:root {
    color-scheme: dark;
    --bg: #090e13;
    --side: #0c1418;
    --panel: #111c20;
    --panel2: #142328;
    --border: #25383a;
    --text: #e9f2ef;
    --muted: #8da6a6;
    --green: #4bc88e;
    --green2: #1e654a
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: radial-gradient(ellipse at 75% 0%, #11251d 0%, transparent 38%), var(--bg);
    color: var(--text);
    font: 14px/1.5 system-ui, -apple-system, Segoe UI, sans-serif
}

button,
input,
select {
    font: inherit
}

button {
    cursor: pointer
}

button:disabled {
    cursor: default
}

.shell {
    min-height: 100vh;
    display: flex
}

.sidebar {
    width: 258px;
    flex-shrink: 0;
    background: var(--side);
    border-right: 1px solid var(--border);
    padding: 28px 16px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh
}

.brand {
    display: flex;
    gap: 11px;
    align-items: center;
    padding: 0 8px 34px
}

.brandmark,
.auth-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid #418969;
    border-radius: 12px;
    color: #7de6a9;
    background: #183529;
    font-size: 23px
}

.brand strong {
    font-size: 15px;
    letter-spacing: -.5px
}

.brand strong span {
    color: var(--green)
}

.brand small {
    display: block;
    font-size: 9px;
    color: var(--muted);
    letter-spacing: 1.7px;
    margin-top: 3px
}

.nav-label {
    color: #63877d;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.6px;
    margin: 10px 14px 12px
}

.nav {
    width: 100%;
    display: flex;
    gap: 12px;
    align-items: center;
    text-align: left;
    background: none;
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 12px 14px;
    color: #9bb1b0;
    font-weight: 600;
    margin-bottom: 4px
}

.nav span {
    flex: 1
}

.nav.active {
    background: #18362a;
    border-color: #2e664e;
    color: #85e8b1
}

.nav:not(:disabled):hover {
    background: #1b2b2b
}

.nav.muted {
    opacity: .55
}

.nav i {
    font-size: 10px;
    font-weight: 400
}

.sidebottom {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding: 20px 10px 0;
    display: flex;
    gap: 11px;
    align-items: center
}

.sidebottom strong {
    display: block;
    font-size: 12px
}

.sidebottom small {
    display: block;
    color: var(--muted);
    font-size: 11px
}

.online-dot {
    height: 9px;
    width: 9px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--green)
}

.main {
    min-width: 0;
    flex: 1
}

.topbar {
    height: 72px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background: #0d1719a8
}

.breadcrumb {
    color: var(--muted);
    font-size: 12px
}

.breadcrumb span {
    margin: 0 12px;
    color: #4d6663
}

.breadcrumb b {
    color: #e2efea
}

.topright {
    display: flex;
    gap: 15px;
    align-items: center
}

.chip,
.datechip,
.tiny-pill {
    font-size: 11px;
    padding: 7px 12px;
    background: #183429;
    border: 1px solid #315b46;
    color: #8fe4b5;
    border-radius: 100px
}

.subtle {
    background: transparent;
    border: 1px solid #38504b;
    color: #b5d2c8;
    border-radius: 7px;
    padding: 7px 12px
}

.content {
    max-width: 1500px;
    margin: auto;
    padding: 36px 40px 70px
}

.heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    gap: 16px
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 2.1px;
    font-weight: 800;
    color: var(--green)
}

h1 {
    font-size: 32px;
    letter-spacing: -1px;
    margin: 6px 0
}

h2 {
    font-size: 17px;
    letter-spacing: -.3px;
    margin: 0
}

h3 {
    font-size: 13px;
    color: #c7e7d8;
    margin: 23px 0 12px
}

.heading p,
.panelhead p,
.auth-panel p {
    color: var(--muted);
    margin: 3px 0
}

.datechip {
    background: #142322;
    color: #b5d4c6;
    border-color: #2c4842
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px
}

.stat,
.panel {
    background: linear-gradient(135deg, #132123, #101a1d);
    border: 1px solid var(--border);
    border-radius: 14px
}

.stat {
    padding: 23px;
    position: relative;
    overflow: hidden
}

.stat>span {
    color: #89aca1;
    letter-spacing: 1.2px;
    font-size: 10px;
    font-weight: 800
}

.stat strong {
    display: block;
    font-size: 31px;
    letter-spacing: -1px;
    margin: 8px 0 3px
}

.stat small {
    color: var(--muted)
}

.stat-icon {
    position: absolute;
    right: 20px;
    top: 18px;
    color: #2f6d50;
    font-size: 26px
}

.twocol {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 18px;
    margin-bottom: 18px
}

.panel {
    padding: 23px;
    margin-bottom: 18px
}

.twocol .panel {
    margin: 0
}

.panelhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px
}

.panelhead p {
    font-size: 12px
}

.leader {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 14px 0
}

.rank {
    color: #648c7f;
    width: 24px;
    font-size: 12px
}

.avatar {
    width: 35px;
    height: 35px;
    border-radius: 10px;
    background: #1c4436;
    display: grid;
    place-items: center;
    color: #87dfae;
    font-weight: 800
}

.leader-main {
    flex: 1;
    min-width: 0
}

.leader-name {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px
}

.leader-name span:last-child {
    color: #9cdcb9
}

.bar {
    height: 6px;
    border-radius: 9px;
    background: #233a34;
    overflow: hidden
}

.bar>div {
    height: 100%;
    background: linear-gradient(90deg, #27895f, #65d99c);
    border-radius: 9px
}

.ringline {
    display: flex;
    align-items: center;
    gap: 23px;
    padding: 10px 0 20px
}

.ring {
    width: 105px;
    height: 105px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--green) var(--pct, 0%), #273c36 0);
    position: relative;
    flex-shrink: 0
}

.ring:before {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    background: #132124
}

.ring span {
    position: relative;
    font-size: 23px;
    font-weight: 800
}

.ringline p {
    color: var(--muted);
    font-size: 12px;
    margin: 4px 0
}

.line {
    border-top: 1px solid var(--border);
    margin: 10px 0
}

.healthrow {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    margin: 13px 0
}

.healthrow span {
    color: var(--muted)
}

.note {
    background: #152824;
    border: 1px solid #2b4d3f;
    color: #93b9a8;
    padding: 12px;
    border-radius: 8px;
    font-size: 11px;
    margin-top: 20px
}

.standalone {
    margin-top: 0
}

.outline {
    border: 1px solid #34594a;
    border-radius: 8px;
    padding: 8px 12px;
    background: #172c25;
    color: #9be6b9;
    font-weight: 600
}

.tablewrap {
    overflow-x: auto
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap
}

th {
    color: #759a8f;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 13px 12px;
    border-bottom: 1px solid var(--border)
}

td {
    padding: 14px 12px;
    border-bottom: 1px solid #223536;
    font-size: 12px
}

tbody tr:last-child td {
    border-bottom: 0
}

tbody tr:hover {
    background: #1b302b;
    cursor: pointer
}

.rsn {
    font-weight: 700;
    color: #e2f6e9
}

.rsn small {
    display: block;
    font-weight: 400;
    color: var(--muted)
}

.pill {
    border: 1px solid #325947;
    color: #82d6a5;
    background: #193329;
    border-radius: 99px;
    padding: 4px 9px;
    font-size: 10px
}

.pill.stale {
    border-color: #5a4b30;
    background: #322b1d;
    color: #ddbd7a
}

.search,
input,
select {
    background: #0d1a1c;
    border: 1px solid #34504b;
    border-radius: 8px;
    padding: 11px 13px;
    color: #e6f3ec;
    outline: none;
    min-width: 0
}

.search:focus,
input:focus,
select:focus {
    border-color: var(--green)
}

.search {
    max-width: 220px
}

.auth-panel {
    max-width: 620px;
    margin: 60px auto;
    background: linear-gradient(135deg, #142a23, #111b20);
    border: 1px solid #2c5a46;
    padding: 35px;
    border-radius: 18px
}

.auth-panel h2 {
    font-size: 24px;
    margin: 20px 0 8px
}

.authrow {
    display: flex;
    gap: 10px;
    margin-top: 22px
}

.authrow input {
    flex: 1
}

.primary {
    background: #4bc88e;
    border: 0;
    border-radius: 8px;
    color: #092014;
    font-weight: 800;
    padding: 12px 18px
}

.helper {
    font-size: 11px;
    margin-top: 15px !important
}

.profileStats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 15px 0
}

.mini {
    background: #172b29;
    border: 1px solid #2b4940;
    padding: 16px;
    border-radius: 10px
}

.mini span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px
}

.mini strong {
    display: block;
    font-size: 20px;
    margin-top: 4px
}

.skills {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px
}

.skill {
    background: #152724;
    border: 1px solid #29453b;
    border-radius: 9px;
    padding: 11px;
    display: flex;
    justify-content: space-between;
    gap: 8px
}

.skill strong {
    color: #92e1b3
}

.skill small {
    display: block;
    color: var(--muted)
}

.chart {
    min-height: 200px;
    background: #101e20;
    border: 1px solid #243e38;
    border-radius: 10px;
    padding: 16px
}

.bigchart {
    min-height: 330px
}

.chart svg {
    width: 100%;
    height: 210px;
    overflow: visible
}

.bigchart svg {
    height: 280px
}

.chart-empty {
    color: var(--muted);
    display: grid;
    place-items: center;
    height: 180px
}

.axis {
    fill: #83a79a;
    font-size: 11px
}

.gridline {
    stroke: #2d4641;
    stroke-width: 1
}

.chartpath {
    fill: none;
    stroke: #55d595;
    stroke-width: 3;
    stroke-linejoin: round;
    stroke-linecap: round
}

.chartarea {
    fill: #55d595;
    fill-opacity: .09
}

#status {
    color: #a9d7bb;
    font-size: 12px;
    margin-top: 15px
}

#mobileMenu {
    display: none
}

@media(max-width:1150px) {
    .stats {
        grid-template-columns: repeat(2, 1fr)
    }

    .twocol {
        grid-template-columns: 1fr
    }
}

@media(max-width:760px) {
    .sidebar {
        position: fixed;
        z-index: 10;
        transform: translateX(-100%);
        transition: transform .2s
    }

    .sidebar.open {
        transform: none
    }

    .topbar {
        padding: 0 18px
    }

    .content {
        padding: 25px 18px
    }

    .heading {
        align-items: flex-start
    }

    .datechip {
        display: none
    }

    #mobileMenu {
        display: block;
        background: none;
        color: var(--text);
        border: 0;
        font-size: 22px;
        margin-right: 10px
    }

    .breadcrumb {
        flex: 1
    }

    .stats {
        gap: 10px
    }

    .stat {
        padding: 16px
    }

    .stat strong {
        font-size: 25px
    }

    .authrow {
        flex-direction: column
    }

    .profileStats {
        grid-template-columns: 1fr
    }

    .panel {
        padding: 16px
    }

    .heading h1 {
        font-size: 26px
    }
}

/* v0.3: improved legibility and editable clan notes */
body {
    font-size: 15px
}

.panelhead p,
.leader-name,
td,
.healthrow {
    font-size: 13px
}

.stat small,
.note,
.ringline p {
    font-size: 12px
}

.nav-label,
.eyebrow {
    font-size: 11px
}

.leader-name {
    font-size: 13px
}

.management-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 14px
}

.management-grid label,
.manage-label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #a7c9bc;
    font-size: 13px;
    font-weight: 600
}

.management-grid input,
.management-grid select,
.manage-label textarea {
    width: 100%
}

.manage-label {
    margin-top: 16px
}

textarea {
    font: inherit;
    resize: vertical;
    background: #0d1a1c;
    border: 1px solid #34504b;
    border-radius: 8px;
    padding: 12px;
    color: #e6f3ec
}

.management-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 14px
}

.management-actions span {
    color: #9fdbc0;
    font-size: 13px
}

@media(max-width:760px) {
    .management-grid {
        grid-template-columns: 1fr
    }
}


/* v0.4 — Adventurers United heraldic theme: midnight navy, antique gold, parchment */
:root {
    --bg: #080e1b;
    --side: #0b1323;
    --panel: #101b2d;
    --panel2: #17263b;
    --border: #344158;
    --text: #f4edda;
    --muted: #a9b3c6;
    --green: #dcb85f;
    --green2: #84632c;
    --gold: #e5c77e;
    --goldbright: #f7df9a;
    --navy: #0b1427;
    --blue: #718db7;
}

html {
    scroll-behavior: smooth
}

body {
    background: radial-gradient(ellipse 60% 35% at 78% 0%, #29344b80, transparent 75%),
        radial-gradient(ellipse 40% 30% at 20% 95%, #172541, transparent 90%), #080e1b;
    color: var(--text);
    font-family: Inter, Segoe UI, system-ui, sans-serif;
}

body:before {
    content: "";
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: .12;
    background-image: linear-gradient(90deg, transparent 49.8%, #d9b66d12 50%, transparent 50.2%);
    background-size: 90px 90px
}

.shell {
    position: relative;
    z-index: 1
}

.sidebar {
    background: linear-gradient(175deg, #101c31, #090f1d 68%);
    border-right: 1px solid #9b7a4050;
    padding-top: 31px;
    box-shadow: 8px 0 32px #0003
}

.brand {
    padding-bottom: 34px;
    border-bottom: 1px solid #e5c77e1d;
    margin-bottom: 18px
}

.brandmark,
.auth-icon {
    width: 45px;
    height: 45px;
    border-radius: 13px;
    border: 1px solid #d5af5c;
    color: var(--goldbright);
    background: radial-gradient(circle at 50% 20%, #475372, #16243a 68%);
    box-shadow: 0 0 0 4px #d5af5c0d, inset 0 0 18px #dfb65d21;
    font-family: Georgia, serif
}

.brand strong {
    font-size: 15px;
    letter-spacing: -.35px;
    color: #fff7e4
}

.brand strong span {
    color: var(--gold)
}

.brand small {
    color: #c4a96e;
    font-size: 9px
}

.nav-label {
    color: #9b8d75
}

.nav {
    border-radius: 10px;
    color: #aebbd0;
    font-size: 13px;
    transition: background .2s, color .2s, border-color .2s, transform .2s
}

.nav:hover:not(:disabled) {
    background: #1a2a42;
    transform: translateX(3px)
}

.nav.active {
    background: linear-gradient(90deg, #5a482b80, #1c2b42);
    border-color: #a7894d80;
    color: #f5d98f;
    box-shadow: inset 3px 0 #e1bb65
}

.nav.muted {
    opacity: .46
}

.sidebottom {
    border-color: #9c835035
}

.online-dot {
    background: #dcb85f;
    box-shadow: 0 0 12px #dcb85f
}

.topbar {
    background: #0c1526e8;
    border-bottom: 1px solid #ae8e4b35;
    backdrop-filter: blur(14px)
}

.breadcrumb b {
    color: #f3d78f
}

.breadcrumb span {
    color: #b3965c
}

.content {
    max-width: 1560px;
    padding-top: 42px
}

.eyebrow {
    color: var(--gold);
    letter-spacing: 2.4px
}

h1 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1.4px;
    color: #fff6df
}

h2 {
    color: #fff1d3;
    font-size: 18px
}

h3 {
    color: #f2d898
}

.heading p,
.panelhead p {
    color: #aebbd0
}

.stat,
.panel {
    background: linear-gradient(145deg, #19263a 0%, #111c2e 62%, #101a2a 100%);
    border: 1px solid #8f785145;
    border-radius: 16px;
    box-shadow: 0 12px 35px #0003, inset 0 1px #ffffff09
}

.stat {
    min-height: 144px;
    padding: 25px 23px 20px;
    transition: transform .2s, border-color .2s, box-shadow .2s
}

.stat:before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #b68d45aa, transparent)
}

.stat:hover,
.panel:hover {
    border-color: #bd9b6070
}

.stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px #0005
}

.stat>span {
    color: #b9a780
}

.stat strong {
    color: #fff5d8;
    font-size: 33px
}

.stat small {
    color: #aab6c9
}

.stat-icon {
    color: #ad8d52
}

.panel {
    padding: 25px
}

.panelhead {
    margin-bottom: 24px
}

.chip,
.datechip,
.tiny-pill {
    background: #3a302345;
    border-color: #ae8b4b70;
    color: #f3d68b
}

.subtle,
.outline {
    background: #263148;
    border: 1px solid #8b784f80;
    color: #f5d993;
    transition: .2s
}

.subtle:hover,
.outline:hover {
    background: #394057;
    border-color: #d5b46a
}

.primary {
    background: linear-gradient(110deg, #b78c3d, #f1d58a);
    color: #1d1a16;
    box-shadow: 0 5px 20px #bd954329
}

.primary:hover {
    filter: brightness(1.1)
}

.rank {
    color: #bd9e63
}

.avatar {
    background: linear-gradient(135deg, #50432e, #263751);
    color: #f5d68a;
    border: 1px solid #b99b5c44
}

.leader-name span:last-child {
    color: #e7c678
}

.bar {
    height: 8px;
    background: #2b3446
}

.bar>div {
    background: linear-gradient(90deg, #8b662e, #dfb85f, #ffdf90);
    box-shadow: 0 0 12px #e6bd6040
}

.ring {
    background: conic-gradient(#dcb85f var(--pct, 0%), #29354b 0);
    box-shadow: 0 0 0 1px #b9984e55
}

.ring:before {
    background: #152236
}

.note {
    background: #282d36;
    border-color: #8c754b66;
    color: #d1c5a8
}

.healthrow span {
    color: #acb8c9
}

.line {
    border-color: #8f78513d
}

th {
    color: #c3a96f;
    border-color: #a48b5b3d
}

td {
    border-color: #b6a06a24
}

tbody tr:hover {
    background: #29334a
}

.rsn {
    color: #f9e6b6
}

.rsn small {
    color: #aebbd0
}

.pill {
    border-color: #9f86567a;
    color: #f0d38c;
    background: #4c3e2c75
}

.pill.stale {
    background: #483226;
    color: #f4b899
}

.search,
input,
select,
textarea {
    background: #0d182a;
    border: 1px solid #7b745e70;
    color: #f3eddf
}

.search:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: #e4be70;
    box-shadow: 0 0 0 3px #c5a25820
}

.auth-panel {
    background: linear-gradient(135deg, #202e42, #111b2d);
    border-color: #a28a5577
}

.mini,
.skill {
    background: #1b2a3e;
    border-color: #9e87554d
}

.mini strong {
    color: #fff3d4
}

.skill strong {
    color: #e7c577
}

.skill small {
    color: #aab8cb
}

.chart {
    background: #0d1929;
    border-color: #85754f55
}

.axis {
    fill: #afbdd0
}

.gridline {
    stroke: #46516a
}

.chartpath {
    stroke: #edc675
}

.chartarea {
    fill: #edc675;
    fill-opacity: .11
}

#status,
.management-actions span {
    color: #e5ca8d
}

.management-grid label,
.manage-label {
    color: #c5b994
}

::selection {
    background: #ae874a;
    color: #0c1422
}

@media(max-width:760px) {
    h1 {
        font-size: 28px
    }

    .sidebar {
        box-shadow: 15px 0 45px #0008
    }
}

/* v0.5 profile and tracking refinements */
.bar>div {
    display: block;
    max-width: 100%;
    min-width: 0;
    height: 100%;
    transition: width .5s ease
}

.profile-hero {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 22px;
    align-items: stretch;
    margin: 14px 0 28px
}

.character-frame {
    min-height: 290px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #b18c4c75;
    border-radius: 14px;
    background: radial-gradient(circle at 50% 36%, #36435e 0, #18243a 48%, #0b1526 100%)
}

.character-frame:after {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px solid #c5a4602c;
    border-radius: 10px;
    pointer-events: none
}

.character-frame img {
    max-width: 92%;
    max-height: 250px;
    object-fit: contain;
    image-rendering: auto;
    filter: drop-shadow(0 10px 12px #0008)
}

.character-frame img[hidden],
.character-fallback[hidden] {
    display: none
}

.character-fallback {
    font: 70px Georgia, serif;
    color: #dcb85f66
}

.character-caption {
    position: absolute;
    bottom: 11px;
    font-size: 10px;
    letter-spacing: 1.5px;
    color: #d4b773
}

.profile-hero-main {
    display: flex;
    flex-direction: column;
    justify-content: center
}

.profile-hero-main .profileStats {
    grid-template-columns: repeat(3, minmax(0, 1fr))
}

.avatar-help {
    font-size: 12px;
    color: #9dacc4
}

.profile-controls {
    display: flex;
    gap: 10px;
    margin-top: 6px
}

.chart-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    margin: 12px 0
}

.chart-toolbar label {
    font-size: 12px;
    color: #c9b68d;
    display: flex;
    gap: 9px;
    align-items: center
}

.chart-toolbar select {
    min-width: 120px;
    padding: 8px
}

.chart-dot {
    fill: #f2cf7d;
    stroke: #17233a;
    stroke-width: 2;
    cursor: help
}

.chart-dot:hover,
.chart-dot:focus {
    fill: #fff0b7;
    stroke: #e6bc66;
    stroke-width: 4;
    outline: none
}

.skill {
    align-items: center;
    justify-content: initial;
    gap: 10px;
    min-height: 62px
}

.skill-icon {
    width: 27px;
    height: 27px;
    object-fit: contain;
    flex-shrink: 0
}

.skill-icon[hidden] {
    display: none
}

.skill-name {
    flex: 1;
    min-width: 0
}

.skill strong {
    font-size: 16px
}

@media(max-width:980px) {
    .profile-hero {
        grid-template-columns: 1fr
    }

    .character-frame {
        min-height: 210px
    }

    .profile-hero-main .profileStats {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }
}

@media(max-width:600px) {
    .profile-hero-main .profileStats {
        grid-template-columns: 1fr
    }

    .chart-toolbar {
        flex-wrap: wrap;
        justify-content: flex-start
    }
}

/* Character upload v0.6 */
.upload-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 650;
    font-size: 13px
}

.upload-label:hover {
    background: #394057;
    border-color: #d5b46a
}

#avatarUploadStatus {
    font-size: 12px;
    color: #e5ca8d
}

.character-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center
}

/* v1 — Guild operations */
.section-banner {
    position: relative;
    overflow: hidden;
    border: 1px solid #cba55b70;
    border-radius: 17px;
    padding: 30px 35px;
    margin-bottom: 20px;
    background: radial-gradient(ellipse at 95% 10%, #bd8b3336, transparent 55%), linear-gradient(120deg, #1d2b45, #0d1729);
    box-shadow: 0 18px 42px #0004
}

.section-banner:after {
    content: '⚜';
    position: absolute;
    right: 40px;
    top: -30px;
    font: 190px Georgia, serif;
    color: #d5b36b18;
    pointer-events: none
}

.section-banner h2 {
    font-size: 30px;
    margin: 12px 0 8px
}

.section-banner p {
    color: #bfc8d7;
    max-width: 680px;
    line-height: 1.6
}

.operations-layout {
    align-items: start
}

.operation-form {
    display: grid;
    gap: 16px
}

.operation-form label {
    display: grid;
    gap: 7px;
    color: #dfc892;
    font-size: 13px;
    font-weight: 650
}

.operation-form input,
.operation-form select,
.operation-form textarea {
    width: 100%;
    padding: 12px;
    border-radius: 9px;
    box-sizing: border-box;
    font: inherit
}

.operation-form button {
    justify-self: start;
    padding: 12px 20px
}

.form-status {
    color: #efd08b;
    font-size: 13px
}

.operation-list {
    display: grid;
    gap: 12px
}

.operation-card {
    background: linear-gradient(120deg, #1c2b43, #121d31);
    border: 1px solid #a28b5a55;
    padding: 18px;
    border-radius: 12px
}

.operation-card h3 {
    font-size: 17px;
    margin: 12px 0 8px;
    color: #fff1cc
}

.operation-card p {
    color: #b9c5d5;
    line-height: 1.55;
    margin: 0 0 10px;
    white-space: pre-wrap;
    overflow-wrap: anywhere
}

.operation-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    color: #b5c0cf;
    font-size: 12px
}

.operation-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px
}

.operation-actions button {
    padding: 7px 12px;
    font-size: 12px
}

.operation-target {
    color: #e7ca83 !important
}

.empty-operations {
    padding: 55px 20px;
    text-align: center;
    border: 1px dashed #a58b5a60;
    border-radius: 12px;
    color: #b5bfd1
}

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

    .section-banner {
        padding: 22px
    }

    .section-banner:after {
        right: 0;
        font-size: 110px;
        top: 5px
    }
}

/* Guild operations v1.1 */
.guild-roster {
    margin: 16px 0;
    padding: 15px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0c1829, #18253a);
    border: 1px solid #ac8a4a50
}

.guild-roster>strong {
    display: block;
    color: #f0d48b;
    font-size: 12px;
    margin-bottom: 10px
}

.guild-roster>p {
    font-size: 12px;
    color: #9eacc1;
    margin: 6px 0 14px
}

.guild-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 12px
}

.guild-chips span {
    font-size: 11px;
    border: 1px solid #8e754f60;
    border-radius: 30px;
    padding: 5px 9px;
    color: #e4d4b0;
    background: #2a3040
}

.guild-scoreboard {
    margin-bottom: 12px
}

.guild-scoreboard>div {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px solid #a58a5135;
    font-size: 12px;
    color: #e2d9c6
}

.guild-scoreboard b {
    color: #f5d68c
}

.operation-entry {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px
}

.operation-entry select,
.operation-entry input {
    flex: 1 1 115px;
    min-width: 100px;
    padding: 9px
}

.operation-entry button {
    white-space: nowrap
}


/* v1.2 - Guild Hall visual system */
:root {
    --gold: #e3bd6e;
    --goldbright: #ffe6a6;
    --midnight: #070e1d;
    --surface: #101b30
}

body {
    background: radial-gradient(ellipse 55% 45% at 82% -15%, #3d3e4938, transparent 80%), #070d19
}

.shell {
    min-height: 100vh
}

.sidebar {
    background: linear-gradient(165deg, #111d34 0%, #0a1224 48%, #080e1c 100%);
    border-right: 1px solid #d2a75c3c
}

.brand {
    margin-bottom: 27px
}

.brandmark {
    width: 48px;
    height: 48px;
    box-shadow: 0 0 22px #e1b76620, inset 0 0 18px #dfbd6333
}

.brand strong {
    font-size: 15px
}

.brand small {
    letter-spacing: 1.45px
}

.nav {
    min-height: 45px;
    letter-spacing: .1px
}

.nav-label {
    font-size: 10px;
    letter-spacing: 2px;
    margin-top: 18px
}

.nav.active {
    background: linear-gradient(90deg, #6e542f75, #243451a0);
    box-shadow: inset 3px 0 #e8bf6c, 0 5px 18px #0002
}

.topbar {
    height: 64px;
    border-bottom-color: #bc975136
}

.content {
    max-width: 1600px;
    padding: 38px 48px 90px
}

.heading {
    margin-bottom: 29px
}

.heading h1 {
    font-size: 38px;
    letter-spacing: -1.5px
}

.heading p {
    font-size: 14px
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 2.6px;
    color: #dcb976
}

.guild-hero {
    min-height: 310px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid #d0a65e83;
    border-radius: 20px;
    padding: 48px 54px;
    margin-bottom: 34px;
    display: flex;
    align-items: center;
    background:
        radial-gradient(ellipse 38% 80% at 88% 44%, #b68c4b4d, transparent 80%),
        linear-gradient(115deg, #111e33 0%, #192945 50%, #0c1628 100%);
    box-shadow: 0 26px 70px #0006, inset 0 1px #fff2
}

.guild-hero:before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid #d6b36e24;
    border-radius: 14px;
    pointer-events: none
}

.guild-hero:after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .15;
    background: repeating-linear-gradient(130deg, transparent 0, transparent 43px, #e6bf6822 44px, transparent 45px)
}

.hero-ornament {
    position: absolute;
    left: -55px;
    bottom: -145px;
    font: 360px Georgia, serif;
    color: #d9b5660c;
    transform: rotate(-17deg)
}

.hero-copy {
    position: relative;
    z-index: 1;
    max-width: 710px
}

.hero-kicker {
    font-size: 10px;
    letter-spacing: 2.6px;
    color: #f3d492;
    font-weight: 800
}

.hero-diamond {
    font-size: 9px;
    margin-right: 7px
}

.hero-separator {
    margin: 0 12px;
    color: #b6a582
}

.guild-hero h2 {
    font-family: Georgia, serif;
    font-weight: 700;
    font-size: clamp(40px, 4.2vw, 68px);
    letter-spacing: -2.2px;
    line-height: 1.1;
    color: #fff6e0;
    margin: 17px 0 16px
}

.guild-hero h2 em {
    font-style: italic;
    color: #f1c873
}

.guild-hero p {
    color: #c0ccdd;
    font-size: 15px;
    line-height: 1.75;
    max-width: 555px
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 29px;
    flex-wrap: wrap
}

.hero-actions button {
    border-radius: 9px;
    font-size: 13px;
    font-weight: 750;
    padding: 13px 19px;
    cursor: pointer;
    transition: transform .18s, filter .18s
}

.hero-actions button:hover {
    transform: translateY(-2px);
    filter: brightness(1.1)
}

.hero-actions button span {
    margin-left: 12px
}

.hero-primary {
    background: linear-gradient(120deg, #d6a84f, #ffe0a0);
    color: #19192a;
    border: 1px solid #f8d48b
}

.hero-secondary {
    background: #14223aab;
    color: #f5dba0;
    border: 1px solid #b9955e88
}

.hero-insignia {
    position: absolute;
    right: 7%;
    top: 50%;
    transform: translateY(-50%);
    width: 245px;
    height: 245px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid #d7b571a3;
    box-shadow: 0 0 0 12px #d1aa6230, 0 0 0 14px #d1aa6260, inset 0 0 50px #d2a35b22, 0 0 70px #d2a35b1c;
    background: radial-gradient(circle, #273650, #101b2e 74%)
}

.insignia-mark {
    font: 112px Georgia, serif;
    color: #f4d792;
    text-shadow: 0 0 30px #e3bd6e6a;
    line-height: 1
}

.insignia-wreath {
    position: absolute;
    top: 10px;
    color: #d3b26f;
    font: 38px Georgia, serif
}

.insignia-caption {
    font-size: 10px;
    letter-spacing: 4px;
    color: #e5c888;
    margin-top: 12px
}

.guild-pulse-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin: 0 0 15px
}

.guild-pulse-heading h2 {
    font-size: 24px;
    margin: 7px 0 0;
    color: #f9e8c1
}

.pulse-status {
    color: #a8b7c8;
    font-size: 10px;
    letter-spacing: 1.3px;
    font-weight: 700
}

.pulse-status span {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d6b363;
    margin-right: 7px;
    box-shadow: 0 0 11px #d6b363aa
}

.guild-pulse {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 35px
}

.pulse-card {
    display: flex;
    position: relative;
    align-items: flex-start;
    gap: 15px;
    text-align: left;
    min-height: 133px;
    border-radius: 14px;
    padding: 23px 17px;
    background: linear-gradient(145deg, #1a2940, #111d31);
    border: 1px solid #aa8b5663;
    color: #fff;
    cursor: pointer;
    transition: transform .2s, border-color .2s, background .2s
}

.pulse-card:hover {
    transform: translateY(-4px);
    border-color: #f2c978;
    background: linear-gradient(145deg, #263650, #17263d)
}

.pulse-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    border-radius: 11px;
    border: 1px solid #b8965c63;
    background: #6d58322c;
    color: #eacb89;
    font: 23px Georgia, serif
}

.pulse-card small {
    display: block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.4px;
    color: #bdad8f;
    margin: 1px 0 9px
}

.pulse-card strong {
    font-size: 28px;
    line-height: 1.1;
    color: #ffefd0;
    font-weight: 800
}

.pulse-card p {
    font-size: 11px;
    color: #aab9cd;
    margin: 8px 0 0;
    line-height: 1.45;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.pulse-denom {
    font-size: 15px;
    color: #9da9b9
}

.pulse-card .pulse-date {
    font-size: 21px
}

.pulse-arrow {
    position: absolute;
    right: 13px;
    top: 12px;
    font-size: 15px;
    color: #ad925e
}

.stats {
    gap: 14px
}

.stat {
    min-height: 138px;
    border-color: #a48a5950
}

.stat strong {
    font-size: 34px
}

.panel {
    border-color: #9e86524a;
    border-radius: 17px;
    box-shadow: 0 15px 44px #0003
}

.panelhead h2 {
    font-size: 18px
}

.leader {
    padding: 9px 0
}

.leader .bar {
    height: 6px
}

.bar>div {
    background: linear-gradient(90deg, #a57b3c, #ffdc86)
}

.avatar {
    border-radius: 11px
}

.character-frame {
    min-height: 340px;
    background: radial-gradient(ellipse at 50% 25%, #3c4863, #17243a 55%, #0b1424 100%)
}

.character-frame img {
    max-height: 320px;
    filter: drop-shadow(0 15px 22px #000a)
}

.skill {
    transition: transform .2s, border-color .2s
}

.skill:hover {
    transform: translateY(-2px);
    border-color: #d7b76f
}

.operation-card {
    transition: border-color .2s, transform .2s
}

.operation-card:hover {
    border-color: #c8a66e;
    transform: translateY(-2px)
}

.section-banner {
    min-height: 130px;
    background: radial-gradient(ellipse at 95% 0%, #d1a35c38, transparent 55%), linear-gradient(120deg, #202f49, #0d172a)
}

.section-banner h2 {
    font: 700 34px Georgia, serif
}

@media(max-width:1250px) {
    .guild-pulse {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .hero-insignia {
        right: 4%;
        width: 180px;
        height: 180px
    }

    .insignia-mark {
        font-size: 80px
    }

    .hero-copy {
        max-width: 62%
    }
}

@media(max-width:900px) {
    .content {
        padding: 25px 22px 60px
    }

    .guild-hero {
        padding: 34px
    }

    .hero-insignia {
        opacity: .2;
        right: -20px
    }

    .hero-copy {
        max-width: 100%
    }
}

@media(max-width:580px) {
    .guild-hero {
        padding: 30px 22px;
        min-height: 310px
    }

    .guild-hero h2 {
        font-size: 44px
    }

    .hero-insignia {
        display: none
    }

    .guild-pulse {
        grid-template-columns: 1fr
    }

    .guild-pulse-heading {
        align-items: start;
        gap: 10px
    }

    .pulse-card {
        min-height: 105px
    }
}

@media(prefers-reduced-motion:reduce) {

    .pulse-card,
    .hero-actions button,
    .operation-card,
    .skill,
    .stat {
        transition: none !important
    }
}

.crest-mark {
    overflow: hidden;
    padding: 0;
    border: 1px solid #d4ac5f;
    border-radius: 12px;
    background: #0a1829
}

.crest-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.crest-showcase {
    overflow: hidden;
    padding: 0;
    background: #0c1b2b;
    border: 2px solid #d5af65;
    box-shadow: 0 0 0 8px #c9a05b18, 0 0 0 10px #e2b96a5a, 0 0 70px #c39b5b2c
}

.crest-showcase img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover
}

@media(max-width:1250px) {
    .crest-showcase {
        width: 180px;
        height: 180px
    }
}

@media(max-width:900px) {
    .crest-showcase {
        opacity: .2
    }
}

/* v1.4: approved transparent Adventurers United crest */
.crest-mark {
    border-radius: 8px;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible
}

.crest-mark img {
    object-fit: contain;
    filter: drop-shadow(0 2px 5px #0008)
}

.crest-showcase {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    width: 260px;
    height: 260px
}

.crest-showcase img {
    object-fit: contain;
    filter: drop-shadow(0 18px 22px #0008)
}

@media(max-width:1250px) {
    .crest-showcase {
        width: 190px;
        height: 190px
    }
}

/* v1.5 - The Guild Atlas: distinctive compositions, guild progress, competition arena */
:root {
    --amber: #eec578;
    --deep: #070d19;
    --panel: #101e33
}

body {
    background: radial-gradient(ellipse 70% 60% at 80% 0%, #13244055, transparent), #080f1e
}

.content {
    max-width: 1700px;
    padding-top: 32px
}

.heading h1 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 42px;
    letter-spacing: -1.3px;
    color: #f9eed9
}

.guild-hero {
    min-height: 350px;
    border-radius: 8px 28px 8px 28px;
    padding: 50px 58px;
    background: radial-gradient(ellipse at 75% 50%, #b98a4b27, transparent 40%), linear-gradient(110deg, #0c1b2f, #1a2c48 55%, #0b1729);
    border-color: #b8955b77;
    box-shadow: inset 0 0 0 7px #ffffff06, 0 28px 60px #0007
}

.guild-hero:before {
    border-radius: 4px 20px 4px 20px
}

.guild-hero h2 {
    font-size: clamp(48px, 4.9vw, 80px);
    line-height: 1.02;
    max-width: 700px
}

.guild-hero p {
    max-width: 560px;
    font-size: 15px
}

.crest-showcase {
    width: 265px;
    height: 265px;
    border: 0;
    box-shadow: none;
    background: transparent;
    overflow: visible
}

.crest-showcase img {
    object-fit: contain;
    filter: drop-shadow(0 20px 30px #0008) drop-shadow(0 0 28px #f2c66c30)
}

.guild-pulse {
    gap: 11px
}

.pulse-card {
    min-height: 112px;
    border-radius: 7px;
    padding: 18px 15px;
    background: linear-gradient(140deg, #152840, #0f1b2f);
    border-top: 2px solid #b8985a7a
}

.pulse-icon {
    width: 35px;
    height: 35px;
    font-size: 20px
}

.pulse-card strong {
    font-size: 26px
}

.warroom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(310px, 1fr);
    gap: 18px;
    margin: 30px 0 36px
}

.feature-panel {
    min-width: 0;
    position: relative;
    border: 1px solid #a788535a;
    border-radius: 9px;
    overflow: hidden;
    box-shadow: 0 18px 40px #0004
}

.progress-feature {
    padding: 28px 31px;
    background: linear-gradient(140deg, #16283f, #0e1a2d)
}

.feature-overline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    letter-spacing: 2.1px;
    color: #e9c57d;
    font-weight: 850;
    border-bottom: 1px solid #d4b56b36;
    padding-bottom: 16px
}

.feature-overline span {
    color: #9aacc2;
    font-size: 9px;
    letter-spacing: 1.5px
}

.feature-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 23px 0 12px
}

.feature-title h2 {
    font: 700 30px Georgia, serif;
    color: #ffefd0;
    margin: 0 0 5px
}

.feature-title p {
    font-size: 12px;
    color: #aebed1;
    margin: 0
}

.text-link {
    border: 0;
    background: none;
    color: #f0ca7d;
    font-weight: 700;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap
}

.weekly-gains {
    min-height: 180px
}

.gain-row {
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid #ffffff10;
    padding: 13px 0
}

.gain-row:last-child {
    border-bottom: 0
}

.gain-position {
    font: 24px Georgia, serif;
    color: #71849c;
    min-width: 35px
}

.gain-position.first {
    color: #ffcf79
}

.gain-person {
    flex: 1;
    min-width: 0
}

.gain-person strong {
    display: block;
    color: #f5ead6;
    font-size: 14px
}

.gain-person span {
    display: block;
    color: #93a4b9;
    font-size: 11px;
    margin-top: 4px
}

.gain-number {
    color: #f4cc79;
    font-weight: 850;
    font-size: 20px;
    white-space: nowrap
}

.gain-number small {
    font-size: 11px;
    color: #b6c3d2
}

.feature-footnote {
    font-size: 11px;
    color: #8294ab;
    margin-top: 15px;
    line-height: 1.6
}

.feature-empty {
    padding: 27px 0;
    color: #b4c3d3;
    font-size: 13px;
    line-height: 1.7
}

.feature-empty strong {
    color: #f0d6a0
}

.dispatch-feature {
    background: radial-gradient(circle at 75% 40%, #a8793c38, transparent 45%), linear-gradient(155deg, #24354c, #111d30 75%);
    padding: 28px 31px
}

.dispatch-inner {
    position: relative;
    z-index: 1;
    padding-top: 19px
}

.dispatch-seal {
    position: absolute;
    right: -15px;
    top: 7px;
    width: 130px;
    opacity: .25;
    filter: grayscale(.3)
}

.dispatch-seal img {
    width: 100%
}

.dispatch-inner h2 {
    position: relative;
    font: 700 38px/1.05 Georgia, serif;
    color: #f7e9c9;
    margin: 22px 0
}

.dispatch-inner h2 em {
    color: #f0c476
}

.dispatch-inner p {
    font-size: 13px;
    line-height: 1.7;
    color: #bcc8d7;
    max-width: 280px;
    margin: 0 0 22px
}

.dispatch-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: 1px solid #f5d18a;
    background: linear-gradient(115deg, #d3a557, #f7d48d);
    color: #172237;
    border-radius: 5px;
    padding: 14px 18px;
    font-weight: 850;
    cursor: pointer
}

.dispatch-alt {
    border: 0;
    background: none;
    color: #f4d08a;
    padding: 15px 0 0;
    cursor: pointer;
    font-weight: 750
}

.section-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 26px 0 15px
}

.section-divider span {
    color: #f1cc84;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 2px
}

.section-divider i {
    height: 1px;
    background: linear-gradient(90deg, #b08c53, #b08c5300);
    flex: 1
}

.section-divider small {
    font-size: 10px;
    letter-spacing: 1px;
    color: #8294a9
}

.stats .stat {
    border-radius: 7px;
    min-height: 125px;
    background: linear-gradient(160deg, #122139, #0f192b);
    border-top: 2px solid #b8965d5e
}

.panel {
    border-radius: 9px
}

.leader {
    padding: 12px 0
}

.leader .avatar {
    background: #2a3b50;
    border: 1px solid #b69a625a
}

.arena-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    min-height: 265px;
    padding: 35px 47px;
    margin-bottom: 24px;
    background: radial-gradient(circle at 83% 50%, #c1975040, transparent 40%), linear-gradient(110deg, #132840, #1d3046 65%, #101c30);
    border: 1px solid #c2a06191;
    border-radius: 7px 30px 7px 30px
}

.arena-banner:before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid #bda06c25;
    pointer-events: none;
    border-radius: 3px 22px 3px 22px
}

.arena-copy {
    position: relative;
    z-index: 1
}

.arena-copy h2 {
    font: 700 clamp(40px, 4vw, 62px) Georgia, serif;
    color: #f9edda;
    margin: 16px 0
}

.arena-copy h2 em {
    color: #f3c978
}

.arena-copy p {
    max-width: 610px;
    color: #bfcbd9;
    font-size: 14px;
    line-height: 1.7
}

.arena-crest {
    width: 215px;
    height: 215px;
    object-fit: contain;
    filter: drop-shadow(0 12px 22px #0008);
    margin: 0 30px
}

.arena-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 21px
}

.arena-pills span {
    padding: 8px 12px;
    background: #0b172c8a;
    border: 1px solid #a78b5b70;
    color: #e4ca97;
    font-size: 11px;
    border-radius: 3px
}

.competition-detail {
    padding: 26px 30px;
    margin: 0 0 25px;
    border: 1px solid #d2ab66a0;
    background: linear-gradient(145deg, #172b42, #0c1729);
    border-radius: 8px
}

.competition-detail[hidden] {
    display: none
}

.competition-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: start;
    margin-bottom: 24px
}

.competition-heading h2 {
    font: 700 34px Georgia, serif;
    color: #fff1d5;
    margin: 10px 0
}

.competition-heading h2 em {
    color: #efc778
}

.competition-heading p {
    color: #9bafc4;
    font-size: 12px
}

.competition-standings {
    display: grid;
    gap: 8px
}

.competition-rank {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    background: #101f35;
    border: 1px solid #b89b5b45;
    border-radius: 5px
}

.medal {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid #b79b64;
    color: #d9c19a;
    font: 23px Georgia, serif
}

.medal-1 {
    color: #ffe6a6;
    background: #6b4c204a
}

.medal-2 {
    color: #d8e2ec
}

.medal-3 {
    color: #d6a878
}

.competition-rank>div {
    flex: 1
}

.competition-rank strong {
    display: block;
    color: #f5e6c9
}

.competition-rank small {
    display: block;
    color: #9cb0c5;
    font-size: 11px;
    margin-top: 5px
}

.competition-rank>b {
    color: #f0c779;
    font-size: 18px
}

.pending-players {
    font-size: 12px;
    color: #a7b8c9;
    line-height: 1.7
}

.form-hint {
    display: block;
    color: #a7b9cc;
    font-size: 11px;
    margin-top: 7px
}

.score-view {
    border-color: #dfb965;
    color: #f3cd7f
}

.operation-card {
    border-radius: 6px;
    border-left: 3px solid #bd995d;
    background: linear-gradient(145deg, #16273d, #101c2e)
}

@media(max-width:1120px) {
    .warroom-grid {
        grid-template-columns: 1fr
    }

    .dispatch-inner {
        max-width: 550px
    }

    .dispatch-seal {
        right: 30px;
        opacity: .25
    }
}

@media(max-width:700px) {
    .guild-hero {
        padding: 30px 24px;
        min-height: 330px
    }

    .guild-hero h2 {
        font-size: 48px
    }

    .crest-showcase {
        display: none
    }

    .warroom-grid {
        gap: 12px
    }

    .feature-title {
        align-items: start;
        flex-direction: column
    }

    .arena-banner {
        padding: 28px 22px
    }

    .arena-crest {
        position: absolute;
        right: -65px;
        opacity: .14
    }

    .arena-copy {
        z-index: 1
    }

    .competition-heading {
        flex-direction: column
    }

    .section-divider small {
        display: none
    }
}

/* v1.6: stable skill tiles and treasury ledger */
.skills {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 9px;
    align-items: stretch
}

.skill {
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) auto !important;
    align-items: center !important;
    justify-content: stretch !important;
    gap: 11px !important;
    min-height: 70px;
    padding: 11px 13px !important;
    text-align: left !important;
    transition: none !important
}

.skill-icon {
    width: 32px !important;
    height: 32px !important;
    display: block;
    object-fit: contain;
    flex: none
}

.skill-name {
    min-width: 0;
    line-height: 1.35;
    flex: none !important;
    font-size: 13px;
    font-weight: 700;
    text-align: left !important
}

.skill-name small {
    font-size: 11px;
    margin-top: 3px;
    font-weight: 400
}

.skill strong {
    justify-self: end;
    font-size: 17px !important;
    font-variant-numeric: tabular-nums
}

.skill:hover {
    transform: none !important
}

.skill-icon[hidden] {
    visibility: hidden;
    display: block !important
}

.ledger-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(115deg, #152842, #101a2d);
    border: 1px solid #d4aa606e;
    border-radius: 17px;
    padding: 39px 40px;
    margin-bottom: 22px
}

.ledger-hero:after {
    content: '✦';
    position: absolute;
    right: 8%;
    top: -58px;
    font: 230px Georgia, serif;
    color: #e5bb7020;
    pointer-events: none
}

.ledger-hero h2 {
    font: 700 clamp(34px, 4vw, 56px) Georgia, serif;
    color: #fff0c9;
    margin: 11px 0
}

.ledger-hero h2 em {
    color: #edc67a
}

.ledger-hero p {
    max-width: 620px;
    color: #b9c7da;
    line-height: 1.65
}

.ledger-mini {
    display: flex;
    gap: 20px;
    margin-top: 22px;
    color: #ebce90;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 800
}

.ledger-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, .85fr);
    gap: 20px;
    align-items: start
}

.drop-feed {
    display: grid;
    gap: 8px
}

.drop-entry {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(95deg, #182941, #121d31);
    border: 1px solid #9c80514f;
    border-radius: 10px;
    padding: 15px 14px;
    min-width: 0
}

.drop-icon {
    width: 43px;
    height: 43px;
    flex: none;
    display: grid;
    place-items: center;
    border: 1px solid #a78a58;
    background: #9f794528;
    color: #f0c87c;
    border-radius: 9px;
    font-size: 23px
}

.drop-details {
    flex: 1;
    min-width: 0
}

.drop-main {
    display: flex;
    gap: 10px;
    align-items: center
}

.drop-main strong {
    color: #fff1cc;
    font-size: 15px;
    overflow-wrap: anywhere
}

.drop-qty {
    font-size: 12px;
    color: #d4b57c
}

.drop-sub {
    font-size: 11px;
    color: #9faec4;
    margin-top: 5px
}

.drop-sub span {
    color: #a88e61;
    margin: 0 4px
}

.drop-details p {
    font-size: 11px;
    color: #aebcd0;
    margin: 7px 0 0
}

.drop-actions {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 8px;
    flex: none
}

.drop-state {
    font-size: 10px;
    color: #e7c883
}

.drop-state.posted {
    color: #9cdbb0
}

.drop-state.failed {
    color: #e8a19a
}

.drop-actions button {
    font-size: 11px;
    padding: 6px 10px
}

.drop-actions button:disabled {
    opacity: .4;
    cursor: not-allowed
}

.ledger-entry .note {
    line-height: 1.6
}

.ledger-entry textarea {
    background: #101b2b;
    border: 1px solid #8b784f80;
    color: #fff;
    border-radius: 8px;
    padding: 12px;
    resize: vertical
}

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

@media(max-width:600px) {
    .ledger-hero {
        padding: 26px
    }

    .drop-entry {
        align-items: flex-start
    }

    .drop-actions {
        max-width: 90px
    }

    .ledger-mini {
        flex-wrap: wrap
    }
}

.drop-icon img {
    width: 36px;
    height: 36px;
    object-fit: contain
}

.drop-icon img[hidden] {
    display: none
}

/* Icon-only RuneScape skills */
#skillGrid.skills {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)) !important;
    gap: 12px !important
}

#skillGrid .skill {
    display: flex !important;
    flex-direction: column;
    justify-content: center !important;
    align-items: center !important;
    gap: 5px !important;
    min-height: 72px !important;
    padding: 7px 3px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 9px !important
}

#skillGrid .skill:hover {
    background: #e8bc6630 !important
}

#skillGrid .skill-icon {
    width: 38px !important;
    height: 38px !important;
    object-fit: contain !important
}

#skillGrid .skill-level {
    font-size: 12px;
    line-height: 1.1;
    color: #e8c777;
    font-weight: 800;
    font-variant-numeric: tabular-nums
}

#skillGrid .skill-name,
#skillGrid .skill strong {
    display: none !important
}

/* v1.6.2: show XP directly under the level while keeping icons prominent. */
#skillGrid.skills {
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)) !important;
    column-gap: 10px !important;
    row-gap: 14px !important
}

#skillGrid .skill {
    min-height: 94px !important;
    gap: 5px !important
}

#skillGrid .skill-xp {
    display: block;
    white-space: nowrap;
    text-align: center;
    font-size: 11px;
    line-height: 1.15;
    color: #acbdd2;
    font-variant-numeric: tabular-nums
}

/* Public guild portal permission management */
.permission-checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0
}

.permission-checks label {
    display: flex;
    align-items: center;
    gap: 10px
}

.permission-checks input {
    width: auto
}

.permission-entry {
    padding: 10px 0;
    border-bottom: 1px solid #ffffff1c
}

#permissionPanel {
    margin-top: 24px
}

button:disabled,
input:disabled,
textarea:disabled,
select:disabled {
    opacity: .48;
    cursor: not-allowed
}


/* RuneMetrics Activity Ledger */
#platformActivity {
    margin-top: 22px;
    min-width: 0;
}

.activity-rows {
    display: grid;
    gap: 10px;
}

.activity-entry {
    padding: 14px 16px;
    border: 1px solid #a88b574a;
    border-radius: 9px;
    background: linear-gradient(110deg, #182940, #101b2e);
    overflow-wrap: anywhere;
}

.activity-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.activity-entry-header strong {
    color: #f4d68e;
}

.activity-entry-header small,
.activity-details {
    color: #aebbd0;
    font-size: 12px;
}

.activity-entry p {
    color: #e7e9ed;
    margin: 9px 0 0;
}

.activity-details {
    display: block;
    margin-top: 7px;
}

@media (max-width: 600px) {
    .activity-entry-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Automatic RuneMetrics Activity Ledger */

.activity-ledger-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.activity-updated {
    font-size: 12px;
    color: var(--muted, #a7aebe);
}

.activity-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-entry {
    padding: 18px 20px;
    border: 1px solid rgba(212, 175, 95, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
    transition: border-color 0.2s ease,
        background 0.2s ease;
}

.activity-entry:hover {
    border-color: rgba(212, 175, 95, 0.35);
    background: rgba(255, 255, 255, 0.045);
}

.activity-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.activity-entry-header strong {
    color: #e7c77a;
    font-size: 15px;
}

.activity-entry-header small {
    color: #99a4b8;
    font-size: 12px;
}

.activity-entry p {
    margin: 0;
    line-height: 1.6;
}

.activity-details {
    display: block;
    margin-top: 8px;
    color: #aab4c5;
    line-height: 1.5;
}

.activity-load-more {
    display: flex;
    justify-content: center;
    padding: 18px 0 4px;
}

@media (max-width: 600px) {
    .activity-entry {
        padding: 14px;
    }

    .activity-entry-header {
        align-items: flex-start;
        flex-direction: column;
    }
}