/* ==========================================================================
   CyberLegacy — tema inspirado en Hacker Experience Legacy
   Header oscuro, sidebar, content-header, widgets, tablas y terminal.
   ========================================================================== */

@media (max-width: 600px) {
    .hardware-market-table thead { display: none; }
    .hardware-market-table tbody { display: block; }
    .hardware-market-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hardware-market-table td { display: block; min-width: 0; text-align: left; }
    .hardware-market-table td[data-label]::before { content: attr(data-label); display: block; font-size: 10px; font-weight: bold; color: #666; }
    .hardware-market-table td:last-child { grid-column: 1 / -1; }
    .hardware-market-table select { min-width: 0; max-width: 100%; }
}

* {
    box-sizing: border-box;
}

.missions-page { min-width: 0; max-width: 100%; }
.missions-page .widget-box { min-width: 0; }
.missions-page .widget-content { max-width: 100%; overflow-wrap: anywhere; overflow-x: auto; }
.missions-page .widget-content.nopadding { max-width: 100%; overflow-x: auto; }
.missions-page .table th, .missions-page .table td { overflow-wrap: normal; }
@media (max-width: 600px) { .missions-page table:has(thead) { min-width: 640px; } }

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background: #444;
    color: #444;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.45;
}

a {
    color: #2a6496;
    text-decoration: none;
}

a:hover {
    color: #1d4b70;
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 8px;
    color: #333;
    font-weight: 700;
    line-height: 1.25;
}

p {
    margin: 0 0 10px;
}

.muted {
    color: #888;
}

.small {
    font-size: 11px;
}

.mono {
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
}

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

.nomargin {
    margin: 0 !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    z-index: 9999;
    background: #111;
    color: #7ee787;
    padding: 8px 12px;
}

.skip-link:focus {
    left: 10px;
}

/* --------------------------------------------------------------------------
   Header / user navigation
   -------------------------------------------------------------------------- */

#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: #1d1d1d;
    border-bottom: 1px solid #000;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .45);
    z-index: 50;
}

#header h1 {
    position: absolute;
    top: 17px;
    left: 18px;
    margin: 0;
    font-size: 23px;
    letter-spacing: 0;
    text-transform: none;
}

#header h1 a {
    color: #f4f4f4;
    text-decoration: none;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
}

#header h1 a:hover {
    color: #7ee787;
    text-decoration: none;
}

.brand-cursor {
    color: #7ee787;
    animation: blink 1.1s step-end infinite;
}

#user-nav {
    position: absolute;
    top: 18px;
    right: 18px;
}

#user-nav ul {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#user-nav li {
    color: #cfcfcf;
    background: #2b2b2b;
    border: 1px solid #404040;
    padding: 7px 10px;
    font-size: 12px;
    white-space: nowrap;
}

#user-nav li:hover {
    background: #363636;
}

#user-nav a {
    color: #cfcfcf;
    text-decoration: none;
}

#user-nav .user-ip {
    color: #7ee787;
    font-family: Consolas, "Courier New", monospace;
}

#user-nav .user-money {
    color: #9be36b;
}

#user-nav .user-rep {
    color: #ffd166;
}

#user-nav .header-language {
    padding: 0 2px;
}

.header-language form {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    margin: 0;
}

.header-language form label,
.header-language select {
    width: auto;
    margin: 0;
}

.header-language select,
.header-language .btn {
    min-height: 30px;
    padding: 3px 5px;
    font-size: 12px;
}

.logout-form {
    display: inline;
    margin: 0;
}

.link-button {
    background: none;
    border: 0;
    padding: 0;
    color: #cfcfcf;
    font: inherit;
    cursor: pointer;
}

.link-button:hover {
    color: #ff8a80;
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */

#sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    bottom: 0;
    width: 220px;
    background: #2b2b2b;
    border-right: 1px solid #1a1a1a;
    overflow-y: auto;
    z-index: 40;
}

#sidebar ul {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

#sidebar li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #363636;
}

#sidebar li a {
    display: block;
    padding: 11px 14px;
    color: #bdbdbd;
    text-decoration: none;
    font-size: 12px;
}

#sidebar li a i {
    width: 18px;
    margin-right: 8px;
    text-align: center;
    color: #8a8a8a;
}

#sidebar li a:hover,
#sidebar li.active a {
    background: #3a3a3a;
    color: #fff;
    text-decoration: none;
}

#sidebar li.active a {
    border-left: 3px solid #7ee787;
    padding-left: 11px;
}

#sidebar li.active a i,
#sidebar li a:hover i {
    color: #7ee787;
}

.mobile-quick-nav { display: none; }

/* --------------------------------------------------------------------------
   Content
   -------------------------------------------------------------------------- */

#content {
    margin-left: 220px;
    padding-top: 70px;
    min-height: 100vh;
    background: #eee;
}

#content-header {
    position: relative;
    height: 78px;
    padding: 15px 20px;
    background: linear-gradient(#fff, #e8e8e8);
    border-bottom: 1px solid #d0d0d0;
}

#content-header h1 {
    margin: 0;
    font-size: 23px;
    color: #333;
}

.header-ip {
    position: absolute;
    right: 20px;
    top: 17px;
    text-align: right;
    color: #777;
    font-size: 11px;
}

.header-ip-label {
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 4px;
}

.header-ip-value {
    color: #2a6496;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    font-weight: 700;
}

.header-clock {
    display: block;
    margin-top: 4px;
    color: #999;
    font-family: Consolas, "Courier New", monospace;
}

.online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5cb85c;
    box-shadow: 0 0 5px rgba(92, 184, 92, .8);
    margin-left: 6px;
}

#breadcrumb {
    padding: 7px 20px;
    background: #e5e5e5;
    border-top: 1px solid #d6d6d6;
    border-bottom: 1px solid #d6d6d6;
    font-size: 11px;
}

#breadcrumb a {
    color: #666;
    padding-right: 15px;
    margin-right: 5px;
    background: linear-gradient(45deg, transparent 48%, #999 49%, #999 51%, transparent 52%) no-repeat right center;
    background-size: 8px 8px;
}

#breadcrumb a:last-child {
    background: none;
    color: #333;
    font-weight: 700;
}

.container-fluid {
    padding: 18px 20px 40px;
}

.internet-context {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    margin-bottom: 14px;
    padding: 9px 12px;
    background: #f1f1f1;
    border: 1px solid #d8d8d8;
    font-size: 12px;
}

.internet-context-item {
    min-width: 0;
    overflow-wrap: anywhere;
}

.internet-context-directory {
    margin-left: auto;
}

.internet-resume {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.internet-resume .btn {
    white-space: normal;
    overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   Grid (subset of Bootstrap 2 used by the views)
   -------------------------------------------------------------------------- */

.row-fluid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    width: 100%;
}

.row-fluid > [class*="span"] {
    min-width: 0;
}

.span12 { flex: 1 1 100%; }
.span9 { flex: 1 1 calc(75% - 10px); }
.span6 { flex: 1 1 calc(50% - 10px); }
.span3 { flex: 1 1 calc(25% - 10px); }
.span8 { flex: 1 1 calc(66.666% - 10px); }
.span7 { flex: 1 1 calc(58.333% - 10px); }
.span5 { flex: 1 1 calc(41.666% - 10px); }
.span4 { flex: 1 1 calc(33.333% - 12px); }

/* --------------------------------------------------------------------------
   Widgets
   -------------------------------------------------------------------------- */

.widget-box {
    background: #f9f9f9;
    border: 1px solid #cdcdcd;
    border-top: 0;
    margin: 0 0 18px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

.widget-title {
    min-height: 36px;
    padding: 8px 12px;
    background: linear-gradient(#fdfdfd, #eaeaea);
    border-top: 1px solid #cdcdcd;
    border-bottom: 1px solid #cdcdcd;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title .icon {
    color: #777;
    width: 16px;
    text-align: center;
}

.widget-title h5 {
    margin: 0;
    font-size: 13px;
    color: #444;
    flex: 1;
}

.widget-title .label,
.widget-title .help {
    margin-left: auto;
}

.widget-title .help a {
    font-size: 10px;
    color: #777;
    text-transform: uppercase;
}

.widget-content {
    padding: 12px 14px;
    background: #f9f9f9;
}

.widget-content.nopadding {
    padding: 0;
}

.label {
    display: inline-block;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
    color: #fff;
    background: #777;
    text-transform: uppercase;
    letter-spacing: .4px;
    vertical-align: middle;
}

.site-ad {
    width: 100%;
    max-width: 728px;
    margin: 12px auto 16px;
    text-align: center;
}

.site-ad small {
    display: block;
    margin-bottom: 4px;
    color: #5e5e5e;
}

.landing-shell .site-ad small { color: #bdbdbd; }

.site-ad iframe {
    display: block;
    width: 100%;
    height: 90px;
    border: 0;
}

@media (max-width: 767px) {
    .site-ad { max-width: 468px; }
    .site-ad iframe { height: 90px; }
}

.label-success { background: #5cb85c; }
.label-important { background: #d9534f; }
.label-warning { background: #f0ad4e; color: #3d2a00; }
.label-info { background: #5bc0de; }

.alert {
    padding: 10px 12px;
    margin: 0 0 14px;
    border: 1px solid transparent;
    font-size: 13px;
}

.alert-success {
    color: #2c662d;
    background: #dff0d8;
    border-color: #c6e2b9;
}

.alert-error {
    color: #8a2a25;
    background: #f2dede;
    border-color: #e5b8b5;
}

.alert-info {
    color: #245269;
    background: #d9edf7;
    border-color: #bce8f1;
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.table {
    width: 100%;
    margin: 0 0 14px;
    border-collapse: collapse;
    background: #fff;
}

.table th,
.table td {
    padding: 7px 8px;
    text-align: left;
    vertical-align: middle;
    border-top: 1px solid #ddd;
}

.table th {
    background: linear-gradient(#fdfdfd, #eaeaea);
    border-bottom: 1px solid #cdcdcd;
    font-size: 11px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.table-striped tbody tr:nth-child(odd) td {
    background: #f7f7f7;
}

.table-bordered {
    border: 1px solid #ddd;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #ddd;
}

.table-condensed th,
.table-condensed td {
    padding: 5px 7px;
}

.table tbody tr.info td {
    background: #d9edf7 !important;
}

.network-table td {
    font-size: 12px;
}

.file-table td {
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
}

/* --------------------------------------------------------------------------
   Buttons / forms
   -------------------------------------------------------------------------- */

.btn {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #bbb;
    background: linear-gradient(#fff, #e6e6e6);
    color: #333;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    vertical-align: middle;
}

.btn:hover {
    background: #e6e6e6;
    color: #111;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(#428bca, #3071a9);
    border-color: #2a6496;
    color: #fff;
}

.btn-primary:hover {
    background: #3071a9;
    color: #fff;
}

.btn-danger {
    background: linear-gradient(#d9534f, #c9302c);
    border-color: #ac2925;
    color: #fff;
}

.btn-danger:hover {
    background: #c9302c;
    color: #fff;
}

.btn-mini {
    padding: 3px 7px;
    font-size: 11px;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.btn[disabled] {
    opacity: .5;
    cursor: not-allowed;
}

input[type="text"],
input[type="password"],
input[type="email"],
select {
    width: 100%;
    padding: 7px 9px;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    font-size: 13px;
}

input:focus,
select:focus {
    outline: 2px solid rgba(66, 139, 202, .35);
    border-color: #428bca;
}

label {
    display: block;
    margin: 0 0 4px;
    color: #555;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.form-inline {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 14px;
}

.form-inline label {
    width: 100%;
    margin: 0;
}

.form-inline input {
    width: 240px;
    flex: 0 1 240px;
}

.finances-page {
    min-width: 0;
    overflow-wrap: anywhere;
}

.finances-page :is(label, input, select, button) {
    min-width: 0;
    max-width: 100%;
}

.finance-total {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
}

.finance-total strong { font-size: 1.45em; }

.finance-account-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
    gap: 12px;
}

.finance-account {
    min-width: 0;
    border: 1px solid #d2d2d2;
    background: #fff;
}

.finance-account summary {
    padding: 10px 12px;
    background: #eee;
    cursor: pointer;
}

.finance-account summary span { margin-inline-start: 8px; }
.finance-account-body { padding: 12px; }
.finance-account-body dl { margin: 0 0 12px; }
.finance-account-body dt { color: #555; font-size: 12px; }
.finance-account-body dd { margin: 0 0 6px; }

.finance-account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.finance-account-funds {
    margin-top: 12px;
}

.finance-account-funds input[type="number"] {
    width: 100%;
    padding: 7px 9px;
    margin-bottom: 6px;
    border: 1px solid #aaa;
}

@media (max-width: 760px) {
    .finances-page :is(.btn, .finance-account summary) { min-height: 44px; }
    .finances-page .btn { white-space: normal; }
    .finances-page .table td { overflow-wrap: anywhere; }
}

.internet-search {
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e2e2;
}

.internet-search .btn {
    flex: 0 0 auto;
}

/* --------------------------------------------------------------------------
   Dashboard components
   -------------------------------------------------------------------------- */

.machine-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #ddd;
}

.machine-head .muted {
    display: block;
    font-family: Consolas, "Courier New", monospace;
    font-size: 11px;
}

.machine-status {
    color: #5cb85c;
    font-size: 11px;
}

.hardware-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 18px;
    margin-bottom: 14px;
}

.hardware-grid-large {
    grid-template-columns: 1fr;
}

.hardware-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
    color: #666;
    font-size: 11px;
}

.hardware-label span:first-child {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.progress {
    height: 9px;
    background: #e3e3e3;
    border: 1px solid #ccc;
    overflow: hidden;
}

.progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #5cb85c, #7ee787);
}

.account-list {
    display: grid;
    gap: 8px;
}

.account-list > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e5e5;
}

.account-list > div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.account-list strong {
    color: #333;
    text-align: right;
}

.log-message {
    max-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}

/* --------------------------------------------------------------------------
   Detalle de objetivo
   -------------------------------------------------------------------------- */

.target-details {
    margin: 0 0 12px;
}

.target-details dt {
    width: 100px;
    float: left;
    clear: left;
    color: #777;
    font-weight: 400;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
    line-height: 22px;
}

.target-details dd {
    margin-left: 110px;
    line-height: 22px;
}

/* --------------------------------------------------------------------------
   Auth pages
   -------------------------------------------------------------------------- */

.auth-page {
    background: #111;
    color: #d7d7d7;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 15px;
    background:
        radial-gradient(circle at 50% 0%, rgba(126, 231, 135, .08), transparent 45%),
        #111;
}

.auth-brand {
    margin-bottom: 18px;
    color: #f4f4f4;
    font-family: Consolas, "Courier New", monospace;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.auth-brand .brand-mark {
    color: #7ee787;
    margin-right: 8px;
}

.auth-box {
    width: 100%;
    max-width: 430px;
    background: #1b1f1b;
    border: 1px solid #314031;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .55);
}

.login-panel {
    padding: 26px 28px 22px;
}

.login-head {
    text-align: center;
    margin-bottom: 20px;
}

.login-head h1 {
    color: #7ee787;
    font-family: Consolas, "Courier New", monospace;
    font-size: 22px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.login-head p {
    margin: 0;
    color: #7e9a7e;
    font-size: 12px;
}

.login-panel label {
    color: #9ab59a;
}

.login-panel input {
    background: #0e120e;
    border: 1px solid #354635;
    color: #d7ffd7;
    font-family: Consolas, "Courier New", monospace;
}

.login-panel input:focus {
    border-color: #7ee787;
    outline: 1px solid rgba(126, 231, 135, .35);
}

.stack-form {
    display: grid;
    gap: 12px;
}

.stack-form .btn {
    margin-top: 6px;
    padding: 10px 12px;
    font-size: 13px;
}

.login-links {
    margin: 16px 0 0;
    text-align: center;
    font-size: 12px;
}

.login-links a {
    color: #7ee787;
}

.login-note {
    margin-top: 12px;
    text-align: center;
    color: #5f755f;
}

.auth-footer {
    margin: 18px 0 0;
    color: #566656;
    font-size: 11px;
}

.auth-page .alert {
    margin: 18px 18px 0;
}

.blink {
    animation: blink 1.1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1000px) {
    .span9,
    .span6,
    .span3,
    .span8,
    .span7,
    .span5,
    .span4 {
        flex: 1 1 100%;
    }

    #user-nav .text {
        display: none;
    }
}

@media (max-width: 760px) {
    #header {
        position: static;
        height: auto;
        min-height: 64px;
        padding-bottom: 8px;
    }

    #header h1 {
        position: static;
        padding: 12px 14px 0;
        font-size: 21px;
    }

    #user-nav {
        position: static;
        padding: 8px 14px 0;
    }

    #user-nav ul {
        flex-wrap: wrap;
    }

    #sidebar {
        position: static;
        width: 100%;
        top: auto;
        border-right: 0;
        border-bottom: 1px solid #1a1a1a;
    }

    #sidebar ul {
        display: flex;
        flex-wrap: wrap;
        margin: 0;
    }

    #sidebar.has-mobile-menu:not(.mobile-menu-open) > ul { display: none; }

    #sidebar .mobile-quick-nav {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 4px 8px;
        padding: 4px 10px;
    }

    .mobile-quick-nav a,
    .mobile-quick-nav button {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        min-height: 44px;
        padding: 0 8px;
        color: #fff;
        background: transparent;
        border: 0;
        font: inherit;
    }

    .mobile-quick-nav [hidden] { display: none; }
    .mobile-quick-nav button { margin-left: auto; cursor: pointer; }
    .mobile-quick-nav a[aria-current="page"] { box-shadow: inset 0 -2px #7ee787; }
    .quick-workspace .internet-context-empty { display: none; }

    #sidebar li {
        border-bottom: 0;
        border-right: 1px solid #363636;
    }

    #sidebar li a {
        padding: 9px 10px;
        font-size: 11px;
    }

    #sidebar li.active a {
        border-left: 0;
        border-bottom: 2px solid #7ee787;
        padding-left: 10px;
    }

    #content {
        margin-left: 0;
        padding-top: 0;
    }

    #content-header {
        height: auto;
        padding: 12px 14px;
    }

    .header-ip {
        position: static;
        text-align: left;
        margin-top: 6px;
    }

    .header-clock {
        display: inline;
        margin-left: 8px;
    }

    .container-fluid {
        padding: 12px;
    }

    .hardware-grid {
        grid-template-columns: 1fr;
    }

    .target-details dt {
        float: none;
        width: auto;
    }

    .target-details dd {
        margin-left: 0;
        margin-bottom: 6px;
    }
}

/* --------------------------------------------------------------------------
   Header stats / footer estilo Legacy
   -------------------------------------------------------------------------- */

.header-ip {
    position: absolute;
    right: 20px;
    top: 9px;
    text-align: right;
}

.header-ip-value {
    display: block;
    color: #333;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 25px;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: .5px;
}

.header-info {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    color: #777;
    font-size: 11px;
    margin-top: 2px;
}

.header-info i {
    color: #777;
}

.header-rep {
    color: #777;
}

.header-money {
    color: #459d1c;
    font-weight: 700;
}

#footer {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 9px 20px;
    border-top: 1px solid #d6d6d6;
    background: #e9e9e9;
    color: #777;
    font-size: 11px;
}

#footer a {
    color: #777;
    text-decoration: none;
}

#footer a:hover {
    color: #333;
    text-decoration: underline;
}

.footer-copy {
    margin-left: auto;
}

.footer-version {
    color: #999;
}

@media (max-width: 760px) {
    .header-ip {
        position: static;
        text-align: left;
        margin-top: 8px;
    }

    .header-ip-value {
        font-size: 20px;
    }

    .header-info {
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .fame-page th, .fame-page td {
        overflow-wrap: anywhere;
    }
    .fame-page table {
        table-layout: fixed;
    }
    .fame-page th:first-child {
        width: 2.25em;
    }
}

.nav-tabs-custom {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    border-bottom: 1px solid #cdcdcd;
}

.nav-tabs-custom li {
    margin: 0;
    padding: 0;
}

.nav-tabs-custom a {
    display: block;
    padding: 8px 14px 7px;
    border: 1px solid transparent;
    border-bottom: 0;
    color: #666;
    font-size: 12px;
    text-decoration: none;
}

.nav-tabs-custom li.active a {
    background: #fff;
    border-color: #cdcdcd;
    color: #333;
    font-weight: 700;
}

.task-progress {
    min-width: 150px;
}

.task-progress .progress {
    display: inline-block;
    width: 110px;
    vertical-align: middle;
    margin: 0 6px 0 0;
}

@media (max-width: 760px) {
    #footer {
        gap: 8px;
    }
    .footer-copy {
        margin-left: 0;
    }
}

/* --------------------------------------------------------------------------
   Landing / About (portada negra estilo 2014)
   -------------------------------------------------------------------------- */

.landing-page {
    background: #000;
    color: #fff;
    min-height: 100vh;
}

.landing-shell {
    min-height: 100vh;
    padding: 8vh 7vw 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.landing-title {
    margin: 0;
    color: #d8d8d8;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(48px, 9vw, 118px);
    font-weight: 700;
    letter-spacing: -5px;
    line-height: 1;
    text-shadow: 0 3px 0 #555;
}

.landing-title-small {
    font-size: clamp(42px, 6vw, 72px);
    letter-spacing: -2px;
}

.landing-subtitle {
    margin: -4px 0 38px;
    color: #e8e8e8;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(24px, 3.2vw, 46px);
    font-style: italic;
    font-weight: 700;
    text-shadow: 1px 2px 0 #444;
}

.landing-subtitle .needs {
    position: relative;
    display: inline-block;
    color: #ff4d4d;
    font-family: Arial, Helvetica, sans-serif;
    font-style: normal;
    font-size: 1.45em;
    font-weight: 900;
    letter-spacing: -2px;
    text-transform: uppercase;
    transform: rotate(-2deg) translateY(8px);
    text-shadow: 3px 3px 0 #4a0000;
}

.landing-subtitle-small {
    font-size: clamp(20px, 2.5vw, 32px);
    margin-bottom: 28px;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 26px;
    margin-top: 8px;
}

.landing-button {
    min-width: 190px;
    padding: 17px 24px;
    background: #f5f5f5;
    border: 1px solid #fff;
    color: #555;
    font-size: 19px;
    letter-spacing: 1px;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 0 0 1px #222;
}

.landing-button i {
    margin-right: 8px;
    color: #777;
}

.landing-button:hover {
    background: #fff;
    color: #111;
    text-decoration: none;
    box-shadow: 0 0 18px rgba(255, 255, 255, .25);
}

.landing-footer {
    margin-top: 10vh;
    color: #777;
    font-size: 11px;
    line-height: 1.6;
}

.landing-footer p {
    margin: 2px 0;
}

.landing-about {
    justify-content: flex-start;
    padding-top: 10vh;
}

.landing-about-text {
    max-width: 760px;
    margin: 26px 0 10px;
    color: #ccc;
    font-size: 14px;
    line-height: 1.75;
    text-align: left;
}

.landing-about-text strong {
    color: #fff;
}

.landing-about-text code {
    color: #7ee787;
}

.landing-about .landing-actions {
    margin-top: 32px;
}

@media (max-width: 700px) {
    .landing-shell {
        padding: 9vh 20px 30px;
    }

    .landing-title {
        letter-spacing: -2px;
    }

    .landing-subtitle .needs {
        font-size: 1.1em;
    }

    .landing-actions {
        width: 100%;
        gap: 10px;
    }

    .landing-button {
        min-width: 0;
        width: 100%;
        padding: 13px 16px;
        font-size: 15px;
    }

    .landing-about {
        padding-top: 6vh;
    }
}

.ip-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    padding: 9px 10px;
    background: #f1f1f1;
    border: 1px solid #d8d8d8;
}

.ip-bar label {
    width: auto;
    margin: 0;
    white-space: nowrap;
    color: #555;
    text-transform: none;
    font-size: 12px;
    font-weight: 700;
}

.ip-bar input {
    flex: 1;
    min-width: 0;
    max-width: 320px;
    padding: 5px 8px;
    font-family: Consolas, "Courier New", monospace;
}

.ip-bar-icon {
    color: #777;
    font-size: 16px;
    padding: 3px 5px;
}

.ip-bar-icon:hover {
    color: #2a6496;
}

@media (max-width: 760px) {
    .ip-bar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .ip-bar label { grid-column: 1 / -1; }
    .ip-bar input { width: 100%; max-width: none; box-sizing: border-box; font-size: 16px; }
    .ip-bar .btn, .ip-bar-icon { min-height: 44px; }
    .ip-bar .internet-hacked, .ip-bar-icon { display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
    .ip-bar-icon { min-width: 44px; }

    .hacked-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hacked-tabs a { display: flex; align-items: center; gap: 6px; min-height: 44px; padding-block: 0; }
}

.login-form-inline {
    max-width: 360px;
    margin-bottom: 14px;
}

.login-form-inline .btn {
    justify-self: start;
}

.target-log-title {
    margin: 14px -14px 10px;
    border-top: 1px solid #cdcdcd;
    min-height: 32px;
    padding: 6px 12px;
}

.task-section-title {
    margin: 16px 0 8px;
    font-size: 13px;
    color: #555;
    border-bottom: 1px solid #ddd;
    padding-bottom: 4px;
}

.quick-actions {
    display: grid;
    gap: 7px;
}

.quick-actions .btn {
    text-align: left;
    padding: 8px 10px;
}

.quick-actions .btn i {
    width: 18px;
}

.target-status-table th {
    width: 150px;
    color: #666;
    font-weight: 600;
}

/* Original-style forms and tables; no terminal/command interface. */
.game-log-editor { display:block; width:100%; box-sizing:border-box; min-height:160px; max-height:60vh; resize:vertical; padding:10px; margin-bottom:10px; font:12px/1.65 Consolas,monospace; background:#fff; color:#555; border:1px solid #ccc; }
.game-log-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 8px;
}

.game-log-actions form { margin: 0; }

.game-log-view {
    margin: 0 0 12px;
    padding: 10px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    overflow: auto;
    max-height: min(60vh, 32rem);
    font: 14px/1.5 Consolas, monospace;
    background: #fff;
    color: #25313a;
    border: 1px solid #ccc;
}

.task-help summary, .task-history summary {
    cursor: pointer;
    padding: 8px 0;
    font-weight: 600;
}

@media (max-width: 760px) {
    .credential-list, .credential-list tbody { display: block; width: 100%; }
    .credential-list thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
    .credential-list tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 10px; }
    .credential-list td { min-width: 0; padding: 2px; border: 0; overflow-wrap: anywhere; }
    .credential-list td[data-label]::before { content: attr(data-label); display: block; font: 600 12px/1.2 system-ui, sans-serif; }
    .credential-list td:last-child { grid-column: 1 / -1; }
    .credential-list .btn { display: inline-flex; min-height: 44px; align-items: center; padding-inline: 12px; }
    /* Phones: more log entries per screen while Save/Clear stay above the fold at 320–390 × 780. */
    .game-log-editor { height: clamp(12rem, 42dvh, 24rem); font-size: 16px; line-height: 1.4; }
    .game-log-actions .btn { min-height: 44px; }
    #task-table, #task-table tbody { display: block; width: 100%; }
    #task-table thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
    #task-table tr {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: start;
        gap: 3px 10px;
        padding: 8px 10px;
        border-bottom: 1px solid #ddd;
    }
    #task-table td { display: block; border: 0; padding: 0; min-width: 0; overflow-wrap: anywhere; }
    #task-table td[colspan], #task-table td:nth-child(2), #task-table td:last-child { grid-column: 1 / -1; }
    #task-table td:nth-child(2) { grid-row: 1; font-weight: 600; }
    #task-table td[data-task-state] { font-weight: 700; }
    #task-table td.button-row { display: flex; gap: 8px; flex-wrap: wrap; }
    #task-table .btn { min-height: 44px; padding-inline: 14px; }
}
.button-row { min-width:130px; }
.button-row form { display:inline-block; margin:2px; }
.research-file { padding:14px 0; border-top:1px solid #ddd; }
.research-file h4 { margin:0 0 8px; font-size:14px; }
.research-form { display:flex; flex-wrap:wrap; align-items:end; gap:12px; }
.research-form label { display:flex; flex-direction:column; gap:4px; font-size:12px; }
.research-form .checkbox-label { flex-direction:row; align-items:center; }
.research-form input[type=checkbox] { width:auto; }
.remote-login-box { max-width:320px; margin:20px auto; padding:22px; border:1px solid #bbb; background:#f8f8f8; }
.npc-web { min-height:110px; margin:14px 0; }
.npc-web ul { margin:8px 0 18px 22px; }
.security-audit { margin:16px 0; padding:12px; border:1px solid #ddd; color:#666; }
.resource-summary { padding:8px; background:#f2f2f2; border:1px solid #ddd; }

.auth-box.auth-box-premium {
    width: min(94vw, 850px);
    max-width: 850px;
    color: #25313a;
}

.auth-box-premium .widget-content .muted {
    color: #52606a;
}
.icon-blue, .site-icon, .nav-tabs-custom .fa-globe, .nav-tabs-custom .fa-list-ul,
.nav-tabs-custom .fa-home, .ip-bar-icon .fa-home, .npc-landing h4 .fa, .npc-landing-links .fa {
    color: #1764ae;
}

.icon-teal, .ip-bar .fa-terminal, .nav-tabs-custom .fa-file-text-o, .npc-landing-links .fa-terminal,
.site-icon[data-site-type="safenet"], .site-icon[data-site-type="isp"] {
    color: #007677;
}

.icon-green, .nav-tabs-custom .fa-sign-in, .nav-tabs-custom .fa-building-o, .npc-landing-links .fa-building-o,
.site-icon[data-site-type="bank"], .site-icon[data-site-type="dc"] {
    color: #187741;
}

.icon-amber, .nav-tabs-custom .fa-folder-open, .nav-tabs-custom .fa-rss, .nav-tabs-custom .fa-certificate,
.nav-tabs-custom .fa-usd, .site-icon[data-site-type="bitcoin"] {
    color: #965000;
}

.icon-violet, .nav-tabs-custom .fa-terminal, .nav-tabs-custom .fa-flask, .npc-landing-links .fa-flask,
.site-icon[data-site-type="md"], .site-icon[data-site-type="torrent"],
.site-icon[data-site-type="puzzle"] {
    color: #743eb5;
}

.nav-tabs-custom .fa-bolt, .nav-tabs-custom .fa-sign-out,
.site-icon[data-site-type="evilcorp"], .site-icon[data-site-type="news"] {
    color: #b2334d;
}

#main-navigation .fa { color: #8fcef9; }
#main-navigation .fa-globe, #main-navigation .fa-terminal { color: #60dfca; }
#main-navigation .fa-folder-open, #main-navigation .fa-gift, #main-navigation .fa-star { color: #ffd279; }
#main-navigation .fa-flask, #main-navigation .fa-users { color: #d6baff; }
#main-navigation .fa-briefcase, #main-navigation .fa-building-o { color: #9ae8a6; }
#main-navigation .fa-bullseye { color: #ff9b9c; }

.game-log-actions .fa-save { color: #c4f5ff; }
.game-log-actions .fa-eraser { color: #ffe1a2; }

.workspace-controls { display: grid; gap: 8px; margin-bottom: 14px; }
.workspace-controls summary { cursor: pointer; font-weight: 600; }
.workspace-folders, .workspace-notes, .research-list { margin-block: 4px; }
.workspace-notes li, .research-list li { padding: 5px 0; }
.workspace-note { max-width: 40rem; }
.workspace-note label { display: block; }
.workspace-note input, .workspace-note textarea {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 100%;
}
.workspace-move { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 4px; }
.workspace-move select { max-width: 100%; }
.research-specs dt { font-weight: 600; }
.research-specs dd { margin: 0 0 8px; }

.game-badge {
    --badge-light: #61bafa;
    --badge-middle: #287ccb;
    --badge-dark: #174b8e;
    --badge-size: 21px;
    position: relative;
    display: inline-grid;
    place-items: center;
    width: var(--badge-size);
    height: var(--badge-size);
    flex: 0 0 var(--badge-size);
    box-sizing: border-box;
    border: 1px solid var(--badge-dark);
    border-radius: 6px;
    background:
        linear-gradient(145deg, #ffffff6b, transparent 47%),
        linear-gradient(180deg, var(--badge-light), var(--badge-middle) 51%, var(--badge-dark));
    box-shadow: inset 0 1px 0 #ffffff72, inset 0 -2px 0 #00000024, 0 1px 1px #17243859;
    color: #fff;
    font-size: 11px;
    line-height: 1;
    text-shadow: 0 1px 1px #000a;
    vertical-align: middle;
}

.tone-teal,
.nav-tabs-custom .game-badge:is(.fa-file-text-o, .fa-cloud-download) {
    --badge-light: #50e1db;
    --badge-middle: #148e94;
    --badge-dark: #085665;
}

.tone-green,
.nav-tabs-custom .game-badge:is(.fa-building-o, .fa-sign-in) {
    --badge-light: #8bda65;
    --badge-middle: #339854;
    --badge-dark: #1b6034;
}

.tone-orange,
.nav-tabs-custom .game-badge:is(.fa-usd, .fa-certificate, .fa-rss) {
    --badge-light: #ffd365;
    --badge-middle: #c67219;
    --badge-dark: #854016;
}

.tone-violet,
.nav-tabs-custom .game-badge:is(.fa-terminal, .fa-flask) {
    --badge-light: #ca9dfd;
    --badge-middle: #8852c2;
    --badge-dark: #503183;
}

.tone-red,
.nav-tabs-custom .game-badge:is(.fa-bolt, .fa-sign-out) {
    --badge-light: #fc9b8a;
    --badge-middle: #c9474c;
    --badge-dark: #8b2638;
}

.tone-rose {
    --badge-light: #f997ce;
    --badge-middle: #bd4e86;
    --badge-dark: #7d2959;
}

.tone-slate {
    --badge-light: #aab9ce;
    --badge-middle: #5e7694;
    --badge-dark: #34475f;
}

.file-badge {
    --badge-size: 25px;
    margin-inline-end: 4px;
    border-radius: 5px 7px 5px 5px;
    box-shadow: inset 0 1px 0 #ffffff9c, inset -2px -2px 0 #00000025, 1px 2px 1px #17243848;
    font-size: 13px;
}

.file-badge::after {
    content: "";
    position: absolute;
    top: 1px;
    right: 1px;
    width: 6px;
    height: 6px;
    border-radius: 0 4px 0 2px;
    background: #fff8;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.nav-tabs-custom .fa.game-badge, .ip-bar .fa.game-badge, .game-log-actions .fa.game-badge {
    color: #fff;
}

.nav-tabs-custom .game-badge { margin-inline-end: 3px; }
.hacked-tabs .game-badge { margin-inline-end: 0; }
.btn .game-badge { --badge-size: 17px; font-size: 9px; border-radius: 4px; }
.btn:disabled .game-badge { filter: saturate(.5); }
.software-filename { overflow-wrap: anywhere; }
.software-file-scroll .software-filename { min-width: 9rem; }

.support-notice {
    position: fixed;
    z-index: 1100;
    inset-inline-end: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    width: min(380px, calc(100% - 24px));
    margin: 0;
    padding: 10px 14px;
    box-sizing: border-box;
    border: 1px solid #dbc078;
    border-radius: 4px;
    box-shadow: 0 4px 18px #0004;
    background: #fff4d5;
    color: #483714;
    text-align: left;
    pointer-events: none;
}

.support-notice[hidden] { display: none; }
/* Bait for cosmetic ad filters: it must have a box so that only a blocker collapses it. */
.support-probe { position: absolute; left: -10000px; top: 0; display: block; width: 1px; height: 1px; overflow: hidden; pointer-events: none; }
.support-notice p { flex: 1 1 100%; margin: 0; }
.support-notice p strong { display: block; margin-bottom: 3px; }
.support-notice .btn { margin-inline-start: auto; min-height: 44px; pointer-events: auto; }
.landing-footer a { color: #a9d5ff; }
#breadcrumb .breadcrumb-help { float: right; }

.software-detail {
    max-width: 48rem;
    overflow-wrap: anywhere;
}
.software-detail dl {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 6px 14px;
    margin: 12px 0;
}
.software-detail dt { font-weight: 600; }
.software-detail dd { margin: 0; }
.software-detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.software-detail-actions form { margin: 0; }

.wiki-page {
    display: grid;
    grid-template-columns: minmax(10rem, 25%) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.wiki-nav {
    padding: 12px;
    border: 1px solid #d0d6dc;
    background: #f4f6f8;
    color: #25313a;
}
.wiki-nav ul, .wiki-results { list-style: none; padding: 0; margin: 8px 0 0; }
.wiki-nav a { display: block; padding: 5px; }
.wiki-nav a[aria-current="page"] { background: #dcebf7; font-weight: 700; }
.wiki-search label { display: block; margin-bottom: 5px; }
.wiki-search div, .wiki-links { display: flex; gap: 8px; flex-wrap: wrap; }
.wiki-search input { width: min(100%, 19rem); }
.wiki-results li { padding: 8px 0; border-bottom: 1px solid #ddd; }
.wiki-results span { display: block; }
.wiki-content { color: #25313a; }

.clan-nav-tabs { display: flex; flex-wrap: wrap; }
.clan-insignia {
    --insignia-size: 29px;
    display: inline-grid;
    place-items: center;
    position: relative;
    width: var(--insignia-size);
    height: var(--insignia-size);
    flex: 0 0 var(--insignia-size);
    vertical-align: middle;
    filter: drop-shadow(0 2px 1px #16232c65);
    color: #fff;
    text-shadow: 0 1px 2px #150b1c;
    isolation: isolate;
}
.clan-insignia::before, .clan-insignia::after {
    content: "";
    position: absolute;
    clip-path: polygon(50% 0, 97% 17%, 91% 63%, 79% 80%, 50% 100%, 21% 80%, 9% 63%, 3% 17%);
}
.clan-insignia::before {
    z-index: -2;
    inset: 0;
    background: linear-gradient(150deg, #f7eee2 8%, #a89b8e 44%, #6d574d 55%, #d8c4a8 80%);
}
.clan-insignia::after {
    z-index: -1;
    inset: 2px;
    background: linear-gradient(145deg, #fff7 10%, transparent 45%, #090d22aa), var(--insignia-color);
}
.clan-insignia > .fa { margin-bottom: 2px; font-size: calc(var(--insignia-size) * .43); }
.emblem-editor fieldset { margin: 10px 0; padding: 0; border: 0; }
.emblem-editor legend { font-weight: 700; margin-bottom: 6px; }
.emblem-preview { display: flex; gap: 12px; align-items: center; }
.emblem-preview .clan-insignia { --insignia-size: 64px; }
.emblem-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 6px; }
.emblem-options label { display: flex; align-items: center; cursor: pointer; min-height: 44px; margin: 0; }
.emblem-options input { margin: 0 5px; width: auto; flex: none; }
.emblem-options label > span { display: flex; align-items: center; gap: 4px; min-width: 0; flex: 1; padding: 6px 2px; color: #314057; }
.emblem-options input:checked + span { background: #dce8f5; border-radius: 4px; font-weight: 700; }
.emblem-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border: 1px solid #29344980;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff5, transparent, #1115), var(--insignia-color);
}

@media (max-width: 640px) {
    .wiki-page { grid-template-columns: minmax(0, 1fr); }
    .wiki-nav { grid-row: 2; }
    .wiki-nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* NPC landing personality: original inline SVG scene and notice board. */
.npc-landing-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.npc-scene { margin-inline-start: auto; width: 200px; max-width: 100%; height: auto; border-radius: 6px; box-shadow: 0 2px 10px #0003; background: #fff; }
.npc-winks { margin: 12px 0 16px; padding: 10px 14px; border: 1px dashed #c9a227; border-radius: 6px; background: #fffbea; color: #4a3b0b; }
.npc-winks h4 { margin: 0 0 6px; font-size: 14px; }
.npc-winks ul { margin: 0 0 0 18px; }
.npc-winks li { margin: 3px 0; }
@media (max-width: 600px) { .npc-scene { margin-inline-start: 0; width: 100%; } }

/* Wide tables scroll inside their widget instead of widening the page on phones. */
.widget-content.table-scroll { max-width: 100%; overflow-x: auto; }
.clan-nav-tabs { margin-bottom: 12px; }

.header-online,
.header-bank {
    white-space: nowrap;
}

.header-bank {
    color: #459d1c;
    font-weight: 700;
}

/* Header figures wrap as whole items on narrow screens instead of breaking the clock. */
.header-info { flex-wrap: wrap; row-gap: 4px; }
.header-info > span { white-space: nowrap; }

/* Log filter (client-side preview of matching lines). */
.log-filter { margin: 0 0 8px; max-width: 100%; }
.log-filter label { display: block; margin-bottom: 4px; }
.log-filter-input { width: 100%; box-sizing: border-box; max-width: 100%; }
.log-filter-count { margin: 4px 0; }
.log-filter-results { list-style: none; margin: 0 0 8px; padding: 0; max-height: 180px; overflow-y: auto; }
.log-filter-results li { margin: 0; }
.log-filter-results button { display: flex; gap: 8px; width: 100%; box-sizing: border-box; text-align: left; background: transparent; color: inherit; border: 0; border-bottom: 1px solid rgba(128,128,128,.3); padding: 4px 6px; font: inherit; cursor: pointer; }
.log-filter-results button:hover, .log-filter-results button:focus-visible { background: rgba(128,128,128,.2); outline: 2px solid currentColor; outline-offset: -2px; }
.log-filter-num { flex: 0 0 auto; opacity: .7; white-space: nowrap; }
.log-filter-text { min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; font-family: monospace; }
.what-now-list { margin: 0; padding-left: 18px; }
.what-now-list li { margin: 4px 0; overflow-wrap: anywhere; }
.webserver-preview-text { margin: 0 0 6px; overflow-wrap: anywhere; white-space: pre-wrap; max-height: 12em; overflow: hidden; }
.server-note { margin-top: 6px; max-width: 100%; }
.server-note summary { cursor: pointer; font-size: 12px; opacity: .85; }
.server-note textarea { display: block; width: 100%; max-width: 100%; box-sizing: border-box; margin: 4px 0; resize: vertical; min-height: 56px; }
.server-note[data-has-note] summary { font-weight: bold; }

/* ==========================================================================
   Dark theme (opt-in via html[data-theme="dark"]); light theme untouched.
   ========================================================================== */
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] body { background: #121212; color: #d8d8d8; }
html[data-theme="dark"] a { color: #8ec5f5; }
html[data-theme="dark"] a:hover { color: #b9dcfa; }
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3,
html[data-theme="dark"] h4, html[data-theme="dark"] h5, html[data-theme="dark"] h6 { color: #ececec; }
html[data-theme="dark"] .muted { color: #a0a0a0; }
html[data-theme="dark"] #header { background: #0c0c0c; border-bottom-color: #000; }
html[data-theme="dark"] #header h1 a, html[data-theme="dark"] #user-nav a { color: #f0f0f0; }
html[data-theme="dark"] #sidebar { background: #181818; border-right-color: #000; }
html[data-theme="dark"] #sidebar li a { color: #c4c4c4; }
html[data-theme="dark"] #sidebar li a:hover, html[data-theme="dark"] #sidebar li.active a { background: #262626; color: #fff; }
html[data-theme="dark"] .link-button { color: #d8d8d8; }
html[data-theme="dark"] .link-button:hover { color: #ff9e94; }
html[data-theme="dark"] #content { background: #1a1a1a; }
html[data-theme="dark"] #content-header { background: linear-gradient(#262626, #1f1f1f); border-bottom-color: #3a3a3a; }
html[data-theme="dark"] #content-header h1 { color: #ececec; }
html[data-theme="dark"] .header-ip, html[data-theme="dark"] .header-ip-label,
html[data-theme="dark"] .header-info, html[data-theme="dark"] .header-info i,
html[data-theme="dark"] .header-rep { color: #b0b0b0; }
html[data-theme="dark"] .widget-box { background: #232323; border-color: #3d3d3d; box-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
html[data-theme="dark"] .widget-title { background: linear-gradient(#2d2d2d, #262626); border-color: #3d3d3d; }
html[data-theme="dark"] .widget-title .icon, html[data-theme="dark"] .widget-title .help a { color: #b0b0b0; }
html[data-theme="dark"] .widget-title h5 { color: #e4e4e4; }
html[data-theme="dark"] .widget-content { background: #232323; color: #d8d8d8; }
html[data-theme="dark"] .what-now { background: #232323; border-color: #4a6a8a; }
html[data-theme="dark"] .what-now .widget-content { background: #1f2a35; color: #dbe6f0; }
html[data-theme="dark"] .alert-success { color: #bfe8bf; background: #1f3a22; border-color: #2f5a34; }
html[data-theme="dark"] .alert-error { color: #f5c2bf; background: #44201f; border-color: #6a312f; }
html[data-theme="dark"] .alert-info { color: #bfe0f2; background: #1c3544; border-color: #2c566e; }
html[data-theme="dark"] .table { background: #232323; color: #d8d8d8; }
html[data-theme="dark"] .table th, html[data-theme="dark"] .table td { border-color: #3d3d3d; }
html[data-theme="dark"] .table th { background: linear-gradient(#2d2d2d, #262626); color: #cfcfcf; border-bottom-color: #3d3d3d; }
html[data-theme="dark"] .table-striped tbody tr:nth-child(odd) td { background: #292929; }
html[data-theme="dark"] .table-bordered, html[data-theme="dark"] .table-bordered th,
html[data-theme="dark"] .table-bordered td { border-color: #3d3d3d; }
html[data-theme="dark"] .table tbody tr.info td { background: #1c3544 !important; color: #d6ebf7; }
html[data-theme="dark"] .btn { background: linear-gradient(#383838, #2c2c2c); border-color: #555; color: #eee; }
html[data-theme="dark"] .btn:hover { background: #404040; color: #fff; }
html[data-theme="dark"] .btn-primary { background: linear-gradient(#2f6fa8, #255a8a); border-color: #1d4b70; color: #fff; }
html[data-theme="dark"] .btn-primary:hover { background: #255a8a; color: #fff; }
html[data-theme="dark"] .btn-danger { background: linear-gradient(#b5413d, #9b2f2b); border-color: #7d2320; color: #fff; }
html[data-theme="dark"] .btn-danger:hover { background: #9b2f2b; color: #fff; }
html[data-theme="dark"] input[type="text"], html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="email"], html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="search"], html[data-theme="dark"] select,
html[data-theme="dark"] textarea { background: #161616; color: #e6e6e6; border-color: #555; }
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: #9a9a9a; }
html[data-theme="dark"] input:focus, html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus { outline-color: rgba(142, 197, 245, .5); border-color: #8ec5f5; }
html[data-theme="dark"] label { color: #c4c4c4; }
html[data-theme="dark"] .nav-tabs-custom { border-bottom-color: #3d3d3d; }
html[data-theme="dark"] .nav-tabs-custom a { color: #b8b8b8; }
html[data-theme="dark"] .nav-tabs-custom li.active a { background: #232323; border-color: #3d3d3d; color: #fff; }
html[data-theme="dark"] .game-log-editor { background: #121212; color: #d0d0d0; border-color: #555; }
html[data-theme="dark"] .log-filter-results button { color: #e0e0e0; }
html[data-theme="dark"] code, html[data-theme="dark"] pre { background: #161616; color: #d8d8d8; }

/* Forum (phase 1) */
.forum-list { list-style: none; margin: 0; padding: 0; }
.forum-row { padding: 10px 12px; border-bottom: 1px solid rgba(128,128,128,.25); }
.forum-main, .forum-title { overflow-wrap: anywhere; word-break: break-word; }
.forum-title { font-weight: bold; }
.forum-meta span { display: inline-block; margin-right: 12px; }
.forum-pad { padding: 10px 12px; margin: 0; }
.forum-pager { padding: 10px 12px; }
.forum-pager span { margin: 0 8px; }
.forum-thread-title { margin: 0; overflow-wrap: anywhere; }
.forum-post { padding: 10px 12px; border-bottom: 1px solid rgba(128,128,128,.25); }
.forum-post-head span { margin-left: 8px; }
.forum-post-body { margin-top: 6px; overflow-wrap: anywhere; word-break: break-word; }
.forum-form input[type="text"], .forum-form textarea { display: block; width: 100%; max-width: 100%; box-sizing: border-box; }
.server-delete { margin-top: 6px; max-width: 100%; }
.server-delete summary { cursor: pointer; font-size: 12px; opacity: .85; }

/* Dark mode: remaining light surfaces (validated in browser). */
html[data-theme="dark"] .header-ip-value { color: #f0f0f0; }
html[data-theme="dark"] #breadcrumb { background: #1d1d1d; border-color: #333; }
html[data-theme="dark"] #breadcrumb a { color: #d8d8d8; }
html[data-theme="dark"] .internet-context { background: #1d1d1d; border-color: #333; color: #d8d8d8; }
html[data-theme="dark"] .internet-context .muted { color: #a0a0a0; }
html[data-theme="dark"] .hardware-item, html[data-theme="dark"] .hardware-item span, html[data-theme="dark"] .hardware-label { color: #b0b0b0; }
html[data-theme="dark"] .progress { background: #333; }
html[data-theme="dark"] .account-list strong, html[data-theme="dark"] .machine-head strong { color: #f0f0f0; opacity: 1; }
html[data-theme="dark"] .account-list > div { border-color: #333; }
html[data-theme="dark"] #footer { background: #121212; color: #a0a0a0; }
.npc-winks li.npc-reaction { font-weight: 600; color: #7a1f1f; }
html[data-theme="dark"] .npc-winks li.npc-reaction { color: #f0b4b4; }
.rivalry-box .account-list strong { font-variant-numeric: tabular-nums; }

/* House ads: our own promotions, no third-party scripts */
.house-ad { margin: 12px auto; max-width: 468px; padding: 8px 12px; border: 1px solid #c9c9c9; border-radius: 4px; background: #fafafa; text-align: center; font-size: 0.95em; }
.house-ad a { font-weight: bold; }
html[data-theme="dark"] .house-ad { border-color: #3a3a3a; background: #1c1c1c; color: #d8d8d8; }
html[data-theme="dark"] .house-ad a { color: #8ec5f5; }

/* Dark mode: every remaining light surface found by scanning app.css (user report: Software summary). */
html[data-theme="dark"] .resource-summary,
html[data-theme="dark"] .ip-bar,
html[data-theme="dark"] .game-log-view,
html[data-theme="dark"] .remote-login-box,
html[data-theme="dark"] .support-notice,
html[data-theme="dark"] .finance-account,
html[data-theme="dark"] .finance-account summary,
html[data-theme="dark"] .wiki-nav,
html[data-theme="dark"] .npc-winks { background: #1d1d1d; color: #d8d8d8; border-color: #333; }
html[data-theme="dark"] .wiki-nav a[aria-current="page"],
html[data-theme="dark"] .nav-tabs-custom li.active a,
html[data-theme="dark"] .emblem-options input:checked + span { background: #2d2d2d; color: #f0f0f0; border-color: #444; }
html[data-theme="dark"] .btn:hover { background: #3a3a3a; color: #f0f0f0; }
html[data-theme="dark"] .npc-scene { background: #e8e8e8; border-radius: 4px; }

/* ==========================================================================
   Root Access (Premium) presentation: header label, expiry note, plans page,
   discreet ad anchor. Appended block; fair play only, no pop-ups.
   ========================================================================== */
.header-info { flex-wrap: wrap; }
.root-badge { font-family: Consolas, "Courier New", monospace; font-size: 11px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.root-badge.root-off { color: #777; }
.root-badge.root-on { color: #2e7d32; }
.root-badge:hover { text-decoration: underline; }
.root-expiry { font-size: 11px; color: #b26a00; text-decoration: none; white-space: nowrap; }
.root-expiry:hover { text-decoration: underline; }
.ad-premium-hint { margin: -6px auto 12px; max-width: 468px; text-align: center; font-size: 11px; }
.ad-premium-hint a { color: #888; text-decoration: none; }
.ad-premium-hint a:hover { text-decoration: underline; }
.root-compare { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
.root-col { flex: 1 1 260px; min-width: 0; padding: 12px 14px; border: 1px solid #d0d0d0; border-radius: 4px; background: #fafafa; }
.root-col h4 { margin: 0 0 8px; }
.root-col ul, .root-col ol { margin: 0; padding-left: 20px; }
.root-col li { margin-bottom: 6px; overflow-wrap: anywhere; }
.root-col-standard { color: #666; }
.root-col-premium { border-color: #2e7d32; background: #f3faf3; box-shadow: 0 0 0 1px rgba(46, 125, 50, .25); }
.root-plans { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.root-plan { position: relative; flex: 1 1 200px; min-width: 0; padding: 14px; border: 1px solid #d0d0d0; border-radius: 4px; background: #fff; text-align: center; }
.root-plan h4 { margin: 0 0 6px; overflow-wrap: anywhere; }
.root-plan p { margin: 4px 0; }
.root-plan-price { font-size: 24px; font-weight: 700; }
.root-plan-monthly, .root-plan-days { color: #777; font-size: 12px; }
.root-plan-save { display: inline-block; padding: 1px 8px; border-radius: 10px; background: #2e7d32; color: #fff; font-size: 11px; font-weight: 700; }
.root-plan-featured { border: 2px solid #2e7d32; background: #f3faf3; box-shadow: 0 2px 8px rgba(46, 125, 50, .3); }
.root-plan-flag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); padding: 1px 10px; border-radius: 10px; background: #2e7d32; color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
.root-plan form { margin-top: 8px; }
@media (max-width: 420px) {
    .root-plan { flex-basis: 100%; }
    .root-badge, .root-expiry { font-size: 10px; }
}
html[data-theme="dark"] .root-badge.root-off { color: #b0b0b0; }
html[data-theme="dark"] .root-badge.root-on { color: #7ee787; }
html[data-theme="dark"] .root-expiry { color: #ffb84d; }
html[data-theme="dark"] .ad-premium-hint a { color: #9a9a9a; }
html[data-theme="dark"] .root-col { background: #1c1c1c; border-color: #3a3a3a; color: #d8d8d8; }
html[data-theme="dark"] .root-col-standard { color: #a8a8a8; }
html[data-theme="dark"] .root-col-premium { background: #15251a; border-color: #3f9b4a; box-shadow: none; }
html[data-theme="dark"] .root-plan { background: #1c1c1c; border-color: #3a3a3a; color: #d8d8d8; }
html[data-theme="dark"] .root-plan-featured { background: #15251a; border-color: #3f9b4a; box-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
html[data-theme="dark"] .root-plan-monthly, html[data-theme="dark"] .root-plan-days { color: #a0a0a0; }
html[data-theme="dark"] .root-plan-save, html[data-theme="dark"] .root-plan-flag { background: #3f9b4a; color: #0b140d; }

/* Forum phase 2: unread/pinned/locked badges, search, moderation, reports. */
.forum-badge { margin-right: 6px; vertical-align: middle; }
.forum-unread { font-weight: bold; }
.forum-snippet { overflow-wrap: anywhere; margin: 2px 0; }
.forum-search input[type="text"] { display: inline-block; width: 70%; max-width: 100%; margin-right: 6px; }
.forum-error { color: #b94a48; font-weight: bold; }
.forum-mod { margin-top: 8px; }
.forum-inline { display: inline-block; margin: 0 4px 0 0; }
.forum-post-actions { margin-top: 6px; }
.forum-post-actions details { display: inline-block; margin-right: 8px; vertical-align: top; }
.forum-report summary { cursor: pointer; color: #666; }
html[data-theme="dark"] .forum-error { color: #f08a86; }
html[data-theme="dark"] .forum-report summary { color: #a0a0a0; }
html[data-theme="dark"] .forum-badge.label { color: #fff; }
html[data-theme="dark"] .forum-badge.label-warning { background: #b9770e; }
html[data-theme="dark"] .forum-badge.label-info { background: #2a7f99; }
html[data-theme="dark"] .forum-unread { color: #ffd78a; }

/* ---- Intro cinematic (first login only) ---- */
.intro-overlay { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: safe center; justify-content: center; padding: 16px; overflow-y: auto; background: radial-gradient(circle at 50% 35%, #0a1714 0%, #05090a 72%); color: #7CFC9A; font-family: Consolas, "Courier New", monospace; opacity: 1; transition: opacity .5s ease; }
.intro-overlay.intro-leaving { opacity: 0; pointer-events: none; }
.intro-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.intro-scanlines { position: fixed; inset: 0; pointer-events: none; z-index: 1; background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, .24) 3px, rgba(0, 0, 0, .24) 4px); opacity: .65; }
.intro-vignette { position: fixed; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(circle at center, transparent 55%, rgba(0, 0, 0, .7) 100%); }
.intro-screen { position: relative; z-index: 2; width: 100%; max-width: 860px; margin: auto; padding: 18px 20px; background: rgba(4, 11, 12, .62); backdrop-filter: blur(4px); border: 1px solid rgba(95, 191, 122, .45); border-radius: 6px; box-shadow: 0 0 36px rgba(124, 252, 154, .12), inset 0 0 24px rgba(124, 252, 154, .04); box-sizing: border-box; }
.intro-title { margin: 0; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: #7CFC9A; }
.intro-log { list-style: none; margin: 0; padding: 0; min-height: 12em; font-size: 13.5px; line-height: 1.62; overflow-wrap: anywhere; }
.intro-js .intro-line { display: none; }
.intro-js .intro-line.intro-shown { display: block; }
.intro-line:last-child { color: #d8ffe3; font-weight: bold; }
.intro-typing::after { content: "\2588"; margin-left: 2px; animation: intro-blink 1s steps(2) infinite; }
.intro-actions { margin: 0; text-align: right; }
.intro-skip { min-height: 40px; min-width: 112px; font-family: Consolas, "Courier New", monospace; font-weight: bold; }
@keyframes intro-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .intro-overlay { transition: none; } .intro-typing::after { animation: none; } .intro-scanlines { display: none; } }
@media (max-width: 360px) { .intro-log { font-size: 12px; min-height: 9.5em; } .intro-screen { padding: 12px; } }
/* ---- /Intro cinematic ---- */

/* Web Server: player-published content frame and templates */
.webpage-frame { border: 2px dashed #b9770e; border-radius: 4px; margin: 14px 0; overflow: hidden; position: relative; isolation: isolate; }
.webpage-frame-banner { background: #fff3cd; color: #5c4400; padding: 6px 10px; font-size: 12px; border-bottom: 1px solid #e0c36b; }
.webpage-frame-body { margin: 0; padding: 10px 14px; max-height: 600px; overflow: auto; overflow-wrap: anywhere; }
.webpage-frame-body h3, .webpage-frame-body h4 { font-size: 1.1em; }
.webserver-templates .btn { margin-right: 4px; }
html[data-theme="dark"] .webpage-frame { border-color: #b9770e; }
html[data-theme="dark"] .webpage-frame-banner { background: #3d3210; color: #ffd78a; border-bottom-color: #6b5a1c; }

/* ==========================================================================
   TERMINAL THEMES (Root Access, cosmetic only). Layered ON TOP of the dark theme:
   html[data-skin="matrix|amber|neon|solarized"] (layout also sets data-theme="dark").
   Text/surface pairs are chosen for >= 4.5:1 contrast. html[data-font] = monospace choice.
   ========================================================================== */
html[data-skin="matrix"] { --sk-bg:#000a00; --sk-s1:#031203; --sk-s2:#0a2410; --sk-fg:#3dff6e; --sk-mute:#4fc46a; --sk-link:#8dffab; --sk-line:#1f6b30; --sk-btn:#0d3017; --sk-btnfg:#9dffb6; --sk-err:#ff8f8f; --sk-ok:#3dff6e; }
html[data-skin="amber"] { --sk-bg:#0b0700; --sk-s1:#140d02; --sk-s2:#241705; --sk-fg:#ffb000; --sk-mute:#d29a2a; --sk-link:#ffd36b; --sk-line:#6b4a0a; --sk-btn:#3a2606; --sk-btnfg:#ffd36b; --sk-err:#ff9d7a; --sk-ok:#ffcf5a; }
html[data-skin="neon"] { --sk-bg:#12002b; --sk-s1:#1a0638; --sk-s2:#2a0c52; --sk-fg:#f3e8ff; --sk-mute:#bba6e4; --sk-link:#33f3ff; --sk-line:#7a28c8; --sk-btn:#3a0f78; --sk-btnfg:#ff9cf0; --sk-err:#ff8fb0; --sk-ok:#5dfbc4; }
html[data-skin="solarized"] { --sk-bg:#002b36; --sk-s1:#073642; --sk-s2:#0b4656; --sk-fg:#eee8d5; --sk-mute:#a3b0b0; --sk-link:#62b4f0; --sk-line:#2b6676; --sk-btn:#0f5a6e; --sk-btnfg:#fdf6e3; --sk-err:#ff9a8f; --sk-ok:#a9c93a; }

html[data-skin] { color-scheme: dark; }
html[data-skin] body { background: var(--sk-bg); color: var(--sk-fg); }
html[data-skin] a { color: var(--sk-link); }
html[data-skin] a:hover { color: var(--sk-fg); text-decoration: underline; }
html[data-skin] h1, html[data-skin] h2, html[data-skin] h3, html[data-skin] h4,
html[data-skin] h5, html[data-skin] h6 { color: var(--sk-fg); }
html[data-skin] .muted, html[data-skin] .small { color: var(--sk-mute); }
html[data-skin] #header { background: var(--sk-bg); border-bottom-color: var(--sk-line); }
html[data-skin] #header h1 a, html[data-skin] #user-nav a { color: var(--sk-fg); }
html[data-skin] #sidebar { background: var(--sk-s1); border-right-color: var(--sk-line); }
html[data-skin] #sidebar li a { color: var(--sk-fg); }
html[data-skin] #sidebar li a:hover, html[data-skin] #sidebar li.active a { background: var(--sk-s2); color: var(--sk-link); }
html[data-skin] .link-button { color: var(--sk-fg); }
html[data-skin] .link-button:hover { color: var(--sk-link); }
html[data-skin] #content { background: var(--sk-bg); }
html[data-skin] #content-header { background: var(--sk-s1); border-bottom-color: var(--sk-line); }
html[data-skin] #content-header h1 { color: var(--sk-fg); }
html[data-skin] .header-ip, html[data-skin] .header-ip-label, html[data-skin] .header-ip-value,
html[data-skin] .header-info, html[data-skin] .header-info i, html[data-skin] .header-rep { color: var(--sk-fg); }
html[data-skin] #breadcrumb, html[data-skin] .internet-context { background: var(--sk-s1); border-color: var(--sk-line); color: var(--sk-fg); }
html[data-skin] #breadcrumb a { color: var(--sk-link); }
html[data-skin] .widget-box { background: var(--sk-s1); border-color: var(--sk-line); box-shadow: none; }
html[data-skin] .widget-title { background: var(--sk-s2); border-color: var(--sk-line); }
html[data-skin] .widget-title .icon, html[data-skin] .widget-title .help a { color: var(--sk-link); }
html[data-skin] .widget-title h5 { color: var(--sk-fg); }
html[data-skin] .widget-content { background: var(--sk-s1); color: var(--sk-fg); }
html[data-skin] .what-now, html[data-skin] .what-now .widget-content { background: var(--sk-s1); color: var(--sk-fg); border-color: var(--sk-line); }
html[data-skin] .table { background: var(--sk-s1); color: var(--sk-fg); }
html[data-skin] .table th, html[data-skin] .table td, html[data-skin] .table-bordered { border-color: var(--sk-line); }
html[data-skin] .table th { background: var(--sk-s2); color: var(--sk-fg); }
html[data-skin] .table-striped tbody tr:nth-child(odd) td { background: var(--sk-s2); }
html[data-skin] .table tbody tr.info td { background: var(--sk-s2) !important; color: var(--sk-fg); }
html[data-skin] .btn, html[data-skin] .btn-primary, html[data-skin] .btn-danger { background: var(--sk-btn); border-color: var(--sk-line); color: var(--sk-btnfg); }
html[data-skin] .btn:hover, html[data-skin] .btn-primary:hover, html[data-skin] .btn-danger:hover { background: var(--sk-s2); color: var(--sk-fg); }
html[data-skin] input[type="text"], html[data-skin] input[type="password"], html[data-skin] input[type="email"],
html[data-skin] input[type="number"], html[data-skin] input[type="search"], html[data-skin] select,
html[data-skin] textarea { background: var(--sk-bg); color: var(--sk-fg); border-color: var(--sk-line); }
html[data-skin] input::placeholder, html[data-skin] textarea::placeholder { color: var(--sk-mute); }
html[data-skin] input:focus, html[data-skin] select:focus, html[data-skin] textarea:focus { outline-color: var(--sk-link); border-color: var(--sk-link); }
html[data-skin] label { color: var(--sk-fg); }
html[data-skin] .alert-success, html[data-skin] .alert-info { background: var(--sk-s2); color: var(--sk-ok); border-color: var(--sk-line); }
html[data-skin] .alert-error { background: var(--sk-s2); color: var(--sk-err); border-color: var(--sk-err); }
html[data-skin] .nav-tabs-custom { border-bottom-color: var(--sk-line); }
html[data-skin] .nav-tabs-custom a { color: var(--sk-fg); }
html[data-skin] .nav-tabs-custom li.active a { background: var(--sk-s2); color: var(--sk-link); border-color: var(--sk-line); }
html[data-skin] .game-log-editor, html[data-skin] .game-log-view, html[data-skin] .resource-summary,
html[data-skin] .ip-bar, html[data-skin] .remote-login-box, html[data-skin] .support-notice,
html[data-skin] .finance-account, html[data-skin] .finance-account summary, html[data-skin] .wiki-nav,
html[data-skin] code, html[data-skin] pre { background: var(--sk-bg); color: var(--sk-fg); border-color: var(--sk-line); }
html[data-skin] .log-filter-results button { color: var(--sk-fg); }
html[data-skin] .progress { background: var(--sk-s2); }
html[data-skin] #footer { background: var(--sk-bg); color: var(--sk-mute); }
html[data-skin] .root-badge.root-on, html[data-skin] .root-badge.root-off, html[data-skin] .root-expiry { color: var(--sk-link); }
html[data-skin] .skin-option { border-color: var(--sk-line); }

html[data-font="mono"] body, html[data-font="mono"] input, html[data-font="mono"] select,
html[data-font="mono"] textarea, html[data-font="mono"] button { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
html[data-font="classic"] body, html[data-font="classic"] input, html[data-font="classic"] select,
html[data-font="classic"] textarea, html[data-font="classic"] button { font-family: "Courier New", Courier, "Liberation Mono", monospace; }

/* Settings page: theme picker */
.skin-options { list-style: none; margin: 0 0 12px; padding: 0; }
.skin-option { display: flex; align-items: center; gap: 8px; margin: 4px 0; padding: 6px 8px; border: 1px solid #ccc; border-radius: 3px; flex-wrap: wrap; }
.skin-option label { margin: 0; flex: 1 1 10rem; }
.skin-lock { margin-left: 8px; }

/* Premium notebook: server tags and extended log (Root Access, comfort only) */
.server-tag { display: inline-block; padding: 1px 7px; border-radius: 9px; font-size: 11px; line-height: 16px; color: #fff; background: #6c757d; text-decoration: none; margin: 0 2px; }
.server-tag-farm { background: #2e8b57; }
.server-tag-bank { background: #2a7f99; }
.server-tag-clan { background: #6f42c1; }
.server-tag-target { background: #c2570c; }
.server-tag-danger { background: #c0392b; }
.server-tag-custom { background: #5a6268; }
a.server-tag:hover { color: #fff; text-decoration: none; opacity: .85; }
.server-tag.is-active { outline: 2px solid #222; }
.server-tag-filter, .log-type-filter { margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.server-tag-lock, .log-extras-lock a { color: #777; text-decoration: none; }
.server-tag-edit form { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.server-tag-edit input[type="text"] { width: 130px; }
.log-type-results { list-style: none; margin: 8px 0; padding: 0; max-height: 260px; overflow: auto; font-family: monospace; font-size: 12px; }
.log-type-results li { padding: 2px 4px; border-bottom: 1px solid #eee; }
.log-type-locked .btn.disabled { opacity: .5; pointer-events: none; }
html[data-theme="dark"] .server-tag.is-active { outline-color: #e6e6e6; }
html[data-theme="dark"] .server-tag-lock, html[data-theme="dark"] .log-extras-lock a { color: #a0a0a0; }
html[data-theme="dark"] .server-tag-custom { background: #7a838b; }
html[data-theme="dark"] .log-type-results li { border-bottom-color: #333; }

/* --- Launch ARG terminal --- */
.arg-terminal .widget-content { background: #0b0f0b; color: #6fdc6f; font-family: monospace; }
.arg-terminal .arg-line { margin: 0 0 10px; }
.arg-terminal .arg-form input[type="text"] { background: #000; color: #6fdc6f; border: 1px solid #2f6b2f; font-family: monospace; }
html[data-theme="dark"] .arg-terminal .widget-content { background: #000; color: #8cf08c; }
html[data-theme="dark"] .arg-terminal .arg-form input[type="text"] { background: #0b0b0b; border-color: #3d7d3d; color: #8cf08c; }

/* Web Server reports: visitor report form and admin queue */
.webpage-report-form { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.webpage-report-form input[type="text"] { flex: 1 1 220px; margin: 0; }
.wsreport-item { padding: 10px 12px; border-bottom: 1px solid #ddd; }
.wsreport-snapshot { max-height: 220px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.wsreport-actions { margin: 6px 0 0; }
html[data-theme="dark"] .wsreport-item { border-bottom-color: #333; }
html[data-theme="dark"] .wsreport-snapshot { background: #1b1b1b; color: #e6e6e6; border-color: #333; }
.webserver-images { margin-top: 16px; border-top: 1px solid #ddd; padding-top: 10px; }
.webserver-image-list { list-style: none; margin: 8px 0 0; padding: 0; }
.webserver-image-list li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid #eee; }
.webserver-image-list img { max-width: 96px; height: auto; flex: 0 0 auto; border: 1px solid #ccc; }
.webserver-image-meta { flex: 1 1 auto; min-width: 0; }
.webserver-image-meta input[type="text"] { width: 100%; box-sizing: border-box; margin: 2px 0 6px; }
html[data-theme="dark"] .webserver-images, html[data-theme="dark"] .webserver-image-list li { border-color: #3a3f45; }

/* --------------------------------------------------------------------------
   Portal: landing page (body.lp). Terminal green on near-black, one amber accent.
   Type: system sans for reading, system mono for terminal and labels. No webfonts.
   -------------------------------------------------------------------------- */
body.lp {
    --lp-bg: #050a09; --lp-surface: #0a1311; --lp-surface-2: #0e1b17; --lp-line: #1d3329;
    --lp-text: #d9e6df; --lp-muted: #9db3a7; --lp-green: #7ee787; --lp-green-dim: #3fae5a; --lp-accent: #ffb454;
    --lp-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --lp-mono: ui-monospace, "SF Mono", SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    position: relative; overflow-x: hidden; min-height: 100vh;
    background: var(--lp-bg); color: var(--lp-text);
    font: 400 17px/1.6 var(--lp-sans); color-scheme: dark;
    -webkit-text-size-adjust: 100%;
}
body.lp *, body.lp *::before, body.lp *::after { box-sizing: border-box; }
body.lp a { color: var(--lp-green); text-decoration: none; }
body.lp a:hover { color: #b6f5bd; text-decoration: underline; }
body.lp h1, body.lp h2, body.lp h3 { margin: 0; color: #f2fbf5; font-family: var(--lp-sans); line-height: 1.15; }
body.lp p { margin-top: 0; margin-bottom: 0; }
body.lp :focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }
body.lp::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 760px; pointer-events: none; z-index: 0;
    background: radial-gradient(ellipse 70% 60% at 25% 0%, rgba(126, 231, 135, .13), transparent 70%),
                radial-gradient(ellipse 50% 50% at 90% 10%, rgba(255, 180, 84, .06), transparent 70%);
}
.lp-grid {
    position: absolute; inset: 0 0 auto 0; height: 820px; z-index: 0; pointer-events: none;
    background-image: linear-gradient(rgba(126, 231, 135, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(126, 231, 135, .05) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: linear-gradient(#000 0%, transparent 85%); mask-image: linear-gradient(#000 0%, transparent 85%);
    animation: lp-drift 22s linear infinite;
}
@keyframes lp-drift { to { background-position: 0 56px, 56px 0; } }
.lp-wrap { position: relative; z-index: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px 28px; }

/* Nav */
.lp-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; }
.lp-brand { font: 700 16px var(--lp-mono); letter-spacing: .12em; color: #eafff0 !important; white-space: nowrap; }
.lp-brand:hover { text-decoration: none !important; }
.lp-prompt { color: var(--lp-green); }
.lp-nav-actions { display: flex; align-items: center; gap: 8px; }
.lp-nav-link, .lp-sfx { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 1px solid transparent; border-radius: 6px; color: #cfe6d6 !important; font: 600 13px var(--lp-mono); letter-spacing: .04em; background: none; cursor: pointer; }
.lp-nav-link:hover, .lp-sfx:hover { color: #fff !important; border-color: var(--lp-line); text-decoration: none; }
.lp-sfx { color: var(--lp-muted) !important; }
.lp-sfx .sfx-state { margin-left: 4px; color: var(--lp-green); }
.lp-sfx.is-muted .sfx-state { color: var(--lp-muted); }
.lp-nav-cta { white-space: nowrap; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 6px; background: var(--lp-green); color: #04120a !important; font: 700 13px var(--lp-mono); letter-spacing: .04em; }
.lp-nav-cta:hover { background: #a9f5b0; text-decoration: none !important; }

/* Hero */
.lp-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 44px; align-items: center; padding: 28px 0 34px; }
.lp-hero-copy { min-width: 0; }
.lp-pill { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 18px; padding: 6px 14px; border: 1px solid rgba(126, 231, 135, .35); border-radius: 999px; background: rgba(10, 24, 17, .8); color: #c3ecca; font: 700 12px/1.4 var(--lp-mono); letter-spacing: .06em; }
.lp-pill-hot { color: var(--lp-accent); }
.lp-sep { opacity: .5; }
.lp-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 10px #4ade80; animation: lp-pulse 1.9s ease-in-out infinite; }
@keyframes lp-pulse { 50% { transform: scale(1.4); opacity: .55; } }
body.lp .lp-title { font-size: clamp(34px, 4.7vw, 60px); font-weight: 800; letter-spacing: -.03em; line-height: 1.04; margin: 0 0 18px; text-wrap: balance; }
.lp-title-hot { display: block; color: var(--lp-green); text-shadow: 0 0 34px rgba(126, 231, 135, .38); }
.lp-sub { max-width: 34em; margin: 0 0 26px !important; color: #c3d4ca; font-size: clamp(17px, 1.7vw, 20px); line-height: 1.55; }
.lp-cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-cta-center { justify-content: center; }
.lp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 26px; border-radius: 8px; border: 1px solid var(--lp-line); font: 700 17px var(--lp-sans); letter-spacing: .01em; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.lp-btn:hover { text-decoration: none !important; transform: translateY(-1px); }
body.lp .lp-btn-primary { background: var(--lp-green); border-color: var(--lp-green); color: #04120a; box-shadow: 0 0 0 0 rgba(126, 231, 135, .5), 0 8px 30px rgba(126, 231, 135, .22); }
body.lp .lp-btn-primary:hover { background: #a9f5b0; color: #000; box-shadow: 0 10px 38px rgba(126, 231, 135, .38); }
body.lp .lp-btn-ghost { background: rgba(255, 255, 255, .03); color: #e4f3ea; }
body.lp .lp-btn-ghost:hover { border-color: var(--lp-green); color: #fff; }
.lp-micro { margin-top: 14px !important; color: var(--lp-muted); font: 13px/1.5 var(--lp-mono); }

/* Terminal */
.lp-hero-visual { min-width: 0; }
.lp-term { background: #070d0b; border: 1px solid #25402f; border-radius: 12px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 60px rgba(126, 231, 135, .1); }
.lp-term-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #0c1612; border-bottom: 1px solid #1d3329; font: 12px var(--lp-mono); color: var(--lp-muted); }
.lp-dots { display: inline-flex; gap: 6px; }
.lp-dots span { width: 10px; height: 10px; border-radius: 50%; background: #2a3a33; }
.lp-dots span:first-child { background: #ff5f57; } .lp-dots span:nth-child(2) { background: #febc2e; } .lp-dots span:nth-child(3) { background: #28c840; }
.lp-term-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-term-live { color: #ff8a96; font-weight: 700; letter-spacing: .06em; }
.lp-term-live i { font-size: 8px; margin-right: 4px; animation: lp-pulse 1.4s ease-in-out infinite; }
.lp-term-tabs { display: flex; gap: 6px; padding: 10px 12px 0; flex-wrap: wrap; }
.lp-term-tab { min-height: 36px; padding: 0 12px; border: 1px solid #25402f; border-radius: 6px; background: transparent; color: var(--lp-muted); font: 700 12px var(--lp-mono); letter-spacing: .05em; cursor: pointer; }
.lp-term-tab:hover { color: #fff; border-color: var(--lp-green); }
.lp-term-tab.is-active { background: rgba(126, 231, 135, .14); border-color: var(--lp-green); color: #eaffee; }
.lp-term-body { min-height: 218px; padding: 14px 16px 12px; font: 14px/1.7 var(--lp-mono); color: #cfe3d6; overflow-wrap: anywhere; }
.lp-term-body p[data-k="cmd"]::before { content: "operator@legacy:~$ "; color: var(--lp-green); }
.lp-term-body p[data-k="ok"] { color: #8fd69a; }
.lp-term-body p[data-k="info"] { color: #9cc8d1; }
.lp-term-body p[data-k="warn"] { color: #ff8a96; }
.lp-cur::after { content: "\2588"; margin-left: 2px; color: var(--lp-green); animation: lp-blink 1s steps(2) infinite; }
@keyframes lp-blink { 50% { opacity: 0; } }
.lp-term-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; padding: 11px 16px; border-top: 1px solid #1d3329; background: #0a1410; color: var(--lp-muted); font: 13px var(--lp-mono); }
.lp-term-foot a { font-weight: 700; white-space: nowrap; }

/* Social proof */
.lp-proof { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; padding: 16px 20px; border: 1px solid var(--lp-line); border-radius: 12px; background: linear-gradient(180deg, var(--lp-surface-2), var(--lp-surface)); }
.lp-proof-head { color: var(--lp-green); font: 700 12px var(--lp-mono); letter-spacing: .1em; white-space: nowrap; }
.lp-proof-list { display: flex; flex: 1 1 520px; flex-wrap: wrap; gap: 10px 30px; margin: 0; padding: 0; list-style: none; }
.lp-stat { display: flex; flex-direction: column; min-width: 0; }
.lp-stat b { color: #f2fbf5; font: 700 18px/1.3 var(--lp-mono); }
.lp-stat span { color: var(--lp-muted); font-size: 14px; line-height: 1.4; }
.lp-stat-wide { flex: 1 1 280px; }
.lp-stat-wide i { color: var(--lp-accent); }
.lp-rank { display: inline-block; min-width: 20px; padding: 0 5px; border-radius: 4px; background: rgba(255, 180, 84, .16); color: var(--lp-accent) !important; font: 700 12px var(--lp-mono) !important; text-align: center; }

/* Sections */
.lp-section { margin-top: 84px; }
.lp-kicker { margin: 0 0 10px !important; color: var(--lp-green); font: 700 13px var(--lp-mono); letter-spacing: .14em; }
body.lp .lp-h2 { margin-bottom: 30px; font-size: clamp(26px, 3.3vw, 38px); font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
.lp-steps, .lp-cards { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.lp-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: none; }
.lp-step { position: relative; padding: 26px 24px; border: 1px solid var(--lp-line); border-radius: 12px; background: var(--lp-surface); }
.lp-step:not(:last-child)::after { content: "\f105"; font: 22px/1 FontAwesome; position: absolute; right: -15px; top: 50%; margin-top: -11px; z-index: 2; color: var(--lp-green-dim); }
.lp-step-ico { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-bottom: 16px; border-radius: 12px; background: rgba(126, 231, 135, .1); border: 1px solid rgba(126, 231, 135, .3); color: var(--lp-green); font-size: 24px; }
.lp-step h3 { margin-bottom: 8px; font-size: 21px; }
.lp-step-n { margin-right: 6px; color: var(--lp-accent); font: 700 14px var(--lp-mono); vertical-align: 2px; }
.lp-step p, .lp-feature p { color: #b7c9be; font-size: 16px; }
.lp-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lp-feature { padding: 22px 22px 24px; border: 1px solid var(--lp-line); border-radius: 12px; background: var(--lp-surface); transition: border-color .2s ease, transform .2s ease; }
.lp-feature:hover { border-color: var(--lp-green-dim); transform: translateY(-2px); }
.lp-feature > i { display: block; margin-bottom: 14px; color: var(--lp-green); font-size: 26px; }
.lp-feature h3 { margin-bottom: 6px; font-size: 19px; }
.lp-feature-hot { border-color: rgba(255, 180, 84, .35); }
.lp-feature-hot > i { color: var(--lp-accent); }
.lp-feature-hot:hover { border-color: var(--lp-accent); }

/* Showcase */
.lp-showcase { display: grid; gap: 56px; }
.lp-show { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 40px; align-items: center; margin: 0; }
.lp-show-flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); }
.lp-show-flip .lp-frame { order: 2; }
.lp-frame { min-width: 0; border: 1px solid #284536; border-radius: 12px; overflow: hidden; background: #070d0b; box-shadow: 0 22px 54px rgba(0, 0, 0, .5), 0 0 50px rgba(126, 231, 135, .07); }
.lp-frame-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #0c1612; border-bottom: 1px solid #1d3329; }
.lp-frame-url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 3px 12px; border-radius: 999px; background: #060c0a; color: var(--lp-muted); font: 12px var(--lp-mono); }
.lp-frame-view { aspect-ratio: 16 / 10; overflow: hidden; background: #0b1511; }
.lp-frame-view img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(var(--zs, 1)); transform-origin: var(--zo, 50% 50%); }
.lp-show figcaption { min-width: 0; }
.lp-show-n { display: block; margin-bottom: 8px; color: var(--lp-accent); font: 700 13px var(--lp-mono); letter-spacing: .12em; }
.lp-show h3 { margin-bottom: 10px; font-size: clamp(22px, 2.4vw, 28px); }
.lp-show p { color: #b7c9be; font-size: 17px; }
.lp-more-title { margin: 56px 0 14px !important; color: var(--lp-muted); font: 700 13px var(--lp-mono); letter-spacing: .12em; text-transform: uppercase; }
.lp-more { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.lp-thumb { display: block; min-width: 0; border: 1px solid var(--lp-line); border-radius: 10px; overflow: hidden; background: var(--lp-surface); color: #d4e6db !important; font: 600 13px var(--lp-mono); }
.lp-thumb:hover { border-color: var(--lp-green); text-decoration: none !important; }
.lp-thumb img { display: block; width: 100%; aspect-ratio: 16 / 10; height: auto; object-fit: cover; object-position: top left; background: #0b1511; }
.lp-thumb span { display: block; padding: 8px 10px; }
.lp-lightbox { display: none; }
.lp-lightbox:target { display: flex; position: fixed; inset: 0; z-index: 60; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .94); }
.lp-lightbox:target img { width: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.lp-lightbox-close { position: absolute; top: 12px; right: 14px; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1px solid #355d44; border-radius: 8px; background: rgba(0, 0, 0, .7); color: #fff !important; font-size: 22px; }

/* Lore */
.lp-lore-card { position: relative; padding: clamp(26px, 5vw, 52px); border: 1px solid rgba(255, 180, 84, .32); border-radius: 14px; background: linear-gradient(135deg, #0e1410 0%, #0a0f0d 60%, #14100a 100%); overflow: hidden; }
.lp-lore-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 4px); }
.lp-lore-card > * { position: relative; }
.lp-lore-log { margin-bottom: 16px !important; color: var(--lp-accent); font: 13px var(--lp-mono); letter-spacing: .04em; overflow-wrap: anywhere; }
body.lp .lp-lore-h { margin-bottom: 18px; font-size: clamp(26px, 4vw, 44px); font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
.lp-lore-time { color: var(--lp-accent); font-family: var(--lp-mono); }
.lp-lore-card p:not(.lp-lore-log):not(.lp-lore-sig) { max-width: 40em; margin-bottom: 12px; color: #c9d7cf; font-size: 18px; }
.lp-lore-sig { margin: 14px 0 18px !important; color: var(--lp-muted); font: italic 16px var(--lp-mono); }
.lp-lore-link { font: 700 15px var(--lp-mono); color: var(--lp-accent) !important; }

/* FAQ */
.lp-faq-list { display: grid; gap: 10px; max-width: 860px; }
.lp-q { border: 1px solid var(--lp-line); border-radius: 10px; background: var(--lp-surface); }
.lp-q[open] { border-color: #2c5a41; }
.lp-q summary { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 18px; list-style: none; cursor: pointer; color: #f0faf3; font-size: 17px; font-weight: 700; }
.lp-q summary::-webkit-details-marker { display: none; }
.lp-q summary::after { content: "+"; margin-left: auto; color: var(--lp-green); font: 400 24px/1 var(--lp-mono); }
.lp-q[open] summary::after { content: "\2212"; }
.lp-q summary > i { width: 20px; text-align: center; color: var(--lp-green); }
.lp-a { padding: 0 18px 18px 50px; color: #bdd0c4; font-size: 16px; }
.lp-a p + p, .lp-a p + ul { margin-top: 10px; }
.lp-checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.lp-checks li { position: relative; padding-left: 26px; }
.lp-checks i { position: absolute; left: 0; top: 5px; color: var(--lp-green); }
.lp-a-links { margin-top: 12px !important; font-size: 15px; }
.lp-a a { text-decoration: underline; }

/* Final CTA + footer */
.lp-final { margin-top: 84px; padding: clamp(34px, 6vw, 64px) 20px; border: 1px solid #2c5a41; border-radius: 16px; text-align: center; background: radial-gradient(ellipse 80% 120% at 50% 0%, rgba(126, 231, 135, .16), transparent 70%), var(--lp-surface); }
body.lp .lp-final h2 { margin-bottom: 8px; font-size: clamp(28px, 4.4vw, 46px); font-weight: 800; letter-spacing: -.02em; }
.lp-final > p:not(.lp-micro) { margin-bottom: 24px; color: #c3d4ca; font-size: 18px; }
.lp-footer { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--lp-line); text-align: center; color: var(--lp-muted); font-size: 14px; }
.lp-footer p { margin-bottom: 8px; }
.lp-footer a { color: #b6dfc0; text-decoration: underline; }
body.lp .lp-footer form { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 0; }
body.lp .lp-footer label { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--lp-muted); font-size: 14px; }
body.lp .lp-footer select { width: auto; min-width: 150px; min-height: 40px; padding: 0 10px; border: 1px solid var(--lp-line); border-radius: 6px; background: var(--lp-surface); color: var(--lp-text); font: 14px var(--lp-sans); }
body.lp .lp-footer .btn { min-height: 40px; padding: 0 14px; border: 1px solid var(--lp-line); border-radius: 6px; background: var(--lp-surface-2); color: var(--lp-text); font: 600 14px var(--lp-sans); cursor: pointer; }
body.lp .lp-footer .btn:hover { border-color: var(--lp-green); color: #fff; }

/* Ads / notices on the landing: dark, quiet, and never over the hero */
body.lp .site-ad, body.lp .house-ad { margin: 36px auto 0; background: var(--lp-surface); border-color: var(--lp-line); color: var(--lp-muted); }
body.lp .site-ad small, body.lp .ad-premium-hint a { color: var(--lp-muted); }
body.lp .house-ad a { color: var(--lp-green); }
body.lp .support-notice { display: none !important; }
body.lp.lp-past-hero .support-notice:not([hidden]) { display: flex !important; }

/* Responsive */
@media (max-width: 980px) {
    .lp-hero { grid-template-columns: minmax(0, 1fr); gap: 30px; padding-top: 12px; }
    .lp-steps, .lp-cards { grid-template-columns: minmax(0, 1fr); }
    .lp-step:not(:last-child)::after { display: none; }
    .lp-show, .lp-show-flip { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .lp-show-flip .lp-frame { order: 0; }
    .lp-more { display: flex; overflow-x: auto; gap: 12px; padding-bottom: 8px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
    .lp-thumb { flex: 0 0 62vw; max-width: 280px; scroll-snap-align: start; }
}
@media (min-width: 640px) and (max-width: 980px) { .lp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .lp-nav-link { display: none; } }
@media (max-width: 640px) {
    body.lp { font-size: 16px; }
    .lp-term-tab { padding: 0 9px; font-size: 11px; letter-spacing: 0; }
    .lp-wrap { padding: 0 16px 24px; }
    .lp-hide-s, .lp-sfx-text, .lp-sfx .sfx-state { display: none; }
    .lp-nav { padding: 10px 0; }
    .lp-nav-link, .lp-sfx { padding: 0 9px; }
    .lp-brand { font-size: 14px; letter-spacing: .08em; }
    .lp-pill { font-size: 11px; padding: 5px 11px; margin-bottom: 14px; }
    body.lp .lp-title { font-size: clamp(32px, 9.4vw, 40px); }
    .lp-sub { margin-bottom: 20px !important; }
    .lp-cta-row { flex-direction: column; }
    .lp-btn { width: 100%; }
    .lp-term-body { font-size: 13px; min-height: 244px; }
    .lp-term-title { display: none; }
    .lp-term-live { margin-left: auto; }
    .lp-proof { padding: 14px 16px; }
    .lp-proof-list { gap: 12px 24px; }
    .lp-section, .lp-final { margin-top: 60px; }
    .lp-a { padding-left: 18px; }
    .lp-q summary { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .lp-grid, .lp-dot, .lp-term-live i, .lp-cur::after { animation: none !important; }
    .lp-btn, .lp-feature { transition: none; }
    .lp-btn:hover, .lp-feature:hover { transform: none; }
    html:focus-within { scroll-behavior: auto; }
    .login-panel .blink { animation: none; }
}
@media (prefers-reduced-motion: no-preference) { html:has(body.lp) { scroll-behavior: smooth; } }
/* Login: terminal prompt, register CTA and simulation notice */
.login-prompt { margin: 0 0 6px; color: #5f8a5f; font: 12px Consolas, "Courier New", monospace; text-align: left; }
.login-cta { margin-top: 18px; padding: 14px; border: 1px dashed #355035; border-radius: 6px; text-align: center; }
.login-cta p { margin: 0 0 10px; color: #9ab59a; font-size: 13px; }
.login-cta-button { display: block; padding: 10px 12px; background: #7ee787; border: 1px solid #7ee787; color: #06130a; font-weight: 700; text-align: center; text-decoration: none; }
.login-cta-button:hover { background: #a3f5ab; color: #000; text-decoration: none; }
.login-sim { margin: 14px 0 0; text-align: center; color: #7e9a7e; }
.login-sim a { color: #7ee787; text-decoration: underline; }
/* Wiki: category groups and badges */
.wiki-group-title { margin: 14px 0 0; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #6b7a86; }
.wiki-badge { display: inline-block; padding: 2px 9px; border: 1px solid currentColor; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.wiki-badge-basics { color: #1d7a3a; }
.wiki-badge-advanced { color: #a45a00; }
.wiki-credit { margin-top: 18px; padding-top: 10px; border-top: 1px solid rgba(128, 128, 128, .3); }
.auth-box .wiki-badge-basics, html[data-theme="dark"] .wiki-badge-basics { color: #7ee787; }
.auth-box .wiki-badge-advanced, html[data-theme="dark"] .wiki-badge-advanced { color: #ffb454; }
.auth-box .wiki-group-title, html[data-theme="dark"] .wiki-group-title { color: #8fa58f; }
/* Tutorial: step indicator, hints and reference screenshots */
.tutorial-steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 8px 0 12px; padding: 0; counter-reset: tstep; }
.tutorial-steps li { counter-increment: tstep; position: relative; padding: 6px 6px 6px 26px; border: 1px solid rgba(128, 128, 128, .4); border-radius: 4px; font-size: 12px; line-height: 1.3; opacity: .65; }
.tutorial-steps li::before { content: counter(tstep); position: absolute; left: 6px; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: rgba(128, 128, 128, .35); font-size: 10px; line-height: 15px; text-align: center; font-weight: 700; }
.tutorial-steps li.is-current { opacity: 1; border-color: #2f8f4a; font-weight: 700; }
.tutorial-steps li.is-current::before { background: #2f8f4a; color: #fff; }
.tutorial-steps li.is-done { opacity: .9; }
.tutorial-steps li.is-done::before { content: "\2713"; background: #2f8f4a; color: #fff; }
.tutorial-hints { margin: 6px 0 10px 18px; padding: 0; font-size: 13px; line-height: 1.5; }
.tutorial-shot { margin: 8px 0 12px; }
.tutorial-shot summary { cursor: pointer; font-size: 13px; }
.tutorial-shot img { display: block; width: 100%; max-width: 560px; height: auto; margin-top: 8px; border: 1px solid rgba(128, 128, 128, .4); border-radius: 4px; }
@media (max-width: 520px) { .tutorial-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
html[data-theme="dark"] .tutorial-steps li.is-current { border-color: #7ee787; }
html[data-theme="dark"] .tutorial-steps li.is-current::before, html[data-theme="dark"] .tutorial-steps li.is-done::before { background: #3fae5a; }

/* First steps checklist (dashboard). Uses alpha colours so light, dark and skins all work. */
.first-steps-meter { height: 6px; margin: 0 0 10px; border-radius: 999px; background: rgba(128, 128, 128, .22); overflow: hidden; }
.first-steps-meter > span { display: block; height: 100%; background: linear-gradient(90deg, #2f8f4a, #63d471); transition: width .35s ease; }
.first-steps-list { list-style: none; margin: 0; padding: 0; counter-reset: fstep; }
.first-steps-list li { counter-increment: fstep; position: relative; margin: 0 0 6px; padding: 6px 8px 6px 34px; border: 1px solid rgba(128, 128, 128, .35); border-radius: 4px; overflow-wrap: anywhere; line-height: 1.35; }
.first-steps-list li::before { content: counter(fstep); position: absolute; left: 8px; top: 7px; width: 18px; height: 18px; border-radius: 50%; background: rgba(128, 128, 128, .35); font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; }
.first-steps-list li.is-done { opacity: .7; }
.first-steps-list li.is-done::before { content: "\2713"; background: #2f8f4a; color: #fff; }
.first-steps-list li.is-locked { opacity: .6; }
.first-steps-list li.is-next { border: 2px solid #2f8f4a; background: rgba(47, 143, 74, .12); box-shadow: 0 0 0 1px rgba(47, 143, 74, .15); }
.first-steps-list li.is-next::before { background: #2f8f4a; color: #fff; animation: first-step-pulse 2.2s ease-in-out infinite; }
@keyframes first-step-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(47, 143, 74, .45); } 50% { box-shadow: 0 0 0 5px rgba(47, 143, 74, 0); } }
.first-steps-state { display: inline-block; margin-right: 6px; padding: 0 5px; border: 1px solid rgba(128, 128, 128, .5); border-radius: 3px; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.first-steps-hint { display: block; margin-top: 2px; font-size: 12px; opacity: .85; }
.first-steps-link { margin-top: 4px; }
.first-steps-done { margin: 0 0 10px; padding: 4px 8px; font-size: 12px; opacity: .8; }
@media (max-width: 480px) { .first-steps-list li { padding-right: 6px; } }
@media (prefers-reduced-motion: reduce) { .first-steps-list li.is-next::before { animation: none; } .first-steps-meter > span { transition: none; } }

/* Intro v2/v4: 4-act directed Canvas 2D cutscene, translucent HUD, clock, C. anomaly (lore). */
.intro-beam { position: fixed; inset: 0; pointer-events: none; z-index: 3; opacity: 0; background: linear-gradient(to bottom, transparent 44%, rgba(124, 252, 154, .85) 50%, transparent 56%); }
.intro-poweron:not(.intro-calm):not(.intro-static) .intro-beam { animation: intro-powerbeam .75s ease-out forwards; }
@keyframes intro-powerbeam { 0% { opacity: 1; transform: scaleY(.04) scaleX(1.05); } 45% { opacity: .75; transform: scaleY(1) scaleX(1); } 100% { opacity: 0; transform: scaleY(1.2); } }
.intro-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid rgba(95, 191, 122, .25); }
.intro-head-left { display: flex; align-items: center; gap: 8px; }
.intro-led { width: 9px; height: 9px; border-radius: 50%; background: #7CFC9A; box-shadow: 0 0 8px #7CFC9A; animation: intro-led 1.4s ease-in-out infinite; }
@keyframes intro-led { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.intro-head-meta { display: flex; align-items: center; gap: 10px; }
.intro-stage-badge { padding: 2px 7px; border: 1px solid rgba(124, 252, 154, .45); border-radius: 3px; font-size: 11px; letter-spacing: .08em; color: #b9ffca; background: rgba(124, 252, 154, .08); }
.intro-clock { font-size: 13px; color: #5fbf7a; font-variant-numeric: tabular-nums; }
.intro-banner { margin: 0 0 10px; padding: 5px 10px; border: 1px solid rgba(124, 252, 154, .32); border-radius: 3px; background: rgba(124, 252, 154, .06); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; text-align: center; color: #c7ffd4; transition: border-color .25s ease, color .25s ease, background-color .25s ease; }
.intro-banner.is-anomaly { border-color: rgba(255, 51, 85, .65); background: rgba(255, 51, 85, .14); color: #ffb3bf; text-shadow: 0 0 8px rgba(255, 51, 85, .5); }
.intro-progress-wrap { margin: 0 0 12px; }
.intro-progress-top { display: flex; justify-content: space-between; font-size: 11px; color: #75c98e; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .06em; }
.intro-progress-meta { display: inline-flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.intro-timer { color: #5fbf7a; }
.intro-progress { height: 6px; background: rgba(124, 252, 154, .12); border: 1px solid rgba(95, 191, 122, .3); border-radius: 3px; overflow: hidden; }
.intro-bar-fill { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, #32a852, #7CFC9A); transition: width .22s ease; }
.intro-phases { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.intro-phase { font-size: 10px; padding: 1px 6px; border: 1px solid rgba(95, 191, 122, .22); border-radius: 2px; color: #477a57; letter-spacing: .06em; }
.intro-phase.is-active { color: #d8ffe3; border-color: rgba(124, 252, 154, .6); background: rgba(124, 252, 154, .12); }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(220px, .85fr); gap: 16px; align-items: start; margin-bottom: 14px; }
.intro-console { padding: 10px 12px; background: rgba(2, 6, 7, .58); border: 1px solid rgba(95, 191, 122, .22); border-radius: 4px; }
.intro-telemetry { padding: 10px 12px; background: rgba(6, 13, 14, .62); border: 1px solid rgba(95, 191, 122, .24); border-radius: 4px; font-size: 12px; }
.intro-tel-head { display: flex; justify-content: space-between; gap: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #75c98e; margin-bottom: 8px; padding-bottom: 5px; border-bottom: 1px solid rgba(95, 191, 122, .18); }
.intro-tel-ip { color: #d8ffe3; }
.intro-counters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.intro-counter { padding: 5px 7px; background: rgba(124, 252, 154, .05); border: 1px solid rgba(95, 191, 122, .18); border-radius: 3px; }
.intro-tel-k { display: block; font-size: 10px; text-transform: uppercase; color: #5fbf7a; }
.intro-counter strong { font-size: 12px; color: #d8ffe3; font-variant-numeric: tabular-nums; }
.intro-hw { display: grid; gap: 6px; margin-bottom: 10px; }
.intro-meter-row { display: flex; justify-content: space-between; font-size: 11px; color: #a9ebc0; margin-bottom: 2px; }
.intro-meter-bar { height: 4px; background: rgba(124, 252, 154, .12); border-radius: 2px; overflow: hidden; }
.intro-meter-bar > span { display: block; height: 100%; width: 0%; background: #5fbf7a; transition: width .25s ease; }
.intro-feed-box { border-top: 1px solid rgba(95, 191, 122, .18); padding-top: 7px; }
.intro-feed-title { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: #5fbf7a; margin-bottom: 4px; }
.intro-feed { list-style: none; margin: 0; padding: 0; font-size: 11px; line-height: 1.45; min-height: 4.5em; color: #8ad6a2; overflow-wrap: anywhere; }
.intro-feed li.intro-feed-alert { color: #ff9aa8; }
.intro-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.intro-foot-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.intro-btn-ghost { min-height: 40px; padding: 0 12px; background: rgba(124, 252, 154, .08); border: 1px solid rgba(95, 191, 122, .35); color: #b9ffca; font-family: Consolas, "Courier New", monospace; font-size: 12px; }
.intro-btn-ghost[hidden] { display: none; }
.intro-btn-ghost:hover { background: rgba(124, 252, 154, .16); color: #fff; }
.intro-key-hint { font-size: 11px; color: #5fbf7a; }
.intro-line:last-child { color: #7CFC9A; font-weight: normal; }
.intro-line.intro-c { color: #ff9aa8; letter-spacing: .02em; }
.intro-line.intro-order { color: #d8ffe3; font-weight: bold; }
.intro-done .intro-skip { box-shadow: 0 0 18px rgba(124, 252, 154, .45); animation: intro-ready-pulse 1.8s ease-in-out infinite; }
@keyframes intro-ready-pulse { 0%, 100% { box-shadow: 0 0 14px rgba(124, 252, 154, .35); } 50% { box-shadow: 0 0 24px rgba(124, 252, 154, .75); } }
.intro-glitch .intro-screen { animation: intro-glitch .13s steps(2) infinite; text-shadow: 2px 0 #ff3355, -2px 0 #33e1ff; border-color: rgba(255, 51, 85, .65); }
.intro-calm.intro-glitch .intro-screen { animation: none; text-shadow: none; }
.intro-glitch .intro-clock, .intro-glitch .intro-stage-badge { color: #ff9aa8; border-color: rgba(255, 51, 85, .6); }
.intro-glitch .intro-led { background: #ff3355; box-shadow: 0 0 10px #ff3355; }
.intro-glitch .intro-bar-fill { background: linear-gradient(90deg, #ff3355, #33e1ff); }
@keyframes intro-glitch { 0% { transform: translate(0, 0); filter: contrast(1.3); } 50% { transform: translate(-3px, 1px); } 100% { transform: translate(3px, -1px); clip-path: inset(0 0 8% 0); } }
@media (prefers-reduced-motion: reduce) { .intro-glitch .intro-screen, .intro-led, .intro-done .intro-skip, .intro-poweron .intro-beam { animation: none; text-shadow: none; } }
@media (max-width: 760px) { .intro-overlay { align-items: flex-start; padding: 10px; } .intro-screen { margin: 0 auto; } .intro-grid { grid-template-columns: 1fr; gap: 10px; } .intro-log { min-height: 8.5em; } }
@media (max-width: 360px) { .intro-head { flex-direction: column; align-items: flex-start; } .intro-clock { font-size: 12px; } .intro-counters { grid-template-columns: 1fr; } }

/* Live landing terminal bar and subtle hero pulse */
.landing-term { padding: 0; overflow: hidden; }
@media (max-width: 700px) { .landing-term { padding: 0; } .landing-term-body { padding: 10px 12px; } }
.landing-term-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 12px; background: #0f1910; border-bottom: 1px solid #223622; font-size: 11px; color: #7e9a7e; }
.landing-term-dots { display: inline-flex; gap: 5px; }
.landing-term-dots span { width: 8px; height: 8px; border-radius: 50%; background: #2c4a2c; }
.landing-term-dots span:last-child { background: #7ee787; }
.landing-term-live { padding: 1px 6px; border: 1px solid rgba(126, 231, 135, .45); border-radius: 3px; color: #7ee787; font-size: 10px; letter-spacing: .06em; animation: intro-led 2s ease-in-out infinite; }
.landing-term-body { padding: 12px 16px; min-height: 6.8em; }
.landing-term-info { color: #a9d5ff; }
.landing-term-warn { color: #ff9aa8; }
@media (prefers-reduced-motion: reduce) { .landing-term-live { animation: none; } }

/* Guest pages (Terms, Privacy, Credits/Licenses) render inside the auth shell: keep them dark and readable. */
.auth-page .widget-box { background: #0b110c; border: 1px solid #1f3a24; }
.auth-page .widget-title { background: #0f1a11; border-bottom: 1px solid #1f3a24; color: #7dff9a; }
.auth-page .widget-title h5 { color: #7dff9a; }
.auth-page .widget-content { background: #0b110c; color: #d6e8da; }
.auth-page .widget-content h4 { color: #7dff9a; margin-top: 1.2em; }
.auth-page .widget-content a { color: #8cf5a8; }
.auth-page .widget-content .muted { color: #9fb5a5; }
.auth-page .widget-content .table { background: #070c08; border-color: #1f3a24; color: #d6e8da; }
.auth-page .widget-content .table th { background: #0f1a11; color: #7dff9a; border-color: #1f3a24; }
.auth-page .widget-content .table td { background: #0b110c; color: #d6e8da; border-color: #1f3a24; }
.legal-text, .license-text { line-height: 1.6; max-width: 72ch; }
.license-text { white-space: pre-wrap; font-size: 12px; background: #050805; border: 1px solid #1f3a24; padding: 10px; overflow-x: auto; color: #cfe3d3; }
.consent-line { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; }
.consent-line input { margin-top: 3px; }
.next-level-list { list-style: none; margin: 0; padding: 0; }
.next-level-list li { margin: 0 0 6px; padding: 6px 8px; border: 1px solid rgba(128, 128, 128, .5); border-radius: 4px; overflow-wrap: anywhere; line-height: 1.35; }
.next-level-list li.is-done { opacity: .7; }
.next-level-list li.is-done .first-steps-title::before { content: "\2713 "; color: #2f8f4a; }
html[data-theme="dark"] .next-level .widget-content { background: #1f2a35; color: #dbe6f0; }
html[data-skin] .next-level, html[data-skin] .next-level .widget-content { background: var(--sk-s1); color: var(--sk-fg); border-color: var(--sk-line); }

/* Global server-wide Doom countdown alert banner */
.doom-global-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 0 0 12px;
    padding: 10px 14px;
    border-radius: 5px;
    border: 1px solid #b91c1c;
    border-left: 4px solid #dc2626;
    background: linear-gradient(90deg, #450a0a 0%, #2a0a0f 100%);
    color: #fee2e2;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 4px 14px rgba(185, 28, 28, .25);
}
.doom-global-banner.is-forced {
    border-color: #ea580c;
    border-left-color: #f97316;
    background: linear-gradient(90deg, #431407 0%, #2a0a0f 100%);
}
.doom-banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 3px;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    white-space: nowrap;
}
.doom-global-banner.is-forced .doom-banner-badge {
    background: #ea580c;
}
.doom-banner-body {
    flex: 1 1 240px;
    min-width: 0;
    overflow-wrap: anywhere;
}
.doom-banner-body a {
    color: #fca5a5;
    text-decoration: underline;
    font-weight: 700;
}
.doom-banner-timer {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(0, 0, 0, .45);
    border: 1px solid rgba(252, 165, 165, .45);
    color: #fef08a;
    font-size: 13px;
    letter-spacing: .04em;
}
.doom-banner-more {
    color: #fed7aa;
    font-weight: 600;
    margin-left: 4px;
}
.doom-banner-cta {
    margin-left: auto;
    white-space: nowrap;
}
@media (max-width: 600px) {
    .doom-global-banner { padding: 9px 10px; font-size: 12px; }
    .doom-banner-cta { margin-left: 0; }
}

/* Light-mode v2 visual hierarchy: preserves original #header/#user-nav/#sidebar dark neutral colors,
   replaces harsh #fff with soft stone/paper tones, and gives dark-slate widget headers & rich contrast.
   Strictly scoped away from dark mode and Root Access skins. */
html:not([data-theme="dark"]):not([data-skin]) body.app-page #content {
    background: #cfd6df;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page .muted {
    color: #475569;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page #content a {
    color: #1d4ed8;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page #content a:hover {
    color: #1e3a8a;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page #content-header {
    background: linear-gradient(180deg, #e8edf4 0%, #d8e0eb 100%);
    border-bottom: 2px solid #8b9bb0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page #content-header h1 {
    color: #0f172a;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page .header-ip-value {
    color: #0f4c81;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page #breadcrumb {
    background: #bfc9d7;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #8a9aaf;
    color: #1e293b;
    font-size: 12px;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page #breadcrumb a {
    color: #1e293b;
    font-weight: 600;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page #breadcrumb a:last-child {
    color: #0f172a;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page #content #breadcrumb .breadcrumb-help {
    background: #334155;
    border: 1px solid #1e293b;
    border-radius: 3px;
    padding: 1px 9px;
    margin-right: 0;
    color: #f8fafc;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page #content #breadcrumb .breadcrumb-help:hover {
    background: #1e293b;
    color: #ffffff;
    text-decoration: none;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page .internet-context {
    background: #dce5f2;
    border: 1px solid #7f94b0;
    border-left: 5px solid #1d4ed8;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
    color: #0f172a;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page #content .internet-context-directory {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    border: 1px solid #1e3a8a;
    border-radius: 3px;
    color: #ffffff;
    font-weight: 600;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page #content .internet-context-directory:hover {
    background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%);
    color: #ffffff;
    text-decoration: none;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page .nav-tabs-custom {
    gap: 5px;
    border-bottom: 2px solid #475569;
    padding-left: 2px;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page #content .nav-tabs-custom a {
    background: linear-gradient(180deg, #dfe6f0 0%, #c6d1e0 100%);
    border: 1px solid #7d8fa6;
    border-bottom: 0;
    border-radius: 4px 4px 0 0;
    color: #1e293b;
    font-weight: 700;
    padding: 8px 14px 7px;
    margin-bottom: -1px;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page #content .nav-tabs-custom a:hover {
    background: linear-gradient(180deg, #edf2f8 0%, #d5e0ee 100%);
    border-color: #475569;
    color: #0f172a;
    text-decoration: none;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page #content .nav-tabs-custom li.active a {
    background: #f4f6f9;
    border: 1px solid #475569;
    border-top: 3px solid #1d4ed8;
    border-bottom: 2px solid #f4f6f9;
    margin-bottom: -2px;
    color: #0f172a;
    font-weight: 700;
    box-shadow: 0 -2px 4px rgba(15, 23, 42, .08);
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page .widget-box {
    background: #f4f6f9;
    border: 1px solid #8898ae;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .12);
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page .widget-title {
    background: linear-gradient(180deg, #334155 0%, #243041 100%);
    border-top: 0;
    border-bottom: 2px solid #1e293b;
    border-radius: 4px 4px 0 0;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page .widget-title h5 {
    color: #f8fafc;
    font-weight: 700;
    letter-spacing: .01em;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page .widget-title .icon {
    color: #7ee787;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page #content .widget-title .help a {
    color: #bfdbfe;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page .widget-content {
    background: #f4f6f9;
    color: #1e293b;
    border-radius: 0 0 4px 4px;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page .resource-summary {
    background: #dce6f2;
    border: 1px solid #7f94b0;
    border-left: 4px solid #0f766e;
    border-radius: 4px;
    color: #0f172a;
    font-weight: 700;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page .workspace-controls summary,
html:not([data-theme="dark"]):not([data-skin]) body.app-page .task-help summary,
html:not([data-theme="dark"]):not([data-skin]) body.app-page .task-history summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    margin: 2px 0 6px;
    background: linear-gradient(180deg, #e9eef5 0%, #cfd9e7 100%);
    border: 1px solid #788ba3;
    border-radius: 4px;
    color: #0f172a;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page .workspace-controls summary:hover,
html:not([data-theme="dark"]):not([data-skin]) body.app-page .task-help summary:hover,
html:not([data-theme="dark"]):not([data-skin]) body.app-page .task-history summary:hover {
    background: #f4f7fb;
    border-color: #475569;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page .table {
    background: #f8fafc;
    border-color: #8f9eb2;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page .table th {
    background: linear-gradient(180deg, #d7e0ec 0%, #c1cddf 100%);
    border-bottom: 2px solid #788ba3;
    color: #0f172a;
    font-weight: 700;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page .table th,
html:not([data-theme="dark"]):not([data-skin]) body.app-page .table td,
html:not([data-theme="dark"]):not([data-skin]) body.app-page .table-bordered,
html:not([data-theme="dark"]):not([data-skin]) body.app-page .table-bordered th,
html:not([data-theme="dark"]):not([data-skin]) body.app-page .table-bordered td {
    border-color: #a6b4c7;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page .table-striped tbody tr:nth-child(odd) td {
    background: #eaeff6;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page .table tbody tr:hover td {
    background: #dbe8f8;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page #content .btn {
    border: 1px solid #6b7d94;
    border-radius: 3px;
    background: linear-gradient(180deg, #f8fafc 0%, #d1dce9 100%);
    color: #0f172a;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 1px 2px rgba(15, 23, 42, .08);
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page #content .btn:hover {
    background: linear-gradient(180deg, #ffffff 0%, #c1d0e2 100%);
    border-color: #475569;
    color: #0f172a;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page #content .btn-primary {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    border-color: #1e3a8a;
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(29, 78, 216, .25);
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page #content .btn-primary:hover {
    background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%);
    color: #ffffff;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page #content .btn-danger {
    background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
    border-color: #991b1b;
    color: #ffffff;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page #content .btn-danger:hover {
    background: linear-gradient(180deg, #b91c1c 0%, #991b1b 100%);
    color: #ffffff;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page input[type="text"],
html:not([data-theme="dark"]):not([data-skin]) body.app-page input[type="password"],
html:not([data-theme="dark"]):not([data-skin]) body.app-page input[type="email"],
html:not([data-theme="dark"]):not([data-skin]) body.app-page input[type="number"],
html:not([data-theme="dark"]):not([data-skin]) body.app-page input[type="search"],
html:not([data-theme="dark"]):not([data-skin]) body.app-page select,
html:not([data-theme="dark"]):not([data-skin]) body.app-page textarea {
    border: 1px solid #788ba3;
    border-radius: 3px;
    background: #ffffff;
    color: #0f172a;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page .first-steps-list li:not(.is-next) {
    background: #e8eef6;
    border-color: #94a3b8;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page .house-ad a {
    background: linear-gradient(180deg, #eef2f8 0%, #d8e2ef 100%);
    border: 1px solid #7f94b0;
    color: #0f172a;
    font-weight: 700;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page #footer {
    background: #2b2b2b;
    border-top: 2px solid #1a1a1a;
    color: #cbd5e1;
}
html:not([data-theme="dark"]):not([data-skin]) body.app-page #footer a {
    color: #93c5fd;
    font-weight: 600;
}

/* 1-click Hide/Show own game IP toggle */
.header-ip-row {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.ip-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid #94a3b8;
    border-radius: 4px;
    background: #eef2f7;
    color: #1e293b;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ip-toggle:hover,
.ip-toggle:focus-visible {
    background: #dce5f2;
    border-color: #2563eb;
    color: #0f172a;
}

.ip-toggle.is-hidden {
    background: #334155;
    border-color: #1e293b;
    color: #f8fafc;
}

html[data-theme="dark"] .ip-toggle,
html[data-skin] .ip-toggle {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
    color: #e2e8f0;
}

html[data-theme="dark"] .ip-toggle:hover,
html[data-theme="dark"] .ip-toggle:focus-visible,
html[data-skin] .ip-toggle:hover,
html[data-skin] .ip-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

html[data-theme="dark"] .ip-toggle.is-hidden,
html[data-skin] .ip-toggle.is-hidden {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

@media (max-width: 760px) {
    .header-ip-row {
        justify-content: flex-start;
    }
}

/* Forum phase 3: toolbar, ranks, moderator badge, helpful button & member profiles */
.forum-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.forum-badge-mod {
    background-color: #2f6f9f;
}

.forum-rank {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    vertical-align: middle;
    margin-right: 4px;
    border: 1px solid rgba(15, 23, 42, 0.16);
}
.forum-rank-1 { background: #e2e8f0; color: #334155; }
.forum-rank-2 { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.forum-rank-3 { background: #dcfce7; color: #166534; border-color: #86efac; }
.forum-rank-4 { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.forum-rank-5 { background: #ede9fe; color: #5b21b6; border-color: #c4b5fd; }
.forum-rank-6 { background: #ffe4e6; color: #9f1239; border-color: #fda4af; }
.forum-rank-7 { background: #1e293b; color: #fbbf24; border-color: #f59e0b; }

html[data-theme="dark"] .forum-rank,
html[data-skin] .forum-rank { border-color: rgba(255, 255, 255, 0.2); }
html[data-theme="dark"] .forum-rank-1, html[data-skin] .forum-rank-1 { background: #334155; color: #e2e8f0; }
html[data-theme="dark"] .forum-rank-2, html[data-skin] .forum-rank-2 { background: #1e3a8a; color: #bfdbfe; }
html[data-theme="dark"] .forum-rank-3, html[data-skin] .forum-rank-3 { background: #14532d; color: #bbf7d0; }
html[data-theme="dark"] .forum-rank-4, html[data-skin] .forum-rank-4 { background: #78350f; color: #fde68a; }
html[data-theme="dark"] .forum-rank-5, html[data-skin] .forum-rank-5 { background: #4c1d95; color: #ddd6fe; }
html[data-theme="dark"] .forum-rank-6, html[data-skin] .forum-rank-6 { background: #881337; color: #fecdd3; }
html[data-theme="dark"] .forum-rank-7, html[data-skin] .forum-rank-7 { background: #0f172a; color: #fcd34d; border-color: #f59e0b; }

.forum-author-stats {
    font-size: 11px;
    opacity: 0.82;
}

.forum-helpful-btn.is-active {
    background: #1d4ed8;
    border-color: #1e40af;
    color: #ffffff;
}

.forum-helpful-stat {
    display: inline-block;
    margin-right: 8px;
}

.forum-move-form {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.forum-move-select {
    width: auto;
    height: 24px;
    padding: 1px 6px;
    margin: 0;
    font-size: 11px;
}

.forum-profile-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.forum-profile-head h3 {
    margin: 0;
}

.forum-rank-progress {
    margin-bottom: 14px;
}

.forum-rank-progress-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.forum-rank-bar {
    height: 10px;
    border-radius: 5px;
    background: rgba(148, 163, 184, 0.35);
    overflow: hidden;
}

.forum-rank-bar > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #10b981);
}

.forum-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.forum-stat-card {
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 4px;
}

.forum-stat-card span {
    display: block;
}

.forum-stat-card strong {
    font-size: 16px;
}

.forum-rank-tiers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

/* EU/UK/CH ad & cookie consent banner + /privacy preferences box */
.consent-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 9500;
    background: #1e293b;
    color: #f8fafc;
    border: 1px solid #475569;
    border-radius: 6px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    padding: 12px 16px;
    max-width: 980px;
    margin: 0 auto;
}

.consent-banner-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.consent-banner-copy {
    flex: 1 1 360px;
    font-size: 12px;
    line-height: 1.45;
}

.consent-banner-copy p {
    margin: 4px 0 0;
    color: #cbd5e1;
}

.consent-banner-copy a {
    color: #93c5fd;
    text-decoration: underline;
}

.consent-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.consent-prefs-box {
    margin: 12px 0;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 4px;
    background: rgba(148, 163, 184, 0.08);
}

.consent-prefs-box p {
    margin: 0 0 8px;
}

/* Landing polish (22-11-2026) */
/* Showcase screenshots were captured in the game's light theme; render them dark to match the landing.
   Remove this filter if /assets/shots/*.webp are re-captured in the dark theme. */
body.lp img[src*="/assets/shots/"] { filter: invert(0.92) hue-rotate(180deg) saturate(1.15); }
body.lp .lp-footer form label { display: inline-flex; width: auto; flex: 0 0 auto; }
body.lp .lp-footer form select { width: auto; min-width: 140px; margin: 0; }
body.lp .lp-footer form button { display: inline-block; margin: 0; }

/* Quick sign-in buttons (OAuth), placed above the e-mail forms */
.oauth-buttons { margin: 6px 0 4px; display: grid; gap: 10px; }
.oauth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 16px;
  border: 1px solid #2a4a31; border-radius: 10px; background: #0d1610; color: #e4f5e8; font-weight: 600; font-size: 16px;
  text-decoration: none; transition: border-color .15s, background .15s, transform .15s; }
.oauth-btn:hover, .oauth-btn:focus-visible { border-color: #7ef29a; background: #112018; color: #fff; text-decoration: none; transform: translateY(-1px); }
.oauth-btn:focus-visible { outline: 2px solid #7ef29a; outline-offset: 2px; }
.oauth-btn svg { flex: 0 0 auto; }
.oauth-hint { margin: 2px 0 0; text-align: center; color: #9fb5a5; font-size: 13px; }
.oauth-divider { display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; color: #9fb5a5; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.oauth-divider::before, .oauth-divider::after { content: ""; flex: 1; height: 1px; background: #24402a; }
@media (prefers-reduced-motion: reduce) { .oauth-btn { transition: none; } .oauth-btn:hover { transform: none; } }
/* Auth forms: primary action matches the landing's green CTA */
.auth-page .stack-form .btn-primary { background: #7ef29a; background-image: none; border: 1px solid #7ef29a; color: #04120a; font-weight: 700; min-height: 48px; border-radius: 10px; text-shadow: none; box-shadow: none; }
.auth-page .stack-form .btn-primary:hover, .auth-page .stack-form .btn-primary:focus-visible { background: #9bf7b1; border-color: #9bf7b1; color: #04120a; }
/* Landing: compact language switch in the top bar (EN · ES · PT) */
body.lp .lp-lang { display: inline-flex; align-items: center; gap: 2px; margin: 0; padding: 2px; border: 1px solid #24402a; border-radius: 8px; background: rgba(8, 16, 10, .6); }
body.lp .lp-lang-btn { margin: 0; padding: 4px 7px; min-height: 28px; border: 0; border-radius: 6px; background: transparent; color: #9fb5a5; font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; cursor: pointer; }
body.lp .lp-lang-btn:hover, body.lp .lp-lang-btn:focus-visible { color: #e4f5e8; background: #112018; }
body.lp .lp-lang-btn:focus-visible { outline: 2px solid #7ef29a; outline-offset: 1px; }
body.lp .lp-lang-btn.is-active { color: #04120a; background: #7ef29a; }
@media (max-width: 430px) {
  body.lp .lp-nav .lp-sfx { display: none; }
  body.lp .lp-lang-btn { padding: 4px 5px; font-size: 11px; }
  body.lp .lp-nav-actions { gap: 6px; }
}
