:root {
    --app-font: Arial, Helvetica, sans-serif;
}

body {
    background: #07090d;
    color: #edf2f7;
    font-family: var(--app-font);
    margin: 0;
}

button,
input,
select,
textarea {
    font-family: var(--app-font);
}

.app-layout {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    width: 50px;
    box-sizing: border-box;
    overflow: hidden;
    padding: 16px 5px 24px;
    background: #0c0d10;
    border-right: 1px solid #242833;
    box-shadow: 12px 0 28px rgba(0, 0, 0, 0.24);
    transition: width 180ms ease, padding 180ms ease;
    z-index: 100;
}

.sidebar::after {
    display: none;
}

.sidebar:hover,
.sidebar:focus-within {
    width: 232px;
    padding: 16px 12px 24px;
}

.sidebar-nav {
    order: 1;
    display: grid;
    gap: 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: 48px;
    padding: 0 10px;
    color: #eeeeee;
    text-decoration: none;
    font-size: 18px;
    border-radius: 7px;
    white-space: nowrap;
    transition: background 140ms ease, color 140ms ease;
}

.sidebar:hover .sidebar-link,
.sidebar:focus-within .sidebar-link {
    justify-content: flex-start;
    gap: 16px;
    padding: 0 14px;
}

.sidebar-link span {
    width: 0;
    overflow: hidden;
    opacity: 0;
}

.sidebar:hover .sidebar-link span,
.sidebar:focus-within .sidebar-link span {
    width: auto;
    overflow: visible;
    opacity: 1;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: #ffffff;
    background: #171a21;
}

.sidebar-link.active {
    box-shadow: inset 3px 0 #36a2eb;
}

.sidebar-link svg {
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    fill: currentColor;
}

.sidebar-link img.sidebar-item-icon {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    object-fit: contain;
    image-rendering: pixelated;
}

.sidebar .sidebar-mayor {
    display: none;
}

.sidebar:hover .sidebar-mayor,
.sidebar:focus-within .sidebar-mayor {
    display: flex;
}

.page-content {
    min-height: 100vh;
    margin: 0 auto;
    box-sizing: border-box;
    transition: margin-left 180ms ease;
}

.profile-tracker-page {
    width: min(1180px, calc(100% - 96px));
    padding: 38px 0 56px;
}

.profile-back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #8ecfff;
    text-decoration: none;
}

.profile-tracker-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
    gap: 34px;
    align-items: center;
    padding: 42px;
    background:
        radial-gradient(circle at 8% 15%, rgba(54, 162, 235, 0.24), transparent 34%),
        linear-gradient(135deg, #121721, #0e1118);
    border: 1px solid #2b3443;
    border-radius: 18px;
}

.profile-tracker-hero h1 {
    margin: 8px 0 12px;
    font-size: clamp(38px, 5vw, 64px);
}

.profile-tracker-hero > div > p:last-child {
    max-width: 590px;
    margin: 0;
    color: #aeb9c8;
    font-size: 18px;
    line-height: 1.55;
}

.profile-search-card {
    padding: 24px;
    background: rgba(5, 8, 13, 0.78);
    border: 1px solid #30394a;
    border-radius: 13px;
}

.profile-search-card label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
}

.profile-search-row {
    display: flex;
    gap: 10px;
}

.profile-search-row input {
    min-width: 0;
    flex: 1;
    padding: 13px 14px;
    color: #fff;
    background: #0c1017;
    border: 1px solid #394457;
    border-radius: 8px;
    font-size: 16px;
}

.profile-search-row input:focus {
    outline: 2px solid rgba(54, 162, 235, 0.45);
    border-color: #36a2eb;
}

.profile-search-row button {
    padding: 0 18px;
    color: #07101a;
    background: #67c1ff;
    border: 0;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
}

.profile-search-card small,
.profile-search-error {
    display: block;
    margin: 10px 0 0;
    color: #8794a7;
}

.profile-search-error:not(:empty) {
    color: #ff9d9d;
}

.profile-search-error a {
    color: #8fd6ff;
}

.profile-feature-panel {
    margin-top: 24px;
    padding: 30px;
    background: #0e1117;
    border: 1px solid #252c38;
    border-radius: 16px;
}

.profile-results {
    margin-top: 24px;
    padding: 30px;
    background: linear-gradient(135deg, #101722, #0e1117);
    border: 1px solid #314056;
    border-radius: 16px;
}

.profile-result-header {
    display: flex;
    gap: 18px;
    align-items: center;
    margin-bottom: 24px;
}

.profile-result-header img {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    image-rendering: pixelated;
}

.profile-result-header p,
.profile-result-header h2 {
    margin: 0;
}

.profile-result-header p {
    color: #8ecfff;
}

.profile-result-header h2 {
    margin-top: 4px;
    font-size: 30px;
}

.profile-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.profile-stat-grid article {
    display: grid;
    gap: 6px;
    padding: 17px;
    background: #141923;
    border: 1px solid #283243;
    border-radius: 9px;
}

.profile-stat-grid small {
    color: #8d99aa;
}

.profile-api-note {
    margin-top: 16px;
    padding: 14px;
    color: #aab5c4;
    background: rgba(54, 162, 235, 0.08);
    border-radius: 8px;
    line-height: 1.5;
}

.profile-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.profile-tabs button {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 9px 13px;
    color: #aeb9c8;
    background: #0b1119;
    border: 1px solid #293548;
    border-radius: 7px;
    cursor: pointer;
}

.profile-tabs button.active {
    color: #071018;
    background: #55dca0;
    border-color: #55dca0;
}

.profile-tabs small {
    opacity: 0.7;
}

.profile-uuid {
    display: block;
    margin-top: 5px;
    color: #758398;
}

.profile-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.profile-detail-grid > section,
.networth-panel,
.inventory-viewer {
    padding: 20px;
    background: #0d141d;
    border: 1px solid #273448;
    border-radius: 10px;
}

.profile-detail-grid h3,
.networth-panel h3,
.inventory-viewer h3 {
    margin: 0 0 14px;
}

.profile-detail-grid h3 small {
    color: #7e8ba0;
    font-weight: 400;
}

.profile-detail-list {
    display: grid;
    gap: 7px;
}

.profile-detail-list > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 7px;
    border-bottom: 1px solid #1f2a39;
}

.profile-detail-list span,
.profile-empty,
.networth-panel p,
.inventory-heading p {
    color: #8d9bae;
}

.profile-empty,
.networth-panel p,
.inventory-heading p {
    margin: 0;
}

.networth-panel {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 12px;
}

.networth-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
}

.networth-breakdown span {
    display: grid;
    gap: 4px;
    color: #8795a8;
    font-size: 12px;
}

.networth-breakdown strong {
    color: #dce8f5;
    font-size: 14px;
}

.inventory-viewer {
    margin-top: 12px;
}

.inventory-heading {
    margin-bottom: 14px;
}

.inventory-container {
    margin-top: 8px;
    background: #090f16;
    border: 1px solid #202c3c;
    border-radius: 8px;
}

.inventory-container summary {
    padding: 13px 15px;
    cursor: pointer;
    font-weight: 700;
}

.inventory-container summary span {
    margin-left: 8px;
    color: #748399;
    font-size: 12px;
    font-weight: 400;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    padding: 0 10px 10px;
}

.inventory-grid article {
    display: flex;
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 9px;
    background: #111a25;
    border: 1px solid #243246;
    border-radius: 7px;
}

.inventory-grid img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    image-rendering: pixelated;
}

.inventory-grid article div {
    min-width: 0;
}

.inventory-grid strong,
.inventory-grid small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inventory-grid small {
    margin-top: 3px;
    color: #8190a4;
}

.backpack-list {
    display: grid;
    gap: 12px;
    padding: 0 10px 10px;
}

.backpack-section {
    overflow: hidden;
    background: #0c141c;
    border: 1px solid #263747;
}

.backpack-section h4 {
    margin: 0;
    padding: 10px 12px;
    color: #dbe8f2;
    background: #111d27;
    border-bottom: 1px solid #263747;
}

.backpack-section h4 small {
    margin-left: 7px;
    color: #7f90a1;
    font-weight: 400;
}

.backpack-section .inventory-grid {
    padding-top: 10px;
}

@media (max-width: 760px) {
    .profile-detail-grid,
    .inventory-grid {
        grid-template-columns: 1fr;
    }

    .networth-panel {
        display: grid;
    }
}

.combat-hero {
    border-left-color: #ef4444;
}

.combat-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid #293746;
    background: #293746;
}

.combat-tabs button {
    min-height: 52px;
    border: 0;
    background: #111820;
    color: #9eafc0;
    font: inherit;
    cursor: pointer;
}

.combat-tabs button:hover,
.combat-tabs button.active {
    background: #182431;
    color: #67c5ff;
}

.combat-panel {
    display: none;
}

.combat-panel.active {
    display: block;
}

.combat-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.combat-card-grid article,
.combat-drop-list article,
.combat-timer-grid article {
    padding: 16px;
    border: 1px solid #263544;
    background: #0d141b;
}

.combat-card-grid article > span {
    color: #f5ba45;
    font-size: 0.72rem;
    text-transform: uppercase;
}

.combat-card-grid article.clickable {
    transition: border-color 120ms ease, transform 120ms ease;
    cursor: pointer;
}

.combat-card-grid article.clickable:hover,
.combat-card-grid article.clickable:focus {
    transform: translateY(-2px);
    border-color: #4e87ad;
    outline: none;
}

.combat-card-grid article > b {
    display: block;
    margin-top: 13px;
    color: #67c5ff;
    font-size: 0.78rem;
}

.combat-method-guide {
    position: relative;
    margin-top: 12px;
    padding: 20px;
    border: 1px solid #477493;
    background: #0b151e;
}

.combat-method-guide > button {
    position: absolute;
    top: 12px;
    right: 14px;
    border: 0;
    background: transparent;
    color: #9eafc0;
    font-size: 1.6rem;
    cursor: pointer;
}

.combat-method-guide dl {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 9px;
    margin: 16px 0 0;
}

.combat-guide-heading {
    margin: 20px 0 9px;
    color: #dfe7ef;
    font-size: 0.95rem;
}

.combat-gear-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 8px;
}

.combat-gear-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 10px;
    border: 1px solid #263b4b;
    background: #0d141b;
}

.combat-gear-card img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    image-rendering: pixelated;
}

.combat-gear-card span,
.combat-gear-card small {
    display: block;
}

.combat-gear-card small {
    margin-top: 4px;
    color: #8fa2b4;
}

.combat-progression {
    display: grid;
    gap: 7px;
}

.combat-progression article {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 11px;
    border: 1px solid #263b4b;
    background: #0d141b;
}

.combat-progression article > b {
    display: grid;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 50%;
    background: #17334a;
    color: #67c5ff;
}

.combat-progression span,
.combat-progression small {
    display: block;
}

.combat-progression small {
    margin-top: 4px;
    color: #a9b8c5;
    line-height: 1.45;
}

.combat-guide-source {
    display: inline-block;
    margin-top: 14px;
    color: #67c5ff;
}

.slayer-guide-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.slayer-guide-picker button {
    padding: 9px 13px;
    border: 1px solid #334b5e;
    background: #101a23;
    color: #aebdca;
    cursor: pointer;
}

.slayer-guide-picker button:hover,
.slayer-guide-picker button.active {
    border-color: #5d9bc5;
    background: #17334a;
    color: #8fd6ff;
}

#slayerGuideDetail {
    padding: 14px;
    border: 1px solid #31495b;
    background: #09121a;
}

#slayerGuideDetail > h3 {
    margin: 0 0 12px;
}

#slayerGuideDetail .combat-progression {
    margin-top: 10px;
}

.slayer-guide-tip {
    margin: 10px 0 0;
    padding: 11px;
    border-left: 3px solid #f5ba45;
    background: #131b22;
    color: #b9c6d1;
    line-height: 1.5;
}

.combat-method-guide dl > div {
    padding: 13px;
    border: 1px solid #263b4b;
    background: #0d141b;
}

.combat-method-guide dt {
    margin-bottom: 6px;
    color: #f5ba45;
    font-size: 0.74rem;
    text-transform: uppercase;
}

.combat-method-guide dd {
    margin: 0;
    color: #bac7d2;
    line-height: 1.5;
}

.combat-card-grid h3,
.combat-timer-grid h3 {
    margin: 7px 0;
}

.combat-card-grid small,
.combat-drop-list span {
    color: #8295a8;
}

.combat-card-grid p,
.combat-drop-list p {
    margin-bottom: 0;
    color: #aebdca;
    line-height: 1.5;
}

.combat-search {
    width: 100%;
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid #354656;
    background: #070c10;
    color: #e7edf5;
    font: inherit;
}

.combat-drop-list {
    display: grid;
    gap: 7px;
}

.combat-drop-list article {
    display: grid;
    grid-template-columns: minmax(150px, 0.7fr) minmax(150px, 0.8fr) 2fr;
    align-items: center;
    gap: 14px;
}

.combat-drop-list p {
    margin: 0;
}

.combat-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px;
    margin: 14px 0;
}

.combat-checklist label {
    padding: 12px;
    border: 1px solid #263544;
    background: #0d141b;
    cursor: pointer;
}

.combat-checklist input {
    margin-right: 8px;
    accent-color: #57c7ff;
}

.combat-timer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.combat-timer-grid strong {
    display: block;
    margin: 12px 0;
    color: #58e6aa;
    font-size: 1.4rem;
}

.combat-timer-grid button {
    width: 100%;
    padding: 9px;
    border: 1px solid #34516a;
    background: #132435;
    color: #9fdcff;
    cursor: pointer;
}

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

    .combat-drop-list article {
        grid-template-columns: 1fr;
    }
}


.profile-feature-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 22px;
}

.profile-feature-heading h2,
.profile-feature-heading p {
    margin: 0;
}

.profile-feature-heading p {
    margin-top: 7px;
    color: #929daf;
}

.profile-feature-heading > span {
    padding: 7px 11px;
    color: #9fd7ff;
    background: rgba(54, 162, 235, 0.12);
    border: 1px solid rgba(54, 162, 235, 0.3);
    border-radius: 999px;
    white-space: nowrap;
}

.profile-feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.profile-feature-grid article {
    display: flex;
    gap: 11px;
    align-items: center;
    min-height: 48px;
    padding: 8px 12px;
    background: #141923;
    border: 1px solid #252d3a;
    border-radius: 9px;
}

.profile-feature-grid b {
    width: 52px;
    color: #6f849d;
    font-size: 9px;
    letter-spacing: 0.06em;
    text-align: left;
}

.profile-attribution {
    color: #7f8b9d;
    font-size: 13px;
    text-align: center;
}

.garden-page {
    width: min(1180px, calc(100% - 72px));
    padding: 38px 0 60px;
}

.garden-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.45fr);
    gap: 28px;
    align-items: center;
    padding: 38px;
    background:
        radial-gradient(circle at 12% 10%, rgba(54, 220, 146, 0.18), transparent 36%),
        #0b1412;
    border: 1px solid #235443;
    border-top: 3px solid #46dc9a;
}

.garden-hero h1 {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 7px 0 10px;
    font-size: clamp(40px, 6vw, 68px);
}

.garden-hero h1 img {
    width: 56px;
    height: 56px;
    image-rendering: pixelated;
}

.garden-hero p:last-child,
.garden-note {
    color: #8ea49d;
}

.garden-hero-stat {
    display: grid;
    gap: 7px;
    padding: 22px;
    background: #07100e;
    border: 1px solid #246047;
}

.garden-hero-stat span,
.garden-hero-stat small {
    color: #78948a;
}

.garden-hero-stat strong {
    color: #55e6a6;
    font-size: 20px;
}

.farming-level-control {
    display: grid;
    grid-template-columns: 1fr 74px;
    gap: 7px 10px;
    align-items: center;
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid #203d33;
}

.farming-level-control > span {
    color: #b7cbc4;
    font-weight: 700;
}

.farming-level-control input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    color: #eafff7;
    background: #050b09;
    border: 1px solid #32604f;
}

.farming-level-control small {
    grid-column: 1 / -1;
}

.garden-section {
    margin-top: 18px;
    padding: 26px;
    background: #0b1113;
    border: 1px solid #23332f;
}

a.garden-feature-link {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin-top: 18px;
    padding: 20px 22px;
    color: #dce9e4;
    background: linear-gradient(90deg, rgba(65, 218, 147, 0.1), transparent 45%), #0a1211;
    border: 1px solid #29483e;
    border-left: 3px solid #49dc99;
    text-decoration: none;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
    transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

a.garden-feature-link:hover {
    color: #f1fff9;
    background: linear-gradient(90deg, rgba(65, 218, 147, 0.16), transparent 52%), #0d1916;
    border-color: #46dc9a;
    text-decoration: none;
    transform: translateY(-1px);
}

.garden-feature-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    color: #54dca0;
    background: #10251e;
    border: 1px solid #2f6752;
}

.garden-feature-icon svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: square;
    stroke-linejoin: miter;
    stroke-width: 1.6;
}

.garden-feature-copy > * {
    display: block;
}

.garden-feature-copy small {
    margin-bottom: 4px;
    color: #65dca5;
    font-size: 10px;
    letter-spacing: 0.12em;
}

.garden-feature-copy strong {
    color: #e7f4ef;
    font-size: 19px;
    letter-spacing: 0.01em;
}

.garden-feature-copy span {
    margin-top: 5px;
    color: #91a69e;
    font-size: 13px;
}

a.garden-feature-link > b {
    display: flex;
    gap: 10px;
    align-items: center;
    color: #70e4ad;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

a.garden-feature-link > b span {
    font-size: 20px;
}

@media (max-width: 650px) {
    a.garden-feature-link {
        grid-template-columns: 42px minmax(0, 1fr);
        padding: 16px;
    }

    .garden-feature-icon {
        width: 42px;
        height: 42px;
    }

    a.garden-feature-link > b {
        display: none;
    }
}

.greenhouse-page {
    width: min(1180px, calc(100% - 72px));
    padding: 38px 0 60px;
}

.greenhouse-page-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.45fr);
    gap: 26px;
    align-items: center;
    padding: 34px;
    background:
        radial-gradient(circle at 15% 0, rgba(84, 220, 160, 0.16), transparent 36%),
        #091310;
    border: 1px solid #2a5143;
    border-top: 3px solid #55dca0;
}

.greenhouse-page-hero h1 {
    margin: 6px 0 9px;
    font-size: clamp(38px, 6vw, 62px);
}

.greenhouse-page-hero p:last-child {
    color: #8fa39c;
}

.greenhouse-top-stat {
    display: grid;
    gap: 7px;
    padding: 20px;
    background: #07100d;
    border: 1px solid #2c5b49;
}

.greenhouse-top-stat span,
.greenhouse-top-stat small {
    color: #789088;
}

.greenhouse-top-stat strong {
    color: #55e6a6;
    font-size: 18px;
}

.greenhouse-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 220px 150px;
    gap: 10px;
    margin-top: 16px;
    padding: 14px;
    background: #0b1213;
    border: 1px solid #253936;
}

.greenhouse-toolbar label,
.greenhouse-toolbar > div {
    display: grid;
    gap: 6px;
}

.greenhouse-toolbar span {
    color: #778d86;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.greenhouse-toolbar input,
.greenhouse-toolbar select {
    min-width: 0;
    padding: 10px;
    color: #dceae5;
    background: #070d0c;
    border: 1px solid #315146;
}

.mutation-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.mutation-card {
    overflow: hidden;
    background: #0b1213;
    border: 1px solid #283a3a;
    border-left: 3px solid #718079;
}

.mutation-card.rarity-uncommon { border-left-color: #55d98b; }
.mutation-card.rarity-rare { border-left-color: #4a83e8; }
.mutation-card.rarity-epic { border-left-color: #ad55db; }
.mutation-card.rarity-legendary { border-left-color: #e6a43f; }

.mutation-market-link {
    display: grid;
    grid-template-columns: 30px 50px minmax(0, 1fr) auto;
    gap: 13px;
    align-items: center;
    padding: 16px 18px;
    color: inherit;
    text-decoration: none;
}

.mutation-market-link:hover {
    background: rgba(85, 220, 160, 0.05);
}

.mutation-market-link > img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    image-rendering: pixelated;
}

.mutation-rank {
    color: #526860;
    font-size: 12px;
}

.mutation-title,
.mutation-profit {
    display: grid;
    gap: 3px;
}

.mutation-title small,
.mutation-profit small,
.mutation-title em,
.mutation-profit em {
    color: #71877f;
    font-size: 10px;
    font-style: normal;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mutation-title strong {
    font-size: 20px;
}

.mutation-title em {
    color: #57dca1;
}

.mutation-profit {
    justify-items: end;
}

.mutation-profit strong {
    color: #59e4a6;
    font-size: 18px;
}

.mutation-breakdown {
    display: flex;
    gap: 24px;
    padding: 10px 18px;
    background: #09100f;
    border-top: 1px solid #1e302c;
    border-bottom: 1px solid #1e302c;
}

.mutation-breakdown span {
    color: #71877f;
    font-size: 11px;
}

.mutation-breakdown strong {
    margin-left: 4px;
    color: #b9ccc5;
}

.mutation-recipe {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr 1.5fr;
    gap: 1px;
    background: #21342e;
}

.mutation-recipe > div {
    display: grid;
    gap: 5px;
    padding: 13px 18px;
    background: #0c1613;
}

.mutation-recipe small {
    color: #627970;
    font-size: 9px;
    letter-spacing: 0.07em;
}

.mutation-recipe strong {
    color: #b9ccc5;
    font-size: 12px;
    line-height: 1.4;
}

.mutation-layout {
    display: grid;
    grid-template-columns: minmax(180px, 0.55fr) minmax(220px, 1fr);
    gap: 22px;
    align-items: center;
    padding: 18px;
    background: #09100f;
    border-top: 1px solid #1e302c;
}

.mutation-layout-card {
    grid-column: 1 / -1;
    margin-top: 4px;
}

.mutation-layout-card .mutation-layout {
    border: 1px solid #29493d;
}

.mutation-layout small {
    display: block;
    margin-bottom: 10px;
    color: #65dca5;
    font-size: 9px;
    letter-spacing: 0.1em;
}

.mutation-layout-grid {
    display: grid;
    grid-template-columns: repeat(var(--layout-columns), minmax(30px, 46px));
    gap: 4px;
}

.mutation-layout-cell {
    display: grid;
    aspect-ratio: 1;
    place-items: center;
    min-width: 30px;
    color: #dcebe5;
    border: 1px solid #365047;
    font-size: 12px;
    font-weight: 700;
}

.mutation-layout-cell.target,
.mutation-layout-legend i.target {
    color: #07120e;
    background: #59e4a6;
    border-color: #7cf0ba;
}

.mutation-layout-cell.empty {
    color: #40534c;
    background: #0c1512;
}

.mutation-layout-cell.plant-0,
.mutation-layout-legend i.plant-0 { background: #245f47; }
.mutation-layout-cell.plant-1,
.mutation-layout-legend i.plant-1 { background: #345c84; }
.mutation-layout-cell.plant-2,
.mutation-layout-legend i.plant-2 { background: #725181; }
.mutation-layout-cell.plant-3,
.mutation-layout-legend i.plant-3 { background: #806138; }
.mutation-layout-cell.plant-4,
.mutation-layout-legend i.plant-4 { background: #7d4545; }
.mutation-layout-cell.plant-5,
.mutation-layout-legend i.plant-5 { background: #397078; }
.mutation-layout-cell.plant-6,
.mutation-layout-legend i.plant-6 { background: #62663a; }
.mutation-layout-cell.plant-7,
.mutation-layout-legend i.plant-7 { background: #594b73; }

.mutation-layout-legend {
    display: flex;
    gap: 8px 18px;
    flex-wrap: wrap;
}

.mutation-layout-legend span {
    display: flex;
    gap: 7px;
    align-items: center;
    color: #b9ccc5;
    font-size: 12px;
}

.mutation-layout-legend i {
    display: grid;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    place-items: center;
    color: #eefaf5;
    border: 1px solid #507064;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
}

.mutation-layout-legend em,
.mutation-layout-note {
    width: 100%;
    color: #71877f;
    font-size: 11px;
    font-style: normal;
    line-height: 1.5;
}

.mutation-layout-note {
    padding: 14px 18px;
    background: #09100f;
    border-top: 1px solid #1e302c;
}

.greenhouse-disclaimer {
    margin-top: 16px;
}

.mining-page {
    width: min(100%, 1180px);
    max-width: 1180px;
    margin-inline: auto;
}

.mining-hero {
    padding: 28px;
    background: linear-gradient(135deg, rgba(48, 190, 220, 0.12), transparent 55%), #0b1115;
    border: 1px solid #253943;
}

.mining-hero h1 {
    display: flex;
    gap: 14px;
    align-items: center;
    margin: 8px 0;
}

.mining-hero h1 img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    image-rendering: pixelated;
}

.mining-hero p:last-child {
    color: #8da3ad;
}

.mining-tool-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.mining-tool-grid article {
    display: grid;
    gap: 1px;
    padding: 16px;
    background: #0b1216;
    border: 1px solid #263a43;
}

.mining-tool-grid h2 {
    margin: 0 0 9px;
    color: #59d8e4;
    font-size: 16px;
}

.mining-tool-grid a,
.mining-tool-grid span {
    padding: 9px 10px;
    color: #c5d5da;
    background: #0e181d;
    border-left: 2px solid #31515c;
    text-decoration: none;
}

.mining-tool-grid a:hover {
    color: #70e3ec;
    border-left-color: #59d8e4;
}

.mining-panel {
    margin-top: 14px;
    padding: 20px;
    scroll-margin-top: 16px;
    background: #0a1115;
    border: 1px solid #263a43;
}

.mining-panel h2,
.mining-panel h3 {
    margin: 4px 0 14px;
}

.mining-panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.mining-panel-heading > span,
.mining-panel-heading > a {
    color: #7fa4af;
    font-size: 12px;
}

.mining-price-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.gemstone-market-card {
    overflow: hidden;
    background: #0d181d;
    border: 1px solid #243a43;
}

.gemstone-market-card header {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 11px;
    color: #62dce6;
    border-bottom: 1px solid #243a43;
}

.gemstone-market-card a {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 9px 11px;
    color: #d6e4e8;
    border-bottom: 1px solid #17272e;
    text-decoration: none;
}

.gemstone-market-card a:hover {
    background: #112229;
}

.mining-price-grid img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    image-rendering: pixelated;
}

.mining-price-grid span,
.mining-price-grid small {
    display: block;
}

.mining-price-grid small {
    margin-top: 4px;
    color: #77909a;
}

.gemstone-market-card a > span:not(:first-child) {
    min-width: 92px;
    text-align: right;
}

.mining-price-grid b {
    color: #62dce6;
    font-size: 12px;
}

.mining-explanation {
    max-width: 920px;
    margin: -6px 0 16px;
    color: #8da3ad;
    font-size: 13px;
    line-height: 1.6;
}

.mining-form-grid,
.mining-tracker-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    align-items: stretch;
}

.mining-tracker-columns {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.mining-form-grid label,
.mining-tracker-columns > div,
.mining-tracker-columns > label {
    display: grid;
    gap: 7px;
    align-content: start;
    padding: 13px;
    color: #8da3ad;
    background: #0d181d;
    border: 1px solid #243a43;
    font-size: 11px;
    min-width: 0;
}

.mining-form-grid input,
.mining-form-grid select,
.mining-tracker-columns input,
.mining-tracker-columns select,
.mining-inline-control input {
    width: 100%;
    padding: 10px;
    color: #deedf0;
    background: #080e11;
    border: 1px solid #31505b;
    box-sizing: border-box;
    min-width: 0;
}

.mining-result {
    display: grid;
    gap: 7px;
    align-content: center;
    padding: 14px;
    background: linear-gradient(135deg, rgba(65, 208, 218, 0.1), transparent), #0d181d;
    border: 1px solid #31505b;
}

.mining-result small,
.mining-result span {
    color: #77909a;
}

.mining-result strong {
    color: #62dce6;
    font-size: 18px;
}

.mining-checklist {
    display: grid;
    gap: 5px;
}

.mining-checklist label {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 7px;
    color: #c5d5da;
    background: #091216;
}

.mining-checklist input {
    width: auto;
}

.mining-button {
    align-self: center;
    padding: 10px 14px;
    color: #061114;
    background: #59d8e4;
    border: 0;
    cursor: pointer;
    font-weight: 700;
}

.mining-inline-control {
    display: flex;
    gap: 10px;
    align-items: center;
    max-width: 210px;
    margin-bottom: 10px;
    color: #8da3ad;
}

.mining-table {
    display: grid;
    gap: 4px;
}

.mining-table > a,
.mining-table > button {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 18px;
    padding: 10px 12px;
    color: #bdcfd5;
    background: #0d181d;
    border: 0;
    text-decoration: none;
    text-align: left;
}

.mining-table > button {
    cursor: pointer;
}

.mining-table > div {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 18px;
    padding: 9px 12px;
    color: #bdcfd5;
    background: #0d181d;
}

.mining-table strong {
    color: #62dce6;
}

.forge-recipe-breakdown {
    display: flex;
    gap: 8px 18px;
    flex-wrap: wrap;
    padding: 12px;
    color: #9db2b9;
    background: #081014;
    border-left: 2px solid #59d8e4;
    font-size: 12px;
}

.forge-recipe-breakdown[hidden] {
    display: none;
}

.forge-recipe-breakdown b {
    width: 100%;
    color: #62dce6;
}

.mining-profile-search {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

.mining-profile-search input {
    min-width: 230px;
    padding: 10px;
    color: #deedf0;
    background: #080e11;
    border: 1px solid #31505b;
}

.mining-profile-search span {
    color: #75a0aa;
    font-size: 12px;
}

.mining-profile-results {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.mining-profile-results article {
    display: grid;
    gap: 5px;
    padding: 12px;
    background: #0d181d;
    border: 1px solid #243a43;
}

.mining-profile-results small,
.mining-profile-results span,
.mining-advice {
    color: #8da3ad;
}

.mining-detail-tool {
    margin-top: 10px;
    padding: 12px;
    background: #0c161a;
    border: 1px solid #243a43;
}

.mining-detail-tool summary {
    color: #62dce6;
    cursor: pointer;
}

.mining-detail-tool .mining-form-grid {
    margin-top: 12px;
}

.mining-advice {
    margin-top: 10px;
    padding: 12px;
    background: #0d181d;
}

.mining-chart {
    width: 100%;
    height: 220px;
    margin-top: 12px;
    background: linear-gradient(#0d181d, #091115);
    border: 1px solid #243a43;
}

.mining-history-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
    margin-top: 14px;
}

.mining-history-toolbar label {
    display: grid;
    gap: 5px;
    color: #8da3ad;
    font-size: 11px;
}

.mining-history-toolbar select {
    min-width: 260px;
    padding: 9px;
    color: #deedf0;
    background: #080e11;
    border: 1px solid #31505b;
}

.mining-history-toolbar strong {
    color: #62dce6;
    font-size: 12px;
}

.mining-subpage-hero {
    margin-top: 12px;
    padding: 22px;
    background: linear-gradient(135deg, rgba(48, 190, 220, 0.1), transparent 58%), #0b1115;
    border: 1px solid #253943;
}

.mining-subpage-hero h1 {
    margin: 6px 0;
    font-size: clamp(24px, 3vw, 36px);
}

.mining-subpage-hero p:last-child {
    margin-bottom: 0;
    color: #8da3ad;
}

@media (max-width: 900px) {
    .mining-tool-grid,
    .mining-price-grid,
    .mining-form-grid,
    .mining-tracker-columns,
    .mining-profile-results {
        grid-template-columns: 1fr;
    }

    .mining-table > a,
    .mining-table > button {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .mining-profile-search {
        align-items: stretch;
        flex-direction: column;
    }

    .mining-history-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .mining-panel,
    .mining-hero,
    .mining-subpage-hero {
        padding: 14px;
    }

    .mining-form-grid,
    .mining-tracker-columns {
        grid-template-columns: minmax(0, 1fr);
    }

    .gemstone-market-card a {
        grid-template-columns: 1fr;
    }

    .gemstone-market-card a > span:not(:first-child) {
        text-align: left;
    }
}

/* Mining uses the original simple Bazaar Tracker visual language. */
.mining-page,
.mining-subpage {
    color: #d8dee9;
    background: #05070a;
}

.mining-hero,
.mining-subpage-hero,
.mining-panel,
.mining-tool-grid article,
.gemstone-market-card,
.mining-form-grid label,
.mining-tracker-columns > div,
.mining-tracker-columns > label,
.mining-result,
.mining-profile-results article,
.mining-detail-tool,
.mining-advice {
    background: #090d12;
    background-image: none;
    border-color: #202a36;
    border-radius: 0;
    box-shadow: none;
}

.mining-panel,
.mining-hero,
.mining-subpage-hero {
    border: 1px solid #202a36;
}

.mining-tool-grid h2,
.mining-panel h2,
.mining-panel h3,
.mining-subpage-hero h1 {
    color: #e5e9f0;
}

.mining-tool-grid a,
.mining-tool-grid span,
.gemstone-market-card a,
.mining-table > a,
.mining-table > button,
.mining-checklist label,
.forge-recipe-breakdown {
    color: #c7d0dd;
    background: #0b111a;
    border-color: #202a36;
}

.mining-tool-grid a,
.mining-tool-grid span {
    border-left-color: #27496d;
}

.mining-tool-grid a:hover,
.gemstone-market-card a:hover,
.mining-table > button:hover {
    color: #ffffff;
    background: #101b2a;
    border-color: #356b9a;
}

.mining-button {
    color: #dce8f5;
    background: #13243a;
    border: 1px solid #294d72;
    border-radius: 0;
}

.mining-button:hover {
    background: #1a3150;
}

.mining-form-grid input,
.mining-form-grid select,
.mining-tracker-columns input,
.mining-tracker-columns select,
.mining-inline-control input,
.mining-profile-search input,
.mining-history-toolbar select {
    color: #d8dee9;
    background: #05080d;
    border-color: #293849;
    border-radius: 0;
}

.mining-result strong,
.mining-price-grid b,
.mining-table strong,
.mining-history-toolbar strong,
.gemstone-market-card header,
.mining-detail-tool summary {
    color: #58a6d8;
}

.mining-explanation,
.mining-result small,
.mining-result span,
.mining-profile-results small,
.mining-profile-results span,
.mining-advice,
.mining-subpage-hero p:last-child {
    color: #8b98aa;
}

.mining-chart {
    height: 300px;
    background: #080b10;
    border-color: #202a36;
}

.mining-panel-heading > a,
.mining-panel-heading > span {
    color: #6fa8d1;
}

/* Global Bazaar color system */
:root {
    --theme-page: #05080c;
    --theme-sidebar: #090c11;
    --theme-panel: #15191f;
    --theme-panel-dark: #0d1117;
    --theme-row: #10151c;
    --theme-border: #252d39;
    --theme-border-blue: #2c4058;
    --theme-text: #e5e9f0;
    --theme-muted: #8b95a5;
    --theme-blue: #36a2eb;
    --theme-blue-dark: #0d1623;
    --theme-blue-hover: #14243a;
    --theme-pink: #ff6384;
}

html,
body,
.app-layout {
    background: var(--theme-page);
    color: var(--theme-text);
}

.sidebar {
    background: var(--theme-sidebar);
    border-color: var(--theme-border);
    box-shadow: none;
}

.sidebar-link {
    color: #c7cfdb;
}

.sidebar-link:hover {
    background: var(--theme-blue-hover);
}

.sidebar-link.active {
    color: #ffffff;
    background: var(--theme-blue-dark);
    box-shadow: inset 3px 0 var(--theme-blue);
}

.page-content [class*="-panel"],
.page-content [class*="-card"],
.page-content [class*="-hero"],
.page-content [class*="-toolbar"],
.page-content [class*="-summary"],
.page-content [class*="-breakdown"],
.page-content [class*="-detail"] {
    background-color: var(--theme-panel);
    background-image: none;
    border-color: var(--theme-border);
    box-shadow: none;
}

.page-content [class*="-row"],
.page-content table,
.page-content thead,
.page-content tbody,
.page-content details,
.page-content .empty-state {
    border-color: var(--theme-border);
}

.page-content [class*="-row"]:not(.prediction-heading),
.page-content tbody tr,
.page-content details,
.page-content .empty-state {
    background-color: var(--theme-row);
}

.page-content input,
.page-content select,
.page-content textarea {
    color: var(--theme-text);
    background: #090d13;
    border-color: var(--theme-border-blue);
    border-radius: 5px;
    box-shadow: none;
}

.page-content button,
.page-content .hub-button,
.page-content [class*="-button"],
.page-content [class*="-tab"] {
    color: #dce5f0;
    background-color: var(--theme-blue-dark);
    background-image: none;
    border-color: var(--theme-border-blue);
    box-shadow: none;
}

.page-content button:hover,
.page-content .hub-button:hover,
.page-content [class*="-button"]:hover,
.page-content [class*="-tab"]:hover {
    color: #ffffff;
    background-color: var(--theme-blue-hover);
    border-color: #37658f;
}

.page-content button.active,
.page-content [class*="-button"].active,
.page-content [class*="-tab"].active {
    color: #06121c;
    background-color: var(--theme-blue);
    border-color: var(--theme-blue);
}

.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content strong {
    color: var(--theme-text);
}

.page-content p,
.page-content small,
.page-content label,
.page-content .eyebrow {
    border-color: var(--theme-border);
}

.page-content .eyebrow,
.page-content [class*="-label"],
.page-content [class*="-meta"],
.page-content [class*="-note"],
.page-content [class*="-description"] {
    color: var(--theme-muted);
}

.page-content a {
    color: #75b9e8;
}

.page-content th {
    color: #91a0b3;
    background: var(--theme-panel-dark);
    border-color: var(--theme-border);
}

.page-content td {
    border-color: var(--theme-border);
}

.chart-panel,
.ah-history-view,
.market-chart-shell,
.mining-chart {
    background: var(--theme-panel);
    border-color: var(--theme-border);
}

.profit,
.prediction-up,
.garden-positive {
    color: #55d99b !important;
}

.loss,
.prediction-down,
.garden-negative {
    color: #ff738d !important;
}

@media (min-width: 761px) {
    body > .sidebar:hover ~ .page-content,
    body > .sidebar:focus-within ~ .page-content {
        width: calc(100% - 264px);
        margin-right: 16px;
        margin-left: 248px;
    }
}

.alloy-ah-history {
    margin-top: 12px;
    background: #15191f;
    border: 1px solid #252d39;
}

.alloy-ah-history canvas {
    width: 100% !important;
    height: auto !important;
    background: #15191f;
}

.minecraft-login-modal {
    position: fixed;
    inset: 0;
    display: grid;
    padding: 20px;
    place-items: center;
    background: rgba(0, 0, 0, 0.72);
    z-index: 1000;
}

.minecraft-login-modal[hidden] {
    display: none;
}

.minecraft-login-dialog {
    position: relative;
    width: min(420px, 100%);
    box-sizing: border-box;
    padding: 26px;
    color: var(--theme-text);
    background: var(--theme-panel);
    border: 1px solid var(--theme-border);
}

.minecraft-login-dialog h2 {
    margin: 5px 0 10px;
}

.minecraft-login-dialog > p {
    color: var(--theme-muted);
    line-height: 1.5;
}

.minecraft-login-dialog form,
.minecraft-login-dialog label {
    display: grid;
    gap: 8px;
}

.minecraft-login-dialog input {
    box-sizing: border-box;
    width: 100%;
    padding: 11px;
    color: var(--theme-text);
    background: #090d13;
    border: 1px solid var(--theme-border-blue);
}

.minecraft-login-dialog button {
    min-height: 40px;
    padding: 0 13px;
    color: #dce5f0;
    background: var(--theme-blue-dark);
    border: 1px solid var(--theme-border-blue);
    cursor: pointer;
}

.minecraft-login-dialog form button {
    margin-top: 5px;
    color: #06121c;
    background: var(--theme-blue);
    border-color: var(--theme-blue);
}

.minecraft-login-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 34px;
    min-height: 34px !important;
    padding: 0 !important;
    font-size: 22px;
}

.minecraft-login-status {
    min-height: 20px;
    margin-bottom: 8px;
    color: #75b9e8 !important;
}

.home-hero {
    position: relative;
}

.home-profile-login {
    position: absolute;
    top: 12px;
    right: 14px;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    min-height: 36px;
    padding: 0 13px;
    color: #dce5f0;
    background: var(--theme-blue-dark);
    border: 1px solid var(--theme-border-blue);
    border-radius: 5px;
    cursor: pointer;
    z-index: 2;
}

.home-profile-login:hover {
    color: #ffffff;
    background: var(--theme-blue-hover);
    border-color: #37658f;
}

.home-profile-login svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

@media (max-width: 760px) {
    .home-profile-login {
        position: static;
        align-self: center;
        margin: -10px auto 0;
    }
}

@media (max-width: 760px) {
    .greenhouse-page-hero,
    .greenhouse-toolbar,
    .mutation-recipe,
    .mutation-layout {
        grid-template-columns: 1fr;
    }

    .mutation-market-link {
        grid-template-columns: 28px 42px minmax(0, 1fr);
    }

    .mutation-profit {
        grid-column: 2 / -1;
        justify-items: start;
    }

    .mutation-breakdown {
        display: grid;
        gap: 5px;
    }
}

.garden-section-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
    margin-bottom: 20px;
}

.garden-section-heading h2,
.garden-section-heading p {
    margin: 0;
}

.garden-section-heading > span {
    color: #7f978f;
    font-size: 13px;
}

.garden-best-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.garden-best-grid article {
    position: relative;
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 18px;
    background: #101a18;
    border: 1px solid #295141;
}

.garden-best-grid article > img {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
}

.garden-best-grid h3,
.garden-best-grid strong,
.garden-best-grid small {
    display: block;
    margin: 0;
}

.garden-best-grid strong {
    margin-top: 4px;
    color: #59e5a6;
}

.garden-best-grid small {
    margin-top: 2px;
    color: #788f87;
}

.garden-rank {
    position: absolute;
    top: 8px;
    right: 10px;
    color: #59756b;
    font-size: 12px;
}

.visitor-calculator {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.greenhouse-calculator {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
}

.greenhouse-section {
    background:
        radial-gradient(circle at 92% 5%, rgba(70, 220, 154, 0.08), transparent 28%),
        #0b1113;
    border-color: #285043;
}

.greenhouse-calculator label {
    display: grid;
    grid-column: span 4;
    gap: 9px;
    padding: 15px;
    color: #a4b8b0;
    background: rgba(13, 25, 22, 0.88);
    border: 1px solid #29483e;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.025em;
}

.greenhouse-calculator input,
.greenhouse-calculator select {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    height: 42px;
    padding: 10px 11px;
    color: #e3f1ec;
    background: #070e0c;
    border: 1px solid #355c4e;
    border-radius: 4px;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0;
}

.greenhouse-calculator input:focus,
.greenhouse-calculator select:focus {
    outline: 2px solid rgba(70, 220, 154, 0.22);
    border-color: #46dc9a;
}

.greenhouse-calculator article {
    position: relative;
    display: grid;
    grid-column: span 4;
    gap: 5px;
    min-height: 70px;
    padding: 16px 16px 16px 48px;
    background: linear-gradient(135deg, #12231e, #0c1714);
    border: 1px solid #32604f;
    border-radius: 7px;
}

.greenhouse-calculator strong {
    color: #55e6a6;
    font-size: 19px;
}

.greenhouse-calculator article small {
    color: #829a91;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.greenhouse-result-icon {
    position: absolute;
    top: 17px;
    left: 16px;
    color: #56dca0;
    font-size: 21px;
}

.greenhouse-percent-input {
    display: flex;
    align-items: center;
}

.greenhouse-percent-input b {
    display: grid;
    place-items: center;
    height: 42px;
    box-sizing: border-box;
    padding: 10px;
    color: #91aaa1;
    background: #0c1512;
    border: 1px solid #31483f;
    border-left: 0;
    border-radius: 0 4px 4px 0;
}

.greenhouse-percent-input input {
    border-radius: 4px 0 0 4px;
}

.visitor-calculator label,
.visitor-calculator article {
    display: grid;
    gap: 7px;
    padding: 14px;
    color: #8da098;
    background: #101817;
    border: 1px solid #253a34;
    font-size: 13px;
}

.visitor-calculator input {
    min-width: 0;
    padding: 10px;
    color: #e3f1ec;
    background: #080e0d;
    border: 1px solid #31483f;
}

.visitor-calculator strong {
    color: #e3f1ec;
    font-size: 17px;
}

.garden-table-wrap {
    overflow-x: auto;
}

.garden-table {
    width: 100%;
    border-collapse: collapse;
}

.garden-table th,
.garden-table td {
    padding: 12px;
    border-bottom: 1px solid #20302c;
    text-align: right;
    white-space: nowrap;
}

.garden-table th:first-child,
.garden-table td:first-child {
    text-align: left;
}

.garden-table th {
    color: #71877f;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.garden-crop-name {
    display: inline-flex;
    gap: 9px;
    align-items: center;
}

.garden-sale-route {
    display: grid;
    gap: 2px;
    justify-items: end;
}

.garden-sale-route small {
    color: #71877f;
    font-size: 11px;
}

.garden-crop-name img,
.jacob-crop-grid img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    image-rendering: pixelated;
}

.garden-positive {
    color: #57dda1 !important;
}

.garden-negative {
    color: #ff8e8e !important;
}

.jacob-crop-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.jacob-crop-grid article {
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: 14px 8px;
    background: #101817;
    border: 1px solid #243a33;
    text-align: center;
}

.jacob-crop-grid strong {
    color: #55dca0;
}

.jacob-crop-grid small {
    color: #71857e;
}

@media (max-width: 850px) {
    .garden-hero,
    .garden-best-grid,
    .visitor-calculator,
    .greenhouse-calculator {
        grid-template-columns: 1fr;
    }

    .greenhouse-calculator label,
    .greenhouse-calculator article {
        grid-column: auto;
    }

    .jacob-crop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/*
 * Compact interface pass
 * Keep the site closer to a practical in-game companion than a marketing page.
 */
:root {
    --surface-0: #080b10;
    --surface-1: #0c1118;
    --surface-2: #111821;
    --line: #263141;
    --muted: #8b99aa;
    --accent: #49aeea;
}

body {
    background: var(--surface-0);
}

.sidebar {
    background: #090d12;
    border-right-color: #222b37;
    box-shadow: none;
}

.sidebar-link {
    border-radius: 3px;
}

.home-hero,
.home-ah-tracker,
.market-panel,
.prediction-panel,
.method-step,
.poll-row,
.candidate-modal-card,
.profile-tracker-hero,
.profile-search-card,
.profile-results,
.profile-feature-panel,
.profile-feature-grid article,
.profile-stat-grid article,
.shortcut-card {
    background: var(--surface-1);
    border-color: var(--line);
    border-radius: 4px;
    box-shadow: none;
}

.home-hero,
.profile-tracker-hero {
    background: var(--surface-1);
}

.primary-action,
.secondary-action,
.profile-search-row input,
.profile-search-row button,
.search-icon,
.hero-search-card #searchBox,
.hero-search-card #ahSearchBox,
.profile-feature-heading > span {
    border-radius: 3px;
}

.primary-action:hover,
.secondary-action:hover {
    transform: none;
}

.shortcut-card:hover {
    background: var(--surface-2);
    box-shadow: none;
}

.live-dot {
    box-shadow: none;
}

.profile-tracker-page {
    width: min(1080px, calc(100% - 96px));
    padding-top: 24px;
}

.profile-back-link {
    margin-bottom: 12px;
    color: #8195aa;
    font-size: 13px;
}

.profile-back-link:hover {
    color: #b8dfff;
}

.profile-tracker-hero {
    grid-template-columns: minmax(0, 1fr) minmax(390px, 0.85fr);
    gap: 48px;
    padding: 30px;
}

.profile-tracker-hero h1 {
    margin: 5px 0 10px;
    font-size: clamp(32px, 4vw, 45px);
    letter-spacing: -0.03em;
}

.profile-tracker-hero > div > p:last-child {
    font-size: 14px;
    line-height: 1.5;
}

.profile-search-card {
    padding: 18px;
    background: #090d13;
}

.profile-feature-panel {
    padding: 22px;
}

.profile-feature-heading {
    margin-bottom: 15px;
}

.profile-feature-heading h2 {
    font-size: 20px;
}

.profile-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 3px;
}

.profile-feature-grid article {
    min-height: 38px;
    padding: 6px 11px;
    background: #0f151e;
    border: 0;
    border-radius: 0;
}

.profile-feature-grid article:hover {
    background: #141d28;
}

.profile-attribution {
    text-align: left;
}

@media (max-width: 850px) {
    .profile-tracker-hero {
        grid-template-columns: 1fr;
        gap: 22px;
    }
}

@media (max-width: 620px) {
    .profile-feature-grid {
        grid-template-columns: 1fr;
    }
}

.profile-attribution a {
    color: #8ecfff;
}

.profile-shortcut .shortcut-icon {
    color: #8ecfff;
}

@media (max-width: 850px) {
    .profile-tracker-page {
        width: min(100% - 34px, 1180px);
        padding-top: 24px;
    }

    .profile-tracker-hero {
        grid-template-columns: 1fr;
        padding: 28px;
    }

    .profile-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .profile-search-row,
    .profile-feature-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-search-row button {
        min-height: 44px;
    }

    .profile-feature-grid {
        grid-template-columns: 1fr;
    }

    .profile-stat-grid {
        grid-template-columns: 1fr;
    }
}

.mayor-banner {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 10px 14px;
    align-items: center;
    margin-bottom: 24px;
    padding: 12px 16px;
    color: #eef6ff;
    background: linear-gradient(
        90deg,
        rgba(54, 162, 235, 0.2),
        rgba(54, 162, 235, 0.06)
    );
    border: 1px solid rgba(54, 162, 235, 0.32);
    border-radius: 9px;
}

.mayor-label {
    color: #9fd7ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mayor-banner strong {
    font-size: 18px;
}

.mayor-perks {
    overflow: hidden;
    color: #aeb9c8;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-mayor {
    order: 2;
    display: flex;
    margin: auto 4px 0;
    padding: 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    transition: border-color 140ms ease, background 140ms ease;
}

.sidebar-mayor:hover,
.sidebar-mayor.active-mayor {
    background: rgba(54, 162, 235, 0.15);
    border-color: rgba(54, 162, 235, 0.55);
}

.sidebar-mayor .mayor-perks {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.45;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.hub-page {
    max-width: 1180px;
    padding: 48px 42px;
    text-align: center;
}

.mayor-page {
    max-width: 1100px;
    padding: 42px;
    text-align: center;
}

.mayor-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    gap: 22px;
}

.detail-panel {
    padding: 22px;
    background: #0d1016;
    border: 1px solid #202632;
    border-radius: 10px;
}

.detail-panel h2 {
    margin: 0 0 16px;
}

.detail-list {
    display: grid;
    gap: 10px;
}

.detail-row {
    padding: 15px;
    background: #090d14;
    border: 1px solid #272d38;
    border-radius: 7px;
    text-align: center;
}

.detail-row strong {
    color: #9fd7ff;
}

.detail-row p {
    margin: 7px 0 0;
    color: #c5cedb;
    line-height: 1.55;
}

.special-schedule {
    margin-top: 22px;
}

.mayor-events {
    margin-top: 22px;
}

.mayor-archive-panel {
    margin-top: 22px;
}

.mayor-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.archive-mayor-card {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 13px;
    align-items: center;
    min-height: 82px;
    padding: 11px;
    color: #edf2f7;
    background: #090d14;
    border: 1px solid #272d38;
    border-radius: 8px;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.archive-mayor-card:hover,
.archive-mayor-card:focus-visible {
    background: #181d25;
    border-color: #4d6078;
    outline: none;
}

.archive-mayor-card img {
    width: 56px;
    height: 66px;
    object-fit: contain;
    image-rendering: auto;
    filter: drop-shadow(0 7px 10px rgba(0, 0, 0, 0.28));
}

.archive-mayor-card strong,
.archive-mayor-card small {
    display: block;
}

.archive-mayor-card small {
    margin-top: 4px;
    color: #9ba6b7;
    font-size: 12px;
    line-height: 1.35;
}

.archived-term-summary {
    flex-wrap: wrap;
}

.election-polls {
    margin-top: 22px;
}

.poll-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.poll-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 8px 16px;
    width: 100%;
    padding: 14px;
    color: inherit;
    background: #12151a;
    border: 1px solid #202632;
    border-radius: 8px;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.poll-row:hover,
.poll-row:focus-visible {
    background: #181d25;
    border-color: #4d6078;
    outline: none;
}

.poll-row.projected {
    border-color: rgba(99, 230, 190, 0.4);
}

.poll-candidate,
.poll-result {
    display: grid;
    gap: 3px;
}

.poll-candidate-name {
    width: fit-content;
    max-width: 100%;
    padding: 0;
    color: #edf2f7;
    background: none;
    border: 0;
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.poll-candidate-name:hover,
.poll-candidate-name:focus-visible {
    color: #9fd7ff;
    outline: none;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.poll-candidate span,
.poll-candidate small,
.poll-result small {
    color: #9ba6b7;
}

.poll-result {
    text-align: right;
}

.candidate-modal[hidden] {
    display: none;
}

.candidate-modal {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
}

.candidate-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 13, 0.82);
    backdrop-filter: blur(5px);
}

.candidate-modal-card {
    position: relative;
    z-index: 1;
    width: min(680px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 28px;
    color: #edf2f7;
    background: #0d1016;
    border: 1px solid #354052;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.candidate-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    place-items: center;
    color: #d9e0ea;
    background: #242a34;
    border: 1px solid #3b4554;
    border-radius: 50%;
    cursor: pointer;
}

.candidate-modal-close svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.candidate-modal-close:hover {
    color: #ffffff;
    background: #303846;
}

.candidate-profile {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    text-align: left;
}

.candidate-portrait-wrap {
    position: relative;
    display: grid;
    width: 190px;
    height: 236px;
    overflow: hidden;
    place-items: center;
    background:
        radial-gradient(circle at 50% 20%, rgba(143, 199, 255, 0.18), transparent 42%),
        linear-gradient(145deg, #162236, #090d14);
    border: 1px solid #465874;
    border-radius: 12px;
}

.candidate-portrait {
    width: calc(100% - 16px);
    height: calc(100% - 14px);
    object-fit: contain;
    image-rendering: auto;
    filter: drop-shadow(0 13px 16px rgba(0, 0, 0, 0.38));
}

.candidate-portrait-fallback {
    display: none;
    color: #9fd7ff;
    font-size: 70px;
    font-weight: 800;
}

.candidate-portrait-fallback.visible {
    display: block;
}

.candidate-profile-copy h2 {
    margin: 4px 0 14px;
    font-size: 32px;
}

.candidate-vote-summary {
    display: flex;
    gap: 14px;
    align-items: baseline;
}

.candidate-vote-summary strong {
    color: #63e6be;
    font-size: 34px;
}

.candidate-vote-summary span {
    color: #9ba6b7;
}

.candidate-modal-perks {
    display: grid;
    gap: 10px;
    margin-top: 26px;
}

.candidate-perk {
    padding: 15px;
    text-align: left;
    background: #090d14;
    border: 1px solid #292f3a;
    border-radius: 8px;
}

.candidate-perk > div {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.candidate-perk strong {
    color: #9fd7ff;
}

.candidate-perk span {
    padding: 4px 7px;
    color: #d7c89c;
    background: rgba(215, 200, 156, 0.1);
    border-radius: 5px;
    font-size: 11px;
}

.candidate-perk p {
    margin: 7px 0 0;
    color: #c5cedb;
    line-height: 1.5;
}

body.modal-open {
    overflow: hidden;
}

.poll-bar {
    grid-column: 1 / -1;
    height: 7px;
    overflow: hidden;
    background: #252a33;
    border-radius: 999px;
}

.poll-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #36a2eb, #63e6be);
    border-radius: inherit;
}

.detail-note {
    color: #9ba6b7;
}

.schedule-grid,
.event-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.schedule-card,
.event-card {
    display: flex;
    padding: 16px;
    flex-direction: column;
    gap: 7px;
    background: #090d14;
    border: 1px solid #272d38;
    border-radius: 7px;
    text-align: center;
}

.schedule-card strong,
.event-card strong {
    color: #9fd7ff;
    font-size: 19px;
}

.event-card span {
    color: #aeb9c8;
}

.event-card em {
    color: #82d4a3;
    font-size: 13px;
    font-style: normal;
    line-height: 1.4;
}

.event-card small {
    color: #c5cedb;
    line-height: 1.45;
}

.schedule-card span {
    color: #edf2f7;
}

.schedule-card small {
    color: #8f9bad;
}

.hub-header {
    margin-bottom: 30px;
    text-align: center;
}

.hub-header h1 {
    margin: 0;
    font-size: 36px;
}

.hub-header > p:last-child {
    max-width: 650px;
    margin: 10px auto 0;
    color: #9ba6b7;
    font-size: 17px;
}

.flip-type-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
}

.flip-type-card {
    overflow: hidden;
    background: #101216;
    border: 1px solid #242833;
    border-radius: 9px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.flip-type-title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: #1c2028;
}

.flip-type-title svg {
    width: 40px;
    height: 40px;
    fill: #ffffff;
}

.flip-type-item-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    image-rendering: pixelated;
}

.flip-type-title h2 {
    margin: 0;
    color: #ffffff;
    font-size: 25px;
    font-weight: 500;
}

.flip-type-body {
    display: flex;
    min-height: 220px;
    box-sizing: border-box;
    padding: 24px 20px 20px;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.flip-type-body p {
    margin: 0 0 24px;
    color: #f0f0f0;
    font-size: 18px;
    line-height: 1.65;
}

.hub-button {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    margin-top: auto;
    padding: 0 18px;
    color: #ffffff;
    background: #315e8e;
    border: 1px solid #3f71a6;
    border-radius: 7px;
    text-decoration: none;
    font-size: 17px;
    transition: background 140ms ease, transform 140ms ease;
}

.hub-button:hover {
    background: #3b70a8;
    transform: translateY(-1px);
}

.hub-button.disabled {
    color: #aeb6c1;
    background: #30343a;
    border-color: #3d424a;
    cursor: not-allowed;
}

.flips-page {
    max-width: 1180px;
    padding: 42px;
    text-align: center;
}

.list-page-header {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 26px;
    text-align: center;
}

.list-page-header > div {
    flex: 1;
}

.list-page-header h1 {
    margin: 0;
    font-size: 34px;
}

.list-page-header p:last-child {
    margin: 9px 0 0;
    color: #9ba6b7;
}

.back-link {
    padding: 10px 14px;
    color: #dce7f4;
    background: #0e131d;
    border: 1px solid #242d3d;
    border-radius: 7px;
    text-decoration: none;
}

.back-link:hover {
    background: #171f2d;
}

button {
    padding: 10px 16px;
    cursor: pointer;
    color: #e8edf5;
    background: #0e131d;
    border: 1px solid #242d3d;
    border-radius: 7px;
}

button:hover {
    background: #171f2d;
    border-color: #455268;
}

.search-container {
    position: relative;
}

#searchBox,
#ahSearchBox,
#detailSearchBox,
#auctionItemSearch {
    width: 320px;
    padding: 11px 12px;
    font-size: 16px;
    color: #edf2f7;
    background: #0b0f17;
    border: 1px solid #2a3140;
    border-radius: 6px;
    outline: none;
}

#searchBox:focus,
#ahSearchBox:focus,
#detailSearchBox:focus,
#auctionItemSearch:focus {
    border-color: #36A2EB;
    box-shadow: 0 0 0 3px rgba(54, 162, 235, 0.18);
}

#suggestions,
#ahSuggestions,
#detailSuggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #0b0f17;
    border: 1px solid #2a3140;
    border-radius: 6px;
    display: none;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 6px;
}

.home-shell #suggestions,
.home-shell #ahSuggestions {
    max-height: 156px;
}

.suggestion {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #1b2230;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: none;
}

.suggestion-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    object-fit: contain;
    image-rendering: pixelated;
}

.suggestion:hover {
    background: #141c29;
}

.item-page {
    max-width: 1320px;
    padding: 32px 34px 48px;
    text-align: center;
}

.bz-central-page {
    max-width: 1320px;
    padding: 38px 34px 64px;
}

.bz-central-landing {
    max-width: 1180px;
    margin: 0 auto;
    text-align: center;
}

.item-detail-shell {
    text-align: center;
}

.item-header {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #202632;
    text-align: center;
}

.item-header h1 {
    margin: 0;
    font-size: 32px;
}

.item-overview {
    display: grid;
    grid-template-columns: 160px repeat(2, minmax(180px, 260px));
    gap: 18px;
    align-items: stretch;
    margin: 24px 0;
    justify-content: center;
}

.item-overview #itemImage {
    width: 160px;
    height: 140px;
    box-sizing: border-box;
    padding: 38px 48px;
    background: #0d1016;
    border: 1px solid #202632;
    border-radius: 10px;
}

.price-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px 22px;
    background: #0d1016;
    border: 1px solid #202632;
    border-radius: 10px;
    text-align: center;
}

.price-card > span,
.price-card small {
    color: #8f9bad;
}

.price-card strong {
    margin: 8px 0 3px;
    font-size: 28px;
}

.buy-card {
    border-top: 3px solid #36a2eb;
}

.sell-card {
    border-top: 3px solid #ff6262;
}

.chart-panel {
    padding: 22px;
    background: #15181e;
    border: 1px solid #202632;
    border-radius: 10px;
}

.chart-toolbar {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 16px;
    text-align: center;
}

.chart-toolbar h2 {
    margin: 0;
}

.prices {
    margin: 20px 0;
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: center;
}

.buttons button {
    min-width: 52px;
    padding: 8px 12px;
}

.buttons button.active {
    background: #36a2eb;
    border-color: #36a2eb;
    color: #081018;
}

.jerry-active-rotation {
    border-color: #9b6cff;
    background: rgba(155, 108, 255, 0.1);
}

.jerry-rotation-perk {
    display: grid;
    gap: 3px;
    margin-top: 10px;
}

.jerry-rotation-perk b {
    color: #d8c6ff;
}

.jerry-rotation-perk span {
    color: #aeb5c2;
    font-size: 0.9rem;
}

canvas {
    max-width: 1200px;
    width: 100%;
    margin: auto;
}

.market-context {
    margin-top: 18px;
    --context-left-offset: 0px;
    --context-right-offset: 0px;
}

.market-context-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    padding-left: var(--context-left-offset);
    padding-right: var(--context-right-offset);
    color: #c5cedb;
}

.market-context-heading small {
    color: #8290a3;
}

.market-context-timeline {
    position: relative;
    min-height: 56px;
    margin-left: var(--context-left-offset);
    margin-right: var(--context-right-offset);
    overflow: hidden;
    background: #0f1319;
    border: 1px solid #252c36;
    border-radius: 6px;
}

.market-context-segment {
    position: absolute;
    top: 0;
    bottom: 0;
    display: grid;
    align-content: center;
    gap: 3px;
    min-height: 56px;
    padding: 8px 10px;
    overflow: hidden;
    background:
        linear-gradient(
            135deg,
            hsla(var(--segment-hue), 62%, 48%, 0.18),
            hsla(var(--segment-hue), 62%, 32%, 0.07)
        );
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.market-context-gap {
    min-width: 4px;
    padding-left: 6px;
    padding-right: 6px;
    background:
        repeating-linear-gradient(
            135deg,
            rgba(148, 163, 184, 0.12) 0,
            rgba(148, 163, 184, 0.12) 5px,
            rgba(15, 19, 25, 0.42) 5px,
            rgba(15, 19, 25, 0.42) 10px
        );
    border-left: 1px solid rgba(148, 163, 184, 0.24);
    border-right: 1px solid rgba(148, 163, 184, 0.24);
}

.market-context-segment strong,
.market-context-segment span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.15;
}

.market-context-segment strong {
    color: #eef3fb;
    font-size: 14px;
    font-weight: 700;
}

.market-context-segment span {
    color: #aab4c3;
    font-size: 11px;
}

.market-context-gap strong,
.market-context-gap span {
    color: #8794a6;
}

.craft-section {
    margin: 24px 0 0;
    padding: 22px;
    box-sizing: border-box;
    text-align: center;
    background: #0b0f17;
    border: 1px solid #1b2230;
    border-radius: 8px;
}

.craft-section h2 {
    margin: 0 0 18px;
}

.craft-ingredients {
    display: grid;
    gap: 8px;
}

.craft-ingredient {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    background: #090d14;
    border: 1px solid #1b2230;
    border-radius: 6px;
    text-align: left;
}

.craft-ingredient img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    image-rendering: pixelated;
}

.craft-ingredient small {
    display: block;
    margin-top: 4px;
    color: #8ea0b8;
}

.craft-summary {
    display: flex;
    justify-content: center;
    gap: 22px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #1b2230;
}

.mutation-recipe-details {
    grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(190px, 0.75fr));
    gap: 12px;
}

.mutation-recipe-detail {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    min-height: 92px;
    padding: 16px;
    color: #dcebe5;
    background: linear-gradient(145deg, rgba(68, 221, 151, 0.08), transparent 58%), #09120f;
    border: 1px solid #29493d;
    text-align: left;
}

.mutation-spreading-detail {
    border-left: 3px solid #4cdd9b;
}

.mutation-detail-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: #58dfa0;
    background: #10251d;
    border: 1px solid #2e604d;
}

.mutation-recipe-detail small,
.mutation-recipe-detail strong,
.mutation-recipe-detail em {
    display: block;
}

.mutation-recipe-detail small {
    margin-bottom: 7px;
    color: #65dca5;
    font-size: 10px;
    letter-spacing: 0.1em;
}

.mutation-recipe-detail strong {
    line-height: 1.45;
}

.mutation-recipe-detail em {
    margin-top: 5px;
    color: #8ea69d;
    font-size: 12px;
    font-style: normal;
}

@media (max-width: 850px) {
    .mutation-recipe-details {
        grid-template-columns: 1fr;
    }
}

.loss {
    color: #ff7b7b;
}

.prediction-locked-link {
    display: block;
    color: #9fb0bc;
    text-decoration: none;
}

.prediction-locked-link:hover {
    color: #54dca0;
}

#itemImage {
    width: 128px;
    height: 128px;
    object-fit: contain;
    image-rendering: pixelated;
}

.home-shell {
    max-width: 1180px;
    padding: 26px 34px 64px;
    text-align: center;
}

.home-header {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 22px;
    padding: 18px 0 24px;
    border-bottom: 1px solid #1b2230;
    text-align: center;
}

.home-hero {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: minmax(240px, 0.65fr) minmax(340px, 1.35fr);
    gap: 36px;
    align-items: center;
    min-height: auto;
    padding: 26px 28px;
    overflow: visible;
    background: #0d1118;
    border: 1px solid #252d39;
    border-radius: 6px;
    box-shadow: none;
    text-align: left;
}

.home-hero::before,
.home-hero::after {
    display: none;
}

.hero-copy,
.hero-search-card {
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #a9bad0;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #63e6be;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(99, 230, 190, 0.1);
}

.home-hero h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 650px;
    margin: 0 0 8px;
    font-size: 30px;
    line-height: 1.05;
    letter-spacing: -0.025em;
}

.home-title-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    object-fit: contain;
    image-rendering: pixelated;
}

.hero-description {
    max-width: 570px;
    margin: 4px 0 0 44px;
    color: #8493a8;
    font-size: 13px;
}

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

.primary-action,
.secondary-action {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 0 19px;
    border-radius: 9px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary-action {
    color: #ffffff;
    background: #286b9b;
    border: 1px solid #3983b8;
}

.secondary-action {
    color: #dbe7f5;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid #3a4658;
}

.primary-action:hover,
.secondary-action:hover {
    transform: translateY(-2px);
}

.secondary-action:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: #53637a;
}

.hero-search-card {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.search-card-heading {
    display: flex;
    gap: 13px;
    align-items: center;
    margin-bottom: 18px;
}

.search-card-heading strong,
.search-card-heading small {
    display: block;
}

.search-card-heading strong {
    font-size: 17px;
}

.search-card-heading small {
    margin-top: 4px;
    color: #8493a8;
}

.search-icon {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    color: #7cc8ff;
    background: rgba(54, 162, 235, 0.12);
    border: 1px solid rgba(54, 162, 235, 0.22);
    border-radius: 10px;
}

.search-icon svg {
    width: 22px;
    fill: currentColor;
}

.hero-search-card #searchBox,
.hero-search-card #ahSearchBox {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    padding: 0 15px;
    background: #090e17;
    border-color: #344055;
    border-radius: 5px;
}

.home-ah-tracker {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(240px, 0.65fr) minmax(340px, 1.35fr);
    gap: 36px;
    align-items: center;
    margin-top: 14px;
    padding: 20px 28px;
    background: #0d1118;
    border: 1px solid #252d39;
    border-radius: 6px;
    text-align: left;
}

.home-ah-tracker-heading {
    display: flex;
    gap: 13px;
    align-items: center;
}

.home-ah-tracker-heading img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    image-rendering: pixelated;
}

.home-ah-tracker h2,
.home-ah-tracker p {
    margin: 0;
}

.home-ah-tracker h2 {
    font-size: 18px;
}

.home-ah-tracker p {
    margin-top: 4px;
    color: #8493a8;
    font-size: 13px;
}

.home-ah-tracker #ahSearchBox {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
}

.search-hints {
    display: block;
    margin-top: 14px;
    color: #7f8b9c;
    font-size: 12px;
}

.home-shortcuts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.bz-central-shortcuts {
    grid-template-columns: repeat(3, minmax(260px, 1fr));
}

.shortcut-card {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 11px 13px;
    color: #edf2f7;
    background: #0d1118;
    border: 1px solid #1f2735;
    border-radius: 5px;
    text-align: left;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.shortcut-card:hover {
    transform: none;
    border-color: #415169;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.shortcut-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #7cc8ff;
    background: rgba(54, 162, 235, 0.1);
    border-radius: 4px;
}

.shortcut-icon svg {
    width: 19px;
    fill: currentColor;
}

.shortcut-icon img {
    width: 25px;
    height: 25px;
    object-fit: contain;
    image-rendering: pixelated;
}

.bazaar-shortcut .shortcut-icon {
    color: #63e6be;
    background: rgba(99, 230, 190, 0.09);
}

.mayor-shortcut .shortcut-icon {
    color: #d7adff;
    background: rgba(183, 124, 255, 0.1);
}

.shortcut-card strong {
    display: block;
}

.shortcut-card strong {
    font-size: 14px;
}

.shortcut-card p {
    margin: 5px 0 0;
    color: #99a5b5;
    font-size: 13px;
    line-height: 1.45;
}

.shortcut-card > b {
    display: none;
}

.home-header h1,
.panel-header h2 {
    margin: 0;
    letter-spacing: 0;
}

.home-header h1 {
    font-size: 34px;
}

.eyebrow {
    margin: 0 0 7px;
    color: #8ea0b8;
    font-size: 13px;
    text-transform: uppercase;
}

.market-layout {
    padding-top: 22px;
}

.market-panel {
    background: #0b0f17;
    border: 1px solid #1b2230;
    border-radius: 8px;
}

.home-market-panel {
    overflow: hidden;
    border-color: #293241;
    border-radius: 8px;
    box-shadow: none;
}

.home-market-panel .panel-header {
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
    padding: 24px 26px;
    text-align: left;
}

.panel-description {
    margin: 7px 0 0;
    color: #8f9bad;
    font-size: 14px;
}

.panel-link {
    flex: 0 0 auto;
    color: #9fd7ff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.panel-link:hover {
    color: #d5efff;
}

.prediction-panel {
    margin-top: 22px;
    overflow: hidden;
    background: #0b0f17;
    border: 1px solid #293241;
    border-radius: 10px;
}

.prediction-page-panel {
    margin-top: 22px;
}

.prediction-history-panel {
    margin-top: 22px;
}

.prediction-method-panel {
    margin-top: 0;
}

.prediction-method-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    padding: 18px;
}

.method-step {
    display: grid;
    gap: 8px;
    min-height: 122px;
    box-sizing: border-box;
    align-content: start;
    padding: 15px;
    background: #090d14;
    border: 1px solid #1b2230;
    border-radius: 8px;
    text-align: left;
}

.method-step strong {
    color: #dfe8f4;
}

.method-step span {
    color: #93a0b2;
    font-size: 13px;
    line-height: 1.45;
}

.trade-example {
    border-color: rgba(99, 230, 190, 0.3);
    background: rgba(99, 230, 190, 0.06);
}

.outcome-badge {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 11px;
    letter-spacing: 0.05em;
}

.outcome-badge.success {
    color: #8ff0ca;
    background: rgba(99, 230, 190, 0.12);
}

.outcome-badge.miss {
    color: #ff9d9d;
    background: rgba(255, 133, 133, 0.12);
}

.prediction-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    padding: 22px 24px;
    border-bottom: 1px solid #1b2230;
    text-align: left;
}

.prediction-header h2 {
    margin: 0;
}

.prediction-header p:last-child {
    margin: 7px 0 0;
    color: #8f9bad;
    font-size: 14px;
}

.prediction-disclaimer {
    flex: 0 0 auto;
    padding: 6px 9px;
    color: #d7c89c;
    background: rgba(215, 200, 156, 0.08);
    border: 1px solid rgba(215, 200, 156, 0.18);
    border-radius: 6px;
    font-size: 12px;
}

.prediction-access-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 22px;
    padding: 20px 24px;
    border: 1px solid rgba(73, 201, 135, 0.28);
    border-radius: 12px;
    background: rgba(73, 201, 135, 0.06);
}

.prediction-access-bar h2 {
    margin: 4px 0 5px;
}

.prediction-access-bar p {
    margin: 0;
    color: #9ba8ba;
}

.prediction-access-bar form {
    flex: 0 1 430px;
}

.prediction-access-bar form > label {
    display: block;
    margin-bottom: 6px;
    color: #c9d2df;
    font-size: 0.8rem;
}

.prediction-access-bar form > div {
    display: flex;
    gap: 8px;
}

.prediction-access-bar input {
    min-width: 0;
    flex: 1;
    padding: 11px 13px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: #090d14;
    color: #fff;
    font: inherit;
}

.prediction-access-bar button {
    padding: 11px 18px;
    border: 0;
    border-radius: 8px;
    background: #49c987;
    color: #07120c;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.prediction-access-bar button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.prediction-access-bar.is-unlocked {
    border-color: rgba(73, 201, 135, 0.5);
}

@media (max-width: 760px) {
    .prediction-access-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .prediction-access-bar form {
        flex-basis: auto;
    }
}

.prediction-access-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(5, 8, 14, 0.82);
    backdrop-filter: blur(8px);
}

.prediction-access-card {
    width: min(420px, 100%);
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: #111722;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.prediction-access-card h2 {
    margin: 6px 0 10px;
}

.prediction-access-card label {
    display: grid;
    gap: 7px;
    margin-top: 20px;
    color: #c9d2df;
    font-size: 0.85rem;
}

.prediction-access-card input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9px;
    background: #090d14;
    color: #fff;
    font: inherit;
}

.prediction-access-card button {
    width: 100%;
    margin-top: 14px;
    padding: 12px;
    border: 0;
    border-radius: 9px;
    background: #49c987;
    color: #07120c;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.prediction-access-card button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.prediction-access-error {
    display: block;
    min-height: 1.25em;
    margin-top: 8px;
    color: #ff7b86;
}

.prediction-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 100px 130px 100px;
    gap: 16px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.prediction-heading {
    padding: 10px 20px;
    color: #8ea0b8;
    background: #090d14;
    border-bottom: 1px solid #1b2230;
    font-size: 12px;
    text-transform: uppercase;
}

.prediction-result {
    position: relative;
    padding: 14px 20px;
    color: #edf2f7;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #1b2230;
    border-radius: 0;
    font: inherit;
}

.prediction-result:hover {
    background: #1b2130;
}

.prediction-explanation {
    grid-column: 1 / -1;
    z-index: 20;
    display: grid;
    width: 100%;
    max-height: 0;
    gap: 6px;
    margin: 0;
    padding: 0 14px;
    color: #dce6f2;
    background: #0f141c;
    border: 0 solid transparent;
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.42);
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    text-align: left;
    transition:
            opacity 0.14s ease 1s,
            max-height 0.14s ease 1s,
            margin 0.14s ease 1s,
            padding 0.14s ease 1s;
}

.prediction-result:hover .prediction-explanation,
.prediction-result:focus-visible .prediction-explanation {
    max-height: min(520px, 70vh);
    margin-top: 2px;
    padding: 13px 14px;
    border-width: 1px;
    border-color: #354052;
    opacity: 1;
    overflow-y: auto;
}

.prediction-explanation strong {
    color: #9fd7ff;
    font-size: 13px;
}

.prediction-explanation small {
    margin: 0;
    color: #aeb9c9;
    line-height: 1.35;
}

.prediction-result strong,
.prediction-result small {
    display: block;
}

.prediction-result small {
    margin-top: 4px;
    color: #8290a3;
    font-size: 12px;
}

.prediction-badge {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 11px;
    letter-spacing: 0.05em;
}

.prediction-badge.invest {
    color: #8ff0ca;
    background: rgba(99, 230, 190, 0.1);
}

.prediction-badge.flip {
    color: #9fd7ff;
    background: rgba(54, 162, 235, 0.12);
}

.investment-tokens {
    display: block;
    color: #f4c95d;
    cursor: help;
    letter-spacing: 0.04em;
}

.investment-rating {
    display: block;
    margin-top: 4px;
    color: #8ff0ca;
    font-weight: 700;
}

.prediction-up {
    color: #63e6be;
}

.prediction-down {
    color: #ff8585;
}

.panel-header {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid #1b2230;
    text-align: center;
}

.status-pill {
    color: #9fd7ff;
    background: rgba(54, 162, 235, 0.12);
    border: 1px solid rgba(54, 162, 235, 0.28);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
}

.flip-table {
    width: 100%;
}

.flip-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
    padding: 20px;
}

.flip-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 0 20px 20px;
}

.flip-pagination[hidden] {
    display: none;
}

.flip-pagination button {
    min-width: 42px;
    min-height: 40px;
    padding: 8px 12px;
}

.flip-pagination button.active {
    color: #08111a;
    background: #63e6be;
    border-color: #63e6be;
    font-weight: 800;
}

.flip-pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.market-flip-card {
    display: flex;
    min-height: 250px;
    box-sizing: border-box;
    padding: 0;
    overflow: hidden;
    flex-direction: column;
    color: #f4f4f4;
    background: #15171c;
    border: 1px solid #303642;
    border-radius: 8px;
    text-align: left;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.market-flip-card:hover {
    background: #15171c;
    border-color: #3a4558;
}

.market-card-title {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 58px;
    padding: 10px 14px;
    background: #1d2027;
    border-bottom: 1px solid #303642;
}

.market-card-title img {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    object-fit: contain;
    object-position: center;
    image-rendering: pixelated;
}

.market-card-title strong {
    overflow: hidden;
    color: #ffb300;
    font-size: 20px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.craft-market-card .market-card-title {
    min-height: 72px;
}

.craft-market-card .market-card-title strong {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.2;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.market-card-title > b {
    color: #929aa5;
    font-size: 12px;
}

.auction-card-title {
    grid-template-columns: 46px minmax(0, 1fr) auto;
}

.auction-card-title.no-auction-icon {
    grid-template-columns: minmax(0, 1fr) auto;
}

.auction-card-title .auction-item-icon {
    width: 42px;
    height: 42px;
    padding: 3px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.18);
    border-radius: 7px;
    image-rendering: pixelated;
}

.auction-card-title strong {
    overflow: visible;
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

.auction-card-title .auction-buy-badge {
    padding: 5px 9px;
    color: #10251e;
    background: #63e6be;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.auction-card-title .auction-buy-badge.sold {
    color: #2f1515;
    background: #ff8787;
}

.market-flip-card.sold-auction-card {
    cursor: not-allowed;
    opacity: 0.65;
}

.market-card-details b.available-status {
    color: #63e6be;
}

.market-card-details b.sold-status {
    color: #ff8787;
}

.market-card-details {
    display: grid;
    gap: 10px;
    padding: 18px 16px 12px;
    font-size: 16px;
}

.market-card-details > span {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.market-card-details b {
    color: #f8f8f8;
    font-weight: 500;
    text-align: right;
}

.market-card-details b.profit {
    color: #63e6be;
}

.market-card-note {
    display: block;
    margin: auto 16px 0;
    padding: 12px 0 16px;
    color: #b7bec8;
    border-top: 1px solid #303642;
    text-align: center;
}

.prediction-item-title {
    display: flex;
    justify-content: center;
    gap: 9px;
    align-items: center;
}

.prediction-item-title img {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    object-fit: contain;
    object-position: center;
    image-rendering: pixelated;
}

.table-item-title {
    display: flex;
    justify-content: center;
    gap: 8px;
    align-items: center;
}

.table-item-title img {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    object-fit: contain;
    object-position: center;
    image-rendering: pixelated;
}

.flip-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(90px, 130px));
    gap: 16px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.craft-flip-table .flip-row {
    grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(90px, 130px));
}

.steal-table .flip-row {
    grid-template-columns: minmax(260px, 1fr) repeat(4, minmax(100px, 140px));
}

.steal-note {
    padding: 14px 18px;
    color: #aeb8c7;
    background: rgba(54, 162, 235, 0.06);
    border-bottom: 1px solid #1b2230;
}

.craft-flip-search {
    display: grid;
    grid-template-columns: minmax(220px, 420px) minmax(180px, 1fr);
    gap: 12px 18px;
    align-items: end;
    padding: 20px;
    background: #101216;
    border-bottom: 1px solid #242833;
    text-align: left;
}

.craft-flip-search label {
    display: grid;
    gap: 7px;
    color: #e5e9ef;
}

.craft-flip-search .fusion-toggle {
    display: flex;
    gap: 10px;
    align-items: center;
    min-height: 42px;
}

.fusion-toggle input {
    width: 18px;
    height: 18px;
    accent-color: #63e6be;
}

.craft-flip-search input {
    min-width: 0;
    padding: 11px 12px;
    color: #f4f7fb;
    background: #0c1017;
    border: 1px solid #384252;
    border-radius: 7px;
    font: inherit;
}

.craft-flip-search input:focus {
    border-color: #36a2eb;
    box-shadow: 0 0 0 3px rgba(54, 162, 235, 0.18);
    outline: none;
}

.craft-flip-search small {
    padding-bottom: 12px;
    color: #aeb8c7;
}

.item-flipper-controls {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr)) auto;
    gap: 16px;
    align-items: end;
    padding: 20px;
    background: #101216;
    border-bottom: 1px solid #242833;
}

.ah-item-explorer {
    overflow: visible;
}

.ah-item-heading {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(300px, 520px);
    gap: 24px;
    align-items: center;
    padding: 22px;
    border-bottom: 1px solid #242833;
}

.ah-item-heading h2,
.ah-item-heading p {
    margin: 0;
}

.ah-item-heading h2 {
    margin-top: 5px;
    overflow-wrap: anywhere;
}

.ah-item-heading .search-container input {
    width: 100%;
    box-sizing: border-box;
}

.ah-item-heading #auctionItemSuggestions {
    position: absolute;
    z-index: 1100;
    top: 100%;
    left: 0;
    display: none;
    width: 100%;
    margin-top: 6px;
    overflow: hidden;
    background: #0b0f17;
    border: 1px solid #2a3140;
    border-radius: 6px;
}

.ah-item-heading #auctionItemSuggestions button {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #1b2230;
    border-radius: 0;
    text-align: left;
}

.ah-market-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0 22px 24px;
    overflow-x: auto;
    border-bottom: 1px solid #242833;
}

.ah-view-heading {
    padding: 26px 22px 18px;
    text-align: center;
}

.ah-view-heading p,
.ah-view-heading h3 {
    margin: 0;
}

.ah-view-heading h3 {
    margin-top: 8px;
    font-size: 28px;
}

.ah-market-tabs button {
    flex: 0 0 auto;
    min-width: 54px;
    min-height: 40px;
}

.ah-market-tabs button.active {
    color: #07131c;
    background: #36a2eb;
    border-color: #36a2eb;
    font-weight: 800;
}

.ah-listing-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 12px;
    padding: 18px 22px;
    background: #0b1018;
    border-bottom: 1px solid #242833;
}

.ah-listing-filters label {
    display: grid;
    gap: 6px;
    color: #9eacbf;
    font-size: 12px;
    text-align: left;
}

.ah-listing-filters input,
.ah-listing-filters select {
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 11px;
    color: #edf2f7;
    background: #0c1017;
    border: 1px solid #384252;
    border-radius: 6px;
    font: inherit;
    outline: none;
}

.ah-listing-filters input:focus,
.ah-listing-filters select:focus {
    border-color: #36a2eb;
    box-shadow: 0 0 0 3px rgba(54, 162, 235, 0.18);
}

.ah-listing-filters button {
    align-self: end;
    min-height: 38px;
}

.ah-active-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 18px;
    padding: 20px 22px 24px;
}

.ah-auction-card {
    overflow: hidden;
    background: #171a20;
    border: 1px solid #303642;
    border-radius: 8px;
}

.ah-auction-price {
    position: relative;
    display: grid;
    grid-template-columns: 34px 1fr 42px;
    grid-template-rows: auto auto;
    gap: 2px 9px;
    align-items: center;
    padding: 12px;
    background: #242832;
}

.ah-auction-price > img {
    grid-row: 1 / 3;
    width: 32px;
    height: 32px;
    object-fit: contain;
    image-rendering: pixelated;
}

.ah-auction-price strong {
    font-size: 18px;
    font-weight: 600;
}

.ah-auction-price > span {
    color: #cbd5e1;
}

.ah-auction-price button {
    grid-column: 3;
    grid-row: 1 / 3;
    width: 42px;
    height: 42px;
    padding: 0;
    color: #e5f3ff;
    background: #286b9b;
    border-color: #3983b8;
    font-size: 20px;
}

.ah-auction-name {
    display: block;
    min-height: 44px;
    padding: 13px 12px 0;
    overflow-wrap: anywhere;
    font-size: 16px;
    line-height: 1.25;
}

.rarity-common {
    color: #ffffff;
}

.rarity-uncommon {
    color: #55ff55;
}

.rarity-rare {
    color: #5555ff;
}

.rarity-epic {
    color: #aa00aa;
}

.rarity-legendary {
    color: #ffaa00;
}

.rarity-mythic {
    color: #ff55ff;
}

.rarity-divine {
    color: #55ffff;
}

.rarity-special,
.rarity-veryspecial {
    color: #ff5555;
}

.rarity-supreme {
    color: #aa0000;
}

.ah-auction-seller {
    display: flex;
    gap: 10px;
    align-items: center;
    min-height: 32px;
    margin: 14px 12px;
    color: #edf2f7;
}

.ah-auction-seller img {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
}

.ah-auction-end {
    margin: 0 12px;
    padding: 14px 0 16px;
    color: #d6dde8;
    border-top: 1px solid #353b47;
}

.ah-history-view {
    padding: 18px 22px 28px;
}

.ah-chart-summary {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    color: #dce7f4;
}

.ah-chart-summary small {
    color: #8493a8;
}

.ah-history-view canvas {
    width: 100% !important;
    height: auto !important;
}

.item-flipper-controls label {
    display: grid;
    gap: 7px;
    color: #e5e9ef;
    text-align: left;
}

.item-flipper-controls input,
.filter-item-search input {
    min-width: 0;
    padding: 11px 12px;
    color: #f4f7fb;
    background: #0c1017;
    border: 1px solid #384252;
    border-radius: 7px;
    font: inherit;
}

.item-flipper-controls small {
    color: #8d98a8;
}

.filter-rules-button {
    min-height: 45px;
    white-space: nowrap;
}

.filter-rules-button span {
    display: inline-grid;
    min-width: 20px;
    height: 20px;
    margin-left: 7px;
    place-items: center;
    background: #315e8e;
    border-radius: 999px;
    font-size: 12px;
}

.filter-modal[hidden] {
    display: none;
}

.filter-modal {
    position: fixed;
    inset: 0;
    display: grid;
    padding: 30px;
    place-items: center;
    z-index: 2000;
}

.filter-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.filter-modal-card {
    position: relative;
    width: min(760px, 100%);
    max-height: min(720px, 90vh);
    box-sizing: border-box;
    padding: 24px;
    overflow-y: auto;
    background: #12151b;
    border: 1px solid #2f3745;
    border-radius: 10px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
}

.filter-modal-header,
.filter-rule-list-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.filter-modal-header h2 {
    margin: 4px 0 0;
}

.filter-close {
    width: 42px;
    height: 42px;
    padding: 0;
    font-size: 26px;
}

.filter-mode-tabs {
    display: flex;
    margin: 22px 0 18px;
}

.filter-mode-tabs button {
    border-radius: 0;
}

.filter-mode-tabs button:first-child {
    border-radius: 7px 0 0 7px;
}

.filter-mode-tabs button:last-child {
    border-radius: 0 7px 7px 0;
}

.filter-mode-tabs button.active {
    background: #315e8e;
    border-color: #3f71a6;
}

.filter-item-search {
    position: relative;
}

.filter-item-search input {
    width: 100%;
    box-sizing: border-box;
}

.filter-suggestions {
    position: absolute;
    inset: calc(100% + 5px) 0 auto;
    display: grid;
    max-height: 230px;
    overflow-y: auto;
    background: #0c1017;
    border: 1px solid #484e59;
    border-radius: 7px;
    z-index: 2;
}

.filter-suggestions:empty {
    display: none;
}

.filter-suggestions button {
    border: 0;
    border-bottom: 1px solid #30343b;
    border-radius: 0;
    text-align: left;
}

.filter-rule-list-header {
    margin: 24px 0 10px;
}

.filter-rule-list {
    display: grid;
    gap: 8px;
    min-height: 80px;
    padding: 12px;
    background: #101216;
    border: 1px solid #1d2027;
    border-radius: 8px;
}

.filter-rule-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 9px 11px;
    background: #171a21;
    border-radius: 6px;
}

.filter-rule-row button {
    padding: 6px 9px;
    color: #ff9d9d;
}

.flip-heading {
    padding: 10px 20px;
    color: #8ea0b8;
    background: #090d14;
    border-bottom: 1px solid #1b2230;
    font-size: 13px;
    text-transform: uppercase;
    text-align: center;
}

.flip-result {
    color: #edf2f7;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #1b2230;
    padding: 14px 20px;
    font: inherit;
}

.flip-result:hover {
    background: #1b2130;
}

.flip-result strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
}

.flip-result small {
    display: block;
    margin-top: 4px;
    color: #8ea0b8;
}

.profit {
    color: #63e6be;
    font-weight: 700;
}

.empty-state {
    padding: 22px 20px;
    color: #8ea0b8;
}

@media (max-width: 980px) {

    .home-hero {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .home-ah-tracker {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .home-shortcuts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .prediction-method-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .ah-listing-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ah-item-heading {
        grid-template-columns: 1fr;
    }

    .ah-chart-summary {
        align-items: flex-start;
        flex-direction: column;
    }


    .candidate-modal {
        padding: 12px;
    }

    .candidate-modal-card {
        max-height: calc(100vh - 24px);
        padding: 22px 18px;
    }

    .candidate-profile {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .candidate-profile-copy {
        text-align: center;
    }

    .candidate-vote-summary {
        justify-content: center;
        flex-wrap: wrap;
    }

    .sidebar {
        position: sticky;
        top: 0;
        display: block;
        width: 100%;
        height: auto;
        overflow: visible;
        padding: 8px;
        border-right: 0;
        border-bottom: 1px solid #242833;
        box-shadow: none;
        transition: none;
    }

    .sidebar:hover,
    .sidebar:focus-within {
        width: 100%;
        padding: 8px;
    }

    .sidebar::after {
        display: none;
    }

    .sidebar-nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .sidebar .sidebar-mayor {
        display: grid;
        grid-template-columns: auto 1fr;
        margin: 8px 0 0;
        padding: 9px 12px;
    }

    .sidebar-mayor .mayor-perks {
        grid-column: 1 / -1;
        -webkit-line-clamp: 2;
    }

    .sidebar-link {
        justify-content: center;
        gap: 8px;
        min-height: 44px;
        padding: 0 8px;
        font-size: 13px;
    }

    .sidebar:hover .sidebar-link,
    .sidebar:focus-within .sidebar-link {
        justify-content: center;
        gap: 8px;
        padding: 0 8px;
    }

    .sidebar-link span {
        width: auto;
        overflow: visible;
        opacity: 1;
    }

    .sidebar-link.active {
        box-shadow: inset 0 -3px #36a2eb;
    }

    .sidebar-link svg {
        width: 20px;
        height: 20px;
        flex-basis: 20px;
    }

    .sidebar-link img.sidebar-item-icon {
        width: 20px;
        height: 20px;
        flex-basis: 20px;
    }

    .page-content {
        margin-left: 0;
    }

    .home-header {
        align-items: stretch;
        flex-direction: column;
    }

    .home-hero {
        display: flex;
        min-height: auto;
        padding: 30px 22px;
        gap: 30px;
        align-items: stretch;
        text-align: center;
    }

    .home-ah-tracker {
        padding: 20px 22px;
    }

    .home-hero h1 {
        font-size: 30px;
    }

    .hero-eyebrow,
    .hero-actions {
        justify-content: center;
    }

    .search-card-heading {
        text-align: left;
    }

    .home-shortcuts {
        grid-template-columns: 1fr;
    }

    .home-market-panel .panel-header {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .prediction-row {
        grid-template-columns: 1fr 90px;
    }

    .prediction-row span:nth-child(3),
    .prediction-row span:nth-child(4) {
        display: none;
    }

    .prediction-method-grid {
        grid-template-columns: 1fr;
    }

    .home-shell,
    .item-page,
    .bz-central-page,
    .hub-page,
    .flips-page,
    .mayor-page {
        padding: 22px 16px 36px;
    }

    .list-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .mayor-banner {
        grid-template-columns: auto 1fr;
    }

    .mayor-perks {
        grid-column: 1 / -1;
        white-space: normal;
    }

    .flip-type-grid {
        grid-template-columns: 1fr;
    }

    .mayor-detail-grid,
    .schedule-grid,
    .event-grid {
        grid-template-columns: 1fr;
    }

    .item-header {
        align-items: stretch;
        flex-direction: column;
    }

    .item-overview {
        grid-template-columns: 1fr 1fr;
    }

    .item-overview #itemImage {
        grid-column: 1 / -1;
        justify-self: center;
    }

    .chart-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    #searchBox,
    #detailSearchBox {
        width: 100%;
        box-sizing: border-box;
    }

    .flip-row {
        grid-template-columns: 1fr 80px;
    }

    .flip-card-grid {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .flip-row span:nth-child(2),
    .flip-row span:nth-child(3) {
        display: none;
    }

    .item-flipper-controls {
        grid-template-columns: 1fr 1fr;
    }

    .craft-flip-search {
        grid-template-columns: 1fr;
    }

    .craft-flip-search small {
        padding-bottom: 0;
    }

    .filter-rules-button {
        grid-column: 1 / -1;
    }

    .filter-modal {
        padding: 12px;
    }

    .craft-flip-table .flip-row span:nth-child(4) {
        display: none;
    }

    .craft-ingredient {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .craft-ingredient > b {
        grid-column: 2;
    }

    .craft-summary {
        justify-content: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}

/* Final shared visual normalization (kept last so page-specific rules inherit it). */
.home-hero,
.home-ah-tracker,
.market-panel,
.prediction-panel,
.method-step,
.poll-row,
.candidate-modal-card,
.candidate-portrait-wrap,
.item-hero,
.item-card,
.flip-card,
.filter-modal-card,
.profile-tracker-hero,
.profile-search-card,
.profile-results,
.profile-feature-panel,
.profile-stat-grid article,
.shortcut-card {
    background-image: none;
    border-radius: 4px;
    box-shadow: none;
}

.candidate-modal-backdrop {
    backdrop-filter: none;
}

.primary-action,
.secondary-action,
.profile-search-row input,
.profile-search-row button,
.search-icon,
.shortcut-icon,
.filter-chip,
.prediction-disclaimer,
.prediction-badge {
    border-radius: 3px;
}

.profile-tracker-hero {
    grid-template-columns: minmax(0, 1fr) minmax(390px, 0.85fr);
    gap: 48px;
    padding: 30px;
    background: #0c1118;
}

.profile-tracker-hero h1 {
    margin: 5px 0 10px;
    font-size: clamp(32px, 4vw, 45px);
}

.profile-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    background: #263141;
    border: 1px solid #263141;
    border-radius: 3px;
}

.profile-feature-grid article {
    min-height: 38px;
    padding: 6px 11px;
    background: #0f151e;
    border: 0;
    border-radius: 0;
}

@media (max-width: 850px) {
    .profile-tracker-hero {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .profile-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .profile-feature-grid {
        grid-template-columns: 1fr;
    }
}

/* SkyCrypt-inspired profile dashboard. */
.skycrypt-profile {
    background:
        radial-gradient(circle at 50% -20%, #132538 0, transparent 35%),
        #05080b;
}

.skycrypt-profile .profile-tracker-page {
    width: min(1240px, calc(100% - 86px));
}

.skycrypt-profile .profile-tracker-hero {
    padding: 24px 28px;
    background: #111820;
    border-color: #2b3948;
    border-top: 3px solid #53c9ff;
}

.skycrypt-profile .profile-tracker-hero h1 {
    color: #f4f8fc;
    font-size: clamp(34px, 4vw, 50px);
    text-shadow: 0 2px 0 #000;
}

.skycrypt-profile .hero-eyebrow {
    color: #55e699;
}

.skycrypt-profile .profile-search-card {
    background: #080d12;
    border-color: #304256;
}

.skycrypt-profile .profile-search-row button {
    color: #07131b;
    background: #54c9ff;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.skycrypt-profile .profile-results {
    padding: 0;
    overflow: hidden;
    background: transparent;
    border: 0;
}

.skycrypt-profile .profile-tabs {
    gap: 2px;
    margin: 0;
    padding: 10px;
    background: #0b1117;
    border: 1px solid #263544;
}

.skycrypt-profile .profile-tabs button {
    border-radius: 2px;
}

.skycrypt-profile .profile-tabs button.active {
    color: #07120d;
    background: #51e397;
    border-color: #51e397;
}

.skycrypt-profile .profile-result-header {
    margin: 0;
    padding: 26px;
    background:
        linear-gradient(90deg, rgba(27, 58, 78, 0.75), transparent 65%),
        #101820;
    border: 1px solid #2b3b4b;
    border-top: 0;
}

.skycrypt-profile .profile-result-header img {
    width: 96px;
    height: 96px;
    border: 2px solid #55dca0;
    border-radius: 3px;
    box-shadow: 0 6px 18px #000;
}

.skycrypt-profile .profile-result-header h2 {
    font-size: 36px;
}

.skycrypt-profile .profile-stat-grid {
    gap: 1px;
    padding: 1px;
    background: #293846;
}

.skycrypt-profile .profile-stat-grid article {
    min-height: 68px;
    padding: 16px 20px;
    background: #0d141b;
    border: 0;
    border-radius: 0;
}

.skycrypt-profile .profile-stat-grid article strong {
    color: #f4c95d;
    font-size: 18px;
}

.skycrypt-profile .profile-detail-grid {
    gap: 10px;
    margin-top: 10px;
}

.skycrypt-profile .profile-detail-grid > section,
.skycrypt-profile .networth-panel,
.skycrypt-profile .inventory-viewer {
    background: #0d141a;
    border-color: #293a49;
    border-radius: 3px;
}

.skycrypt-profile .profile-detail-grid h3,
.skycrypt-profile .networth-panel h3,
.skycrypt-profile .inventory-viewer h3 {
    color: #55e699;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.skycrypt-profile .profile-detail-list > div {
    padding: 8px 4px;
    border-color: #22303b;
}

.skycrypt-profile .profile-detail-list strong {
    color: #d9e8f3;
}

.skycrypt-profile .inventory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.skycrypt-profile .inventory-grid article {
    background: #111c25;
    border-color: #2a3d4d;
    border-radius: 2px;
}

.skycrypt-profile.profile-loaded .profile-feature-panel {
    display: none;
}

@media (max-width: 900px) {
    .skycrypt-profile .profile-tracker-page {
        width: min(100% - 32px, 1240px);
    }

    .skycrypt-profile .inventory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .skycrypt-profile .profile-stat-grid,
    .skycrypt-profile .inventory-grid {
        grid-template-columns: 1fr;
    }
}

/*
 * Bazaar terminal theme
 * A deliberately game-specific, information-dense layer shared by every page.
 */
:root {
    --terminal-bg: #070a0d;
    --terminal-panel: #0b1015;
    --terminal-panel-alt: #0e151b;
    --terminal-line: #26323b;
    --terminal-green: #36e68a;
    --terminal-green-dim: #153c2a;
    --terminal-gold: #f0b84b;
    --terminal-blue: #68bff5;
}

body {
    background-color: var(--terminal-bg);
    background-image:
        linear-gradient(rgba(72, 96, 110, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(72, 96, 110, 0.055) 1px, transparent 1px);
    background-size: 32px 32px;
}

.page-content {
    position: relative;
}

.sidebar {
    background: #080c10;
    border-right: 1px solid #2d3942;
}

.sidebar-link {
    min-height: 43px;
    border-left: 2px solid transparent;
    border-radius: 0;
}

.sidebar-link:hover {
    background: #101820;
    border-left-color: #637584;
}

.sidebar-link.active {
    color: #ffffff;
    background: #10221a;
    border-left-color: var(--terminal-green);
    box-shadow: none;
}

.home-shell {
    max-width: 1280px;
    padding-top: 18px;
}

.home-hero {
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 24px;
    min-height: 90px;
    padding: 18px 20px;
    background: #09110e;
    border: 0;
    border-top: 2px solid var(--terminal-green);
    border-bottom: 1px solid #294236;
    border-radius: 0;
}

.home-hero::before {
    display: block;
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    content: "";
    background: var(--terminal-green);
    opacity: 0.18;
}

.home-hero h1 {
    font-size: 26px;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.home-title-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
}

.hero-description {
    color: #819489;
    letter-spacing: 0.02em;
}

.hero-search-card #searchBox,
.hero-search-card #ahSearchBox,
.home-ah-tracker #ahSearchBox {
    min-height: 40px;
    background: #05090c;
    border: 0;
    border-bottom: 2px solid #42515c;
    border-radius: 0;
}

.hero-search-card #searchBox:focus,
.hero-search-card #ahSearchBox:focus,
.home-ah-tracker #ahSearchBox:focus {
    border-bottom-color: var(--terminal-green);
    box-shadow: none;
    outline: none;
}

.home-ah-tracker {
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 24px;
    margin-top: 6px;
    padding: 14px 20px;
    background: #0b0f14;
    border: 0;
    border-bottom: 1px solid var(--terminal-line);
    border-radius: 0;
}

.home-ah-tracker h2 {
    color: var(--terminal-gold);
    font-size: 15px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.home-ah-tracker-heading img {
    width: 30px;
    height: 30px;
}

.home-shortcuts {
    gap: 1px;
    margin-top: 10px;
    padding: 1px;
    background: #27323c;
}

.shortcut-card {
    min-height: 54px;
    padding: 8px 12px;
    background: #0b1015;
    border: 0;
    border-top: 2px solid transparent;
    border-radius: 0;
}

.shortcut-card:hover {
    background: #121a21;
    border-top-color: var(--terminal-blue);
}

.shortcut-card:nth-child(2n):hover {
    border-top-color: var(--terminal-gold);
}

.shortcut-icon {
    width: 30px;
    height: 30px;
    background: transparent !important;
    border-radius: 0;
}

.shortcut-card strong {
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.market-layout {
    padding-top: 10px;
}

.market-panel,
.prediction-panel,
.profile-feature-panel,
.profile-results {
    background: var(--terminal-panel);
    border: 1px solid var(--terminal-line);
    border-top: 2px solid #3b4a55;
    border-radius: 0;
}

.home-market-panel .panel-header,
.prediction-header {
    padding: 15px 18px;
    background: #0e151b;
    border-bottom: 1px solid #2a3640;
}

.panel-header h2,
.prediction-header h2,
.profile-feature-heading h2 {
    font-size: 18px;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.panel-description {
    margin-top: 4px;
    font-size: 12px;
}

.flip-heading,
.prediction-heading {
    color: #8192a0;
    background: #080d11;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.flip-result,
.prediction-result {
    border-top-color: #1e2931;
}

.flip-result:nth-child(even),
.prediction-result:nth-child(even) {
    background: rgba(24, 35, 43, 0.42);
}

.flip-result:hover,
.prediction-result:hover {
    background: #11231b;
}

.profit,
.prediction-up {
    color: var(--terminal-green);
}

.profile-tracker-hero {
    background: #09110e;
    border: 0;
    border-top: 2px solid var(--terminal-green);
    border-bottom: 1px solid #294236;
    border-radius: 0;
}

.profile-search-card {
    background: #070c10;
    border: 1px solid #2a3842;
    border-radius: 0;
}

.profile-search-row input {
    background: #05090c;
    border: 1px solid #35444f;
    border-radius: 0;
}

.profile-search-row button,
.primary-action {
    color: #05110a;
    background: var(--terminal-green);
    border: 1px solid #65f0a8;
    border-radius: 0;
    text-transform: uppercase;
}

.profile-feature-grid {
    background: #26323b;
    border-color: #26323b;
    border-radius: 0;
}

.profile-feature-grid article {
    background: #0b1117;
}

.profile-feature-grid article:hover {
    background: #10221a;
}

.profile-feature-grid b {
    color: #53b981;
}

@media (max-width: 720px) {
    body {
        background-size: 24px 24px;
    }

    .home-hero,
    .home-ah-tracker {
        grid-template-columns: 1fr;
    }
}

/*
 * Final global theme override.
 * This must remain after the legacy terminal theme above.
 */
body {
    background: var(--theme-page);
    background-image: none;
}

.sidebar {
    background: var(--theme-sidebar);
    border-right-color: var(--theme-border);
}

.sidebar-link:hover {
    color: #ffffff;
    background: var(--theme-blue-hover);
    border-left-color: #37658f;
}

.sidebar-link.active {
    color: #ffffff;
    background: var(--theme-blue-dark);
    border-left-color: var(--theme-blue);
    box-shadow: none;
}

.sidebar-mayor,
.mayor-banner {
    background: var(--theme-blue-dark);
    border-color: var(--theme-border-blue);
}

.page-content [class*="-panel"],
.page-content [class*="-card"],
.page-content [class*="-hero"],
.page-content [class*="-toolbar"],
.page-content [class*="-summary"],
.page-content [class*="-breakdown"],
.page-content [class*="-detail"] {
    background-color: var(--theme-panel);
    background-image: none;
    border-color: var(--theme-border);
    box-shadow: none;
}

.page-content button,
.page-content .hub-button,
.page-content [class*="-button"],
.page-content [class*="-tab"],
.profile-search-row button,
.primary-action {
    color: #dce5f0;
    background: var(--theme-blue-dark);
    border-color: var(--theme-border-blue);
    box-shadow: none;
}

.page-content button:hover,
.page-content .hub-button:hover,
.page-content [class*="-button"]:hover,
.page-content [class*="-tab"]:hover,
.profile-search-row button:hover,
.primary-action:hover {
    color: #ffffff;
    background: var(--theme-blue-hover);
    border-color: #37658f;
}

.page-content button.active,
.page-content [class*="-button"].active,
.page-content [class*="-tab"].active {
    color: #06121c;
    background: var(--theme-blue);
    border-color: var(--theme-blue);
}

.flip-result:hover,
.prediction-result:hover,
.profile-feature-grid article:hover {
    background: var(--theme-blue-hover);
}

@media (min-width: 761px) {
    body > .page-content {
        width: min(1180px, calc(100% - 82px));
        margin-right: 16px;
        margin-left: max(66px, calc((100vw - 1130px) / 2));
    }

    body > .sidebar:hover ~ .page-content,
    body > .sidebar:focus-within ~ .page-content {
        width: min(1180px, calc(100% - 264px));
        margin-right: 16px;
        margin-left: max(248px, calc((100vw - 948px) / 2));
    }
}

@media (max-width: 760px) {
    body > .page-content,
    body > .sidebar:hover ~ .page-content,
    body > .sidebar:focus-within ~ .page-content {
        width: 100%;
        margin-right: 0;
        margin-left: 0;
    }
}

/* HOTM perk browser */
.hotm-perk-layout {
    display: grid;
    grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
    gap: 12px;
}

.hotm-perk-picker {
    display: grid;
    gap: 8px;
    color: #9aa9bc;
    font-size: 12px;
}

.hotm-perk-picker select {
    width: 100%;
    height: 430px;
    padding: 6px;
    color: #dce5f0;
    background: #080c12;
    border: 1px solid #293545;
}

.hotm-perk-picker option {
    padding: 8px 10px;
}

.hotm-perk-picker option:checked {
    color: #ffffff;
    background: #173958 linear-gradient(0deg, #173958, #173958);
}

.hotm-perk-controls {
    display: grid;
    gap: 12px;
    align-content: start;
    min-width: 0;
}

.hotm-perk-detail {
    min-height: 150px;
    padding: 20px;
    background: #080c12;
    border: 1px solid #293545;
}

.hotm-perk-detail small,
.hotm-perk-detail span {
    color: #53a9ec;
}

.hotm-perk-detail h3 {
    margin: 8px 0;
    font-size: 24px;
}

.hotm-perk-detail p {
    margin: 0 0 16px;
    color: #9aa9bc;
    line-height: 1.5;
}

.hotm-level-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
}

.hotm-level-grid .mining-result {
    grid-column: 1 / -1;
}

.hotm-level-grid input:disabled {
    color: #687485;
    cursor: not-allowed;
    opacity: 0.65;
}

@media (max-width: 760px) {
    .hotm-perk-layout {
        grid-template-columns: 1fr;
    }

    .hotm-perk-picker select {
        height: 320px;
    }
}

/* Mining ore routes */
.ore-route-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ore-route-card {
    display: grid;
    gap: 14px;
    align-content: start;
    padding: 18px;
    background: #080c12;
    border: 1px solid #293545;
}

.ore-route-card header {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ore-route-card header img {
    width: 42px;
    height: 42px;
    image-rendering: pixelated;
}

.ore-route-card h3 {
    margin: 3px 0 0;
    font-size: 20px;
}

.ore-route-card small,
.ore-route-card p {
    color: #8f9bad;
}

.ore-route-card p {
    min-height: 66px;
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.ore-route-card label {
    display: grid;
    gap: 7px;
    color: #9aa9bc;
    font-size: 12px;
}

.ore-route-card input {
    width: 100%;
    padding: 10px;
    color: #dce5f0;
    background: #070b10;
    border: 1px solid #314256;
    box-sizing: border-box;
}

.ore-route-path {
    display: flex;
    gap: 6px;
    align-items: center;
    min-height: 54px;
    overflow-x: auto;
}

.ore-route-path span {
    min-width: 92px;
    padding: 7px;
    color: #cbd5e1;
    background: #101a27;
    border: 1px solid #273a50;
    font-size: 11px;
    text-align: center;
}

.ore-route-path b {
    color: #43a7ed;
}

.ore-route-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ore-route-values > span {
    display: grid;
    gap: 5px;
    padding: 11px;
    background: #10151e;
    border: 1px solid #253244;
}

.ore-route-values strong {
    color: #47c98a;
    font-size: 14px;
}

@media (max-width: 1000px) {
    .ore-route-grid {
        grid-template-columns: 1fr;
    }

    .ore-route-card p {
        min-height: 0;
    }
}

/* One destination per Mining hub tab */
.mining-tool-grid .mining-category-tab {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 74px;
    padding: 0 20px;
    color: #e5e9f0;
    background: #090d12;
    border: 1px solid #202a36;
    border-left: 3px solid #2f78ad;
    text-decoration: none;
}

.mining-tool-grid .mining-category-tab span {
    display: grid;
    gap: 5px;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
}

.mining-tool-grid .mining-category-tab strong {
    font-size: 18px;
}

.mining-tool-grid .mining-category-tab small {
    color: #8c9aab;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
}

.mining-tool-grid .mining-category-tab b {
    color: #4aa8ed;
    font-size: 22px;
}

.mining-tool-grid .mining-category-tab:hover {
    color: #ffffff;
    background: #101b2a;
    border-color: #356b9a;
    border-left-color: #4aa8ed;
}

.ore-route-map {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 600 / 330;
    color: #8f9bad;
    background:
        linear-gradient(rgba(42, 57, 75, 0.24) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 57, 75, 0.24) 1px, transparent 1px),
        #070b10;
    background-size: 30px 30px;
    border: 1px solid #29384b;
    overflow: hidden;
}

.ore-route-map svg {
    display: block;
    width: 100%;
    height: 100%;
}

.ore-route-line {
    fill: none;
    stroke: #388ed0;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.82;
}

.route-waypoint {
    cursor: pointer;
    outline: none;
}

.route-waypoint circle {
    fill: #172b40;
    stroke: #63b7f2;
    stroke-width: 2;
}

.route-waypoint text {
    fill: #ffffff;
    font-size: 9px;
    font-weight: 700;
    text-anchor: middle;
    pointer-events: none;
}

.route-waypoint:hover circle,
.route-waypoint:focus circle,
.route-waypoint.active circle {
    fill: #2f78ad;
    stroke: #ffffff;
    stroke-width: 3;
}

.route-waypoint-start circle {
    fill: #17643d;
    stroke: #47d68c;
}

.route-waypoint-finish circle {
    fill: #6c2949;
    stroke: #ff6b9b;
}

.ore-route-axis {
    fill: #7e8ca0;
    font-size: 12px;
}

.ore-route-card .ore-route-waypoint-detail {
    min-height: 38px;
    padding: 9px 10px;
    color: #aeb9c8;
    background: #0d141e;
    border: 1px solid #253244;
    box-sizing: border-box;
}

/* Clean full-width ore route rows */
.ore-route-grid {
    grid-template-columns: 1fr;
    gap: 16px;
}

.ore-route-card {
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.ore-route-card header {
    grid-column: 1 / -1;
    padding: 14px 18px;
    background: #0d131c;
    border-bottom: 1px solid #253244;
}

.ore-route-card header img {
    width: 36px;
    height: 36px;
}

.ore-route-visual {
    min-width: 0;
    padding: 18px;
}

.ore-route-market {
    display: grid;
    gap: 12px;
    align-content: center;
    min-width: 0;
    padding: 18px;
    background: #0a0f16;
    border-left: 1px solid #253244;
}

.ore-route-placeholder {
    display: grid;
    place-content: center;
    gap: 8px;
    min-height: 230px;
    color: #cbd5e1;
    background:
        linear-gradient(rgba(42, 57, 75, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 57, 75, 0.18) 1px, transparent 1px),
        #070b10;
    background-size: 30px 30px;
    border: 1px dashed #34465d;
    text-align: center;
}

.ore-route-placeholder span {
    color: #7f8da1;
    font-size: 12px;
}

.ore-route-values > span {
    min-width: 0;
}

.ore-route-values strong {
    overflow-wrap: anywhere;
}

.ore-route-values .ore-route-profit {
    background: #0d1c19;
    border-color: #285545;
}

.ore-route-values .ore-route-profit strong {
    color: #55db9a;
    font-size: 18px;
}

.ore-route-card .ore-route-waypoint-detail {
    min-height: 0;
    margin-top: 8px;
}

@media (max-width: 850px) {
    .ore-route-card {
        grid-template-columns: 1fr;
    }

    .ore-route-card header,
    .ore-route-visual,
    .ore-route-market {
        grid-column: 1;
    }

    .ore-route-market {
        border-top: 1px solid #253244;
        border-left: 0;
    }
}

.skycrypt-profile .profile-skills-panel {
    grid-column: 1 / -1;
}

.profile-summary-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 14px 20px;
    color: #a9a7a1;
    background: rgba(22, 17, 13, 0.92);
    border: 1px solid #3a3028;
    border-top: 0;
    font-size: 14px;
    font-weight: 700;
}

.profile-summary-line span:not(:last-child)::after {
    content: " ✦";
    color: #71685e;
}

.profile-summary-line strong {
    color: #f1f0eb;
}

.skill-progress-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
}

.skill-progress {
    display: flex;
    align-items: center;
    min-width: 0;
}

.skill-icon {
    position: relative;
    z-index: 1;
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    box-sizing: border-box;
    place-items: center;
    background: #0dc266;
    border-radius: 50%;
    margin-right: 10px;
}

.skill-icon > img {
    display: block;
    width: 28px;
    height: 28px;
    max-width: 28px;
    max-height: 28px;
    object-fit: contain;
    object-position: center;
    image-rendering: pixelated;
}

.skill-progress-body {
    min-width: 0;
    flex: 1;
    margin-left: 0;
}

.skill-progress-body > strong {
    display: block;
    margin: 0 0 4px;
    color: #f4f7fa;
    font-size: 16px;
    font-weight: 700;
}

.skill-progress-track {
    position: relative;
    height: 20px;
    overflow: hidden;
    background: #5a5d5d;
    border-radius: 999px;
}

.skill-progress-track > span {
    position: absolute;
    inset: 0 auto 0 0;
    min-width: 3px;
    background: #08ad59;
    border-radius: inherit;
}

.skill-progress-track > small {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 20px;
    text-shadow: none;
}

.skill-progress.is-capped > .skill-icon,
.skill-progress.is-capped .skill-progress-track > span {
    background: #dc9707;
}

/* Fishing tools */
.fishing-page {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: 28px 0 64px;
}

.fishing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
    gap: 24px;
    align-items: center;
    padding: 26px;
    background: linear-gradient(135deg, #0d1920, #0c1219);
    border: 1px solid #29404d;
    border-radius: 12px;
}

.fishing-hero h1 {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 5px 0 8px;
    font-size: clamp(34px, 5vw, 54px);
}

.fishing-hero h1 img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    image-rendering: pixelated;
}

.fishing-profile-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 9px;
}

.fishing-profile-form input,
.fishing-profile-form button,
.fishing-fields input {
    min-width: 0;
    padding: 11px 12px;
    color: #e8f2f5;
    background: #081119;
    border: 1px solid #315064;
    border-radius: 6px;
}

.fishing-profile-form button {
    color: #06191d;
    background: #4fd6d0;
    border-color: #4fd6d0;
    font-weight: 800;
}

.fishing-profile-form span {
    grid-column: 1 / -1;
    min-height: 18px;
    color: #8bc6cc;
}

.fishing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.fishing-panel {
    min-width: 0;
    padding: 22px;
    background: #0d141b;
    border: 1px solid #263b49;
    border-radius: 10px;
}

.fishing-panel h2 {
    margin: 4px 0 18px;
}

.fishing-wide {
    grid-column: 1 / -1;
}

.fishing-stats,
.fishing-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.fishing-stats span,
.fishing-result {
    padding: 13px;
    background: #081119;
    border: 1px solid #203642;
    border-radius: 7px;
}

.fishing-stats strong,
.fishing-result strong,
.fishing-result span {
    display: block;
}

.fishing-stats strong {
    margin-top: 5px;
    color: #55e6c6;
    font-size: 20px;
}

.fishing-fields label {
    display: grid;
    gap: 6px;
    color: #a9bbc5;
    font-size: 12px;
}

.fishing-result {
    margin-top: 12px;
}

.fishing-result strong {
    color: #55e6c6;
    font-size: 18px;
}

.fishing-result span {
    margin-top: 4px;
    color: #8fa2ad;
}

.fishing-location-list {
    display: grid;
    gap: 8px;
}

.fishing-location-list div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3px 12px;
    padding: 10px 12px;
    background: #081119;
    border-left: 3px solid #324d59;
}

.fishing-location-list div.recommended {
    border-left-color: #55e6c6;
}

.fishing-location-list small {
    grid-column: 1 / -1;
    color: #8fa2ad;
}

.trophy-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.trophy-grid label {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 9px;
    background: #081119;
    border: 1px solid #203642;
    border-radius: 6px;
}

.dungeon-hero {
    background: linear-gradient(135deg, #18131f, #0d1219);
    border-color: #493756;
}

.dungeon-list {
    display: grid;
    gap: 8px;
}

.dungeon-list > div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3px 12px;
    padding: 10px 12px;
    background: #081119;
    border: 1px solid #263746;
    border-radius: 6px;
}

.dungeon-list small {
    grid-column: 1 / -1;
    color: #8fa2ad;
}

.dungeon-floor-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.dungeon-floor-grid article {
    padding: 13px;
    background: #081119;
    border: 1px solid #283948;
    border-radius: 7px;
    text-align: center;
}

.dungeon-floor-grid small,
.dungeon-floor-grid strong,
.dungeon-floor-grid span {
    display: block;
}

.dungeon-floor-grid strong {
    margin: 4px 0;
    color: #b68cff;
    font-size: 21px;
}

.leaderboard-hero {
    background: linear-gradient(135deg, #171925, #0d1219);
}

.leaderboard-meta {
    display: grid;
    gap: 5px;
    padding: 18px;
    background: #081119;
    border: 1px solid #2a4050;
    border-radius: 8px;
}

.leaderboard-meta strong {
    color: #55e6c6;
    font-size: 22px;
}

.leaderboard-controls {
    display: flex;
    gap: 12px;
    align-items: end;
    margin: 18px 0;
}

.leaderboard-controls label {
    display: grid;
    flex: 1;
    gap: 6px;
}

.leaderboard-controls select,
.leaderboard-controls button {
    min-height: 44px;
    padding: 10px 12px;
}

.leaderboard-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.leaderboard-rows {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.leaderboard-rows article {
    display: grid;
    grid-template-columns: 44px 48px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    background: #081119;
    border: 1px solid #253846;
    border-radius: 7px;
}

.leaderboard-rows img {
    width: 42px;
    height: 42px;
    border-radius: 6px;
    image-rendering: pixelated;
}

.leaderboard-rank {
    color: #8c9ca7;
}

.leaderboard-rows article:nth-child(1) .leaderboard-rank {
    color: #ffd55c;
}

.leaderboard-rows article:nth-child(2) .leaderboard-rank {
    color: #ccd5dd;
}

.leaderboard-rows article:nth-child(3) .leaderboard-rank {
    color: #d69a62;
}

@media (max-width: 800px) {
    .fishing-hero,
    .fishing-grid {
        grid-template-columns: 1fr;
    }

    .fishing-wide {
        grid-column: auto;
    }

    .fishing-stats,
    .fishing-fields,
    .trophy-grid,
    .dungeon-floor-grid {
        grid-template-columns: 1fr;
    }
}

/* Expanding the desktop sidebar must not resize or reflow page content. */
@media (min-width: 761px) {
    body > .sidebar:hover ~ .page-content,
    body > .sidebar:focus-within ~ .page-content {
        width: min(1180px, calc(100% - 82px));
        margin-right: 16px;
        margin-left: max(66px, calc((100vw - 1130px) / 2));
    }
}

@media (max-width: 700px) {
    .skill-progress-grid {
        grid-template-columns: 1fr;
    }
}

/* Mining hub card copy must stay stacked, regardless of shared span rules. */
.mining-tool-grid .mining-category-tab {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    min-height: 76px;
    padding: 10px 18px 10px 20px;
}

.mining-tool-grid .mining-category-tab > span {
    display: flex;
    min-width: 0;
    padding: 0;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.mining-tool-grid .mining-category-tab > span > strong,
.mining-tool-grid .mining-category-tab > span > small {
    display: block;
    width: 100%;
}

.mining-tool-grid .mining-category-tab > span > small {
    max-width: 36ch;
}

.mining-tool-grid .mining-category-tab > b {
    align-self: center;
}

.inventory-tabs {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    padding: 8px 8px 0;
    background: #100c09;
    border-bottom: 1px solid #13a94f;
}

.inventory-tabs button {
    display: flex;
    gap: 7px;
    align-items: center;
    flex: 0 0 auto;
    padding: 9px 10px 10px;
    color: #aaa8a2;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    cursor: pointer;
}

.inventory-tabs button:hover,
.inventory-tabs button.active {
    color: #fff;
    border-bottom-color: #1ed16b;
}

.inventory-tabs img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    image-rendering: pixelated;
}

.inventory-tabs span {
    white-space: nowrap;
    text-transform: uppercase;
}

.inventory-tab-panels {
    padding: 24px;
    background:
        radial-gradient(circle at 50% 0, rgba(64, 84, 35, 0.12), transparent 45%),
        #110d0b;
}

.inventory-tab-panel {
    display: none;
}

.inventory-tab-panel.active {
    display: block;
}

.skycrypt-slot-grid {
    display: grid;
    grid-template-columns: repeat(9, minmax(44px, 1fr));
    gap: 8px;
    max-width: 900px;
    margin: 0 auto;
}

.skycrypt-slot {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    min-width: 0;
    background: rgba(38, 34, 31, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.025);
    border-radius: 4px;
}

.skycrypt-slot:not(.is-empty):hover {
    background: #34302c;
    border-color: #506473;
}

.skycrypt-slot img {
    width: 68%;
    height: 68%;
    object-fit: contain;
    image-rendering: pixelated;
}

.skycrypt-slot b {
    position: absolute;
    right: 5px;
    bottom: 3px;
    color: #fff;
    font-size: 16px;
    text-shadow: 0 2px 2px #000, 1px 0 1px #000;
}

.backpack-tab-grid {
    display: grid;
    gap: 18px;
}

.backpack-tab-grid > section {
    padding: 12px;
    background: rgba(15, 19, 23, 0.76);
    border: 1px solid #283746;
}

.backpack-tab-grid h4 {
    margin: 0 0 10px;
    color: #e6edf4;
}

.backpack-tab-grid h4 small {
    margin-left: 7px;
    color: #7f90a1;
    font-weight: 400;
}

@media (max-width: 760px) {
    .inventory-tab-panels {
        padding: 12px;
    }

    .skycrypt-slot-grid {
        grid-template-columns: repeat(9, minmax(32px, 1fr));
        gap: 4px;
        overflow-x: auto;
    }
}
