:root {

    --bg: #fefae0;
    --panel: #ffffff;
    --panel2: #ffffff;

    --border: #111111;

    --green: #1d6ef2;
    --green2: #1547b8;

    --text: #111827;
    --muted: #4b5563;

    --gold: #f7c948;
    --red: #ff5f6d;
    --blue: #4ea2ff;
    --cyan: #6fe3ff;

    --shadow:
        0 15px 0 rgba(21, 58, 103, 1);
}


* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {

    margin: 0;

    background: #fefae0;

    color: var(--text);

    font-family:
        Arial,
        Helvetica,
        sans-serif;
}


.auth-gate {

    position: fixed;

    inset: 0;

    z-index: 1000;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 20px;

    background: rgba(254, 250, 224, .92);

    backdrop-filter: blur(8px);
}


.auth-gate:not(.visible) {

    display: none;
}


.auth-box {

    display: flex;
    gap: 20px;
    align-items: flex-start;

    width: min(760px, 100%);

    padding: 24px;

    background: #ffffff;

    border: 2px solid #111111;

    border-radius: 16px;

    box-shadow: 7px 7px 0 #111111;
}


.auth-form-panel {

    flex: 1.2;
}


.auth-brand {

    color: var(--green);

    font-family: "Comfortaa", sans-serif;

    font-size: 20px;

    font-weight: 900;
}


.auth-title {

    margin-top: 18px;

    color: #111111;

    font-size: 16px;

    font-weight: 900;

    letter-spacing: 1px;
}


.auth-subtitle,
.auth-expiry,
.auth-remaining {

    margin-top: 8px;

    color: var(--muted);

    font-size: 11px;

    line-height: 1.5;
}


.auth-remaining {

    margin-top: 12px;

    padding: 10px;

    background: #fff4d1;

    border: 2px solid #111111;

    color: #17385f;

    font-family: "IBM Plex Mono", monospace;

    font-size: 10px;

    font-weight: 900;

    line-height: 1.5;

    text-align: center;
}


.auth-input {

    width: 100%;

    min-height: 46px;

    margin-top: 18px;

    padding: 0 13px;

    border: 2px solid #111111;

    border-radius: 9px;

    box-shadow: 3px 3px 0 #111111;
}


.auth-box .primary-btn {

    width: 100%;

    margin-top: 14px;
}


.wa-buy-btn {

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    width: 100%;
    min-height: 46px;
    margin-top: 12px;
    padding: 0 14px;

    background: #25d366;
    color: #062b16;
    border: 2px solid #111111;
    border-radius: 10px;

    box-shadow: 3px 3px 0 #111111;

    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
    transition: transform .15s ease, box-shadow .15s ease;
}


.wa-buy-btn:hover {

    transform: translate(-1px, -1px);
    box-shadow: 5px 5px 0 #111111;
}


.auth-error {

    min-height: 18px;

    margin-top: 12px;

    color: #a52332;

    font-size: 11px;

    font-weight: 800;
}


.auth-pricing-panel {

    flex: 0.8;
    min-width: 200px;
    padding: 16px 14px;

    background: #fff4d1;
    border: 2px solid #111111;
    border-radius: 12px;
    box-shadow: 4px 4px 0 #111111;
}


.auth-pricing-title {

    margin-bottom: 12px;
    color: #111111;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
    text-align: center;
}


.auth-pricing-item + .auth-pricing-item {

    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #111111;
}


.auth-price-label {

    color: #17385f;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1px;
}


.auth-price-value {

    margin-top: 6px;
    color: #111111;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.2;
}


.auth-price-feature {

    margin-top: 6px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}


@media (max-width: 720px) {

    .auth-box {

        flex-direction: column;
    }

    .auth-form-panel,
    .auth-pricing-panel {

        width: 100%;
        flex: 1 1 auto;
    }
}


.auth-notice-backdrop {

    position: fixed;

    inset: 0;

    z-index: 1100;

    align-items: center;

    justify-content: center;

    padding: 20px;

    background: rgba(17, 24, 39, .42);

    backdrop-filter: blur(3px);
}


.auth-notice {

    width: min(390px, 100%);

    padding: 22px;

    background: #ffffff;

    border: 2px solid #111111;

    border-radius: 14px;

    box-shadow: 6px 6px 0 #111111;
}


.auth-notice-title {

    color: #a52332;

    font-family: "Comfortaa", sans-serif;

    font-size: 15px;

    font-weight: 900;
}


.auth-notice-message {

    margin-top: 12px;

    color: #566579;

    font-size: 11px;

    line-height: 1.7;
}


.auth-notice .primary-btn {

    width: 100%;

    margin-top: 18px;
}


/* =====================================================
   HEADER
===================================================== */

.topbar {

    position: sticky;

    top: 0;

    z-index: 100;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 18px 25px;

    background:
        linear-gradient(180deg, #ffffff 0%, #f7f2e8 100%);

    border-bottom:
        3px solid var(--border);

    backdrop-filter:
        blur(10px);
    box-shadow:
        0 6px 0 rgba(17, 17, 17, .08);
}


.brand {

    font-size: 22px;

    font-weight: 900;

    letter-spacing: .5px;
    color: #111111;
    font-family: "Comfortaa", sans-serif;
}


.subtitle {

    margin-top: 5px;

    color: var(--muted);

    font-size: 11px;

    letter-spacing: 1.2px;
    font-weight: 800;
}


.top-actions {

    display: flex;

    align-items: center;

    gap: 12px;
}


.online {

    display: flex;

    align-items: center;

    gap: 7px;

    color: var(--green);

    font-size: 11px;

    font-weight: 800;
}


.online span {

    width: 8px;

    height: 8px;

    border-radius: 50%;

    background: var(--green);

    box-shadow:
        0 0 12px
        rgba(37, 99, 235, .7);
}


    .user-token-countdown {

        align-items: center;

        min-height: 30px;

        padding: 0 9px;

        background: #fff4d1;

        border: 2px solid #111111;

        border-radius: 8px;

        color: #17385f;

        font-family: "IBM Plex Mono", monospace;

        font-size: 9px;

        font-weight: 900;

        white-space: nowrap;
    }


.admin-btn {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 38px;

    padding: 0 14px;

    border:
        2px solid var(--border);

    border-radius: 12px;

    background: #ffffff;

    color: var(--green);

    text-decoration: none;

    font-size: 11px;

    font-weight: 800;

    box-shadow: 4px 4px 0 rgba(15, 23, 42, 1);
    transition: transform .2s ease, box-shadow .2s ease;
}


.top-reset-btn {

    min-height: 38px;

    padding: 0 12px;

    font-size: 10px;
}


.admin-btn:hover {

    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 rgba(15, 23, 42, 1);
    background: #eff6ff;
}


/* =====================================================
   CONTAINER
===================================================== */

.container {

    width: min(
        1050px,
        calc(100% - 28px)
    );

    margin: 25px auto 60px;
}


/* =====================================================
   PANEL
===================================================== */

.panel {

    margin-bottom: 20px;

    padding: 20px;

    background: #ffffff;

    border:
        2px solid #000000;

    border-radius: 18px;

    box-shadow:
        4px 4px 0 rgba(0, 0, 0, 1);
}


.section-title {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 18px;

    font-size: 15px;

    font-weight: 900;

    letter-spacing: .6px;
    font-family: "Comfortaa", sans-serif;
}


.number {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    width: 32px;

    height: 24px;

    margin-right: 9px;

    border:
        2px solid var(--border);

    border-radius: 7px;

    background: linear-gradient(180deg, #ffe59a 0%, #faae2b 100%);
    color: #111111;

    font-size: 11px;
    font-weight: 900;
    box-shadow:
        3px 3px 0 rgba(17, 17, 17, 1);
    font-family: "Comfortaa", sans-serif;
}


/* =====================================================
   FORMAT
===================================================== */

.format-row {

    display: flex;

    align-items: end;

    gap: 10px;

    margin-bottom: 12px;

    flex-wrap: wrap;
}


.format-box {

    flex: 1;

    min-width: 230px;
}


.format-box label {

    display: block;

    margin-bottom: 7px;

    color: var(--muted);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 1px;
}


.format-select {

    width: 100%;

    height: 43px;

    padding: 0 12px;

    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);

    border:
        2px solid var(--border);

    border-radius: 12px;

    outline: none;

    color: var(--text);

    font-size: 13px;

    font-weight: 700;
    box-shadow: 4px 4px 0 rgba(17, 17, 17, 1);
}


.format-select:focus {

    border-color:
        var(--border);
    box-shadow: 0 0 0 2px rgba(250,174,43,.2), 4px 4px 0 rgba(17,17,17,1);
}


.format-select-hidden {

    display: none;
}


.format-picker {

    position: relative;
}


.format-picker-input {

    width: 100%;

    min-height: 43px;

    padding: 0 12px;

    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);

    border: 2px solid var(--border);

    border-radius: 12px;

    color: var(--text);

    cursor: pointer;

    font-size: 13px;

    font-weight: 700;

    box-shadow: 4px 4px 0 rgba(17, 17, 17, 1);
}


.format-picker-input:focus {

    outline: none;

    box-shadow: 0 0 0 2px rgba(250,174,43,.2), 4px 4px 0 rgba(17,17,17,1);
}


.format-picker-options {

    position: absolute;

    top: calc(100% + 7px);

    left: 0;

    right: 0;

    z-index: 20;

    max-height: 240px;

    overflow-y: auto;

    border-radius: 9px;
}


.small-btn {

    min-height: 43px;

    padding: 0 13px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    border:
        2px solid var(--border);

    border-radius: 12px;

    background: linear-gradient(180deg, #fffdf9 0%, #f4f4f5 100%);

    color: var(--text);

    text-decoration: none;

    font-size: 10px;

    font-weight: 800;

    cursor: pointer;
    box-shadow: 4px 4px 0 rgba(17,17,17,1);
    transition: transform .18s ease, box-shadow .18s ease;
}


.small-btn:hover {

    border-color:
        var(--border);

    color: #111111;
    transform: translate(1px,1px);
    box-shadow: 2px 2px 0 rgba(17,17,17,1);
}


.format-status {

    margin: 12px 0;

    padding: 10px 12px;

    border:
        2px solid var(--border);

    border-radius: 10px;

    background:
        linear-gradient(180deg, #fff4d1 0%, #ffe59a 100%);

    color: #111111;

    font-size: 11px;

    font-weight: 800;
    box-shadow: 3px 3px 0 rgba(17, 17, 17, 1);
}


.hint {

    margin-bottom: 8px;

    color: var(--muted);

    font-size: 10px;

    letter-spacing: .5px;
}


textarea {

    width: 100%;

    min-height: 260px;

    padding: 14px;

    resize: vertical;

    background: linear-gradient(180deg, #ffffff 0%, #fafbfd 100%);

    border:
        2px solid var(--border);

    border-radius: 14px;

    outline: none;

    color: var(--text);

    font-family:
        "IBM Plex Mono",
        Consolas,
        monospace;

    font-size: 12px;

    line-height: 1.65;
    box-shadow: 4px 4px 0 rgba(17, 17, 17, 1);
}


textarea:focus {

    border-color:
        var(--border);

    box-shadow:
        0 0 0 2px rgba(250,174,43,.2),
        4px 4px 0 rgba(17, 17, 17, 1);
}


/* =====================================================
   BUTTON
===================================================== */

.button-row {

    display: flex;

    gap: 9px;

    flex-wrap: wrap;

    margin-top: 12px;
}


button {

    font-family: inherit;
}


.primary-btn,
.secondary-btn,
.danger-btn {

    min-height: 46px;

    padding: 0 15px;

    border-radius: 12px;

    cursor: pointer;

    font-size: 11px;

    font-weight: 900;

    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
    box-shadow: 5px 5px 0 rgba(17, 17, 17, 1);
}


.primary-btn {

    background:
        linear-gradient(180deg, #ffd974 0%, #faae2b 100%);

    border:
        3px solid var(--border);

    color: #111111;
    font-weight: 800;
}


.primary-btn:hover {

    background:
        linear-gradient(180deg, #ffe49a 0%, #fcbf4f 100%);
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 rgba(17, 17, 17, 1);
}


.secondary-btn {

    background:
        linear-gradient(180deg, #ffffff 0%, #f5f6f8 100%);

    border:
        2px solid var(--border);

    color: var(--text);
}


.secondary-btn:hover {

    border-color:
        var(--border);

    color: var(--text);
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 rgba(17, 17, 17, 1);
}


.danger-btn {

    background:
        linear-gradient(180deg, #ffd9d9 0%, #ffb6b6 100%);

    border:
        2px solid var(--border);

    color: #111111;
}


.danger-btn:hover {

    background:
        linear-gradient(180deg, #ffe1e1 0%, #ffc7c7 100%);
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 rgba(17, 17, 17, 1);
}


.time-box {

    margin-top: 12px;

    color: var(--muted);

    font-size: 10px;
}


/* =====================================================
   STATS
===================================================== */

.stats-grid {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 10px;

    margin-bottom: 12px;
}


.stat-card {

    padding: 15px;

    background:
        linear-gradient(180deg, #ffffff 0%, #fffefc 100%);

    border:
        2px solid var(--border);

    border-radius: 12px;
    box-shadow: 4px 4px 0 rgba(17,17,17,1);
}


.stat-label {

    color: var(--muted);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1px;
}


.stat-value {

    margin-top: 8px;

    font-size: 25px;

    font-weight: 900;
}


.stat-value.k {

    color: var(--green);
}


.stat-value.b {

    color: var(--red);
}


/* =====================================================
   ANALYSIS
===================================================== */

.analysis-grid {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 10px;
}


.analysis-card {

    min-height: 82px;

    padding: 13px;

    background:
        linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);

    border:
        2px solid var(--border);

    border-radius: 10px;
    box-shadow: 3px 3px 0 rgba(17,17,17,1);
}


.analysis-title {

    color: var(--muted);

    font-size: 9px;

    font-weight: 900;

    letter-spacing: 1px;

    margin-bottom: 9px;
}


.analysis-value {

    font-size: 15px;

    font-weight: 900;

    word-break: break-word;
}


.analysis-large {

    margin-top: 12px;

    padding: 14px;

    background:
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);

    border:
        2px solid var(--border);

    border-radius: 10px;
    box-shadow: 4px 4px 0 rgba(17,17,17,1);
}


.analysis-text {

    color: #24364d;

    font-size: 12px;

    line-height: 1.7;
}


.analysis-text strong {

    color: #111827;

    font-weight: 900;
}


#rollerUAHistory {

    display: grid;

    gap: 10px;

    margin-top: 14px;

    padding-top: 14px;

    border-top: 2px solid #c8d8ec;
}


#rollerUAHistory > div {

    padding: 11px 13px;

    background: #eef5ff;

    border: 2px solid #8eadd3;

    color: #17385f;

    font-size: 11px;

    line-height: 1.55;
}


#rollerUAHistory small {

    display: block;

    margin-top: 5px;

    color: #233f63;

    font-family: "IBM Plex Mono", monospace;

    font-size: 10px;

    line-height: 1.55;

    word-break: break-word;
}


.analysis-line {

    display: flex;

    justify-content: space-between;

    gap: 15px;

    padding: 8px 0;

    border-bottom:
        1px solid
        rgba(255,255,255,.04);
}


.analysis-line:last-child {

    border-bottom: 0;
}


.analysis-line span {

    color: var(--muted);
}


.analysis-summary {

    margin-bottom: 10px;

    color: var(--muted);
}


.analysis-summary strong {

    color: var(--green);
}


.analysis-note {

    margin-top: 12px;

    color: var(--muted);

    font-size: 10px;

    line-height: 1.6;
}


.score-grid {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 8px;
}


.score-grid > div {

    padding: 10px;

    border:
        1px solid var(--border);

    border-radius: 7px;

    background: #09100c;
}


.score-grid span {

    display: block;

    color: var(--muted);

    font-size: 9px;

    margin-bottom: 5px;
}


.score-grid strong {

    font-size: 15px;
}


/* =====================================================
   PREDICTION
===================================================== */

.prediction-panel {

    border-color:
        rgba(
            32,
            232,
            121,
            .3
        );
}


.next-match-box {

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 15px;

    margin-bottom: 12px;

    background:
        linear-gradient(180deg, #fff6d6 0%, #ffe39c 100%);

    border:
        2px solid var(--border);

    border-radius: 12px;
    box-shadow: 4px 4px 0 rgba(17,17,17,1);
}


.next-label {

    color: var(--muted);

    font-size: 10px;

    font-weight: 800;
}


.next-number {

    color: var(--green);

    font-size: 25px;

    font-weight: 900;
}


.prediction-result {

    padding: 22px;

    text-align: center;

    background:
        linear-gradient(180deg, #fffaf0 0%, #fff4d4 100%);

    border:
        2px solid var(--border);

    border-radius: 12px;
    box-shadow: 4px 4px 0 rgba(17,17,17,1);
}


.prediction-roll-box {

    margin-top: 12px;

    padding: 14px;

    background:
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);

    border:
        2px solid var(--border);

    border-radius: 12px;

    box-shadow: 4px 4px 0 rgba(17,17,17,1);
}


.prediction-roll-label {

    margin-bottom: 10px;

    color: var(--muted);

    font-size: 9px;

    font-weight: 900;

    letter-spacing: 1px;

    text-transform: uppercase;
}


.prediction-dice-grid {

    display: grid;

    grid-template-columns: repeat(9, minmax(0, 1fr));

    gap: 9px;

    margin-bottom: 12px;

    padding: 8px;

    background: linear-gradient(180deg, #f8fbff 0%, #edf5ff 100%);

    border: 2px solid var(--border);

    border-radius: 10px;
}


.prediction-roll-total {

    display: flex;

    align-items: center;
    justify-content: center;
    gap: 8px;

    color: var(--muted);

    font-size: 10px;

    font-weight: 900;
    letter-spacing: .8px;
    text-transform: uppercase;
}


.prediction-roll-total strong {

    color: #111111;

    font-size: 22px;
    line-height: 1;
}


.prediction-roll-zone {

    margin-top: 10px;

    color: var(--green);

    font-size: 13px;

    font-weight: 900;

    text-align: center;

    letter-spacing: .5px;
}


.prediction-roll-time {

    margin-top: 6px;

    color: var(--muted);

    font-size: 11px;

    font-weight: 800;

    text-align: center;
}


.prediction-score-item {

    display: grid;

    gap: 4px;

    min-width: 74px;

    padding: 10px 8px;

    background: #ffffff;

    border: 2px solid var(--border);

    border-radius: 8px;

    text-align: center;
}


.prediction-score-item span {

    color: var(--muted);

    font-size: 8px;

    font-weight: 900;

    letter-spacing: .6px;
}


.prediction-score-item strong {

    color: var(--text);

    font-size: 20px;
}


.dice-roll-emoji {

    background: #dff7ff;
    border-color: rgba(66, 153, 225, .7);

    animation: prediction-dice-shake .16s ease-in-out infinite alternate;
}


.dice-roll-emoji strong {

    color: #0f172a;
}


@keyframes prediction-dice-shake {

    from {
        transform: translateY(-3px) rotate(-4deg);
    }

    to {
        transform: translateY(3px) rotate(4deg);
    }
}


.ua-prediction-box {

    display: grid;

    gap: 10px;

    margin: 0;

    padding: 18px;

    background: #ffffff;

    border: 2px solid var(--border);

    border-radius: 10px;

    box-shadow: 4px 4px 0 #111111;
}


.ua-prediction-box label {

    margin-top: 2px;

    color: #17385f;

    font-size: 11px;

    font-weight: 900;

    letter-spacing: 1px;
}


.ua-prediction-box .format-select,
.ua-prediction-box .text-input {

    width: 100%;

    min-height: 46px;

    padding: 0 13px;

    background: #ffffff;

    border: 2px solid #111111;

    border-radius: 9px;

    color: #172033;

    font-size: 12px;

    font-weight: 800;

    box-shadow: 3px 3px 0 #111111;
}


.device-roller-suggestions {

    display: none;

    max-height: 260px;

    overflow-y: auto;

    background: #ffffff;

    border: 2px solid #111111;

    box-shadow: 3px 3px 0 #111111;
}


.device-roller-suggestions.visible {

    display: grid;
}


.device-roller-suggestions button {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    min-height: 40px;

    padding: 8px 11px;

    background: #ffffff;

    border: 0;

    border-bottom: 1px solid #d8e2ef;

    color: #172033;

    cursor: pointer;

    text-align: left;
}


.device-roller-suggestions button:hover {

    background: #eaf3ff;
}


.device-roller-suggestions button strong {

    font-size: 11px;
}


.device-roller-suggestions button span {

    color: #56708d;

    font-family: "IBM Plex Mono", monospace;

    font-size: 9px;
}


.ua-prediction-box .format-select:focus,
.ua-prediction-box .text-input:focus {

    outline: none;

    border-color: #1d6ef2;

    box-shadow: 0 0 0 3px rgba(29,110,242,.16), 3px 3px 0 #111111;
}


.ua-prediction-box .text-input[readonly] {

    min-height: 64px;

    padding: 11px 13px;

    background: #eef5ff;

    color: #31547d;

    font-family: "IBM Plex Mono", monospace;

    font-size: 10px;

    line-height: 1.5;

    overflow: hidden;
    text-overflow: ellipsis;
}


.ua-profile-info {

    padding: 9px 11px;

    background: #fff7d6;

    border-left: 4px solid #f7c948;

    color: var(--muted);

    font-size: 10px;

    font-weight: 800;

    line-height: 1.5;
}


.ua-browser-options {

    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 7px;

    margin-top: 2px;
}


.ua-browser-label {

    margin-right: 3px;

    color: #17385f;

    font-size: 9px;

    font-weight: 900;

    letter-spacing: .7px;
}


.ua-browser-options button {

    min-height: 30px;

    padding: 0 10px;

    background: #ffffff;

    border: 2px solid #111111;

    border-radius: 8px;

    color: #31547d;

    cursor: pointer;

    font-size: 9px;

    font-weight: 900;

    box-shadow: 2px 2px 0 #111111;
}


.ua-browser-options button.active {

    background: #ffe59a;

    color: #111111;
}


.roller-action-row {

    display: grid;

    grid-template-columns: 1fr;

    gap: 10px;

    margin-top: 2px;
}


.prediction-roll-label {

    margin-bottom: 10px;

    color: var(--muted);

    font-size: 9px;

    font-weight: 900;

    letter-spacing: 1px;
}


.prediction-roll-total {

    margin-top: 10px;

    color: var(--muted);

    font-size: 11px;

    font-weight: 800;

    text-align: center;
}


.prediction-roll-total strong {

    color: #111111;

    font-size: 18px;
}


.prediction-dice-grid {

    margin-bottom: 0;
}


.prediction-label {

    color: var(--muted);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 1px;
}


.prediction-value {

    margin-top: 8px;

    font-size: 28px;

    line-height: 1.1;
    font-weight: 1000;
    letter-spacing: .4px;
}


.prediction-zones {

    margin-top: 10px;

    padding: 10px 12px;

    text-align: center;

    background:
        linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);

    border:
        2px solid var(--border);

    border-radius: 10px;

    color: var(--muted);

    font-size: 11px;

    line-height: 1.6;
    box-shadow: 3px 3px 0 rgba(17,17,17,1);
}


.prediction-zones strong {

    color: var(--green);
}


.confidence {

    margin-top: 15px;
}


.confidence-head {

    display: flex;

    justify-content: space-between;

    color: var(--muted);

    font-size: 10px;

    font-weight: 800;
}


.confidence-head strong {

    color: var(--green);
}


.confidence-bar {

    height: 11px;

    margin-top: 8px;

    overflow: hidden;

    background: #f2f4f7;

    border-radius: 20px;

    border:
        2px solid var(--border);
    box-shadow: inset 0 0 0 1px rgba(17,17,17,.08);
}


#confidenceFill {

    height: 100%;

    background:
        linear-gradient(90deg, #faae2b 0%, #ffd974 100%);

    transition:
        width .4s ease;
}


.prediction-reason {

    margin-top: 13px;

    padding: 13px;

    color: #1a2433;

    background:
        linear-gradient(180deg, #ffffff 0%, #f5f8fd 100%);

    border:
        2px solid var(--border);

    border-radius: 10px;

    font-size: 11px;

    line-height: 1.7;
    box-shadow: 3px 3px 0 rgba(17,17,17,1);
}


.lw-assistant {

    margin-top: 14px;

    padding: 15px;

    background:
        linear-gradient(135deg, #eef5ff 0%, #ffffff 62%, #fff4d1 100%);

    border: 2px solid #111111;

    border-radius: 12px;

    box-shadow: 4px 4px 0 #111111;
}


.lw-assistant-head {

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 12px;
}


.lw-assistant-head > div {

    display: grid;

    gap: 4px;
}


.lw-assistant-kicker {

    color: var(--green);

    font-family: "IBM Plex Mono", monospace;

    font-size: 9px;

    font-weight: 900;

    letter-spacing: 1px;
}


.lw-assistant-head strong {

    color: #111111;

    font-family: "Comfortaa", sans-serif;

    font-size: 13px;
}


.lw-assistant-badge {

    padding: 4px 7px;

    background: #d5f5df;

    border: 1px solid #111111;

    color: #176b38;

    font-size: 8px;

    font-weight: 900;
}


.lw-assistant-summary {

    display: grid;

    gap: 4px;

    margin-top: 13px;

    color: #17385f;

    font-size: 12px;

    line-height: 1.5;
}


.lw-assistant-summary span {

    color: var(--muted);

    font-size: 10px;
}


.lw-assistant-signals {

    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 8px;

    margin-top: 12px;
}


.lw-assistant-signals > div {

    display: grid;

    gap: 5px;

    min-width: 0;

    padding: 9px;

    background: rgba(255, 255, 255, .78);

    border: 1px solid #9cb9e1;
}


.lw-assistant-signals small {

    color: #56708d;

    font-size: 8px;

    font-weight: 900;
}


.lw-assistant-signals strong {

    overflow-wrap: anywhere;

    color: #17385f;

    font-family: "IBM Plex Mono", monospace;

    font-size: 11px;
}


.lw-assistant-note {

    margin-top: 11px;

    color: #566579;

    font-size: 10px;

    line-height: 1.55;
}


.lw-ai-button {

    width: 100%;

    margin-top: 13px;

    background: #ffffff;
}


.lw-ai-button:disabled {

    cursor: wait;

    opacity: .65;
}


.ai-analysis-result {

    min-height: 42px;

    margin-top: 10px;

    padding: 11px;

    background: #ffffff;

    border: 1px solid #9cb9e1;

    color: #24364d;

    font-size: 10px;

    line-height: 1.65;

    white-space: pre-line;
}


.warning {

    margin-top: 12px;

    padding: 11px;

    background:
        rgba(
            233,
            189,
            82,
            .05
        );

    border:
        1px solid
        rgba(
            233,
            189,
            82,
            .18
        );

    border-radius: 8px;

    color: #cdbb89;

    font-size: 10px;

    line-height: 1.6;
}


/* =====================================================
   DEVICE
===================================================== */

.text-input {

    width: 100%;

    height: 43px;

    padding: 0 13px;

    background:
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);

    border:
        2px solid var(--border);

    border-radius: 12px;

    outline: none;

    color: var(--text);

    font-size: 12px;
    box-shadow: 4px 4px 0 rgba(17,17,17,.18);
}


.text-input:focus {

    border-color:
        var(--border);
    box-shadow: 0 0 0 2px rgba(250,174,43,.2), 4px 4px 0 rgba(17,17,17,.2);
}


.device-result,
.ua-result {

    margin-top: 12px;

    padding: 13px;

    background:
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);

    border:
        2px solid var(--border);

    border-radius: 10px;

    color: #1b2431;

    font-size: 11px;

    line-height: 1.7;

    word-break: break-word;
    box-shadow: 3px 3px 0 rgba(17,17,17,1);
}


/* =====================================================
   GAME
===================================================== */

.roll-mode {

    display: flex;

    gap: 8px;

    margin-bottom: 12px;
}


.mode-btn {

    flex: 1;

    height: 40px;

    border:
        1px solid var(--border);

    border-radius: 8px;

    background:
        var(--panel2);

    color: var(--muted);

    cursor: pointer;

    font-weight: 900;
}


.mode-btn.active {

    background:
        rgba(
            32,
            232,
            121,
            .1
        );

    border-color:
        var(--green);

    color: var(--green);
}


.game-status {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 9px;

    margin-bottom: 12px;
}


.game-status > div {

    padding: 12px;

    text-align: center;

    background:
        var(--panel2);

    border:
        1px solid var(--border);

    border-radius: 8px;

    color: var(--muted);

    font-size: 9px;

    font-weight: 800;
}


.game-status strong {

    display: block;

    margin-top: 5px;

    color: var(--text);

    font-size: 17px;
}


.dice-grid {

    display: grid;

    grid-template-columns:
        repeat(9, 1fr);

    gap: 8px;

    margin-bottom: 12px;
}


.dice {

    padding: 10px 4px;

    text-align: center;

    background:
        linear-gradient(180deg, #0d1713 0%, #09110d 100%);

    border:
        2px solid rgba(255, 255, 255, .15);

    border-radius: 8px;

    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}


.dice span {

    display: block;

    color: #b8c7d9;

    font-size: 8px;
    font-weight: 800;
    letter-spacing: .3px;
}


.dice strong {

    display: block;

    margin-top: 5px;

    color: #b8ffb9;

    font-size: 22px;
    font-weight: 900;
}


.actual-history {

    margin-top: 12px;

    color: var(--muted);

    font-size: 11px;
}


.game-result {

    padding: 13px;

    background:
        rgba(
            32,
            232,
            121,
            .05
        );

    border:
        1px solid
        rgba(
            32,
            232,
            121,
            .2
        );

    border-radius: 8px;

    color: var(--muted);
}


.game-result strong {

    color: var(--green);

    font-size: 20px;
}


/* =====================================================
   SAVED
===================================================== */

.saved-matches {

    display: flex;

    flex-direction: column;

    gap: 8px;
}


.saved-item {

    display: grid;

    grid-template-columns:
        1.5fr
        1fr
        1.5fr;

    gap: 10px;

    padding: 12px;

    background:
        var(--panel2);

    border:
        1px solid var(--border);

    border-radius: 8px;

    color: var(--muted);

    font-size: 10px;
}


.saved-item strong {

    color: var(--green);

    margin-right: 8px;

    font-size: 15px;
}


/* =====================================================
   FOOTER
===================================================== */

footer {

    padding: 25px;

    text-align: center;

    color: var(--muted);

    font-size: 9px;

    letter-spacing: 1px;
}


footer span {

    margin: 0 7px;

    color: var(--green);
}


/* =====================================================
   ADMIN PAGE
===================================================== */

.admin-pin-gate {

    display: flex;

    align-items: center;

    justify-content: center;

    min-height: 100vh;

    padding: 28px 16px;

    background: #fefae0;
}


.admin-pin-box {

    width: min(420px, 100%);

    padding: 28px 22px 20px;

    background: #ffffff;

    border: 2px solid #000000;

    border-radius: 20px;

    box-shadow: 4px 4px 0 rgba(0, 0, 0, 1);

    text-align: center;
}


.admin-pin-icon {

    font-size: 42px;

    margin-bottom: 12px;
}


.admin-pin-title {

    margin-bottom: 8px;

    color: #111111;

    font-size: 24px;

    font-weight: 900;

    letter-spacing: .08em;
    font-family: "Comfortaa", sans-serif;
}


.admin-pin-subtitle {

    margin-bottom: 18px;

    color: var(--muted);

    font-size: 12px;

    font-weight: 700;
}


.admin-pin-input {

    width: 100%;

    height: 46px;

    margin-bottom: 14px;

    padding: 0 14px;

    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);

    border: 2px solid #000000;

    border-radius: 12px;

    outline: none;

    color: var(--text);

    font-size: 14px;
    font-weight: 700;
    box-shadow: 4px 4px 0 rgba(17, 17, 17, .2);
}


.admin-pin-input:focus {

    box-shadow: 0 0 0 2px rgba(250,174,43,.2), 4px 4px 0 rgba(17,17,17,.2);
}


.admin-pin-error {

    min-height: 18px;

    margin-top: 10px;

    color: #b42318;

    font-size: 11px;

    font-weight: 800;
}


.back-btn {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    margin-top: 16px;

    min-height: 42px;

    padding: 0 16px;

    background: #ffffff;

    border: 2px solid #000000;

    border-radius: 12px;

    color: #111111;

    text-decoration: none;

    font-size: 11px;

    font-weight: 900;
    box-shadow: 4px 4px 0 rgba(17,17,17,1);
}


.admin-form {

    display: grid;

    grid-template-columns: 1.15fr .85fr;

    gap: 18px;

    padding: 18px;

    background: #f4f8ff;

    border: 2px solid #111111;

    box-shadow: 5px 5px 0 #111111;
}


.token-form {

    grid-template-columns: 1.15fr .85fr .85fr;
}


.token-duration-fields {

    display: grid;
    grid-template-columns: 1fr .9fr;
    gap: 8px;
}


.token-form .form-group:last-of-type {

    grid-column: auto;
}


.form-group {

    display: flex;

    flex-direction: column;

    gap: 8px;
}


.admin-form .form-group:last-of-type {

    grid-column: 1 / -1;
}


.admin-form .button-row {

    grid-column: 1 / -1;

    margin-top: 2px;
}


.form-group label {

    color: var(--muted);

    font-size: 10px;

    font-weight: 900;

    letter-spacing: 1px;
}


#adminContent .topbar {

    background:
        linear-gradient(135deg, #ffffff 0%, #e7f0ff 100%);
}


#adminContent .container {

    width: min(980px, calc(100% - 30px));

    margin-top: 22px;
}


#adminContent .panel {

    margin-bottom: 22px;

    box-shadow: 7px 7px 0 #111111;
}


#adminContent .section-title {

    margin-bottom: 20px;
}


#adminContent textarea {

    min-height: 150px;

    background: #ffffff;
}


.format-list {

    display: grid;

    gap: 12px;
}


.format-item {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 18px;

    padding: 16px;

    background: #ffffff;

    border: 2px solid #111111;

    box-shadow: 4px 4px 0 #111111;
}


.format-item-main {

    min-width: 0;
}


.format-item-title {

    margin-bottom: 7px;

    color: #111111;

    font-family: "Comfortaa", sans-serif;

    font-size: 15px;

    font-weight: 900;
}


.format-item-meta {

    color: #31547d;

    font-size: 10px;

    font-weight: 800;

    line-height: 1.7;
}


.format-item-meta code {

    padding: 2px 5px;

    background: #e7f0ff;

    border: 1px solid #9cb9e1;

    color: #17385f;

    font-size: 10px;
}


.format-item-description {

    margin-top: 8px;

    color: #566579;

    font-size: 11px;

    line-height: 1.5;
}


.pattern-list {

    display: grid;

    gap: 12px;

    margin-top: 18px;
}


.pattern-item {

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 18px;

    padding: 16px;

    background: #ffffff;

    border: 2px solid #111111;

    box-shadow: 4px 4px 0 #111111;
}


.pattern-item-main {

    min-width: 0;

    flex: 1;
}


.pattern-content-input {

    min-height: 300px;

    font-family: "IBM Plex Mono", monospace;

    line-height: 1.55;
}


.pattern-item-content {

    max-height: 360px;

    margin: 10px 0 0;

    padding: 12px;

    overflow: auto;

    white-space: pre-wrap;
    word-break: break-word;

    background: #f4f8ff;

    border: 1px solid #9cb9e1;

    color: #31547d;

    font-family: "IBM Plex Mono", monospace;

    font-size: 10px;

    line-height: 1.55;
}


.token-form-action {

    justify-content: flex-end;
}


.new-token-box {

    display: grid;

    gap: 7px;

    margin-top: 18px;

    padding: 14px;

    background: #fff4d1;

    border: 2px solid #111111;

    box-shadow: 4px 4px 0 #111111;
}


.new-token-box strong {

    color: #111111;

    font-size: 11px;
}


.new-token-box code {

    padding: 10px;

    overflow-wrap: anywhere;

    background: #ffffff;

    border: 1px solid #111111;

    color: #17385f;

    font-family: "IBM Plex Mono", monospace;

    font-size: 12px;

    font-weight: 800;
}


.new-token-box span {

    color: #566579;

    font-size: 10px;
}


.token-list {

    display: grid;

    gap: 10px;

    margin-top: 18px;

    max-height: 330px;

    overflow-y: auto;

    padding: 2px 7px 7px 2px;

    align-content: start;
}


.list-search {

    width: 100%;

    margin-top: 18px;
}


.list-disclosure {

    margin-top: 18px;

    border: 2px solid #111111;

    background: #f4f8ff;

    box-shadow: 3px 3px 0 #111111;
}


.list-disclosure summary {

    display: flex;

    align-items: center;

    justify-content: space-between;

    min-height: 42px;

    padding: 11px 13px;

    cursor: pointer;

    color: #17385f;

    font-size: 11px;

    font-weight: 900;

    letter-spacing: .5px;

    list-style: none;
}


.list-disclosure summary::-webkit-details-marker {

    display: none;
}


.list-disclosure summary::after {

    content: "+";

    font-size: 18px;
}


.list-disclosure[open] summary::after {

    content: "-";
}


.list-count {

    margin-left: auto;

    margin-right: 12px;

    color: #566579;

    font-family: "IBM Plex Mono", monospace;

    font-size: 10px;
}


.token-item {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 14px;

    padding: 13px;

    background: #ffffff;

    border: 2px solid #111111;

    box-shadow: 3px 3px 0 #111111;
}


.token-item > div:first-child {

    display: grid;

    gap: 4px;

    min-width: 0;
}


.token-item strong {

    color: #17385f;

    font-family: "IBM Plex Mono", monospace;

    font-size: 12px;
}


.token-item span {

    color: #566579;

    font-size: 10px;
}


.token-item-actions {

    display: flex;

    align-items: center;

    gap: 8px;

    flex: 0 0 auto;
}


.token-status {

    padding: 4px 7px;

    border: 1px solid #111111;

    font-size: 9px !important;

    font-weight: 900;
}


.token-status.active {

    background: #d5f5df;

    color: #176b38 !important;
}


.token-status.inactive {

    background: #f0f0f0;

    color: #6b7280 !important;
}


.format-item-actions {

    display: flex;

    flex: 0 0 auto;

    gap: 8px;
}


.format-item-actions .small-btn {

    min-width: 74px;
}


.built-in {

    display: inline-block;

    padding: 2px 6px;

    background: #ffe08a;

    border: 1px solid #111111;

    color: #111111;

    font-size: 9px;

    font-weight: 900;
}


.admin-info {

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 12px;
}


.info-item {

    padding: 16px;

    background: #f4f8ff;

    border: 2px solid #111111;

    box-shadow: 4px 4px 0 #111111;
}


.info-item strong {

    color: #111111;

    font-size: 12px;

    font-weight: 900;
}


.info-item p {

    margin: 10px 0 0;

    color: #566579;

    font-size: 11px;

    line-height: 1.65;
}


.empty-box,
.error-box {

    padding: 20px;

    background: #f4f8ff;

    border: 2px dashed #6b87aa;

    color: #566579;

    font-size: 12px;

    font-weight: 800;
    text-align: center;
}


.error-box {

    background: #fff0f0;

    border-color: #c84b55;

    color: #9b2430;
}


/* =====================================================
   BRANDING OVERRIDE
===================================================== */

.brand,
.subtitle,
footer,
.admin-btn,
.online,
.format-status,
.prediction-value,
.stat-value,
.analysis-value,
.next-number,
.prediction-result,
.game-result strong,
.saved-item strong {
    letter-spacing: .02em;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 800px) {

    .top-actions {

        flex-wrap: wrap;

        justify-content: flex-end;
    }


    .top-reset-btn {

        order: 3;

        width: 100%;
    }


    .user-token-countdown {

        order: 4;

        width: 100%;

        justify-content: center;

        white-space: normal;

        text-align: center;
    }


    .lw-assistant-signals {

        grid-template-columns: repeat(2, 1fr);
    }

    .admin-form {

        grid-template-columns: 1fr;
    }


    .admin-form .form-group:last-of-type,
    .admin-form .button-row {

        grid-column: auto;
    }


    .admin-info {

        grid-template-columns: 1fr;
    }


    .format-item {

        align-items: flex-start;

        flex-direction: column;
    }


    .format-item-actions {

        width: 100%;
    }


    .token-item {

        align-items: flex-start;

        flex-direction: column;
    }


    .token-item-actions {

        width: 100%;

        justify-content: space-between;
    }


    .format-item-actions .small-btn {

        flex: 1;
    }

    .stats-grid {

        grid-template-columns:
            repeat(2, 1fr);
    }


    .analysis-grid {

        grid-template-columns:
            repeat(2, 1fr);
    }


    .score-grid {

        grid-template-columns:
            repeat(2, 1fr);
    }


    .dice-grid {

        grid-template-columns:
            repeat(5, 1fr);
    }

}


@media (max-width: 600px) {

    .roller-action-row {

        grid-template-columns: 1fr;
    }

    .topbar {

        align-items: flex-start;

        padding: 15px;

        flex-direction: column;
    }


    .top-actions {

        width: 100%;

        justify-content: space-between;
    }


    .container {

        width:
            calc(100% - 18px);

        margin-top: 12px;
    }


    .panel {

        padding: 14px;

        border-radius: 11px;
    }


    .format-box {

        min-width: 100%;
    }


    .small-btn {

        flex: 1;
    }


    .stats-grid,
    .analysis-grid {

        grid-template-columns:
            1fr 1fr;
    }


    .score-grid {

        grid-template-columns:
            1fr 1fr;
    }


    .dice-grid {

        grid-template-columns:
            repeat(3, 1fr);
    }


    .saved-item {

        grid-template-columns:
            1fr;
    }


    textarea {

        min-height: 230px;
    }

}


@media (max-width: 380px) {

    .stats-grid,
    .analysis-grid {

        grid-template-columns:
            1fr;
    }


    .score-grid {

        grid-template-columns:
            1fr;
    }

}