/* Custom: Heltonia theme. Palette taken from the HTC client art (burning castle, bronze, embers, arcane portals).
   Part 1 = theme layout and components (.ht-*). Part 2 = dark restyle of the tibiacom markup used by inner pages. */

:root {
    --ht-night: #0d1116;
    --ht-slate: #141a22;
    --ht-slate-2: #1b232e;
    --ht-slate-3: #26313f;
    --ht-line: rgba(200, 150, 62, .28);
    --ht-bronze: #c8963e;
    --ht-bronze-hi: #ecc985;
    --ht-ember: #e0782a;
    --ht-ember-deep: #a9471a;
    --ht-arcane: #8a5cf0;
    --ht-text: #e7e0d3;
    --ht-muted: #a69c8d;
    --ht-ok: #6cc28a;
    --ht-bad: #e06450;
    --ht-display: 'Alegreya SC', 'Palatino Linotype', Georgia, serif;
    --ht-body: 'Alegreya Sans', 'Segoe UI', system-ui, sans-serif;
    --ht-radius-lg: 8px;
    --ht-radius: 5px;
}

/* ============================================================== base */
html { scroll-behavior: smooth; color-scheme: dark; }
.ht a, .ht button, .ht summary, .ht input[type="submit"] { touch-action: manipulation; }
.ht h1, .ht h2, .ht h3 { text-wrap: balance; }
.ht p { text-wrap: pretty; }
.ht-page__content select option { background: var(--ht-slate-2); color: var(--ht-text); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

html, body.ht { min-width: 0 !important; }  /* basic.css forces min-width: 1000px */
body.ht {
    margin: 0;
    min-height: 100vh;
    color: var(--ht-text);
    font-family: var(--ht-body);
    font-size: 16px;
    line-height: 1.55;
    font-variant-numeric: lining-nums;
    background-color: var(--ht-night);
    background-image:
        linear-gradient(180deg, rgba(13, 17, 22, .35) 0, rgba(13, 17, 22, .78) 420px, rgba(13, 17, 22, .94) 900px),
        var(--ht-bg);
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
}

.ht a { color: var(--ht-bronze-hi); text-decoration: none; }
.ht a:hover { color: #fff1cf; text-decoration: underline; text-underline-offset: 3px; }
.ht :focus-visible { outline: 2px solid var(--ht-bronze-hi); outline-offset: 2px; }

.ht-skip {
    position: absolute; left: 12px; top: -48px; z-index: 100;
    padding: 8px 14px; background: var(--ht-ember); color: #fff !important; border-radius: var(--ht-radius);
}
.ht-skip:focus { top: 12px; }

.ht-muted { color: var(--ht-muted); margin: 0; }

/* ============================================================== header */
.ht-header {
    max-width: 1240px;
    margin: 0 auto;
    padding: 34px 16px 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* the one memorable element: emblem + engraved name over the burning castle */
.ht-brand {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    text-decoration: none !important;
}
.ht-brand__emblem { filter: drop-shadow(0 6px 18px rgba(224, 120, 42, .45)); }
.ht-brand__name {
    font-family: var(--ht-display);
    font-weight: 800;
    font-size: clamp(42px, 7vw, 78px);
    letter-spacing: .04em;
    line-height: 1;
    background: linear-gradient(180deg, #fff3cf 0%, #ecc985 38%, #c8963e 62%, #7a5220 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .9)) drop-shadow(0 0 22px rgba(224, 120, 42, .35));
}

.ht-lang {
    position: absolute;
    right: 16px;
    bottom: 22px;
    display: flex;
    gap: 4px;
}
.ht-lang a {
    font-weight: 700; font-size: 13px; padding: 3px 8px; border-radius: var(--ht-radius);
    border: 1px solid var(--ht-line); background: rgba(20, 26, 34, .8); color: var(--ht-muted);
}
.ht-lang a[aria-current] { color: var(--ht-night); background: var(--ht-bronze); border-color: var(--ht-bronze); }

/* ============================================================== layout */
.ht-layout {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px 48px;
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr) 232px;
    gap: 18px;
    align-items: start;
}
.ht-left, .ht-right { display: grid; gap: 14px; }

.ht-panel {
    background: linear-gradient(180deg, rgba(31, 40, 52, .96), rgba(20, 26, 34, .96));
    border: 1px solid var(--ht-line);
    border-radius: var(--ht-radius-lg);
    box-shadow: inset 0 1px 0 rgba(236, 201, 133, .12), 0 10px 30px rgba(0, 0, 0, .35);
}

/* ============================================================== buttons */
.ht-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 16px;
    font-family: var(--ht-body);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.1;
    text-align: center;
    border-radius: var(--ht-radius);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none !important;
}
.ht-btn--ember {
    color: #2a1407 !important;
    background: linear-gradient(180deg, #f5a75a 0%, var(--ht-ember) 55%, #c2601f 100%);
    border-color: #7c3a12;
    box-shadow: inset 0 1px 0 rgba(255, 230, 190, .55), 0 2px 0 #6e3210;
}
.ht-btn--ember:hover { background: linear-gradient(180deg, #ffb873 0%, #ee8a3a 55%, #cf6a26 100%); }
.ht-btn--ember:active { transform: translateY(1px); box-shadow: inset 0 1px 0 rgba(255, 230, 190, .4); }
.ht-btn--quiet {
    color: var(--ht-bronze-hi) !important;
    background: rgba(12, 16, 21, .55);
    border-color: var(--ht-line);
}
.ht-btn--quiet:hover { background: rgba(38, 49, 63, .9); color: #fff1cf !important; }
.ht-btn--outline {
    color: var(--ht-text) !important;
    background: rgba(13, 17, 22, .45);
    border-color: rgba(231, 224, 211, .55);
}
.ht-btn--outline:hover { border-color: #fff; color: #fff !important; }

/* ============================================================== left column */
.ht-account, .ht-download { padding: 14px; display: grid; gap: 10px; }
.ht-download__hint { margin: 0; text-align: center; font-size: 14px; color: var(--ht-muted); }

.ht-menu { padding: 6px; }
.ht-menu__group + .ht-menu__group { border-top: 1px solid rgba(200, 150, 62, .14); }
.ht-menu__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 8px;
    border-radius: var(--ht-radius);
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    color: var(--ht-text);
}
.ht-menu__head::-webkit-details-marker { display: none; }
.ht-menu__head::after {
    content: '+';
    margin-left: auto;
    color: var(--ht-bronze);
    font-weight: 700;
    font-size: 18px;
}
.ht-menu__group[open] > .ht-menu__head::after { content: '\2212'; }
.ht-menu__head:hover { background: rgba(38, 49, 63, .8); }
.ht-menu__head img { image-rendering: pixelated; flex: none; }
.ht-menu__list { list-style: none; margin: 2px 0 8px; padding: 0 0 0 20px; border-left: 1px solid var(--ht-line); margin-left: 23px; }
.ht-menu__list a {
    display: block;
    padding: 5px 10px;
    border-radius: var(--ht-radius);
    color: var(--ht-muted) !important;
    font-size: 15px;
}
.ht-menu__list a:hover { color: var(--ht-text) !important; background: rgba(38, 49, 63, .7); text-decoration: none; }
.ht-menu__list a[aria-current] { color: var(--ht-bronze-hi) !important; background: rgba(200, 150, 62, .12); font-weight: 700; }

/* ============================================================== status bar */
.ht-status {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    margin-bottom: 18px;
}
.ht-status__label { display: block; font-size: 13px; color: var(--ht-muted); line-height: 1.2; }
.ht-status__clock {
    font-family: var(--ht-display);
    font-weight: 700;
    font-size: 26px;
    letter-spacing: .04em;
    color: var(--ht-bronze-hi);
    font-variant-numeric: tabular-nums;
}
.ht-status__event {
    display: block;
    padding: 8px 14px;
    border-radius: var(--ht-radius);
    border: 1px solid var(--ht-line);
    background: rgba(12, 16, 21, .5);
    color: var(--ht-text) !important;
    text-decoration: none !important;
}
.ht-status__event strong { display: block; font-family: var(--ht-display); font-size: 20px; line-height: 1.2; color: var(--ht-muted); }
.ht-status__event.is-active {
    border-color: rgba(138, 92, 240, .7);
    background: linear-gradient(90deg, rgba(138, 92, 240, .32), rgba(138, 92, 240, .08));
    box-shadow: inset 3px 0 0 var(--ht-arcane);
}
.ht-status__event.is-active strong { color: #e9dcff; }
.ht-status__event:hover { border-color: var(--ht-bronze); }
.ht-status__links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ht-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 6px 12px;
    border-radius: var(--ht-radius);
    border: 1px solid var(--ht-line);
    background: rgba(12, 16, 21, .5);
    color: var(--ht-text) !important;
    font-weight: 700;
    white-space: nowrap;
}
.ht-chip:hover { border-color: var(--ht-bronze); text-decoration: none !important; }
.ht-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ht-muted); }
.ht-chip.is-online .ht-dot { background: var(--ht-ok); box-shadow: 0 0 0 3px rgba(108, 194, 138, .2); }
.ht-chip.is-offline .ht-dot { background: var(--ht-bad); }

/* ============================================================== featured article (home) */
.ht-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 18px;
    border: 1px solid var(--ht-line);
    border-radius: var(--ht-radius-lg);
    background: var(--ht-slate);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
}
.ht-hero__body {
    position: relative;
    padding: 46px 40px 40px;
    min-height: 300px;
    background:
        linear-gradient(90deg, rgba(13, 17, 22, .97) 0%, rgba(13, 17, 22, .93) 48%, rgba(13, 17, 22, .45) 72%, rgba(13, 17, 22, .08) 100%),
        var(--ht-hero) center right / cover no-repeat;
}
.ht-hero__kicker { margin: 0 0 6px; color: var(--ht-bronze); font-weight: 700; font-size: 15px; }
.ht-hero__title {
    margin: 0 0 14px;
    font-family: var(--ht-display);
    font-weight: 800;
    font-size: clamp(44px, 6vw, 68px);
    line-height: .95;
    color: #f4ead5;
    text-shadow: 0 3px 0 rgba(0, 0, 0, .6);
}
.ht-hero__text { max-width: 34em; margin: 0 0 24px; font-size: 17px; color: #d8d0c2; }
.ht-hero__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ht-hero__actions .ht-btn { padding: 10px 20px; }

.ht-pillars {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--ht-line);
    background: var(--ht-slate-2);
}
.ht-pillar { padding: 18px 22px 20px; }
.ht-pillar + .ht-pillar { border-left: 1px solid rgba(200, 150, 62, .16); }
.ht-pillar h2 {
    margin: 0 0 6px;
    font-family: var(--ht-display);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.15;
    color: var(--ht-bronze-hi);
}
.ht-pillar p { margin: 0; font-size: 15px; color: var(--ht-muted); }

.ht-systems { padding: 14px 22px 18px; border-top: 1px solid rgba(200, 150, 62, .16); background: var(--ht-slate); }
.ht-systems h2 { margin: 0 0 8px; font-family: var(--ht-display); font-size: 18px; color: var(--ht-text); font-weight: 700; }
.ht-systems ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.ht-systems li {
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid rgba(200, 150, 62, .3);
    font-size: 14px;
    color: var(--ht-muted);
}

/* ============================================================== page */
.ht-page { padding: 18px 20px 22px; }
.ht-page__title {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ht-line);
    font-family: var(--ht-display);
    font-weight: 700;
    font-size: 30px;
    line-height: 1.1;
    color: var(--ht-bronze-hi);
}
.ht-page__content { color: var(--ht-text); }
.ht-footer { margin-top: 18px; text-align: center; font-size: 13px; color: var(--ht-muted); }
.ht-footer a { color: var(--ht-bronze); }

/* ============================================================== right column */
.ht-box { padding: 14px; display: grid; gap: 12px; }
.ht-box__title {
    margin: 0;
    font-family: var(--ht-display);
    font-weight: 700;
    font-size: 21px;
    line-height: 1.1;
    color: var(--ht-bronze-hi);
    text-align: center;
}
.ht-box__title label { margin: 0; cursor: pointer; }

.ht-boosted { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ht-boosted figure { margin: 0; text-align: center; }
.ht-boosted__frame {
    height: 76px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border-radius: var(--ht-radius);
    border: 1px solid rgba(200, 150, 62, .3);
    background: radial-gradient(circle at 50% 70%, rgba(224, 120, 42, .25), rgba(12, 16, 21, .8) 70%);
}
.ht-boosted__frame img { width: auto; height: auto; max-width: 72px; max-height: 72px; image-rendering: pixelated; }
.ht-boosted figcaption { margin-top: 6px; font-size: 14px; font-weight: 700; line-height: 1.2; color: var(--ht-text); }
.ht-boosted figcaption span { display: block; font-weight: 400; font-size: 12px; color: var(--ht-muted); }

.ht-store__body { display: flex; gap: 12px; align-items: center; }
.ht-store__body img { image-rendering: pixelated; flex: none; }
.ht-store__body p { margin: 0; font-size: 15px; color: var(--ht-muted); }

.ht-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: top; }
.ht-top li {
    counter-increment: top;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 4px 6px;
    border-radius: var(--ht-radius);
    background: rgba(12, 16, 21, .45);
    border: 1px solid rgba(200, 150, 62, .14);
}
.ht-top li::before {
    content: counter(top);
    flex: none;
    width: 22px;
    font-family: var(--ht-display);
    font-weight: 700;
    font-size: 18px;
    text-align: center;
    color: var(--ht-bronze);
}
.ht-top li:first-child::before { color: #ffd76a; }
.ht-top__outfit { flex: none; width: 40px; height: 40px; background-size: 64px 64px; background-position: right bottom; background-repeat: no-repeat; }
.ht-top__who { min-width: 0; display: grid; line-height: 1.2; }
.ht-top__who a { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-top__who small { font-size: 12px; color: var(--ht-muted); }
.ht-link { text-align: center; font-weight: 700; font-size: 15px; }

.ht-search { display: grid; gap: 8px; margin: 0; }
.ht-search input {
    min-height: 40px;
    padding: 6px 10px;
    border-radius: var(--ht-radius);
    border: 1px solid var(--ht-line);
    background: rgba(12, 16, 21, .7);
    color: var(--ht-text);
    font: inherit;
}
.ht-search input::placeholder { color: #7d7468; }

.ht-top-btn {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--ht-bronze);
    background: var(--ht-slate-2);
    color: var(--ht-bronze-hi) !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}
.ht-top-btn.is-visible { opacity: 1; pointer-events: auto; }

/* ============================================================== responsive */
@media (max-width: 1120px) {
    .ht-layout { grid-template-columns: 200px minmax(0, 1fr); }
    .ht-right { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}
@media (max-width: 820px) {
    .ht-layout { grid-template-columns: minmax(0, 1fr); }
    .ht-left { grid-template-columns: 1fr 1fr; }
    .ht-menu { grid-column: 1 / -1; }
    .ht-status { grid-template-columns: 1fr; }
    .ht-status__links { justify-content: flex-start; }
    .ht-pillars { grid-template-columns: 1fr; }
    .ht-pillar + .ht-pillar { border-left: 0; border-top: 1px solid rgba(200, 150, 62, .16); }
    .ht-hero__body { padding: 30px 22px; background: linear-gradient(180deg, rgba(13, 17, 22, .55), rgba(13, 17, 22, .95)), var(--ht-hero) center / cover no-repeat; }
    .ht-lang { position: static; margin-left: 16px; }
    .ht-header { justify-content: space-between; }
}
@media (max-width: 520px) {
    .ht-left { grid-template-columns: 1fr; }
    .ht-brand__emblem { width: 52px; height: auto; }
    .ht-page { padding: 14px 12px; }
}

/* ===================================================================================================================
   Part 2: inner pages. They use the tibiacom markup (cream boxes with image frames); turn it into dark slate panels.
   The frame images are set inline (style="background-image:..."), so !important is needed to remove them.
   =================================================================================================================== */
.ht-page__content,
.ht-page__content td,
.ht-page__content th,
.ht-page__content p,
.ht-page__content li,
.ht-page__content div { font-family: var(--ht-body); }
.ht-page__content { font-size: 15px; }
.ht-page__content b, .ht-page__content strong { color: #f3ead8; }

/* wide tables scroll inside the page instead of stretching it on phones */
.ht-page__content { overflow-x: auto; }

/* boxes with caption. basic.css sets font-size: 1px on the containers (it was restored elsewhere in tibiacom) */
.ht .TableContainer, .ht .SmallBox { font-size: 15px; }
.ht .TableContainer table, .ht .TableContainer td, .ht .TableContainer th, .ht .InnerTableContainer,
.ht .SmallBox td { font-size: 15px; line-height: 1.45; }
.ht .TableContainer { margin: 0 0 18px; width: auto; }
.ht .CaptionContainer { width: auto !important; }
.ht .Table1 .InnerTableContainer, .ht .Table2 .InnerTableContainer, .ht .Table3 .InnerTableContainer,
.ht .Table4 .InnerTableContainer, .ht .Table5 .InnerTableContainer { width: auto !important; margin: 0 !important; padding: 8px !important; }
.ht .CaptionContainer { background: none !important; }
.ht .CaptionContainer .CaptionInnerContainer {
    position: relative;
    box-sizing: border-box;
    width: auto !important;
    height: auto;
    background: var(--ht-slate-3) !important;
    border: 1px solid var(--ht-line);
    border-bottom: 0;
    border-radius: var(--ht-radius) var(--ht-radius) 0 0;
    padding: 8px 12px;
}
.ht .CaptionContainer span[class^="Caption"] { display: none !important; }
.ht .CaptionContainer .Text {
    position: static;
    font-family: var(--ht-display) !important;
    font-weight: 700;
    font-size: 18px;
    color: var(--ht-bronze-hi) !important;
    text-shadow: none;
    background: none !important;
}
.ht .Table1, .ht .Table2, .ht .Table3, .ht .Table4, .ht .Table5 {
    background: var(--ht-slate) !important;
    border: 1px solid var(--ht-line) !important;
    border-top: 0 !important;
    border-radius: 0 0 var(--ht-radius) var(--ht-radius);
    color: var(--ht-text);
}
.ht .InnerTableContainer, .ht .TableContentContainer, .ht .TableScrollbarContainer {
    background: transparent !important;
    border: 0 !important;
}
.ht .TableContent, .ht .TableContentAndRightShadow, .ht .TableContentContainer > table {
    background: var(--ht-slate-2) !important;
    border: 1px solid rgba(200, 150, 62, .18) !important;
    border-collapse: collapse;
    color: var(--ht-text);
}
.ht .TableContentAndRightShadow, .ht .TableShadowContainer { background: none !important; border: 0 !important; box-shadow: none !important; }
.ht .TableShadowContainerRightTop, .ht .TableShadowRightTop,
.ht .TableBottomShadow, .ht .TableBottomLeftShadow, .ht .TableBottomRightShadow,
.ht .TableContentAndRightShadow::after { display: none !important; }

/* cream rows (bgcolor attribute or inline style) -> zebra slate */
.ht-page__content tr[bgcolor], .ht-page__content td[bgcolor],
.ht-page__content tr[style*="background"], .ht-page__content td[style*="background-color"] {
    background-color: transparent !important;
}
.ht-page__content table tr:nth-child(odd) > td { background-color: rgba(38, 49, 63, .55); }
.ht-page__content table tr:nth-child(even) > td { background-color: rgba(20, 26, 34, .55); }
.ht-page__content table table tr > td { background-color: transparent; }
.ht-page__content td, .ht-page__content th { border-color: rgba(200, 150, 62, .12) !important; color: var(--ht-text); }
.ht-page__content table tr.Odd > td, .ht-page__content .Odd { background-color: rgba(38, 49, 63, .55) !important; }
.ht-page__content table tr.Even > td, .ht-page__content .Even { background-color: rgba(20, 26, 34, .55) !important; }
.ht .LabelV, .ht .LabelH, .ht .LabelV120, .ht .LabelV150, .ht .LabelV200, .ht td.LabelV, .ht .white {
    background: rgba(38, 49, 63, .95) !important;
    color: var(--ht-bronze-hi) !important;
    font-weight: 700;
}
.ht-page__content .TableContainer table { width: 100%; }

/* headings written by the pages */
.ht-page__content h1, .ht-page__content h2, .ht-page__content h3 {
    font-family: var(--ht-display);
    font-weight: 700;
    color: var(--ht-bronze-hi);
    line-height: 1.15;
    margin: 18px 0 10px;
}
.ht-page__content h1 { font-size: 26px; }
.ht-page__content h2 { font-size: 22px; }
.ht-page__content h3 { font-size: 19px; }

/* text blocks that sit on cream in tibiacom */
.ht-page__content .BoxContent, .ht .BoxContent { background: none !important; color: var(--ht-text); }
.ht-page__content [style*="color: #5A2800"], .ht-page__content [style*="color:#5A2800"],
.ht-page__content [style*="color: black"], .ht-page__content [style*="color:black"],
.ht-page__content font[color="black"], .ht-page__content font[color="#000000"] { color: var(--ht-text) !important; }
.ht-page__content hr { border-color: var(--ht-line); opacity: 1; }

/* generic tibiacom box (news ticker and some pages print it outside the page panel) */
.ht-main > .Box {
    margin: 0 0 18px;
    padding: 12px 14px;
    background: linear-gradient(180deg, rgba(31, 40, 52, .96), rgba(20, 26, 34, .96));
    border: 1px solid var(--ht-line);
    border-radius: var(--ht-radius-lg);
    width: auto;
}
.ht .Box > [class^="Corner"], .ht .Box > .Border_1, .ht .Box > .BorderTitleText, .ht .Box > .CornerWrapper-b,
.ht-main > .Box > img.Title { display: none !important; }
.ht .Border_2, .ht .Border_3 { background: none !important; border: 0 !important; padding: 0 !important; margin: 0 !important; }
.ht-main > .Box .BoxContent { padding: 0 !important; min-height: 0; }
.ht #newsticker .Row { cursor: pointer; }
.ht #newsticker .NewsTickerFullText { display: none; }
.ht #newsticker .Row > div { padding: 6px 8px; border-radius: var(--ht-radius); }
.ht #newsticker .NewsTickerDate { color: var(--ht-bronze); font-weight: 700; margin-right: 6px; }
.ht #newsticker .NewsTickerText { color: var(--ht-text); }

/* news */
.ht .NewsHeadline {
    background: var(--ht-slate-3) !important;
    border: 1px solid var(--ht-line);
    border-radius: var(--ht-radius) var(--ht-radius) 0 0;
}
.ht .NewsHeadlineBackground {
    background: none !important;
    display: flex;
    align-items: center;
    gap: 10px;
    height: auto !important;
    padding: 8px 12px;
}
.ht .NewsHeadlineIcon { position: static !important; float: none !important; margin: 0 !important; }
.ht .NewsHeadlineDate, .ht .NewsHeadlineText { position: static !important; float: none !important; margin: 0 !important; width: auto !important; }
.ht .NewsHeadlineDate { order: 2; margin-left: auto !important; font-size: 13px; color: var(--ht-muted) !important; }
.ht-page__content img[src*="/letters/"] { filter: sepia(1) saturate(1.6) hue-rotate(-12deg) brightness(1.7); vertical-align: bottom; }
.ht .NewsHeadlineText, .ht .NewsHeadlineDate { color: var(--ht-bronze-hi) !important; font-family: var(--ht-body); }
.ht .NewsHeadlineText { font-family: var(--ht-display) !important; font-size: 19px; }
.ht .NewsTable, .ht .NewsTableContainer { background: var(--ht-slate) !important; color: var(--ht-text); }
.ht #NewsTicker, .ht #NewsTicker .Box, .ht .Ticker, .ht #TickerEntry {
    background: var(--ht-slate-2) !important;
    color: var(--ht-text);
}
.ht #news .Box > div[class^="Corner"], .ht #NewsTicker [class^="Corner"], .ht #NewsTicker [class^="Border_"],
.ht #NewsTicker .BorderTitleText, .ht #NewsTicker .Title { display: none !important; }

/* forms */
.ht-page__content input:not([type]), .ht-page__content input[type="text"], .ht-page__content input[type="password"], .ht-page__content input[type="email"],
.ht-page__content input[type="number"], .ht-page__content select, .ht-page__content textarea {
    background: rgba(12, 16, 21, .75) !important;
    border: 1px solid var(--ht-line) !important;
    border-radius: var(--ht-radius);
    color: var(--ht-text) !important;
    padding: 4px 8px;
}
.ht-page__content input:focus, .ht-page__content select:focus, .ht-page__content textarea:focus {
    border-color: var(--ht-bronze) !important;
    outline: none;
    box-shadow: 0 0 0 2px rgba(200, 150, 62, .3);
}
.ht .FormFieldError, .ht .ErrorMessage, .ht .error { color: #ff9b8a !important; }

/* bootstrap bits used by some pages */
.ht .card, .ht .list-group-item, .ht .modal-content { background: var(--ht-slate-2); color: var(--ht-text); border-color: var(--ht-line); }
.ht .table { color: var(--ht-text); }
.ht .alert { border-radius: var(--ht-radius); }

/* ============================================================== buttons of the inner pages
   tibiacom image buttons (BigButton: sbutton.gif blue = neutral, sbutton_green = main action, sbutton_red = danger)
   become theme buttons. Their background images are inline, hence !important. */
.ht .BigButton, .ht .MediumButtonBackground {
    position: relative;
    display: inline-block;
    width: auto !important;
    height: auto !important;
    background: none !important;
    vertical-align: middle;
}
.ht .BigButton > div, .ht .MediumButtonBackground > div { position: static !important; }
.ht .BigButtonOver, .ht .MediumButtonOver { display: none !important; }
.ht .BigButtonText, .ht .MediumButtonText,
.ht-page__content input[type="submit"]:not(.BigButtonText),
.ht-page__content input[type="button"],
.ht-page__content button:not(.ht-btn):not([class*="btn-close"]) {
    position: static !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto !important;
    height: auto !important;
    min-height: 36px;
    min-width: 96px;
    margin: 2px 0;
    padding: 6px 16px !important;
    font-family: var(--ht-body) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.2;
    color: var(--ht-bronze-hi) !important;
    background: linear-gradient(180deg, #2c3846, #1c2430) !important;
    border: 1px solid rgba(200, 150, 62, .55) !important;
    border-radius: var(--ht-radius);
    box-shadow: inset 0 1px 0 rgba(236, 201, 133, .15);
    cursor: pointer;
    text-shadow: none !important;
}
.ht .BigButtonText:hover, .ht .MediumButtonText:hover,
.ht-page__content input[type="submit"]:not(.BigButtonText):hover,
.ht-page__content input[type="button"]:hover,
.ht-page__content button:not(.ht-btn):not([class*="btn-close"]):hover {
    border-color: var(--ht-bronze-hi) !important;
    color: #fff1cf !important;
}
.ht .BigButton[style*="sbutton_green"] .BigButtonText,
.ht .BigButton[style*="sbutton_iagree"] .BigButtonText,
.ht .BigButton[style*="sbutton_login"] .BigButtonText,
.ht .BigButton[data-ht-button="_sbutton_login"] .BigButtonText,
.ht .BigButton[data-ht-button="_sbutton_createcharacter"] .BigButtonText,
.ht .BigButton[data-ht-button="_sbutton_registeraccount"] .BigButtonText,
.ht #createaccount .BigButtonText {
    color: #2a1407 !important;
    background: linear-gradient(180deg, #f5a75a 0%, var(--ht-ember) 55%, #c2601f 100%) !important;
    border-color: #7c3a12 !important;
    box-shadow: inset 0 1px 0 rgba(255, 230, 190, .55), 0 2px 0 #6e3210;
}
.ht .BigButton[style*="sbutton_green"] .BigButtonText:hover { background: linear-gradient(180deg, #ffb873 0%, #ee8a3a 55%, #cf6a26 100%) !important; }
.ht .BigButton[style*="sbutton_red"] .BigButtonText,
.ht .BigButton[data-ht-button="_sbutton_deletecharacter"] .BigButtonText {
    color: #ffe3dc !important;
    background: linear-gradient(180deg, #8a2d22, #5e1a14) !important;
    border-color: #b8473a !important;
}
.ht .BigButtonText:active, .ht-page__content input[type="submit"]:active { transform: translateY(1px); }
.ht .BigButtonText:focus-visible { outline: 2px solid var(--ht-bronze-hi); outline-offset: 2px; }
/* tables of buttons used by the account pages */
.ht-page__content table td > .BigButton, .ht-page__content form > .BigButton { margin: 2px 4px; }

/* ============================================================== character page (characters.html.twig) */
.ht-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hc { display: grid; gap: 16px; }
.hc-admin { margin: 0; display: flex; }
.hc-muted { color: var(--ht-muted); }
.hc-ok { color: var(--ht-ok) !important; font-weight: 700; }
.hc-bad { color: #ff9b8a !important; font-weight: 700; }

.hc-profile {
    overflow: hidden;
    border: 1px solid rgba(200, 150, 62, .55);
    border-radius: var(--ht-radius-lg);
    background: var(--ht-slate);
    box-shadow: inset 0 1px 0 rgba(236, 201, 133, .18);
}
.hc-profile__head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    padding: 22px 24px;
    background:
        linear-gradient(90deg, rgba(20, 26, 34, .96) 0%, rgba(20, 26, 34, .82) 42%, rgba(20, 26, 34, .2) 100%),
        var(--hc-art) center 30% / cover no-repeat;
}
.hc-avatar {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: radial-gradient(circle at 50% 60%, #f1e3c4 0%, #d9c29a 60%, #a8875a 100%);
    border: 3px solid var(--ht-bronze);
    box-shadow: 0 0 0 4px rgba(13, 17, 22, .9), 0 0 0 5px rgba(200, 150, 62, .5), 0 8px 20px rgba(0, 0, 0, .5);
}
.hc-avatar img { width: 128px; height: 128px; max-width: none; image-rendering: pixelated; transform: translate(-16px, -16px); } /* 64x64 outfit, figure in the lower-right corner */
.hc-name {
    margin: 0 !important;
    font-family: var(--ht-display) !important;
    font-size: clamp(30px, 4vw, 42px) !important;
    font-weight: 800 !important;
    line-height: 1.05;
    color: #f4ead5 !important;
    text-shadow: 0 2px 0 rgba(0, 0, 0, .6);
    overflow-wrap: anywhere;
}
.hc-skull { vertical-align: middle; margin-right: 6px; }
.hc-oldname { margin: 4px 0 0; font-size: 14px; color: var(--ht-muted); }
.hc-sub { margin: 6px 0 0; color: #d8ccb6; font-size: 16px; }
.hc-sub__sep { color: var(--ht-bronze); margin: 0 6px; }
.hc-badges { display: grid; gap: 6px; justify-items: end; }
.hc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px;
    border-radius: 999px;
    border: 1px solid rgba(231, 224, 211, .3);
    background: rgba(13, 17, 22, .75);
    font-size: 13px;
    font-weight: 700;
    color: var(--ht-muted);
    white-space: nowrap;
}
.hc-badge--online { color: var(--ht-ok); border-color: rgba(108, 194, 138, .5); }
.hc-badge--online .ht-dot { background: var(--ht-ok); }
.hc-badge--gold { color: var(--ht-night); background: linear-gradient(180deg, #f3d38c, var(--ht-bronze)); border-color: #7a5220; }
.hc-badge--arcane { color: #e9dcff; border-color: rgba(138, 92, 240, .7); background: rgba(138, 92, 240, .25); }

.hc-stats { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1fr; margin: 0; border-top: 1px solid rgba(200, 150, 62, .4); }
.hc-stat { padding: 12px 18px 14px; }
.hc-stat + .hc-stat { border-left: 1px solid rgba(200, 150, 62, .18); }
.hc-stat dt { font-size: 13px; font-weight: 400; color: var(--ht-muted); }
.hc-stat dd { margin: 2px 0 0; font-weight: 700; font-size: 18px; color: var(--ht-text); font-variant-numeric: tabular-nums; }
.hc-stat dd small { display: block; font-weight: 400; font-size: 13px; color: var(--ht-muted); }
.hc-stat dd img { vertical-align: middle; }
.hc-stat--level { background: linear-gradient(180deg, rgba(200, 150, 62, .12), transparent); box-shadow: inset 0 -3px 0 var(--ht-bronze); }
.hc-stat--level dd { font-family: var(--ht-display); font-size: 30px; line-height: 1.1; color: var(--ht-bronze-hi); }

.hc-card {
    border: 1px solid var(--ht-line);
    border-radius: var(--ht-radius-lg);
    background: rgba(20, 26, 34, .85);
    overflow: hidden;
}
.hc-card__title {
    margin: 0 !important;
    padding: 11px 16px !important;
    font-family: var(--ht-display) !important;
    font-size: 19px !important;
    font-weight: 700;
    color: var(--ht-bronze-hi) !important;
    background: var(--ht-slate-3);
    border-bottom: 1px solid var(--ht-line);
    display: flex;
    align-items: center;
    gap: 10px;
}
.hc-count { margin-left: auto; font-family: var(--ht-body); font-size: 14px; font-weight: 400; color: var(--ht-muted); }
.hc-fold > summary { cursor: pointer; list-style: none; }
.hc-fold > summary::-webkit-details-marker { display: none; }
.hc-fold > summary::after { content: "+"; color: var(--ht-bronze); font-family: var(--ht-body); font-size: 20px; margin-left: auto; }
.hc-fold > summary .hc-count + * { margin-left: 0; }
.hc-fold:has(.hc-count) > summary::after { margin-left: 12px; }
.hc-fold:not([open]) > summary { border-bottom: 0; }
.hc-fold[open] > summary::after { content: "\2212"; }
.hc-empty { margin: 0; padding: 14px 16px; color: var(--ht-muted); }
.hc-label { margin: 0 0 8px !important; font-family: var(--ht-body) !important; font-size: 14px !important; font-weight: 700; color: var(--ht-muted) !important; }

.hc-details { display: grid; grid-template-columns: 196px minmax(0, 1fr); }
.hc-inventory { padding: 16px; border-right: 1px solid var(--ht-line); background: rgba(13, 17, 22, .35); }
.hc-slots { display: grid; grid-template-columns: repeat(3, 52px); gap: 6px; justify-content: center; }
.hc-slot {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: var(--ht-radius);
    border: 1px solid rgba(200, 150, 62, .35);
    background: radial-gradient(circle, #2a3442 0%, #161c25 100%);
}
.hc-slot img { width: 40px; height: 40px; image-rendering: pixelated; }
.hc-slot--stat { border-style: dashed; background: transparent; text-align: center; line-height: 1.1; }
.hc-slot--stat span { font-size: 11px; color: var(--ht-muted); }
.hc-slot--stat b { font-size: 14px; color: var(--ht-text); }

.hc-progress { padding: 16px; display: grid; gap: 16px; align-content: start; }
.hc-vitals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hc-vital, .hc-level {
    padding: 10px 12px 12px;
    border-radius: var(--ht-radius);
    border: 1px solid rgba(200, 150, 62, .2);
    background: rgba(13, 17, 22, .45);
}
.hc-vital--health { border-color: rgba(224, 100, 80, .55); }
.hc-vital--mana { border-color: rgba(90, 150, 240, .55); }
.hc-vital__top { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; color: var(--ht-text); }
.hc-vital__top span + span { color: var(--ht-muted); font-weight: 400; }
.hc-vital b { font-size: 22px; font-variant-numeric: tabular-nums; }
.hc-vital small { color: var(--ht-muted); font-size: 14px; }
.hc-bar { height: 7px; margin-top: 8px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.hc-bar span { display: block; height: 100%; border-radius: inherit; }
.hc-vital--health .hc-bar span { background: linear-gradient(90deg, #b8362a, #f07a68); }
.hc-vital--mana .hc-bar span { background: linear-gradient(90deg, #2c62c8, #7fb0ff); }
.hc-bar--exp { height: 9px; }
.hc-bar--exp span { background: linear-gradient(90deg, #a9711f, #ecc985); }
.hc-level__text { margin: 8px 0 0; font-size: 14px; color: var(--ht-muted); }
.hc-level__text b { color: var(--ht-text); }

.hc-skills { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hc-skills li {
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 10px 6px;
    border-radius: var(--ht-radius);
    border: 1px solid rgba(200, 150, 62, .25);
    background: rgba(13, 17, 22, .45);
    text-align: center;
}
.hc-skills img { image-rendering: pixelated; }
.hc-skills span { font-size: 13px; color: var(--ht-muted); line-height: 1.2; }
.hc-skills b { font-size: 20px; color: var(--ht-text); font-variant-numeric: tabular-nums; }

.hc-info { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.hc-info > div { padding: 10px 16px; border-bottom: 1px solid rgba(200, 150, 62, .12); }
.hc-info > div:nth-child(odd):not(.hc-info__wide) { border-right: 1px solid rgba(200, 150, 62, .12); }
.hc-info__wide { grid-column: 1 / -1; }
.hc-info dt { font-size: 13px; font-weight: 400; color: var(--ht-muted); }
.hc-info dd { margin: 2px 0 0; font-weight: 700; color: var(--ht-text); }
.hc-comment { font-weight: 400 !important; overflow-wrap: anywhere; }

.hc-checklist, .hc-achievements, .hc-log { list-style: none; margin: 0; padding: 0; }
.hc-checklist li, .hc-achievements li, .hc-log li {
    display: flex;
    gap: 12px;
    align-items: baseline;
    padding: 8px 16px;
    border-bottom: 1px solid rgba(200, 150, 62, .1);
}
.hc-checklist li b { margin-left: auto; font-size: 13px; color: var(--ht-muted); }
.hc-checklist li.is-done b { color: var(--ht-ok); }
.hc-grade { flex: none; width: 40px; }
.hc-log time { flex: none; width: 140px; font-size: 14px; color: var(--ht-muted); font-variant-numeric: tabular-nums; }
.hc-signature { padding: 14px 16px; display: grid; gap: 10px; }
.hc-signature label { display: grid; gap: 4px; font-size: 14px; color: var(--ht-muted); }

.hc-table-wrap { overflow-x: auto; }
.hc-table { width: 100%; border-collapse: collapse; }
.hc-table th { text-align: left; font-size: 13px; font-weight: 700; color: var(--ht-muted); padding: 8px 16px; background: rgba(13, 17, 22, .4); }
.ht-page__content .hc-table td { padding: 8px 16px; background: transparent !important; border-bottom: 1px solid rgba(200, 150, 62, .1); }
.hc-actions { display: flex; gap: 6px; justify-content: flex-end; }
.hc-actions form { margin: 0; }
.hc-actions .ht-btn { min-height: 32px; padding: 4px 14px; font-size: 14px; }
.ht-page__content .hc .ht-btn { min-width: 0 !important; }

@media (max-width: 760px) {
    .hc-profile__head { grid-template-columns: auto minmax(0, 1fr); }
    .hc-badges { grid-column: 1 / -1; justify-items: start; grid-auto-flow: column; justify-content: start; }
    .hc-stats { grid-template-columns: 1fr 1fr; }
    .hc-stat:nth-child(3) { border-left: 0; }
    .hc-details { grid-template-columns: 1fr; }
    .hc-inventory { border-right: 0; border-bottom: 1px solid var(--ht-line); }
    .hc-vitals, .hc-info { grid-template-columns: 1fr; }
    .hc-info > div:nth-child(odd):not(.hc-info__wide) { border-right: 0; }
    .hc-skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hc-log li { flex-direction: column; gap: 2px; }
}

/* ============================================================== download page (downloadclient.html.twig) */
.hd { display: grid; gap: 16px; }
.hd-note { margin: 0; color: var(--ht-muted); }
.hd-card {
    border: 1px solid var(--ht-line);
    border-radius: var(--ht-radius-lg);
    background: rgba(20, 26, 34, .85);
    overflow: hidden;
}
.hd-launcher {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    padding: 22px 24px;
    border-color: rgba(200, 150, 62, .55);
    background:
        linear-gradient(90deg, rgba(20, 26, 34, .97) 0%, rgba(20, 26, 34, .9) 55%, rgba(20, 26, 34, .6) 100%),
        var(--ht-hero, none) right center / cover no-repeat,
        var(--ht-slate);
    box-shadow: inset 0 1px 0 rgba(236, 201, 133, .18);
}
.hd-launcher__emblem { filter: drop-shadow(0 4px 12px rgba(224, 120, 42, .45)); }
.hd-launcher__title {
    margin: 0 0 6px !important;
    font-family: var(--ht-display) !important;
    font-size: clamp(26px, 3.4vw, 34px) !important;
    font-weight: 800 !important;
    color: #f4ead5 !important;
}
.hd-launcher__text p { margin: 0; max-width: 34em; color: #d8ccb6; }
.hd-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px !important; }
.hd-meta span {
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid rgba(200, 150, 62, .3);
    font-size: 13px;
    color: var(--ht-muted);
}
.hd-launcher__cta { min-height: 52px; padding: 10px 20px; font-size: 17px; white-space: nowrap; }
.hd-launcher__cta small {
    margin-left: 4px;
    padding: 1px 7px;
    border-radius: 4px;
    border: 1px solid rgba(42, 20, 7, .4);
    font-size: 12px;
    font-weight: 700;
}

.hd-steps { list-style: none; margin: 0; padding: 18px 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: step; }
.hd-steps li { counter-increment: step; position: relative; padding: 12px 14px 14px 52px; border-radius: var(--ht-radius); border: 1px solid rgba(200, 150, 62, .2); background: rgba(13, 17, 22, .45); }
.hd-steps li::before {
    content: counter(step);
    position: absolute;
    left: 12px;
    top: 12px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--ht-bronze);
    font-family: var(--ht-display);
    font-weight: 700;
    color: var(--ht-bronze-hi);
}
.hd-steps h4, .hd-help h4 { margin: 0 0 4px !important; font-family: var(--ht-body) !important; font-size: 16px !important; font-weight: 700; color: var(--ht-text) !important; }
.hd-steps p, .hd-help p { margin: 0; font-size: 15px; color: var(--ht-muted); }
.hd code { padding: 1px 5px; border-radius: 4px; background: rgba(13, 17, 22, .7); color: var(--ht-bronze-hi); font-size: 13px; }
.hd-help { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; padding: 16px; }
.hd-help__more { margin: 0; padding: 12px 16px; border-top: 1px solid rgba(200, 150, 62, .15); color: var(--ht-muted); }
.hd-help__more a { font-weight: 700; }
.hd-disclaimer { margin: 0; font-size: 13px; color: #7d7468; }

@media (max-width: 760px) {
    .hd-launcher { grid-template-columns: auto minmax(0, 1fr); }
    .hd-launcher__cta { grid-column: 1 / -1; }
    .hd-steps, .hd-help { grid-template-columns: 1fr; }
}

/* ============================================================== highscores (highscores.html.twig) */
.hs { display: grid; gap: 16px; }
.hs-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    border: 1px solid rgba(200, 150, 62, .55);
    border-radius: var(--ht-radius-lg);
    background:
        linear-gradient(90deg, rgba(20, 26, 34, .97) 0%, rgba(20, 26, 34, .88) 50%, rgba(20, 26, 34, .45) 100%),
        var(--ht-hero, none) right 30% / cover no-repeat,
        var(--ht-slate);
    box-shadow: inset 0 1px 0 rgba(236, 201, 133, .18);
}
.hs-hero__icon {
    flex: none;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 2px solid var(--ht-bronze);
    background: radial-gradient(circle at 50% 40%, #2c3746, var(--ht-night));
    box-shadow: 0 0 0 4px rgba(13, 17, 22, .85), 0 0 18px rgba(224, 120, 42, .35);
}
.hs-hero__icon img { width: 40px; height: 40px; image-rendering: pixelated; }
.hs-hero__title {
    margin: 0 !important;
    font-family: var(--ht-display) !important;
    font-size: clamp(28px, 4vw, 38px) !important;
    font-weight: 800 !important;
    line-height: 1.05;
    color: #f4ead5 !important;
    text-shadow: 0 2px 0 rgba(0, 0, 0, .6);
}
.hs-hero__sub { margin: 4px 0 0; color: #d8ccb6; }

.hs-filters {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--ht-line);
    border-radius: var(--ht-radius-lg);
    background: rgba(20, 26, 34, .85);
}
.hs-group { display: grid; gap: 8px; }
.hs-group + .hs-group { padding-top: 14px; border-top: 1px solid rgba(200, 150, 62, .15); }
.ht-page__content .hs-label { margin: 0; font-family: var(--ht-body); font-size: 14px; font-weight: 700; color: var(--ht-muted); }
.hs-cats { display: grid; gap: 8px; }
.hs-cats--main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hs-cats--skills { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ht .hs-cat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 6px 10px;
    border: 1px solid rgba(200, 150, 62, .25);
    border-radius: var(--ht-radius);
    background: rgba(13, 17, 22, .55);
    color: var(--ht-text);
    font-weight: 700;
    transition: border-color .15s, background-color .15s;
}
.hs-cats--skills .hs-cat { flex-direction: column; gap: 2px; min-height: 64px; font-size: 14px; }
.hs-cat img { image-rendering: pixelated; }
.ht .hs-cat:hover { border-color: var(--ht-bronze); background: rgba(38, 49, 63, .8); color: #fff; text-decoration: none; }
.ht .hs-cat.is-active {
    border-color: var(--ht-bronze-hi);
    background: linear-gradient(180deg, rgba(200, 150, 62, .32), rgba(200, 150, 62, .12));
    color: #fff1cf;
    box-shadow: inset 0 0 0 1px rgba(236, 201, 133, .35);
}
.hs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ht .hs-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 4px 14px;
    border: 1px solid rgba(200, 150, 62, .25);
    border-radius: 999px;
    background: rgba(13, 17, 22, .55);
    color: var(--ht-text);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}
.ht .hs-chip:hover { border-color: var(--ht-bronze); color: #fff; text-decoration: none; }
.ht .hs-chip.is-active { border-color: var(--ht-bronze-hi); background: rgba(200, 150, 62, .25); color: #fff1cf; }
.ht .hs-chip.is-disabled { opacity: .4; cursor: default; }

.hs-board {
    border: 1px solid var(--ht-line);
    border-radius: var(--ht-radius-lg);
    background: rgba(20, 26, 34, .85);
    overflow: hidden;
}
.hs-board__head, .hs-board__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 16px;
}
.hs-board__head { background: var(--ht-slate-3); border-bottom: 1px solid var(--ht-line); }
.hs-board__foot { border-top: 1px solid rgba(200, 150, 62, .15); }
.ht-page__content .hs-board__title { margin: 0; font-size: 19px; }
.hs-board__foot p { margin: 0; font-size: 13px; color: var(--ht-muted); }
.hs-pager { display: flex; align-items: center; gap: 8px; }
.hs-pager__page { font-size: 14px; color: var(--ht-muted); }

.ht-page__content .hs-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ht-page__content .hs-table th {
    padding: 8px 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: var(--ht-muted);
    border-bottom: 1px solid rgba(200, 150, 62, .2) !important;
    background: rgba(13, 17, 22, .35);
}
.ht-page__content .hs-table tr:nth-child(n) > td {
    padding: 8px 12px;
    background: transparent;
    border-bottom: 1px solid rgba(200, 150, 62, .1) !important;
    vertical-align: middle;
}
.ht-page__content .hs-table tbody tr:hover > td { background: rgba(38, 49, 63, .55); }
.ht-page__content .hs-table .hs-num { text-align: right; white-space: nowrap; }
.hs-col-rank { width: 64px; }
.hs-rank {
    display: inline-grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 4px;
    border-radius: 6px;
    font-family: var(--ht-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--ht-muted);
}
.hs-podium .hs-rank { color: #1a1206; border: 1px solid rgba(0, 0, 0, .35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45); }
.hs-podium--1 .hs-rank { background: linear-gradient(180deg, #ffe7a3, #d9a53e); }
.hs-podium--2 .hs-rank { background: linear-gradient(180deg, #f1f3f6, #a9b0ba); }
.hs-podium--3 .hs-rank { background: linear-gradient(180deg, #f2c9a3, #b0703d); }
.hs-char { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hs-avatar {
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(200, 150, 62, .35);
    background-color: rgba(13, 17, 22, .6);
    background-size: 64px 64px;
    background-position: right bottom;
    background-repeat: no-repeat;
    image-rendering: pixelated;
}
.hs-podium .hs-avatar { border-color: var(--ht-bronze); }
.hs-char__who { display: grid; min-width: 0; line-height: 1.25; }
.hs-char__who a { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.hs-char__who small { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ht-muted); }
.hs-online { display: inline-flex; align-items: center; gap: 4px; color: var(--ht-ok); font-weight: 700; }
.hs-online::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ht-ok); box-shadow: 0 0 6px rgba(108, 194, 138, .8); }
.ht-page__content .hs-value { font-family: var(--ht-display); font-size: 19px; font-weight: 700; color: var(--ht-bronze-hi) !important; }
.ht-page__content .hs-dim { color: var(--ht-muted) !important; }
.hs-empty { margin: 0; padding: 24px 16px; color: var(--ht-muted); }

@media (max-width: 760px) {
    .hs-hero { padding: 16px; }
    .hs-cats--skills { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .hs-col-rank { width: 48px; }
    .ht-page__content .hs-table th, .ht-page__content .hs-table tr:nth-child(n) > td { padding: 8px 6px; }
    .hs-avatar { width: 40px; height: 40px; }
}
@media (max-width: 520px) {
    .ht-page__content .hs-table th:nth-child(3), .ht-page__content .hs-table tr:nth-child(n) > td:nth-child(3) { display: none; }
    .hs-board__foot { justify-content: center; }
}

/* ============================================================== event schedule (eventcalendar.html.twig) */
.he { display: grid; gap: 16px; }
.he-card {
    border: 1px solid var(--ht-line);
    border-radius: var(--ht-radius-lg);
    background: rgba(20, 26, 34, .85);
    overflow: hidden;
}
.he-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--ht-slate-3);
    border-bottom: 1px solid var(--ht-line);
}
.ht-page__content .he-month { margin: 0; min-width: 9ch; font-size: 26px; text-align: center; color: #f4ead5; }
.ht .he-nav {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(200, 150, 62, .35);
    color: var(--ht-bronze-hi);
}
.ht .he-nav:hover { border-color: var(--ht-bronze-hi); background: rgba(200, 150, 62, .18); text-decoration: none; }
.he-today-link { margin-left: auto; }

.ht-page__content .he-cal { width: 100%; table-layout: fixed; border-collapse: collapse; }
.ht-page__content .he-cal th {
    padding: 8px 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ht-muted);
    text-align: center;
    background: rgba(13, 17, 22, .35);
    border-bottom: 1px solid rgba(200, 150, 62, .2) !important;
}
.he-cal abbr { text-decoration: none; }
.ht-page__content .he-cal tr:nth-child(n) > td.he-day {
    height: 96px;
    padding: 6px;
    vertical-align: top;
    background: rgba(26, 34, 45, .9);
    border: 1px solid rgba(200, 150, 62, .1) !important;
}
.ht-page__content .he-cal tr:nth-child(n) > td.he-day.is-blank { background: rgba(13, 17, 22, .5); }
.ht-page__content .he-cal tr:nth-child(n) > td.he-day.is-past { background: rgba(20, 26, 34, .7); }
.he-day.is-past .he-day__num { color: #6f685e; }
.ht-page__content .he-cal tr:nth-child(n) > td.he-day.is-today {
    background: linear-gradient(180deg, rgba(224, 120, 42, .22), rgba(26, 34, 45, .9) 70%);
    box-shadow: inset 0 0 0 2px var(--ht-ember);
}
.he-day__num { display: block; margin-bottom: 4px; font-family: var(--ht-display); font-size: 17px; font-weight: 700; color: var(--ht-text); }
.he-day.is-today .he-day__num { color: #ffd1a8; }
.he-chip {
    display: block;
    margin-top: 3px;
    padding: 2px 6px;
    border-left: 3px solid var(--he-color);
    border-radius: 3px;
    background: color-mix(in srgb, var(--he-color) 45%, rgba(13, 17, 22, .6));
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: help;
}

.he-events { list-style: none; margin: 0; padding: 12px 16px; display: grid; gap: 10px; }
.he-event { padding: 10px 12px; border-left: 4px solid var(--he-color); border-radius: var(--ht-radius); background: rgba(13, 17, 22, .45); }
.he-event__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.he-event__head strong { font-size: 16px; }
.he-event__range { font-size: 14px; color: var(--ht-bronze-hi); white-space: nowrap; }
.he-event p { margin: 4px 0 0; color: var(--ht-muted); font-size: 15px; }
.he-empty { margin: 0; padding: 18px 16px; color: var(--ht-muted); }
.he-note { margin: 0; font-size: 13px; color: var(--ht-muted); }

@media (max-width: 640px) {
    .he-head { padding: 10px; gap: 8px; }
    .ht-page__content .he-month { font-size: 21px; min-width: 0; }
    .ht-page__content .he-cal tr:nth-child(n) > td.he-day { height: 56px; padding: 4px; }
    .he-day__num { font-size: 15px; }
    /* on phones the cells only show a coloured dot per event; the list below has the details */
    .he-chip { display: inline-block; width: 8px; height: 8px; margin: 2px 2px 0 0; padding: 0; border: 0; border-radius: 50%; background: var(--he-color); font-size: 0; }
}

/* ============================================================== buy coins + coin terms (buycoins / coinsterms twig) */
.hb { display: grid; gap: 16px; }
.hb-card {
    border: 1px solid var(--ht-line);
    border-radius: var(--ht-radius-lg);
    background: rgba(20, 26, 34, .85);
    overflow: hidden;
}
.hb-pad { padding: 18px 20px; }
.ht-page__content .hb-title { margin: 0; font-size: 24px; color: #f4ead5; }
.hb-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    padding: 14px 20px;
    background: var(--ht-slate-3);
    border-bottom: 1px solid var(--ht-line);
}
.hb-balance { margin: 0; color: var(--ht-muted); }
.hb-balance b { color: var(--ht-bronze-hi); font-family: var(--ht-display); font-size: 20px; }

.hb-banner {
    margin: 0;
    padding: 12px 16px;
    border-radius: var(--ht-radius);
    border: 1px solid rgba(200, 150, 62, .35);
    background: rgba(38, 49, 63, .85);
}
.hb-banner--ok { border-color: rgba(108, 194, 138, .6); background: rgba(108, 194, 138, .14); }
.hb-banner--warn { border-color: rgba(224, 120, 42, .6); background: rgba(224, 120, 42, .14); }
.hb-banner--bad { border-color: rgba(224, 100, 80, .6); background: rgba(224, 100, 80, .14); }
.hb-banner--test { border-style: dashed; color: #ffd1a8; }

.hb-form { display: grid; gap: 18px; padding: 18px 20px 20px; }
.hb-packages { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.hb-package { position: relative; cursor: pointer; }
.hb-package input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.hb-package__body {
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 16px 8px 14px;
    border: 1px solid rgba(200, 150, 62, .25);
    border-radius: var(--ht-radius);
    background: rgba(13, 17, 22, .55);
    text-align: center;
    transition: border-color .15s, background-color .15s;
}
.hb-package:hover .hb-package__body { border-color: var(--ht-bronze); }
.hb-package input:checked + .hb-package__body {
    border-color: var(--ht-bronze-hi);
    background: linear-gradient(180deg, rgba(200, 150, 62, .3), rgba(200, 150, 62, .1));
    box-shadow: inset 0 0 0 1px rgba(236, 201, 133, .35);
}
.hb-package input:focus-visible + .hb-package__body { outline: 2px solid var(--ht-bronze-hi); outline-offset: 2px; }
.hb-package__coins { font-family: var(--ht-display); font-size: 26px; font-weight: 800; line-height: 1.1; color: #f4ead5; font-variant-numeric: tabular-nums; }
.hb-package__label { font-size: 13px; color: var(--ht-muted); }
.hb-package__price { margin-top: 6px; font-size: 18px; font-weight: 700; color: var(--ht-bronze-hi); }
.hb-package__bonus { margin-top: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--ht-night); background: linear-gradient(180deg, #f3d38c, var(--ht-bronze)); }

.hb-consent { display: grid; gap: 10px; }
.hb-check { display: flex; align-items: flex-start; gap: 10px; color: #d8ccb6; cursor: pointer; }
.hb-check input { flex: none; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--ht-ember); }
.hb-pay { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.hb-pay__btn { min-height: 50px; padding: 10px 26px; font-size: 17px; }
.hb-pay p { flex: 1 1 260px; margin: 0; font-size: 14px; color: var(--ht-muted); }

.ht-page__content .hb-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ht-page__content .hb-table th { padding: 8px 12px; text-align: left; font-size: 13px; color: var(--ht-muted); background: rgba(13, 17, 22, .35); }
.ht-page__content .hb-table tr:nth-child(n) > td { padding: 8px 12px; background: transparent; border-bottom: 1px solid rgba(200, 150, 62, .1) !important; }
.ht-page__content .hb-table .hs-num { text-align: right; }
.hb-status { padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid rgba(231, 224, 211, .25); color: var(--ht-muted); }
.hb-status--completed { color: var(--ht-ok); border-color: rgba(108, 194, 138, .5); }
.hb-status--pending { color: #ffd1a8; border-color: rgba(224, 120, 42, .5); }
.hb-status--refunded, .hb-status--reversed, .hb-status--disputed, .hb-status--failed, .hb-status--mismatch { color: #ff9b8a; border-color: rgba(224, 100, 80, .5); }

.hb-terms__meta { margin: 0; font-size: 14px; color: var(--ht-muted); }
.hb-terms h3 { margin: 18px 0 6px !important; font-size: 18px !important; }
.hb-terms p { margin: 0; max-width: 72ch; color: #d8ccb6; }

@media (max-width: 760px) {
    .hb-packages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hb-head, .hb-form, .hb-pad { padding-left: 14px; padding-right: 14px; }
}

/* ============================================================== support tickets (tickets.html.twig) */
.tk-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 20px 0; }
.tk .hb-table { margin-top: 10px; }
.ht-page__content .tk .hb-table tr.tk-waiting > td { background: rgba(224, 120, 42, .10); }
.tk-count { color: var(--ht-muted); }
.tk-status--open { color: #ffd1a8; border-color: rgba(224, 120, 42, .5); }
.tk-status--answered { color: var(--ht-ok); border-color: rgba(108, 194, 138, .5); }
.tk-status--closed { color: var(--ht-muted); }
.tk-meta { margin: 0; padding: 12px 20px 0; font-size: 14px; color: var(--ht-muted); }
.tk-field { display: grid; gap: 6px; }
.tk-field > span { font-size: 14px; font-weight: 700; color: var(--ht-muted); }
.tk-field input, .tk-field select, .tk-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 11px;
    border: 1px solid rgba(200, 150, 62, .3);
    border-radius: var(--ht-radius);
    background: rgba(13, 17, 22, .7);
    color: var(--ht-text);
    font: inherit;
}
.tk-field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.tk-field input:focus-visible, .tk-field select:focus-visible, .tk-field textarea:focus-visible { outline: 2px solid var(--ht-bronze-hi); outline-offset: 1px; }
.tk-thread { list-style: none; margin: 0; padding: 14px 20px; display: grid; gap: 10px; }
.tk-msg { padding: 10px 14px; border-left: 3px solid rgba(231, 224, 211, .25); border-radius: var(--ht-radius); background: rgba(13, 17, 22, .45); }
.tk-msg--staff { border-left-color: var(--ht-bronze); background: rgba(200, 150, 62, .08); }
.tk-msg__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-bottom: 4px; }
.tk-msg__head time { margin-left: auto; font-size: 13px; color: var(--ht-muted); }
.tk-badge { padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--ht-night); background: linear-gradient(180deg, #f3d38c, var(--ht-bronze)); }
.tk-msg__body { color: #d8ccb6; overflow-wrap: anywhere; }
.tk-reply { padding-top: 0; }
.tk-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 0 20px 18px; }
.tk-actions form { margin: 0; }
.tk-actions button.hs-chip { cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; }
.tk-field[hidden] { display: none; }
.tk-field > span small { font-weight: 400; color: #7d7468; }

/* ============================================================== account management (account.management.html.twig) */
.ha-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px 24px;
    padding: 20px 22px;
    background:
        radial-gradient(120% 140% at 100% 0, rgba(138, 92, 240, .16), transparent 55%),
        linear-gradient(180deg, rgba(38, 49, 63, .9), rgba(20, 26, 34, .9));
}
.ha-hero__who { display: grid; gap: 6px; min-width: 0; }
.ht-page__content .ha-hero__kicker { margin: 0; font-size: 14px; color: var(--ht-muted); }
.ht-page__content .ha-hero .hb-title { font-size: 30px; overflow-wrap: anywhere; }
.ha-status { display: flex; align-items: center; gap: 10px; margin: 4px 0 0; }
.ha-status img { flex: none; }
.ha-status span { display: grid; line-height: 1.25; }
.ha-status b { font-size: 18px; }
.ha-status small { font-size: 14px; color: var(--ht-muted); }
.ha-status--premium b { color: var(--ht-ok); }
.ha-status--free b { color: #ff9b8a; }

.ha-coins { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 10px; margin: 0; align-self: start; }
.ha-coin {
    display: grid;
    gap: 2px;
    padding: 10px 14px;
    border: 1px solid rgba(231, 224, 211, .14);
    border-left-width: 3px;
    border-radius: var(--ht-radius);
    background: rgba(13, 17, 22, .55);
}
.ha-coin dt { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ht-muted); }
.ha-coin dd { margin: 0; font-family: var(--ht-display); font-size: 26px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; color: #f4ead5; }
.ha-coin--heltonia { border-left-color: var(--ht-arcane); }
.ha-coin--heltonia dd { color: #cdb6ff; }
.ha-coin--online { border-left-color: #e8c04a; }
.ha-coin--online dd { color: #f3d98a; }

.ha-hero__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.ha-hero__actions form { margin: 0 0 0 auto; }
.ht-page__content .ha .ht-btn { min-width: 0 !important; }
.ha .ha-small { min-height: 34px; padding: 4px 14px; font-size: 14px; }

.ha-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.ha-notice p { flex: 1 1 320px; margin: 0; }
.ha-notice form, .hb-head form { margin: 0; }

.ha-chars { list-style: none; margin: 0; padding: 6px 0; }
.ha-char {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    padding: 10px 20px;
    border-bottom: 1px solid rgba(200, 150, 62, .1);
}
.ha-char:last-child { border-bottom: 0; }
.ha-char:hover { background: rgba(200, 150, 62, .05); }
.ha-char.is-deleted { opacity: .6; }
.ha-char__who { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; }
.ha-char__who small { flex-basis: 100%; font-size: 14px; color: var(--ht-muted); }
.ht-page__content .ha-char__name { font-family: var(--ht-display); font-size: 19px; font-weight: 700; color: #f4ead5; }
.ha-online { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ht-muted); }
.ha-online::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #5d5850; }
.ha-online.is-on { color: var(--ht-ok); }
.ha-online.is-on::before { background: var(--ht-ok); box-shadow: 0 0 6px var(--ht-ok); }
.ha-char__links { display: flex; gap: 12px; font-size: 14px; }

.ha-tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid rgba(200, 150, 62, .1); }
.ha-tools form { margin: 0; }
.ht-page__content .ha button.hs-chip { cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; min-width: 0; }

.ha-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.ha-grid .hb-card { display: flex; flex-direction: column; height: 100%; }
.ha-grid .ha-tools { margin-top: auto; }
.ha-list { margin: 0; padding: 8px 20px 12px; }
.ha-list > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(200, 150, 62, .08); }
.ha-list > div:last-child { border-bottom: 0; }
.ha-list dt { font-size: 14px; color: var(--ht-muted); }
.ha-list dd { margin: 0; overflow-wrap: anywhere; }
.ha-ok { color: var(--ht-ok); font-weight: 700; }
.ha-bad { color: #ff9b8a; font-weight: 700; }

.ha-logs > summary { cursor: pointer; list-style: none; border-bottom: 0; }
.ha-logs > summary::-webkit-details-marker { display: none; }
.ha-logs > summary small { color: var(--ht-muted); }
.ha-logs > summary::after { content: "Show"; margin-left: auto; font-size: 14px; font-weight: 700; color: var(--ht-bronze-hi); }
.ha-logs[open] > summary { border-bottom: 1px solid var(--ht-line); }
.ha-logs[open] > summary::after { content: "Hide"; }

@media (max-width: 760px) {
    .ha-hero { grid-template-columns: minmax(0, 1fr); padding: 16px 14px; }
    .ha-hero__actions form { margin-left: 0; }
    .ha-grid { grid-template-columns: minmax(0, 1fr); }
    .ha-char { grid-template-columns: auto minmax(0, 1fr); padding: 10px 14px; }
    .ha-online, .ha-char__links { grid-column: 2; }
    .ha-list > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .ha-tools { padding-left: 14px; padding-right: 14px; }
}

/* ============================================================== character market (charactermarket.html.twig) */
.cm-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ht-page__content .cm-balance { margin: 0 0 0 auto; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ht-muted); }
.cm-price { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: #cdb6ff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cm-left { font-size: 14px; color: var(--ht-muted); }
.cm-note { margin: 6px 0 0; font-size: 14px; color: var(--ht-muted); }

.cm-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.cm-filters select, .cm-filters input {
    min-height: 34px; padding: 4px 10px; box-sizing: border-box;
    border: 1px solid rgba(200, 150, 62, .3); border-radius: var(--ht-radius);
    background: rgba(13, 17, 22, .7); color: var(--ht-text); font: inherit; font-size: 14px;
}
.cm-filters input { width: 110px; }
.ht-page__content .cm button.hs-chip { cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; min-width: 0; }

.cm-grid { list-style: none; margin: 0; padding: 16px 20px 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.cm-card { position: relative; }
.ht-page__content .cm-card__link {
    display: grid; justify-items: center; gap: 2px; height: 100%; box-sizing: border-box;
    padding: 12px 12px 10px; text-align: center; color: var(--ht-text);
    border: 1px solid rgba(200, 150, 62, .22); border-radius: var(--ht-radius-lg);
    background: linear-gradient(180deg, rgba(38, 49, 63, .75), rgba(13, 17, 22, .6));
    transition: border-color .15s, transform .15s;
}
.ht-page__content .cm-card__link:hover { border-color: var(--ht-bronze-hi); text-decoration: none; color: var(--ht-text); }
.cm-card__outfit { width: 80px; height: 80px; background-repeat: no-repeat; background-position: right bottom; background-size: 64px 64px; image-rendering: pixelated; }
.cm-card__name { font-family: var(--ht-display); font-size: 18px; font-weight: 700; color: #f4ead5; overflow-wrap: anywhere; }
.cm-card__meta { font-size: 14px; color: var(--ht-muted); }
.cm-card__foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 2px 10px; margin-top: 6px; padding-top: 8px; border-top: 1px solid rgba(200, 150, 62, .15); width: 100%; }
.cm-card__mine { position: absolute; top: 8px; right: 8px; }

.cm-detail__hero {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px 22px; padding: 20px 22px;
    background: radial-gradient(120% 140% at 100% 0, rgba(138, 92, 240, .16), transparent 55%), linear-gradient(180deg, rgba(38, 49, 63, .9), rgba(20, 26, 34, .9));
    border-bottom: 1px solid var(--ht-line);
}
.cm-detail__outfit { width: 96px; height: 96px; border-radius: 50%; border: 1px solid var(--ht-bronze); background-color: rgba(13, 17, 22, .6); background-repeat: no-repeat; background-position: right bottom; background-size: 80px 80px; }
.cm-detail__who p { margin: 2px 0 0; }
.ht-page__content .cm-detail .hb-title { font-size: 30px; overflow-wrap: anywhere; }
.cm-buy { display: grid; justify-items: end; gap: 8px; }
.cm-buy form { margin: 0; }
.cm-buy__price { margin: 0; }
.cm-buy__price .cm-price { font-family: var(--ht-display); font-size: 28px; }
.cm-buy__price .cm-price img { width: 18px; height: 18px; }
.cm-buy .ht-btn { min-width: 160px !important; }
.cm-buy .ht-btn[disabled] { opacity: .45; cursor: not-allowed; }

.cm-detail__body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.cm-detail__body > section { padding: 14px 20px 18px; border-right: 1px solid rgba(200, 150, 62, .1); }
.cm-detail__body > section:last-child { border-right: 0; }
.ht-page__content .cm-detail__body h3 { margin: 0 0 6px !important; font-size: 18px !important; }
.cm-detail__body .ha-list { padding: 0; }
.cm-detail__body .ha-list > div { grid-template-columns: 110px minmax(0, 1fr); }
.cm-skills { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; }
.cm-skills > div { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid rgba(200, 150, 62, .08); }
.cm-skills dt { color: var(--ht-muted); font-size: 14px; }
.cm-skills dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.cm-eq { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 40px); gap: 6px; }
.cm-eq li { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(200, 150, 62, .2); border-radius: var(--ht-radius); background: rgba(13, 17, 22, .6); }

.cm-pick { margin: 0; padding: 0; border: 0; display: grid; gap: 6px; }
.cm-pick legend { margin-bottom: 6px; }
.cm-pick__row {
    display: flex; align-items: center; gap: 12px; padding: 9px 12px; cursor: pointer;
    border: 1px solid rgba(200, 150, 62, .22); border-radius: var(--ht-radius); background: rgba(13, 17, 22, .5);
}
.cm-pick__row:has(input:checked) { border-color: var(--ht-bronze-hi); background: rgba(200, 150, 62, .14); }
.cm-pick__row input { width: 18px; height: 18px; accent-color: var(--ht-ember); }
.cm-pick__row small { color: var(--ht-muted); }
.cm-pick__row em { margin-left: auto; font-style: normal; font-size: 13px; color: #ff9b8a; }
.cm-pick__row.is-off { cursor: not-allowed; opacity: .6; }
.cm-price-field { max-width: 320px; }
.cm-rules { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: #d8ccb6; }
.cm-rules b { color: var(--ht-bronze-hi); }

.cm .hb-table form { margin: 0; }
.cm-status--active { color: #cdb6ff; border-color: rgba(138, 92, 240, .55); }
.cm-status--sold { color: var(--ht-ok); border-color: rgba(108, 194, 138, .5); }
.cm-status--expired, .cm-status--withdrawn { color: var(--ht-muted); }

@media (max-width: 760px) {
    .ht-page__content .cm-balance { margin-left: 0; flex-basis: 100%; }
    .cm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 14px; }
    .cm-detail__hero { grid-template-columns: auto minmax(0, 1fr); padding: 16px 14px; }
    .cm-buy { grid-column: 1 / -1; justify-items: start; }
    .cm-detail__body { grid-template-columns: minmax(0, 1fr); }
    .cm-detail__body > section { border-right: 0; border-bottom: 1px solid rgba(200, 150, 62, .1); padding: 12px 14px; }
}
