/* ===========================
   ROOT / BASE / GLOBAL
   =========================== */

:root{
    --ink:#33241a;
    --paper: rgba(255,255,255,.72);
    --glass: rgba(245,235,220,.66);
    --shadow: rgba(0,0,0,.25);
    --brand:#f29f38;
    --brand2:#f6c35f;
    --teal:#1bb5a8;
    --teal2:#129b92;

    /* extra palette */
    --green:#19c27f;
    --green2:#0fa86c;
    --red:#ff5d57;
    --red2:#e0443e;
    --blue:#3aa0ff;
    --blue2:#1f7fe0;

    --radius:16px;
    --chip-h:38px;
    --btn-h:52px;
    --btn-sm-h:36px;
    --gap:10px;
    --chip-min: 96px;

    /* layout helpers */
    --titlebar-h: 108px;
    --shop-h: 0px;

    /* Анимации */
    --fade-dur:480ms;
    --fade-ease: cubic-bezier(.16,.84,.44,1);
}

*{ box-sizing:border-box; }

/* базовые размеры и скрытый скролл по X */
html, body{
    height:100%;
    margin:0;
    overflow:auto;
    -ms-overflow-style:none;      /* IE/Edge Legacy */
    scrollbar-width:none;         /* Firefox */
}
html::-webkit-scrollbar,
body::-webkit-scrollbar{
    width:0;
    height:0;
}

body{
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Noto Sans", Arial, sans-serif;
    color:var(--ink);
    touch-action:manipulation;
    overscroll-behavior:contain;
}

/* iOS text scaling & zoom prevention */
html{ -webkit-text-size-adjust:100%; }

/* Важно: 16px минимум для всех полей ввода, чтобы iOS не приближал на фокусе */
input, select, textarea{ font-size:16px; }
.copy-inline input{ font-size:16px; } /* treasury в модалке */

/* Скрыть скролл у внутренних прокручиваемых блоков (модалки/списки) */
.modal .modal-box,
.list,
#admin-scan-results{
    -ms-overflow-style:none;
    scrollbar-width:none;
}
.modal .modal-box::-webkit-scrollbar,
.list::-webkit-scrollbar,
#admin-scan-results::-webkit-scrollbar{
    width:0;
    height:0;
    display:none;
}

/* не допускаем горизонтальный скролл */
.page{ overflow-x:hidden; }

/* ===========================
   BACKGROUND & TITLEBAR
   =========================== */

.bg{
    position:fixed;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    z-index:-2;
    filter:saturate(1.05) contrast(1.05);
}
.bg-fallback{ z-index:-3; }

.titlebar{
    position:fixed;
    left:0;
    right:0;
    top:0;
    padding:8px 10px;
    z-index:5;
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
    background:linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.05));
    backdrop-filter: blur(6px) saturate(1.05);
    box-shadow:0 12px 28px var(--shadow);
}
.title-gradient{
    font-weight:900;
    letter-spacing:.12em;
    text-align:center;
    font-size:26px;
    background:linear-gradient(90deg,#ffcf73,#ffdba6,#fff,#ffdba6,#ffcf73);
    background-size:200% auto;
    -webkit-background-clip:text;
    background-clip:text;
    color:transparent;
    animation:shine 8s linear infinite;
    text-transform:uppercase;
}
@keyframes shine{
    0%{background-position:0 50%}
    100%{background-position:200% 50%}
}

/* Actions row — emoji only chips */
.actions{
    display:flex;
    gap:8px;
    justify-content:center;
    flex-wrap:wrap;
}
.chip{
    height:var(--chip-h);
    width:42px;
    min-width:42px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    font-size:18px;
    background:color-mix(in srgb, var(--paper) 92%, transparent);
    border:1px solid rgba(0,0,0,.08);
    box-shadow:0 2px 6px rgba(0,0,0,.12);
    cursor:pointer;
    user-select:none;
    transition:transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.chip:hover{
    transform:translateY(-1px);
    box-shadow:0 4px 10px rgba(0,0,0,.18);
}
.chip:focus-visible{
    outline:3px solid color-mix(in srgb, var(--blue) 40%, white);
}

/* ===========================
   LAYOUT & PANELS
   =========================== */

.safe{
    max-width:560px;
    width:100%;
    margin:0 auto;
    padding: calc(var(--titlebar-h, 108px) + 12px + env(safe-area-inset-top, 0px)) 12px 12px;
}
.content{
    margin-top:8px;
    display:grid;
    gap:16px;
    position:relative;
}
#content{
    overflow-x:hidden;
}

/* Panel (glass) */
.panel{
    background:var(--glass);
    backdrop-filter: blur(6px) saturate(1.05);
    border-radius:var(--radius);
    padding:12px;
    box-shadow:0 12px 28px var(--shadow);
    animation: panelFade var(--fade-dur) var(--fade-ease) both;
    overflow-x:hidden;           /* чтобы ничего не вылезало за края */
}

@keyframes panelFade{
    from{ opacity:0; transform: translateY(2px); }
    to  { opacity:1; transform: none; }
}

/* Cards / stats */
.stats{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(92px,1fr));
    gap:8px;
}
.card{
    background:rgba(255,255,255,.6);
    border-radius:14px;
    padding:10px;
    text-align:center;
    box-shadow: inset 0 2px 8px rgba(0,0,0,.08);
}
.card .label{ font-size:12px; opacity:.75; }
.card .value{ font-size:22px; font-weight:900; }

/* Divider */
.divider{
    display:flex;
    align-items:center;
    gap:8px;
    color:#74512f;
    opacity:.95;
}
.divider::before,
.divider::after{
    content:"";
    height:2px;
    flex:1;
    border-radius:2px;
    background:linear-gradient(90deg,transparent,#b47033,transparent);
}
.divider>span{
    display:flex;
    align-items:center;
    gap:6px;
    background:rgba(255,255,255,.72);
    padding:6px 10px;
    border-radius:999px;
}

/* ===========================
   BUTTONS
   =========================== */

.btn{
    appearance:none;
    border:none;
    cursor:pointer;
    user-select:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    padding:0 16px;
    height:var(--btn-h);
    border-radius:14px;
    font-weight:800;
    box-shadow:0 8px 18px rgba(0,0,0,.18), inset 0 -2px 0 rgba(0,0,0,.06);
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease, opacity .12s ease;
}
.btn:hover{
    transform:translateY(-1px);
    box-shadow:0 10px 22px rgba(0,0,0,.2);
}
.btn:active{ transform:translateY(0); }
.btn:disabled{
    opacity:.55;
    filter:saturate(.7);
    cursor:not-allowed;
    pointer-events:none;
}
.btn:focus-visible{
    outline:3px solid color-mix(in srgb, var(--blue) 35%, white);
}
.btn-lg{ height:var(--btn-h); }
.btn-sm{
    height:var(--btn-sm-h);
    padding:0 12px;
    font-weight:700;
}
.btn-primary{
    color:#3a2a17;
    background:linear-gradient(180deg,var(--brand2),var(--brand));
}
.btn-ghost{
    color:var(--ink);
    background:rgba(255,255,255,.6);
    border:1px solid rgba(0,0,0,.08);
    box-shadow:0 4px 10px rgba(0,0,0,.12);
}
.btn-success{
    color:#082b28;
    background:linear-gradient(180deg,var(--green),var(--green2));
}
.btn-danger{
    color:#fff;
    background:linear-gradient(180deg,var(--red),var(--red2));
}

.row{
    display:flex;
    gap:8px;
    align-items:center;
    min-width:0;
}
.row > *{ min-width:0; }

.muted{
    color:rgba(51,36,26,.72);
}

.input{
    appearance:none;
    width:100%;
    min-height:44px;
    padding:10px 12px;
    border-radius:14px;
    border:1px solid rgba(0,0,0,.12);
    background:rgba(255,255,255,.92);
    color:var(--ink);
    font:inherit;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.72), 0 4px 12px rgba(0,0,0,.05);
    transition:border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.input::placeholder{ color:rgba(51,36,26,.48); }
.input:focus{
    outline:none;
    border-color:rgba(27,181,168,.55);
    box-shadow:0 0 0 4px rgba(27,181,168,.12), inset 0 1px 0 rgba(255,255,255,.82);
}
textarea.input{ min-height:88px; resize:vertical; }
select.input{ padding-right:34px; }

.chip.small{
    width:auto;
    min-width:0;
    height:28px;
    padding:0 10px;
    font-size:12px;
    font-weight:800;
    line-height:1;
}

.task-card{
    grid-template-columns:minmax(0,1fr);
    gap:12px;
    padding:14px;
    border-radius:18px;
    background:linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.74));
    border:1px solid rgba(0,0,0,.05);
    box-shadow:0 12px 26px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.74);
}
.task-card.task-card-promo{
    background:linear-gradient(180deg, rgba(255,250,239,.97), rgba(255,242,208,.82));
    border-color:rgba(242,159,56,.34);
    box-shadow:0 14px 30px rgba(242,159,56,.16), inset 0 0 0 1px rgba(255,220,163,.64);
}
.task-card .m-desc{
    display:grid;
    gap:6px;
    white-space:normal;
    overflow:visible;
    text-overflow:unset;
}
.task-card-head{
    justify-content:space-between;
    align-items:flex-start;
    flex-wrap:wrap;
}
.task-card-title{
    font-size:16px;
    line-height:1.25;
}
.task-card-copy{
    display:block;
    white-space:normal;
    overflow-wrap:anywhere;
    line-height:1.35;
    color:rgba(51,36,26,.82);
}
.task-card-copy-strong{
    color:#4a3119;
    font-weight:800;
}
.task-actions{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    justify-content:flex-end;
}
.task-card-badges{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    align-items:center;
}
.task-card.task-card-completed{
    background:linear-gradient(180deg, rgba(248,250,248,.92), rgba(236,241,239,.80));
    border-color:rgba(122,147,133,.18);
    box-shadow:0 10px 22px rgba(0,0,0,.06), inset 0 1px 0 rgba(255,255,255,.72);
}
.quest-sections{
    display:grid;
    gap:12px;
}
.quest-section{
    display:grid;
    gap:8px;
}
.quest-sublist{
    display:grid;
    gap:10px;
}
.task-empty-card{
    display:grid;
    gap:6px;
    padding:16px 18px;
    border-radius:18px;
    background:linear-gradient(180deg, rgba(255,255,255,.88), rgba(243,247,245,.78));
    border:1px solid rgba(0,0,0,.05);
    box-shadow:0 10px 20px rgba(0,0,0,.06);
}
.task-empty-title{
    font-size:16px;
    font-weight:800;
    color:#3c2b1e;
}
.task-empty-copy{
    display:block;
    color:rgba(51,36,26,.76);
    line-height:1.4;
}
.quests-completed{
    display:grid;
    gap:10px;
    padding:10px;
    border-radius:20px;
    background:rgba(255,255,255,.32);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.6);
}
.quests-completed>summary{
    list-style:none;
    cursor:pointer;
    display:grid;
    gap:2px;
    padding:12px 14px;
    border-radius:16px;
    background:linear-gradient(180deg, rgba(255,255,255,.92), rgba(242,246,244,.84));
    box-shadow:0 8px 18px rgba(0,0,0,.06), inset 0 1px 0 rgba(255,255,255,.72);
    position:relative;
}
.quests-completed>summary::-webkit-details-marker{ display:none; }
.quests-completed>summary::after{
    content:'▾';
    position:absolute;
    right:14px;
    top:50%;
    transform:translateY(-50%);
    font-size:16px;
    font-weight:900;
    color:rgba(51,36,26,.7);
    transition:transform .12s ease;
}
.quests-completed[open]>summary::after{
    transform:translateY(-50%) rotate(180deg);
}
.quests-completed-title{
    display:block;
    padding-right:24px;
    font-weight:900;
    color:#33241a;
}
.quests-completed-copy{
    display:block;
    padding-right:24px;
    color:rgba(51,36,26,.7);
    line-height:1.3;
}
.quests-completed-body{
    display:grid;
    gap:10px;
}
.task-status-chip{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:28px;
    padding:0 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
    line-height:1;
    white-space:nowrap;
    border:1px solid transparent;
}
.task-status-chip.done{
    background:rgba(184,224,194,.95);
    color:#24533a;
    border-color:rgba(55,128,84,.18);
}
.task-status-chip.today{
    background:rgba(205,233,248,.95);
    color:#1d4c6c;
    border-color:rgba(70,132,173,.18);
}
.task-status-chip.cooldown{
    background:rgba(255,239,206,.95);
    color:#7a4d12;
    border-color:rgba(193,137,36,.22);
}
.admin-task-card .task-actions{
    justify-content:flex-start;
}

#panel-admin{
    background:linear-gradient(180deg, rgba(255,255,255,.78), rgba(237,244,240,.64));
}
#admin-tabs{
    justify-content:flex-start;
    align-items:stretch;
    gap:10px;
    margin:0 0 10px 0 !important;
    padding:8px;
    border-radius:22px;
    background:rgba(255,255,255,.38);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.6);
}
#admin-tabs .tab,
#admin-mint-fox{
    min-height:44px;
    background:rgba(255,255,255,.88);
    color:#2f2117;
    box-shadow:0 8px 18px rgba(0,0,0,.10);
}
#admin-tabs .tab.active{
    background:linear-gradient(135deg, rgba(39,191,181,.92), rgba(21,151,150,.92));
    color:#083a3a;
}
#admin-mint-fox{
    order:999;
    flex:1 1 100%;
    background:linear-gradient(180deg, rgba(255,226,177,.96), rgba(246,176,79,.92));
}
#panel-admin .admin-tab{
    display:grid;
    gap:14px;
}
#panel-admin .admin-tab > .list,
#panel-admin #admin-settings-form{
    background:rgba(255,255,255,.42);
    border-radius:24px;
    padding:14px;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.66), 0 12px 24px rgba(0,0,0,.06);
}
#panel-admin .admin-tab > .list > .row,
#panel-admin .admin-tab > .row,
#panel-admin #admin-settings-form > .row{
    background:rgba(255,255,255,.68);
    padding:12px 14px;
    border-radius:18px;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.74);
}
#panel-admin .admin-tab > .list > .divider{ margin:4px 0; }
#panel-admin label{ color:#6a4420; font-weight:700; }
#admin-tab-tasks #at_form_hint{
    display:block;
    padding:10px 12px;
    border-radius:14px;
    background:linear-gradient(135deg, rgba(255,248,234,.95), rgba(255,233,176,.76));
    color:#7a4f1d;
}
#admin-tab-tasks .task-card{ margin-top:0; }

@media (max-width:640px){
    #panel-admin .admin-tab > .list > .row,
    #panel-admin .admin-tab > .row,
    #panel-admin #admin-settings-form > .row{
        display:grid;
        grid-template-columns:minmax(0, 1fr);
        align-items:stretch;
    }
    #panel-admin .admin-tab label[style*="min-width"],
    #panel-admin #admin-settings-form label[style*="min-width"]{
        min-width:0 !important;
        width:100%;
    }
    #panel-admin .admin-tab > .list > .row > input.input,
    #panel-admin .admin-tab > .list > .row > select.input,
    #panel-admin .admin-tab > .list > .row > textarea.input,
    #panel-admin .admin-tab > .row > input.input,
    #panel-admin .admin-tab > .row > select.input,
    #panel-admin .admin-tab > .row > textarea.input,
    #panel-admin #admin-settings-form > .row > input.input,
    #panel-admin #admin-settings-form > .row > select.input,
    #panel-admin #admin-settings-form > .row > textarea.input{
        width:100%;
        max-width:none !important;
        min-width:0;
    }
    #panel-admin .admin-tab > .list > .row > textarea.input,
    #panel-admin .admin-tab > .row > textarea.input,
    #panel-admin #admin-settings-form > .row > textarea.input{
        min-height:96px;
    }
    #panel-admin .admin-tab > .list > .row > .muted,
    #panel-admin .admin-tab > .row > .muted,
    #panel-admin #admin-settings-form > .row > .muted,
    #admin-tab-tasks #at_form_hint{
        width:100%;
    }
    #panel-admin .admin-tab > .list > .row > .btn,
    #panel-admin .admin-tab > .row > .btn,
    #panel-admin #admin-settings-form > .row > .btn,
    #panel-admin .admin-tab > .list > .row > .tab,
    #panel-admin .admin-tab > .row > .tab{
        justify-self:start;
        max-width:100%;
    }
    .task-actions > .btn{
        flex:1 1 auto;
    }
}

/* Claim area — центровка */
.claim-area{
    display:grid;
    gap:8px;
    justify-items:center;
    text-align:center;
}
.claim-area .cooldown{ font-weight:700; font-size:14px; }
.claim-area .hint{ opacity:.8; font-size:13px; }

/* Wallet: чистые секции и центровка */
.wallet-section{
    display:grid;
    gap:8px;
    justify-items:center;
    text-align:center;
    margin-bottom:10px;
}
#panel-wallet .row{ justify-content:center; }
#panel-wallet .copy-inline{ justify-content:center; }

/* ===========================
   LISTS, MINERS, SHOP
   =========================== */

.shop{ min-height: var(--shop-h, 0px); }
.shop-item.placeholder .m-desc{ opacity:.65; font-style:italic; }
.shop-item.placeholder .badge{ opacity:.5; }

.miners,
.shop{
    display:grid;
    gap:10px;
    overflow-x:hidden;
}
.miner-item,
.shop-item{
    display:grid;
    grid-template-columns:1fr auto;
    gap:8px;
    align-items:center;
    background:rgba(255,255,255,.62);
    border-radius:12px;
    padding:10px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,.06);
}
.m-desc{ font-size:14px; }
.badge{
    background:rgba(0,0,0,.06);
    padding:4px 8px;
    border-radius:999px;
    font-weight:800;
}

/* Miner row: fix overflow on narrow screens */
.miner-item{
    grid-template-columns:minmax(0,1fr) max-content;
    overflow:hidden;
}
.m-desc{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

/* Внутри панели турнира разрешаем многострочный текст в описаниях */
#panel-tourney .miner-item .m-desc{
    white-space:normal;
    overflow-wrap:anywhere;
}

.badge{
    white-space:nowrap;
    font-variant-numeric:tabular-nums;
    max-width:10ch;
    overflow:hidden;
    text-overflow:ellipsis;
    flex:0 0 auto;
}
@media (max-width:420px){
    .badge{ padding:4px 8px; font-size:12px; }
}

/* Lists (универсальный контейнер) */
.list{
    display:grid;
    gap:10px;
}
.list.scroll-y{ overflow-y:auto; }

/* Копируемые поля */
.copy-inline{
    display:inline-flex;
    gap:6px;
    align-items:center;
}
.copy-inline input{
    width:260px;
    max-width:60vw;
    padding:6px 8px;
    border-radius:8px;
    border:1px solid #ccc;
    background:#fff;
    font-family:inherit;
    font-size:12px;
}
.copy-inline button{
    height:30px;
    padding:0 10px;
    border:none;
    border-radius:8px;
    cursor:pointer;
    background:rgba(0,0,0,.06);
}

/* Tabs */
.tabs{
    display:flex;
    gap:8px;
    justify-content:center;
    margin:-6px 0 4px 0;
    flex-wrap:wrap;
}
.tab{
    border:none;
    border-radius:999px;
    padding:6px 12px;
    cursor:pointer;
    font-weight:800;
    background:rgba(255,255,255,.65);
    transition:filter .12s ease, transform .12s ease;
}
.tab:hover{ filter:saturate(1.05); }
.tab.active{
    background:linear-gradient(180deg,var(--teal),var(--teal2));
    color:#082b28;
}

/* Utilities */
.hidden{ display:none!important; }
.scroll-y{ overflow:auto; }
.sticky-top{
    position:sticky;
    top:0;
    z-index:1;
    background:rgba(255,255,255,.9);
    backdrop-filter:blur(4px);
}

/* Responsive base */
@media (max-width:420px){
    .stats{ grid-template-columns:1fr 1fr; }
}

/* Collapse */
body.collapsed .page{ display:none; }
body.collapsed .title-gradient{ display:none; }
body.collapsed .titlebar{
    background:transparent;
    box-shadow:none;
    backdrop-filter:none;
}

/* ===========================
   MODALS
   =========================== */

.modal{
    position:fixed;
    inset:0;
    display:none;
    z-index:20;
    align-items:flex-start;
    justify-content:center;
    padding-top: calc(var(--titlebar-h, 108px) + 2px);
    background:rgba(0,0,0,.35);
}
.modal .modal-box{
    max-height:min(90vh, 1000px);
    overflow:auto;
    background:rgba(255,255,255,.92);
    color:#1a1310;
    border-radius:16px;
    padding:14px;
    box-shadow:0 12px 28px rgba(0,0,0,.35);
    position:relative;
    animation: panelFade var(--fade-dur) var(--fade-ease) both;
}
.modal .row{
    display:flex;
    gap:10px;
    align-items:center;
    flex-wrap:wrap;
}
.modal .row.right{ justify-content:flex-end; }
.modal .input{
    width:100%;
    padding:10px;
    border-radius:10px;
    border:1px solid #ccc;
    background:#fff;
}
.modal .muted{ opacity:.8; }
.modal.hidden{ display:none; }
.modal:not(.hidden){ display:flex; }

/* Упрощённый заголовок модалки рейтингов */
.modal .modal-header{
    position:static;
    margin:0 0 10px 0;
    padding:0;
    background:transparent;
    border-radius:0;
}
.modal .btn-close{ display:none; }

/* ===========================
   STATUS / PROGRESS
   =========================== */

.status-pill{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:4px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
    background:rgba(0,0,0,.06);
}
.status-pending{
    color:#7a4e00;
    background:linear-gradient(180deg,#ffe9b5,#ffd67a);
}
.status-approved{
    color:#0b4d44;
    background:linear-gradient(180deg,#bfeee7,#84dfd3);
}
.status-paid{
    color:#17440b;
    background:linear-gradient(180deg,#c6f3d9,#9eeabf);
}
.status-rejected{
    color:#5b1111;
    background:linear-gradient(180deg,#ffd1cf,#ff9f9a);
}

.progress{
    height:10px;
    border-radius:999px;
    background:rgba(0,0,0,.08);
    overflow:hidden;
}
.progress-bar{
    height:100%;
    width:0;
    background:linear-gradient(90deg, var(--teal), var(--teal2));
    transition: width .2s ease;
}

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

.promo-btn{
    position:absolute;
    top:8px;
    left:8px;
    padding:6px 10px;
    border-radius:10px;
    border:1px solid rgba(0,0,0,.08);
    background:rgba(255,255,255,.9);
    backdrop-filter:blur(6px);
    font-size:14px;
    line-height:1;
    cursor:pointer;
    z-index:12;
}
.promo-popover{
    position:absolute;
    top:44px;
    left:8px;
    width:min(92vw, 320px);
    padding:10px;
    border-radius:12px;
    border:1px solid rgba(0,0,0,.08);
    background:rgba(255,255,255,.98);
    box-shadow:0 8px 24px rgba(0,0,0,.08);
    z-index:13;
}
.promo-popover .promo-row{
    display:grid;
    grid-template-columns:1fr auto;
    gap:8px;
    align-items:center;
}
.promo-popover .input{ font-size:16px; } /* анти-зуум iOS */
.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;
}
#promo-msg.ok{ color:#0b4d44; }
#promo-msg.error{ color:#7a1b1b; }

/* ===========================
   NFT INVENTORY / CARDS
   =========================== */

.segmented{
    display:flex;
    gap:6px;
    justify-content:center;
    flex-wrap:wrap;
}
.segmented .seg{
    border:none;
    border-radius:999px;
    padding:6px 12px;
    font-weight:800;
    cursor:pointer;
    background:rgba(255,255,255,.7);
}
.segmented .seg.active{
    background:linear-gradient(180deg,var(--teal),var(--teal2));
    color:#082b28;
}

/* NFT filters responsive chips */
.nft-filters{
    display:grid;
    gap:10px;
    justify-items:stretch;
}
.chips{
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--chip-min, 96px), 1fr));
    gap:8px;
}
.chip.small{
    height:28px;
    min-width:auto;
    width:100%;
    padding:0 12px;
    font-size:12px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    background:rgba(255,255,255,.7);
    border-radius:999px;
    border:1px solid rgba(0,0,0,.06);
}
.chip.small.active{
    background:linear-gradient(180deg,var(--brand2),var(--brand));
    color:#082b28;
    border-color:transparent;
}

.nft-list details{
    background:rgba(255,255,255,.62);
    border-radius:12px;
    padding:8px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,.06);
}
.nft-list summary{
    cursor:pointer;
    font-weight:800;
    padding:4px 6px;
    border-radius:8px;
}
.nft-list summary::marker{ content:""; }
.nft-list .subhead{
    font-weight:800;
    opacity:.8;
    margin:6px 2px 4px;
}

.nft-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
}
.nft-card{
    position:relative;
    overflow:hidden;
    border-radius:12px;
    background:rgba(255,255,255,.8);
    padding:6px;
    display:grid;
    grid-template-rows:auto 1fr auto;
    gap:6px;
    cursor:pointer;
    box-shadow: inset 0 1px 6px rgba(0,0,0,.06);
}
.nft-card img{
    display:block;
    width:100%;
    aspect-ratio:4 / 3;
    height:auto;
    object-fit:cover;
    border-radius:8px;
}
.nft-card .title{
    font-weight:800;
    font-size:13px;
    white-space:nowrap;
    text-overflow:ellipsis;
    overflow:hidden;
}
.nft-card .meta{
    font-size:11px;
    opacity:.75;
}
.nft-card .badge-multi{
    position:absolute;
    top:6px;
    right:6px;
    background:rgba(0,0,0,.65);
    color:#fff;
    font-size:12px;
    font-weight:900;
    padding:2px 6px;
    border-radius:999px;
}

/* серый фильтр для отсутствующих */
.nft-card.dim img{
    filter: grayscale(1) saturate(.3) opacity(.7);
}

/* модалка NFT */
.nft-modal-content{ display:grid; gap:10px; }

/* NFT collection visuals: minted & detail square */
.nft-card img.minted{
    width:100%;
    aspect-ratio:1 / 1;
    object-fit:contain;
    object-position:center;
    background:#fff;
    padding:8px;
    border-radius:12px;
}
.nft-detail-img{
    width:100%;
    aspect-ratio:1 / 1;
    max-height:58vh;
    object-fit:contain;
    background:#fff;
    padding:10px;
    border-radius:14px;
    box-shadow: inset 0 1px 6px rgba(0,0,0,.06);
}
.nft-detail-meta{
    font-size:12px;
    opacity:.8;
}

/* ===========================
   TAIL DIVIDER
   =========================== */
/* Tail divider: заменён простой линией */
.tail-divider{
    height:2px;
    margin:8px 4px;
    border-radius:2px;
    background:linear-gradient(90deg, transparent, rgba(0,0,0,.15), transparent);
}

/* ===========================
   TOURNAMENT BUILDER
   =========================== */

.tourney-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    grid-template-areas:
        "fighter fighter fighter"
        "sphere1 arena   sphere2"
        "weapon  .       kimono";
    gap:10px;
    max-width:100%;
    width:100%;
    box-sizing:border-box;
}
/* базовый слот */
.slot{
    background:rgba(255,255,255,.85);
    border:1px dashed rgba(0,0,0,.15);
    border-radius:12px;
    padding:8px;
    display:flex;
    flex-direction:column;
    gap:6px;
    position:relative;
    cursor:pointer;
}
.slot .slot-title{
    font-weight:800;
    font-size:13px;
    opacity:.85;
}

/* квадратная зона под картинку */
.slot .slot-body{
    position:relative;
    width:100%;
    flex:1 1 auto;
    display:grid;
    place-items:center;
    aspect-ratio:1 / 1;
    min-height:0;
}

/* подпись снизу — реально нужна только у бойца */
.slot .slot-hint{
    font-size:12px;
    opacity:.7;
}

/* привязка к сетке */
.slot-big{   grid-area:fighter; }
.slot-wide{  grid-area:arena;   }
.slot[data-slot="sphere1"]{ grid-area:sphere1; }
.slot[data-slot="sphere2"]{ grid-area:sphere2; }
.slot[data-slot="weapon"] { grid-area:weapon;  }
.slot[data-slot="kimono"] { grid-area:kimono;  }

.slot.disabled{
    filter:saturate(.5);
    opacity:.6;
    pointer-events:none;
}
.slot.filled{
    border-style:solid;
    border-color:rgba(0,0,0,.12);
}

/* картинка строго заполняет квадрат */
.slot .thumb{
    width:100%;
    height:100%;
    object-fit:cover;
    border-radius:10px;
    box-shadow:0 2px 6px rgba(0,0,0,.12);
}

/* боец остаётся квадратом, просто крупным */
.slot-big .slot-body{ aspect-ratio:1 / 1; }
.slot-big .thumb{
    max-width:420px;
    max-height:420px;
}

/* кнопка "×" */
.slot .remove{
    position:absolute;
    top:6px;
    right:6px;
    border:none;
    background:rgba(0,0,0,.06);
    border-radius:999px;
    width:26px;
    height:26px;
    cursor:pointer;
}

/* пустой слот — плюсик */
.slot.empty .slot-body{ position:relative; }
.slot.empty .big-plus{
    width:72px;
    height:72px;
    border-radius:16px;
    border:2px dashed rgba(0,0,0,.25);
    display:grid;
    place-items:center;
    font-size:42px;
    font-weight:900;
    color:rgba(0,0,0,.35);
    background:rgba(255,255,255,.6);
    box-shadow:0 4px 12px rgba(0,0,0,.08);
}
.slot-big.empty .big-plus{
    width:96px;
    height:96px;
    font-size:56px;
}

/* нижняя пятёрка маленьких квадратов */
#tourney-extras{
    display:grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap:8px;
    padding:4px 0;
    width:100%;
    max-width:100%;
    overflow-x:hidden;
}

#tourney-extras .slot{
    padding:4px;
    min-width:0;
}

/* внутри — те же квадратные body */
#tourney-extras .slot .slot-body{
    aspect-ratio:1 / 1;
    min-height:0;
}

/* более мелкий плюсик, чтобы красиво влезал */
#tourney-extras .slot .big-plus{
    width:52px;
    height:52px;
    font-size:32px;
}

/* адаптив: сетка остаётся 3×3, просто колонки сжимаются */
@media (max-width:420px){
    .tourney-grid{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }
}

/* ===========================
   TOURNAMENT DUEL (VS)
   =========================== */

.tourney-duel{
    display:flex;
    align-items:stretch;
    justify-content:center;
    gap:8px;
    width:100%;
    max-width:100%;
    box-sizing:border-box;
    margin-top:6px;
}

.tourney-duel-card{
    flex:1 1 0;
    min-width:0;
    max-width:50%;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:4px;
    background:rgba(255,255,255,.85);
    border-radius:12px;
    padding:6px;
    box-shadow:inset 0 1px 6px rgba(0,0,0,.06);
}


.tourney-duel-meta{
    width:100%;
    max-width:140px;
    box-sizing:border-box;
    font-size:11px;
    line-height:1.15;
    text-align:center;
    padding:4px 6px;
    border-radius:10px;
    background:rgba(0,0,0,.04);
    box-shadow:inset 0 1px 4px rgba(0,0,0,.05);
}
.tourney-duel-meta b{ font-weight:900; }
.tourney-duel-meta .line{ display:block; }

@media (max-width:400px){
    .tourney-duel-meta{ max-width:110px; font-size:10px; padding:3px 5px; }
}

.tourney-duel-img{
    width:100%;
    max-width:140px;
    aspect-ratio:1 / 1;
    border-radius:10px;
    overflow:hidden;
    background:rgba(0,0,0,.06);
}

.tourney-duel-img img{
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
}

.tourney-duel-name{
    font-size:13px;
    font-weight:800;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    width:100%;
    text-align:center;
}

.tourney-duel-bonus{
    font-size:12px;
    opacity:.85;
    width:100%;
    text-align:center;
    line-height:1.15;
    /* важно для узких телефонов: процент/текст НЕ должен вылезать за край */
    white-space:normal;
    overflow-wrap:anywhere;
}

@media (max-width:400px){
    .tourney-duel-bonus{ font-size:11px; }
}
@media (max-width:360px){
    .tourney-duel-bonus{ font-size:10px; }
}

.tourney-duel-vs{
    flex:0 0 auto;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:900;
    font-size:18px;
    padding:0 4px;
}

@media (max-width:400px){
    .tourney-duel{ gap:6px; }
    .tourney-duel-img{ max-width:110px; }
    .tourney-duel-name{ font-size:12px; }
    .tourney-duel-bonus{ font-size:11px; }
}

/* ===========================
   PANELS / SUBNAV / FAB / ADMIN
   =========================== */

#panel-tourney .pad{
    overflow-x:hidden;       /* не даём конструктору вытаскивать горизонтальный скролл */
}

/* FAB */
.fab{
    position:fixed;
    right:14px;
    bottom:22px;
    width:56px;
    height:56px;
    border-radius:50%;
    background:linear-gradient(180deg,#ffc46a,#ff9b3a);
    box-shadow:0 10px 22px rgba(0,0,0,.22), inset 0 -2px 0 rgba(0,0,0,.15);
    border:none;
    cursor:pointer;
    z-index:15;
    font-size:26px;
    line-height:1;
    display:grid;
    place-items:center;
}
.fab:hover{ transform:translateY(-1px); }
.fab.hidden{ display:none; }

/* Админка: кнопки действий под карточкой */
.item-actions{
    grid-column:1 / -1;
    justify-content:flex-end;
    margin-top:6px;
}

/* Panels (full-screen views) */
.subnav{
    position:sticky;
    top:0;
    z-index:2;
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-wrap:nowrap;
    gap:8px;
    padding:8px 10px;
    margin:-6px -6px 8px -6px;
    background:linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.80));
    backdrop-filter:blur(6px);
    border-radius:12px;
    box-shadow:0 6px 16px rgba(0,0,0,.10);
}
.subnav .title{
    font-weight:900;
    letter-spacing:.02em;
    color:#3a2a17;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.page > .content.panel{
    background:var(--glass);
    border-radius:var(--radius);
    padding:12px;
    box-shadow:0 12px 28px var(--shadow);
    will-change:opacity, transform;
    animation: panelFade var(--fade-dur) var(--fade-ease) both;
}

/* Единый ряд для кнопок возврата */
#back-profile,
#back-refs,
#back-quests,
#back-wallet,
#back-ranks,
#back-admin,
#back-halloween,
#back-nft{
    min-width:86px;
}

/* Внутри panel-quests: секция рекламы не должна прыгать */
#quests-ads .progress{ margin-top:6px; }

/* Мелкий косметический фикс: заголовки секций в панелях */
.panel .divider{ margin-top:8px; }

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

.game-controls{
    display:grid;
    gap:8px;
    justify-items:center;
    text-align:center;
}
.game-controls .btn{
    width:min(100%, 420px);
}
.game-guess{
    display:grid;
    gap:8px;
    justify-items:center;
    text-align:center;
}
.mask{
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size:20px;
    letter-spacing:.18em;
    font-weight:800;
    background:rgba(255,255,255,.66);
    padding:8px 12px;
    border-radius:10px;
}

/* Guess Game — difficulty row */
#panel-games #game-difficulty{
    display:flex;
    gap:8px;
    justify-content:center;
    flex-wrap:wrap;
}
#panel-games .chip-diff{
    width:40px;
    height:40px;
    border-radius:999px;
    font-weight:900;
}
#panel-games .chip-diff.active{
    background:linear-gradient(180deg,var(--green),var(--green2));
    color:#082b28;
    border-color:transparent;
    box-shadow:0 6px 14px rgba(25,194,127,.35);
}

/* Guess Game layout hardening */
#panel-games .game-controls,
#panel-games .game-guess{
    display:grid;
    gap:8px;
    justify-items:center;
    text-align:center;
    width:100%;
}
#panel-games img{
    max-width:100%;
    height:auto;
    display:block;
    border-radius:10px;
}

/* Маска — не растягивать экран, прокрутка по необходимости */
#panel-games .mask{
    max-width:100%;
    overflow-x:auto;
    text-align:center;
    margin-inline:auto;
}

/* Активный раунд / поле ответа / прошлый раунд — центрируем */
#panel-games #game-active,
#panel-games #game-guess-box,
#panel-games #last-wrap{
    width:100%;
    max-width:520px;
    margin:0 auto;
}

/* Внутренние тексты не раздвигают контейнер */
#panel-games .m-desc,
#panel-games #game-hint-excerpt{
    word-break:break-word;
    overflow-wrap:anywhere;
}

/* Изображение в активной карточке — всегда «в рамке» */
#panel-games #game-active img{
    display:block;
    width:100%;
    height:auto;
    max-height:min(60vh, 520px);
    object-fit:cover;
    border-radius:10px;
}

/* Поле ответа: ряд не ломает макет */
#panel-games #game-guess-box .row{
    width:100%;
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    justify-content:center;
}
#panel-games #game-guess-input{
    flex:1 1 240px;
    min-width:0;
    max-width:420px;
}
#panel-games #game-guess-send{
    flex:0 0 auto;
}

/* Сворачиваемый «Прошлый раунд» */
#last-wrap{
    background:transparent;
    border:none;
    padding:0;
}
#last-wrap > summary{
    list-style:none;
    cursor:pointer;
    display:flex;
    justify-content:center;
    padding:6px 10px;
    border-radius:999px;
    border:1px solid rgba(0,0,0,.08);
    background:rgba(255,255,255,.7);
    font-weight:800;
}
#last-wrap[open] > summary{
    background:linear-gradient(180deg,var(--teal),var(--teal2));
    color:#082b28;
}

/* Game timers */
.lobby-timer{
    font-weight:900;
    font-size:42px;
    letter-spacing:.04em;
    font-variant-numeric:tabular-nums;
}
.round-timer{
    font-weight:900;
    font-size:28px;
    line-height:1;
    letter-spacing:.04em;
    font-variant-numeric:tabular-nums;
    background:rgba(255,255,255,.75);
    padding:8px 12px;
    border-radius:10px;
    display:inline-block;
    box-shadow: inset 0 1px 8px rgba(0,0,0,.06);
}
#gs-active-timer{ text-align:center; }

#gs-lobby-wrap.hidden{ display:none!important; }
#gs-lobby-wrap{ margin-top:8px; }
#gs-lobby-divider span{ font-weight:900; }
#gs-lobby{ text-align:center; }
#gs-lobby-mmss{
    font-weight:900;
    font-size:42px;
    line-height:1;
    letter-spacing:.04em;
}
#gs-lobby-sub{ opacity:.85; }

/* карточка и изображение не вылезают из родителя */
#panel-games .card{ overflow:hidden; }

/* ===========================
   BESTIARY
   =========================== */

#panel-bestiary #bestiary-grid{
    display:grid;
    grid-template-columns:repeat(2, 1fr);
    gap:8px;
}
.best-card{
    background:rgba(255,255,255,.75);
    border-radius:12px;
    padding:6px;
    box-shadow:inset 0 1px 6px rgba(0,0,0,.06);
    cursor:pointer;
    display:grid;
    gap:6px;
}
.best-card img{
    width:100%;
    aspect-ratio:1/1;
    object-fit:cover;
    border-radius:10px;
    display:block;
}
.best-card .title{
    text-align:center;
    font-weight:900;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.best-card .meta{
    text-align:center;
    font-size:12px;
    opacity:.78;
    line-height:1.25;
}
@media (max-width:380px){
    #panel-bestiary #bestiary-grid{ grid-template-columns:1fr; }
}

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

#panel-halloween .subnav .title{ min-width:0; flex:1 1 auto; }
#panel-halloween .row{ flex-wrap:wrap; }
#panel-halloween .row .btn{
    flex:1 1 220px;
    min-width:180px;
}
@media (max-width:420px){
    #panel-halloween .row .btn{ flex-basis:100%; }
}
#panel-halloween .card{ overflow:hidden; }
#panel-halloween .card table{
    width:100%;
    table-layout:fixed;
}
#panel-halloween .card th,
#panel-halloween .card td{
    word-break:break-word;
}

/* ===========================
   FANFARE (COINS / REWARDS)
   =========================== */

.fanfare{
    pointer-events:none;
    position:fixed;
    inset:0;
    z-index:50;
    display:grid;
    place-items:center;
    animation: fadeOut 1.4s var(--fade-ease) both;
}
.fanfare-burst{
    width:120px;
    height:120px;
    border-radius:999px;
    background: radial-gradient(closest-side, rgba(255,255,255,.9), rgba(255,255,255,.0) 70%);
    filter:blur(1px);
    animation: scalePop .32s cubic-bezier(.2,1.1,.2,1) both;
}
@keyframes scalePop{
    from{ transform:scale(.75); opacity:0; }
    to  { transform:scale(1);   opacity:1; }
}
@keyframes fadeOut{
    0%{opacity:1}
    70%{opacity:1}
    100%{opacity:0}
}

.confetti{
    --i:0;
    position:absolute;
    width:10px;
    height:10px;
    border-radius:2px;
    top:50%;
    left:50%;
    transform: translate(-50%,-50%) rotate(calc(var(--i) * 20deg));
    background:hsl(calc(var(--i)*20deg), 85%, 60%);
    animation: confettiFly 1.1s ease-out forwards;
}
@keyframes confettiFly{
    0%{
        transform: translate(-50%,-50%) rotate(0deg) scale(1);
        opacity:1;
    }
    80%{ opacity:1; }
    100%{
        transform:
                translate(calc(-50% + (cos(var(--i))*120px)),
                calc(-50% - (sin(var(--i))*140px)))
                rotate(360deg) scale(.9);
        opacity:0;
    }
}
.fanfare .confetti:nth-child(odd){ border-radius:50%; }

/* ===========================
   MAINTENANCE CURTAIN
   =========================== */

.curtain{
    position:fixed;
    inset:0;
    z-index:100000;
    display:grid;
    place-items:center;
    background:rgba(0,0,0,.45);
    backdrop-filter:blur(4px) saturate(1.05);
    animation: curtainFade var(--fade-dur,300ms) var(--fade-ease,cubic-bezier(.2,.65,.2,1)) both;
}
.curtain.hidden{ display:none; }
.curtain-box{
    max-width:520px;
    width:calc(100% - 32px);
    border-radius:16px;
    padding:16px 14px;
    background:rgba(255,255,255,.96);
    color:#1a1310;
    text-align:center;
    box-shadow:0 18px 40px rgba(0,0,0,.35);
    animation: panelFade var(--fade-dur,300ms) var(--fade-ease,cubic-bezier(.2,.65,.2,1)) both;
}
.curtain-title{
    font-weight:900;
    font-size:20px;
    letter-spacing:.02em;
    margin-bottom:6px;
}
.curtain-sub{
    opacity:.85;
    font-size:14px;
}
.curtain-meta{
    display:block;
    margin-top:8px;
    opacity:.7;
}
.curtain-help{
    margin-top:10px;
    font-size:13px;
    line-height:1.45;
    opacity:.9;
}
.curtain-help b{ font-weight:800; }
.curtain-actions .btn{ min-width:170px; }
.curtain-copy-status{
    min-height:18px;
    margin-top:8px;
    font-size:12px;
    opacity:.78;
}
@keyframes curtainFade{
    from{opacity:0}
    to  {opacity:1}
}

/* ===========================
   MISC
   =========================== */

body.ws-open .page{ pointer-events:none; }

/* ===========================
   TOURNAMENT BANNER
   =========================== */

.tourney-banner{
    display:flex;
    flex-wrap:wrap;
    align-items:flex-start;
    justify-content:space-between;
    gap:8px;
    padding:8px 10px;
    border-radius:12px;
    background:linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,245,220,.96));
    box-shadow:0 6px 14px rgba(0,0,0,.18);
    font-size:13px;
    margin-top:4px;

    width:100%;
    max-width:100%;
    min-width:0;
    box-sizing:border-box;
}
.tourney-banner .tb-text{
    display:flex;
    flex-direction:column;
    gap:2px;
    min-width:0;
    flex:1 1 auto;
}
.tourney-banner strong{
    font-size:14px;
}
.tourney-banner span{
    white-space:nowrap;
    text-overflow:ellipsis;
    overflow:hidden;
}
.tourney-banner .btn{
    flex-shrink:0;
    flex:0 0 auto;
}

/* На узких экранах баннер складывается в колонку:
   текст сверху, кнопка отдельной строкой, по ширине панели. */
@media (max-width:420px){
    .tourney-banner{
        flex-direction:column;
        align-items:flex-start;
    }
    .tourney-banner .btn{
        width:100%;
        justify-content:center;
        margin-top:4px;
    }
}
/* tourney: hardening WITHOUT breaking square images */
#panel-tourney{ max-width:100%; }
#panel-tourney *{ max-width:100%; }

/* Общие картинки в турнире — только ограничение по ширине (НЕ трогаем height) */
#panel-tourney img{ max-width:100%; display:block; }

/* Квадратные превью в конструкторе */
#panel-tourney .slot .thumb{
    width:100%;
    height:100%;
    object-fit:cover;
}

/* Квадратные картинки в дуэли (ВАЖНО: перебиваем старый height:auto) */
#panel-tourney .tourney-duel-img img{
    width:100%;
    height:100%;
    object-fit:contain;
}

/* ultra-narrow fallback */
@media (max-width: 340px){
    .tourney-duel{ flex-wrap:wrap; }
    .tourney-duel-card{ max-width:100%; flex:1 1 100%; }
    .tourney-duel-vs{ width:100%; padding:6px 0; }
}
/* Battle cards should be vertical, not 2-column miner grid */
#panel-tourney .tourney-dep-item{
    display:flex;
    flex-direction:column;
    gap:8px;
}
#panel-tourney .tourney-dep-item > *{ width:100%; }
/* ===========================
   PICK MODAL (tourney picker) — cards with images
   =========================== */

#modal-pick #t-pick-list{
    display:grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap:8px;
}

#modal-pick .pick-card{
    background:rgba(255,255,255,.78);
    border-radius:12px;
    padding:6px;
    display:grid;
    gap:6px;
    cursor:pointer;
    box-shadow: inset 0 1px 6px rgba(0,0,0,.06);
}

#modal-pick .pick-thumb-wrap{
    position:relative;
    width:100%;
    aspect-ratio: 1 / 1;
    border-radius:10px;
    overflow:hidden;
    background:rgba(0,0,0,.06);
}

#modal-pick .pick-thumb-wrap img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

#modal-pick .pick-badge{
    position:absolute;
    right:6px;
    top:6px;
    background:rgba(0,0,0,.65);
    color:#fff;
    font-weight:900;
    font-size:12px;
    padding:2px 6px;
    border-radius:999px;
}

#modal-pick .pick-title{
    font-weight:900;
    font-size:13px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

#modal-pick .pick-sub{
    font-size:11px;
    opacity:.8;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

@media (max-width:380px){
    #modal-pick #t-pick-list{ grid-template-columns:1fr; }
}
#modal-pick .pick-card.disabled{
    opacity:.45;
    filter: grayscale(1) saturate(.2);
    cursor:not-allowed;
}

#modal-pick .pick-card.disabled .pick-thumb-wrap img{
    filter: grayscale(1) saturate(.2) opacity(.85);
}

#modal-pick .pick-lock{
    font-size:11px;
    font-weight:800;
    opacity:.9;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
/* ===== TOURNAMENT: fighter line (for finals / results) ===== */
.fighter-line{
    display:flex;
    gap:10px;
    align-items:center;
    min-width:0;
}
.fighter-line .img{
    width:44px;
    height:44px;
    border-radius:10px;
    overflow:hidden;
    background:rgba(0,0,0,.06);
    flex:0 0 auto;
}
.fighter-line .img img{
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
}
.fighter-line .txt{
    min-width:0;
}
.fighter-line .txt strong{
    display:block;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.fighter-line .txt small{
    display:block;
    opacity:.85;
    white-space:normal;
    overflow-wrap:anywhere;
}


/* ===== TOURNAMENT RESULTS / BANNER UPGRADE ===== */
#panel-tourney-results .miner-item{
    grid-template-columns:minmax(0,1fr);
    align-items:flex-start;
}
#panel-tourney-results .miner-item .m-desc{
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
    overflow-wrap:anywhere;
}

.tourney-final-wrap{
    display:grid;
    gap:14px;
}
.tourney-final-hero{
    position:relative;
    overflow:hidden;
    padding:14px;
    border-radius:22px;
    background:linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,255,255,.72));
    box-shadow:0 14px 32px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.55);
}
.tourney-final-hero.tone-light{
    background:radial-gradient(circle at 15% 20%, rgba(255,222,102,.30), transparent 35%), linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,246,204,.80));
}
.tourney-final-hero.tone-dark{
    background:radial-gradient(circle at 85% 18%, rgba(106,72,255,.24), transparent 35%), linear-gradient(135deg, rgba(255,255,255,.95), rgba(229,220,255,.78));
}
.tourney-final-topline{
    display:flex;
    gap:8px;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    margin-bottom:10px;
}
.tourney-final-kicker,
.tourney-final-winner,
.tb-chip{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:6px 10px;
    border-radius:999px;
    font-weight:800;
    font-size:12px;
    background:rgba(0,0,0,.06);
    box-shadow:inset 0 1px 2px rgba(255,255,255,.5);
}
.tourney-final-winner.tone-light,
.tb-chip.win{
    background:linear-gradient(135deg, rgba(255,222,102,.92), rgba(255,190,64,.92));
    color:#452b00;
}
.tourney-final-winner.tone-dark{
    background:linear-gradient(135deg, rgba(126,93,255,.95), rgba(76,52,190,.92));
    color:#fff;
}
.tourney-final-winner.tone-draw{
    background:linear-gradient(135deg, rgba(168,168,168,.95), rgba(118,118,118,.92));
    color:#fff;
}
.tourney-final-versus,
.tb-versus{
    display:grid;
    grid-template-columns:1fr auto 1fr;
    gap:10px;
    align-items:center;
}
.tourney-final-vs,
.tb-vs{
    width:56px;
    height:56px;
    border-radius:50%;
    display:grid;
    place-items:center;
    font-size:18px;
    font-weight:900;
    color:#fff;
    background:radial-gradient(circle at 30% 30%, rgba(255,180,74,1), rgba(220,95,32,1));
    box-shadow:0 8px 20px rgba(220,95,32,.35);
}
.tourney-hero-fighter,
.tb-side{
    display:grid;
    justify-items:center;
    gap:6px;
    text-align:center;
    padding:10px;
    border-radius:18px;
    background:rgba(255,255,255,.65);
    border:1px solid rgba(0,0,0,.07);
    min-width:0;
}
.tourney-hero-fighter.winner,
.tb-side.winner{
    box-shadow:0 0 0 2px rgba(255,192,71,.45), 0 10px 22px rgba(255,192,71,.18);
    transform:translateY(-2px);
}
.thf-label,
.tb-side-label{
    font-size:12px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.04em;
    opacity:.78;
}
.thf-image,
.tb-avatar{
    width:min(32vw, 132px);
    aspect-ratio:1/1;
    border-radius:20px;
    overflow:hidden;
    display:grid;
    place-items:center;
    background:radial-gradient(circle at 30% 30%, rgba(255,255,255,.8), rgba(0,0,0,.08));
    box-shadow:inset 0 1px 5px rgba(255,255,255,.55), 0 8px 18px rgba(0,0,0,.12);
}
.thf-image img,
.tb-avatar img{
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
}
.thf-name,
.tb-side-name{
    font-weight:900;
    font-size:14px;
    line-height:1.2;
    overflow-wrap:anywhere;
}
.thf-meta,
.tb-side-score{
    font-size:12px;
    opacity:.8;
    overflow-wrap:anywhere;
}
.tourney-final-pills{
    margin-top:12px;
    display:grid;
    grid-template-columns:repeat(3, minmax(0,1fr));
    gap:8px;
}
.trc-metric{
    display:flex;
    flex-direction:column;
    gap:4px;
    padding:9px 10px;
    border-radius:14px;
    background:rgba(255,255,255,.78);
    border:1px solid rgba(0,0,0,.06);
}
.trc-metric span{
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:.04em;
    opacity:.7;
}
.trc-metric strong{
    font-size:15px;
    line-height:1.1;
}
.trc-metric.spent strong{ color:#a44b07; }
.trc-metric.prize strong,
.trc-metric.mine strong,
.trc-metric.positive strong{ color:#0a7f46; }
.trc-metric.negative strong{ color:#b23c3c; }
.tourney-final-note{
    margin-top:10px;
    font-size:12px;
    line-height:1.45;
    opacity:.82;
}
.tourney-section-block,
.tourney-side-panel,
.tourney-rounds-wrap{
    padding:12px;
    border-radius:20px;
    background:rgba(255,255,255,.72);
    box-shadow:0 8px 24px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.55);
}
.tourney-section-title{
    display:inline-flex;
    align-items:center;
    gap:6px;
    margin-bottom:10px;
    padding:6px 12px;
    border-radius:999px;
    background:rgba(255,255,255,.75);
    font-weight:900;
    font-size:14px;
}
.tourney-result-grid,
.tsp-podium,
.tourney-more-list{
    display:grid;
    gap:10px;
}
.tourney-two-col{
    display:grid;
    grid-template-columns:repeat(2, minmax(0,1fr));
    gap:14px;
}
.tsp-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:8px;
    margin-bottom:10px;
}
.tsp-title{
    font-size:20px;
    font-weight:900;
    line-height:1;
}
.tsp-sub{
    margin-top:4px;
    font-size:12px;
    opacity:.8;
}
.tsp-badge,
.trc-side{
    display:inline-flex;
    align-items:center;
    padding:4px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
    background:rgba(0,0,0,.06);
}
.tsp-badge.tone-light,
.trc-side.tone-light{ background:rgba(255,215,0,.22); color:#7d5400; }
.tsp-badge.tone-dark,
.trc-side.tone-dark{ background:rgba(115,82,255,.18); color:#4d31a6; }
.tsp-badge.tone-draw,
.trc-side.tone-draw{ background:rgba(145,145,145,.18); color:#555; }
.tourney-result-card{
    display:grid;
    grid-template-columns:auto 92px minmax(0,1fr);
    gap:12px;
    align-items:center;
    padding:12px;
    border-radius:20px;
    background:rgba(255,255,255,.88);
    border:1px solid rgba(0,0,0,.07);
    box-shadow:0 8px 20px rgba(0,0,0,.08);
    position:relative;
    overflow:hidden;
}
.tourney-result-card::after{
    content:"";
    position:absolute;
    inset:auto -30% -60% auto;
    width:180px;
    height:180px;
    border-radius:50%;
    background:radial-gradient(circle, rgba(255,255,255,.28), transparent 70%);
    pointer-events:none;
}
.tourney-result-card.tone-light{ background:linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,246,204,.78)); }
.tourney-result-card.tone-dark{ background:linear-gradient(135deg, rgba(255,255,255,.92), rgba(232,225,255,.80)); }
.tourney-result-card.inactive{ filter:saturate(.72); opacity:.94; }
.tourney-result-card.mine{ box-shadow:0 0 0 2px rgba(56,143,245,.18), 0 10px 24px rgba(56,143,245,.12); }
.tourney-result-card.leader-gold{ box-shadow:0 0 0 2px rgba(255,201,71,.52), 0 14px 32px rgba(255,201,71,.18); }
.tourney-result-card.leader-silver{ box-shadow:0 0 0 2px rgba(198,206,220,.52), 0 14px 32px rgba(198,206,220,.18); }
.tourney-result-card.leader-bronze{ box-shadow:0 0 0 2px rgba(201,142,82,.45), 0 14px 32px rgba(201,142,82,.15); }
.trc-rank{
    align-self:stretch;
    min-width:48px;
    display:grid;
    place-items:center;
    padding:8px 10px;
    border-radius:14px;
    font-weight:900;
    font-size:18px;
    background:rgba(0,0,0,.06);
}
.tourney-result-card.leader-gold .trc-rank{ background:linear-gradient(180deg, rgba(255,226,119,.98), rgba(255,187,56,.92)); color:#613c00; }
.tourney-result-card.leader-silver .trc-rank{ background:linear-gradient(180deg, rgba(239,242,247,.98), rgba(195,203,216,.92)); color:#465365; }
.tourney-result-card.leader-bronze .trc-rank{ background:linear-gradient(180deg, rgba(226,183,138,.96), rgba(186,120,63,.92)); color:#4f2b07; }
.trc-thumb{
    width:92px;
    aspect-ratio:1/1;
    border-radius:18px;
    overflow:hidden;
    display:grid;
    place-items:center;
    background:radial-gradient(circle at 30% 30%, rgba(255,255,255,.8), rgba(0,0,0,.08));
    box-shadow:inset 0 1px 5px rgba(255,255,255,.55), 0 8px 16px rgba(0,0,0,.08);
}
.trc-thumb img{
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
}
.trc-thumb-placeholder{
    font-size:30px;
    opacity:.45;
}
.trc-main{ min-width:0; display:grid; gap:6px; }
.trc-head{
    display:flex;
    justify-content:space-between;
    gap:8px;
    align-items:flex-start;
    flex-wrap:wrap;
}
.trc-head h4{
    margin:0;
    font-size:22px;
    line-height:1.05;
    font-weight:900;
    overflow-wrap:anywhere;
}
.trc-sub,
.trc-scoreline,
.trc-note{
    font-size:13px;
    line-height:1.35;
    overflow-wrap:anywhere;
}
.trc-note{ opacity:.76; }
.trc-metrics-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0,1fr));
    gap:8px;
}
.tourney-empty-card{
    padding:16px;
    border-radius:18px;
    background:rgba(255,255,255,.66);
    border:1px dashed rgba(0,0,0,.15);
    font-size:14px;
    opacity:.8;
}
.tourney-more-block{
    margin-top:10px;
    border-radius:16px;
    background:rgba(255,255,255,.62);
    border:1px solid rgba(0,0,0,.06);
    padding:10px;
}
.tourney-more-block summary{
    cursor:pointer;
    font-weight:800;
    list-style:none;
}
.tourney-more-block summary::-webkit-details-marker{ display:none; }
.tourney-more-block.muted{
    background:rgba(255,255,255,.46);
}
.tourney-round-list{ display:grid; gap:8px; margin-top:10px; }
.tourney-round-match{
    padding:10px 12px;
    border-radius:14px;
    background:rgba(255,255,255,.8);
    border:1px solid rgba(0,0,0,.06);
    display:grid;
    gap:4px;
}
.tourney-round-users{
    font-weight:800;
    overflow-wrap:anywhere;
}
.tourney-round-users span{ opacity:.5; margin:0 6px; }
.tourney-round-score{
    font-size:16px;
    font-weight:900;
}
.tourney-round-result{
    font-size:12px;
    opacity:.78;
}
.tb-simple{ display:grid; gap:4px; }
.tb-lead{ font-size:18px; font-weight:900; }
.tb-sub{ font-size:13px; line-height:1.35; opacity:.9; }
.tourney-banner{
    align-items:stretch;
}
.tourney-banner .tb-text{
    min-width:0;
    display:grid;
    gap:8px;
}
.tourney-banner .tb-text strong{ white-space:normal; }
.tourney-banner .tb-text #tourney-banner-text{ display:grid; gap:8px; }
.tourney-banner.is-finished{
    background:linear-gradient(135deg, rgba(255,255,255,.84), rgba(255,236,197,.74));
    box-shadow:0 12px 30px rgba(216,123,31,.16), inset 0 1px 0 rgba(255,255,255,.6);
}
.tb-finale{ display:grid; gap:10px; }
.tb-topline{ display:flex; gap:6px; flex-wrap:wrap; }
.tb-popup-hero,
.tb-popup-best{
    padding:10px 12px;
    border-radius:16px;
    background:rgba(255,255,255,.8);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.5);
}
.tb-popup-title{ font-size:18px; font-weight:900; }
.tb-popup-sub{ font-size:13px; opacity:.82; margin-top:4px; }

@media (max-width:860px){
    .tourney-two-col{ grid-template-columns:1fr; }
}
@media (max-width:640px){
    .tourney-final-versus,
    .tb-versus,
    .tourney-result-card{
        grid-template-columns:1fr;
    }
    .tourney-final-vs,
    .tb-vs{
        width:44px;
        height:44px;
        margin:0 auto;
    }
    .tourney-final-pills,
    .trc-metrics-grid{
        grid-template-columns:1fr;
    }
    .trc-thumb,
    .thf-image,
    .tb-avatar{
        width:min(52vw, 140px);
        margin:0 auto;
    }
    .trc-rank{
        align-self:start;
        width:max-content;
    }
    .trc-head h4{
        font-size:18px;
    }
}

/* ===== builds list: fighter thumbnail ===== */
.build-fighter{
    display:inline-flex;
    align-items:center;
    gap:8px;
    vertical-align:middle;
}
.build-fighter .img{
    width:34px;
    height:34px;
    border-radius:10px;
    overflow:hidden;
    background:rgba(0,0,0,.06);
    flex:0 0 auto;
}
.build-fighter .img img{
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
}
.build-fighter .val code{
    white-space:nowrap;
}
/* ===========================
   TOURNEY CUTSCENES (portal / fight)
   =========================== */

body.cutscene-open{
    overflow:hidden;
}

.tourney-cutscene{
    position:fixed;
    inset:0;
    z-index:60;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(0,0,0,.92);
    opacity:0;
    pointer-events:none;
    transition:opacity .22s var(--fade-ease, ease);
}
.tourney-cutscene.show{
    opacity:1;
    pointer-events:auto;
}

.tourney-cutscene .tcs-video{
    width:min(92vw, 520px);
    max-height:86vh;
    border-radius:18px;
    box-shadow:0 12px 28px rgba(0,0,0,.45);
    background:#000;
}

.tourney-cutscene .tcs-dim{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.86);
    opacity:0;
    transition:opacity .22s var(--fade-ease, ease);
}
.tourney-cutscene.dim .tcs-dim{ opacity:1; }
.tourney-cutscene.dim .tcs-video{ opacity:0; transition:opacity .22s var(--fade-ease, ease); }

.tourney-cutscene .tcs-msg{
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    opacity:0;
    pointer-events:none;
    transition:opacity .22s var(--fade-ease, ease);
}
.tourney-cutscene.msg .tcs-msg{
    opacity:1;
    pointer-events:auto;
}

.tourney-cutscene .tcs-msg-box{
    width:min(92vw, 460px);
    background:rgba(255,255,255,.92);
    color:#1a1310;
    border-radius:16px;
    padding:16px;
    box-shadow:0 12px 28px rgba(0,0,0,.35);
    text-align:center;
}
.tourney-cutscene .tcs-msg-title{
    font-weight:900;
    font-size:16px;
    margin-bottom:6px;
}
.tourney-cutscene .tcs-msg-text{
    opacity:.9;
    line-height:1.35;
}


/* Weekly TON block */
.weekly-ton{ text-align:left; }
.weekly-ton .wt-line{ display:flex; gap:8px; align-items:center; justify-content:flex-start; margin:6px 0; }
.weekly-ton .wt-icon{ width:22px; display:inline-block; text-align:center; }
.weekly-ton .wt-days{ display:flex; flex-wrap:wrap; gap:6px; margin:6px 0 10px 30px; }
.weekly-ton .wt-day{ width:28px; display:flex; flex-direction:column; align-items:center; font-size:12px; opacity:.8; }
.weekly-ton .wt-day.ok{ opacity:1; }
.weekly-ton .wt-day .wt-day-top{ font-size:11px; line-height:12px; }
.weekly-ton .wt-day .wt-day-icon{ font-size:14px; line-height:14px; }


/* ===== TOURNAMENT GLAMOUR MODE v1.0.12 ===== */
@keyframes tourneyGlowPulse {
  0%,100% { transform:translateY(0); box-shadow:0 18px 40px rgba(0,0,0,.14), 0 0 0 1px rgba(255,255,255,.18) inset; }
  50% { transform:translateY(-2px); box-shadow:0 26px 52px rgba(0,0,0,.18), 0 0 24px rgba(255,190,74,.18), 0 0 0 1px rgba(255,255,255,.24) inset; }
}
@keyframes tourneyShineSweep {
  0% { transform:translateX(-120%) skewX(-18deg); opacity:0; }
  12% { opacity:.8; }
  50% { opacity:.16; }
  100% { transform:translateX(220%) skewX(-18deg); opacity:0; }
}
@keyframes tourneyVsPulse {
  0%,100% { transform:scale(1); box-shadow:0 12px 28px rgba(220,95,32,.38); }
  50% { transform:scale(1.05); box-shadow:0 18px 38px rgba(220,95,32,.55), 0 0 26px rgba(255,184,84,.28); }
}
@keyframes tourneyHaloSpin {
  from { transform:rotate(0deg); }
  to { transform:rotate(360deg); }
}

.tourney-banner.is-finished{
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(circle at 15% 18%, rgba(255,199,86,.24), transparent 28%),
    radial-gradient(circle at 88% 24%, rgba(125,93,255,.20), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,239,214,.82));
  border:1px solid rgba(255,195,90,.26);
  box-shadow:0 16px 36px rgba(206,118,23,.18), inset 0 1px 0 rgba(255,255,255,.72);
}
.tourney-banner.is-finished::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(115deg, transparent 24%, rgba(255,255,255,.55) 42%, transparent 58%);
  opacity:.65;
  transform:translateX(-120%) skewX(-18deg);
  animation:tourneyShineSweep 7.2s linear infinite;
  pointer-events:none;
}
.tourney-banner .tb-crownline{ display:grid; gap:4px; }
.tb-headline{ font-size:22px; font-weight:1000; line-height:1.04; letter-spacing:.02em; }
.tb-subline{ font-size:13px; line-height:1.35; opacity:.85; }
.tourney-banner .tb-topline{ gap:8px; }
.tourney-banner .tb-chip{ backdrop-filter:blur(8px); }
.tourney-banner .tb-chip.prize{
  background:linear-gradient(135deg, rgba(157,243,211,.96), rgba(77,214,157,.88));
  color:#0d5a32;
}
.tb-side{
  position:relative;
  min-height:220px;
  padding:16px 12px 14px;
  border-radius:24px;
  background:linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.64));
  box-shadow:0 16px 30px rgba(0,0,0,.10), inset 0 1px 0 rgba(255,255,255,.72);
}
.tb-side.tone-light{ background:linear-gradient(180deg, rgba(255,250,230,.95), rgba(255,241,187,.72)); }
.tb-side.tone-dark{ background:linear-gradient(180deg, rgba(244,240,255,.95), rgba(222,212,255,.74)); }
.tb-side::after{
  content:"";
  position:absolute;
  inset:auto -18% -28% auto;
  width:140px; height:140px; border-radius:50%;
  background:radial-gradient(circle, rgba(255,255,255,.28), transparent 70%);
  pointer-events:none;
}
.tb-side-ribbon{
  position:absolute;
  top:10px; left:10px;
  padding:5px 10px;
  border-radius:999px;
  background:rgba(0,0,0,.08);
  font-size:11px;
  font-weight:900;
  letter-spacing:.03em;
}
.tb-side.winner{
  box-shadow:0 0 0 2px rgba(255,194,74,.55), 0 22px 42px rgba(255,194,74,.18);
  animation:tourneyGlowPulse 5.5s ease-in-out infinite;
}
.tb-side-stats{
  display:flex; flex-wrap:wrap; justify-content:center; gap:6px;
}
.tb-side-stats span{
  display:inline-flex; align-items:center; justify-content:center;
  padding:5px 9px; border-radius:999px;
  background:rgba(255,255,255,.66); border:1px solid rgba(0,0,0,.06);
  font-size:11px; font-weight:800;
}
.tb-vs,
.tourney-final-vs{
  position:relative;
  overflow:visible;
  animation:tourneyVsPulse 4s ease-in-out infinite;
}
.tb-vs::before,
.tourney-final-vs::before{
  content:"";
  position:absolute;
  inset:-10px;
  border-radius:50%;
  border:2px solid rgba(255,199,86,.28);
  animation:tourneyHaloSpin 11s linear infinite;
}
.tourney-final-hero.glamour-mode{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  border:1px solid rgba(255,204,108,.20);
  box-shadow:0 24px 50px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.72);
}
.tourney-final-hero.glamour-mode::before{
  content:"";
  position:absolute;
  inset:-30% -20% auto auto;
  width:280px; height:280px; border-radius:50%;
  background:radial-gradient(circle, rgba(255,202,84,.22), transparent 70%);
  filter:blur(8px);
  z-index:-1;
}
.tourney-final-hero.glamour-mode::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(115deg, transparent 28%, rgba(255,255,255,.32) 44%, transparent 58%);
  transform:translateX(-140%) skewX(-18deg);
  animation:tourneyShineSweep 8.8s linear infinite;
  z-index:-1;
}
.tourney-final-headline-wrap{ display:grid; gap:5px; margin-bottom:12px; }
.tourney-final-headline{
  font-size:34px;
  line-height:1;
  font-weight:1000;
  letter-spacing:.02em;
  text-transform:uppercase;
}
.tourney-final-subline{
  max-width:720px;
  font-size:14px;
  line-height:1.45;
  opacity:.86;
}
.tourney-hero-fighter{
  position:relative;
  gap:8px;
  padding:16px 14px 14px;
  border-radius:26px;
  min-height:100%;
  background:linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.58));
  box-shadow:0 16px 32px rgba(0,0,0,.09), inset 0 1px 0 rgba(255,255,255,.72);
}
.tourney-hero-fighter.tone-light{ background:linear-gradient(180deg, rgba(255,250,230,.96), rgba(255,241,187,.72)); }
.tourney-hero-fighter.tone-dark{ background:linear-gradient(180deg, rgba(247,243,255,.96), rgba(222,212,255,.76)); }
.tourney-hero-fighter .thf-ribbon{
  display:inline-flex; align-items:center; justify-content:center;
  padding:6px 12px; border-radius:999px;
  background:rgba(0,0,0,.08); font-size:11px; font-weight:900;
}
.tourney-hero-fighter.winner{ animation:tourneyGlowPulse 5.2s ease-in-out infinite; }
.thf-stats{ display:flex; flex-wrap:wrap; gap:6px; justify-content:center; }
.thf-stats span{
  padding:5px 10px; border-radius:999px; background:rgba(255,255,255,.68);
  border:1px solid rgba(0,0,0,.05); font-size:11px; font-weight:800;
}
.thf-bars{ width:100%; display:grid; gap:8px; }
.thf-bar{
  display:flex; justify-content:space-between; align-items:center; gap:10px;
  padding:8px 10px; border-radius:14px; background:rgba(255,255,255,.7);
  border:1px solid rgba(0,0,0,.05); font-size:12px;
}
.thf-bar b{ font-size:11px; text-transform:uppercase; opacity:.74; letter-spacing:.04em; }
.thf-bar span{ font-weight:900; }
.thf-bar.spent span{ color:#a45b09; }
.thf-bar.prize span{ color:#0b8550; }
.thf-bar.positive span{ color:#0b8550; }
.thf-bar.negative span{ color:#b13a3a; }
.tourney-stars-wrap{ position:relative; overflow:hidden; }
.tourney-stars-wrap::after{
  content:"";
  position:absolute; inset:auto auto -80px -60px;
  width:220px; height:220px; border-radius:50%;
  background:radial-gradient(circle, rgba(255,190,74,.16), transparent 70%);
  pointer-events:none;
}
.tourney-star-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:12px;
}
.tourney-star-card{
  position:relative;
  display:grid; gap:10px; justify-items:center; text-align:center;
  padding:16px 14px 14px;
  border-radius:24px;
  background:linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.68));
  border:1px solid rgba(0,0,0,.06);
  box-shadow:0 16px 30px rgba(0,0,0,.10);
  overflow:hidden;
}
.tourney-star-card::before{
  content:"";
  position:absolute;
  inset:-40% auto auto -20%;
  width:180px; height:180px; border-radius:50%;
  background:radial-gradient(circle, rgba(255,255,255,.28), transparent 70%);
  pointer-events:none;
}
.tourney-star-card.tone-light{ background:linear-gradient(180deg, rgba(255,250,230,.96), rgba(255,241,187,.76)); }
.tourney-star-card.tone-dark{ background:linear-gradient(180deg, rgba(247,243,255,.96), rgba(222,212,255,.78)); }
.tourney-star-badge{
  display:inline-flex; align-items:center; justify-content:center;
  padding:6px 12px; border-radius:999px; background:rgba(0,0,0,.08);
  font-size:11px; font-weight:900;
}
.tourney-star-thumb{
  width:min(38vw, 156px); aspect-ratio:1/1; border-radius:22px; overflow:hidden;
  display:grid; place-items:center; background:rgba(255,255,255,.62);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.68), 0 10px 22px rgba(0,0,0,.12);
}
.tourney-star-thumb img{ width:100%; height:100%; object-fit:contain; display:block; }
.tourney-star-name{ font-size:18px; font-weight:1000; line-height:1.08; overflow-wrap:anywhere; }
.tourney-star-sub{ font-size:12px; opacity:.78; }
.tourney-star-metrics{ display:grid; gap:6px; width:100%; }
.tourney-star-metrics span{
  display:block; padding:8px 10px; border-radius:14px; background:rgba(255,255,255,.68);
  font-size:12px; font-weight:800;
}
.tourney-result-card{ padding-top:18px; }
.tourney-result-card .trc-ribbon{
  position:absolute; top:10px; right:10px;
  display:inline-flex; align-items:center; justify-content:center;
  padding:6px 10px; border-radius:999px; background:rgba(0,0,0,.08);
  font-size:11px; font-weight:900; letter-spacing:.03em;
}
.tourney-result-card .trc-ribbon.leader-gold{ background:linear-gradient(135deg, rgba(255,226,119,.98), rgba(255,187,56,.92)); color:#613c00; }
.tourney-result-card .trc-ribbon.leader-silver{ background:linear-gradient(135deg, rgba(239,242,247,.98), rgba(195,203,216,.92)); color:#465365; }
.tourney-result-card .trc-ribbon.leader-bronze{ background:linear-gradient(135deg, rgba(226,183,138,.96), rgba(186,120,63,.92)); color:#4f2b07; }
.tourney-result-card.leader-gold,
.tourney-star-card.leader-gold{ box-shadow:0 0 0 2px rgba(255,201,71,.52), 0 18px 36px rgba(255,201,71,.18); }
.tourney-result-card.leader-silver,
.tourney-star-card.leader-silver{ box-shadow:0 0 0 2px rgba(198,206,220,.52), 0 18px 36px rgba(198,206,220,.18); }
.tourney-result-card.leader-bronze,
.tourney-star-card.leader-bronze{ box-shadow:0 0 0 2px rgba(201,142,82,.45), 0 18px 36px rgba(201,142,82,.16); }
@media (max-width:860px){
  .tourney-star-grid{ grid-template-columns:1fr; }
}
@media (max-width:640px){
  .tb-headline{ font-size:18px; }
  .tourney-final-headline{ font-size:24px; }
  .tourney-final-subline{ font-size:13px; }
  .tb-side{ min-height:unset; }
  .tourney-star-thumb{ width:min(58vw, 180px); }
}


/* ===== TOURNEY RESULTS CTA + HIDE (v1.0.13) ===== */
@keyframes btnSparkleGlow {
  0%,100% { box-shadow:0 12px 24px rgba(255,166,46,.26), 0 0 0 1px rgba(255,255,255,.18) inset; transform:translateY(0); }
  50% { box-shadow:0 18px 34px rgba(255,166,46,.42), 0 0 28px rgba(255,213,104,.24), 0 0 0 1px rgba(255,255,255,.26) inset; transform:translateY(-1px); }
}
@keyframes btnSparkleSweep {
  0% { transform:translateX(-140%) skewX(-18deg); opacity:0; }
  18% { opacity:.88; }
  100% { transform:translateX(240%) skewX(-18deg); opacity:0; }
}
.btn-results-glow{
  position:relative;
  overflow:hidden;
  border-color:rgba(255,196,83,.38)!important;
  background:linear-gradient(135deg, rgba(255,211,105,.98), rgba(255,167,60,.96))!important;
  color:#4c2600!important;
  font-weight:1000;
  letter-spacing:.02em;
  animation:btnSparkleGlow 3.4s ease-in-out infinite;
}
.btn-results-glow::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(115deg, transparent 24%, rgba(255,255,255,.72) 45%, transparent 60%);
  transform:translateX(-140%) skewX(-18deg);
  animation:btnSparkleSweep 4.6s linear infinite;
}
.tourney-banner.is-finished-compact{
  gap:12px;
  align-items:center;
}
.tourney-banner.is-finished-compact .tb-text{
  gap:10px;
}
.tourney-banner .tb-finale-compact{
  display:grid;
  gap:10px;
}
.tourney-banner .tb-topline-mine .tb-chip.mine{
  background:linear-gradient(135deg, rgba(255,242,193,.95), rgba(255,224,130,.85));
  color:#734400;
}
.tourney-banner .tb-chip.good{
  background:linear-gradient(135deg, rgba(175,245,211,.96), rgba(94,221,164,.88));
  color:#0d6335;
}
.tourney-banner .tb-chip.bad{
  background:linear-gradient(135deg, rgba(255,218,218,.96), rgba(255,159,159,.88));
  color:#8f2121;
}
#panel-tourney-results .subnav .row{ flex-wrap:wrap; }
.tourney-summary-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:14px;
  margin-top:14px;
}
.tourney-summary-card{
  position:relative;
  display:grid;
  gap:10px;
  padding:16px 16px 14px;
  border-radius:22px;
  background:linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.70));
  border:1px solid rgba(0,0,0,.06);
  box-shadow:0 16px 34px rgba(0,0,0,.09), inset 0 1px 0 rgba(255,255,255,.7);
}
.tourney-summary-card.overall.tone-light{ background:linear-gradient(180deg, rgba(255,250,230,.96), rgba(255,241,187,.72)); }
.tourney-summary-card.overall.tone-dark{ background:linear-gradient(180deg, rgba(247,243,255,.96), rgba(222,212,255,.76)); }
.tourney-summary-card.mine{
  background:linear-gradient(180deg, rgba(245,255,250,.96), rgba(213,248,226,.76));
}
.tourney-summary-card.mine.negative{
  background:linear-gradient(180deg, rgba(255,247,247,.96), rgba(255,224,224,.78));
}
.tourney-summary-title{
  font-size:18px;
  font-weight:1000;
  line-height:1.05;
}
.tourney-summary-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:9px 12px;
  border-radius:14px;
  background:rgba(255,255,255,.68);
  border:1px solid rgba(0,0,0,.05);
}
.tourney-summary-line span{
  font-size:12px;
  opacity:.78;
}
.tourney-summary-line strong{
  font-size:14px;
  font-weight:1000;
  text-align:right;
}
.tourney-summary-note{
  font-size:12px;
  line-height:1.45;
  opacity:.82;
}
.tourney-final-actions{ flex-wrap:wrap; }
.tourney-hidden-state{
  display:grid;
  gap:8px;
  place-items:center;
  text-align:center;
  padding:22px 18px;
  border-radius:20px;
  background:linear-gradient(135deg, rgba(255,255,255,.94), rgba(255,240,213,.82));
  box-shadow:0 16px 34px rgba(0,0,0,.10), inset 0 1px 0 rgba(255,255,255,.68);
}
.tourney-hidden-icon{ font-size:28px; }
.tourney-hidden-title{ font-size:18px; font-weight:1000; }
.tourney-hidden-text{ font-size:13px; line-height:1.45; opacity:.82; max-width:420px; }
@media (max-width:720px){
  .tourney-summary-grid{ grid-template-columns:1fr; }
}

/* === Tournament guide / team war revamp === */
#btn-tourney-guide {
  position: relative;
  overflow: hidden;
}
#btn-tourney-guide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.18) 35%, transparent 70%);
  transform: translateX(-110%);
  animation: tguideShine 3.2s linear infinite;
}
@keyframes tguideShine {
  to { transform: translateX(120%); }
}

.tguide-wrap {
  display: grid;
  gap: 16px;
}
.tguide-hero,
.tguide-card,
.tguide-arena,
.tguide-sideboard,
.tguide-faq {
  border-radius: 22px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.72));
  border: 1px solid rgba(120,90,40,.12);
  box-shadow: 0 12px 26px rgba(31,20,8,.10);
}
.tguide-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 10%, rgba(255,214,120,.34), transparent 32%),
    radial-gradient(circle at 85% 14%, rgba(120,215,255,.26), transparent 28%),
    linear-gradient(135deg, rgba(255,252,243,.96), rgba(246,238,255,.92));
}
.tguide-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.74);
  padding: 6px 12px;
  font-weight: 800;
  margin-bottom: 10px;
}
.tguide-hero h2 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.05;
}
.tguide-hero p {
  margin: 0;
  color: #5d4b39;
  font-size: 15px;
  line-height: 1.45;
}
.tguide-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.tguide-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(0,0,0,.06);
  font-weight: 800;
}
.tguide-steps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.tguide-card-title {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 8px;
}
.tguide-card-body {
  color: #5d4b39;
  line-height: 1.5;
  font-size: 14px;
}
.tguide-card-body p { margin: 0; }
.tguide-section-title {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 10px;
}
.tguide-duel-showcase {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: stretch;
}
.tguide-fighter-card {
  border-radius: 24px;
  padding: 14px;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55), 0 10px 22px rgba(33,24,10,.10);
}
.tguide-fighter-card.tone-light {
  background: linear-gradient(180deg, rgba(255,247,208,.98), rgba(255,239,194,.88));
}
.tguide-fighter-card.tone-dark {
  background: linear-gradient(180deg, rgba(233,229,250,.98), rgba(216,210,246,.88));
}
.tguide-fighter-label {
  font-weight: 900;
  font-size: 20px;
  margin-bottom: 8px;
}
.tguide-fighter-thumb {
  width: 164px;
  height: 164px;
  margin: 0 auto 10px;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255,255,255,.76);
  box-shadow: 0 16px 34px rgba(0,0,0,.14);
}
.tguide-fighter-thumb img,
.tguide-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.tguide-thumb-placeholder {
  display: grid;
  place-items: center;
  font-size: 52px;
}
.tguide-fighter-metric,
.tguide-fighter-score {
  font-size: 15px;
  margin-top: 6px;
}
.tguide-fighter-score {
  font-size: 17px;
  font-weight: 900;
}
.tguide-vs-wrap {
  display: grid;
  place-items: center;
  gap: 12px;
  min-width: 110px;
}
.tguide-vs {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 30px;
  color: #fff;
  background: radial-gradient(circle at 35% 30%, #ffd48f, #ff962d 60%, #d76a11);
  box-shadow: 0 0 0 10px rgba(255,196,120,.18), 0 18px 30px rgba(170,89,20,.28);
}
.tguide-vs-note {
  text-align: center;
  color: #6a5138;
  font-size: 14px;
  line-height: 1.45;
}
.tguide-sideboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tguide-sidebox {
  border-radius: 20px;
  padding: 14px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
}
.tguide-sidebox.tone-light {
  background: linear-gradient(180deg, rgba(255,246,198,.95), rgba(255,236,177,.9));
}
.tguide-sidebox.tone-dark {
  background: linear-gradient(180deg, rgba(228,224,251,.98), rgba(214,208,247,.9));
}
.tguide-sidebox-title {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 8px;
}
.tguide-sidebox-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(0,0,0,.08);
}
.tguide-sidebox-line:last-child { border-bottom: 0; }
.tguide-sidebox-line span { color: #6a5945; }
.tguide-sidebox-line b { text-align: right; }
.tguide-note {
  margin-top: 10px;
  color: #6a5138;
  line-height: 1.45;
}
.tguide-faq ul {
  margin: 0;
  padding-left: 18px;
  color: #5d4b39;
  line-height: 1.55;
}
.tguide-faq li + li { margin-top: 8px; }

@media (max-width: 720px) {
  .tguide-hero h2 { font-size: 27px; }
  .tguide-steps-grid,
  .tguide-sideboard-grid,
  .tguide-duel-showcase {
    grid-template-columns: 1fr;
  }
  .tguide-vs-wrap { min-width: 0; }
  .tguide-vs { width: 78px; height: 78px; font-size: 24px; }
  .tguide-fighter-thumb { width: 136px; height: 136px; }
}

.tourney-war-callout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 20px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(255,247,221,.92), rgba(240,235,255,.82));
  border: 1px solid rgba(111,82,33,.12);
  box-shadow: 0 10px 24px rgba(33,22,8,.08);
}
.tourney-war-callout-title {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 4px;
}
.tourney-war-callout-text {
  color: #6a5641;
  line-height: 1.45;
  font-size: 13px;
}

.tourney-war-live{
  padding:16px 18px;
  border-radius:24px;
  background:
    radial-gradient(circle at top left, rgba(255,188,102,.28), transparent 34%),
    radial-gradient(circle at top right, rgba(120,180,255,.22), transparent 30%),
    linear-gradient(145deg, rgba(255,247,231,.96), rgba(244,239,255,.88));
  border:1px solid rgba(111,82,33,.12);
  box-shadow:0 14px 34px rgba(33,22,8,.10);
}
.tourney-war-live-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:14px;
}
.tourney-war-live-title{
  font-size:20px;
  font-weight:900;
  color:#3b2b18;
  margin-bottom:4px;
}
.tourney-war-live-sub{
  color:#6a5641;
  line-height:1.45;
  font-size:13px;
}
.tourney-war-lead{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.76);
  box-shadow:0 6px 14px rgba(33,22,8,.08);
  font-weight:800;
  color:#5d4528;
  text-align:center;
}
.tourney-war-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  gap:12px;
  align-items:stretch;
}
.tourney-war-side{
  min-width:0;
  border-radius:22px;
  padding:16px 14px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7), 0 10px 24px rgba(33,22,8,.08);
  border:1px solid rgba(111,82,33,.10);
}
.tourney-war-side.light{
  background:linear-gradient(180deg, rgba(255,252,237,.98), rgba(255,236,181,.86));
}
.tourney-war-side.dark{
  background:linear-gradient(180deg, rgba(245,241,255,.98), rgba(219,210,255,.86));
}
.tourney-war-side-label{
  font-size:18px;
  font-weight:900;
  margin-bottom:6px;
  color:#3b2b18;
}
.tourney-war-side-score{
  font-size:42px;
  line-height:1;
  font-weight:900;
  letter-spacing:.02em;
  color:#3b2b18;
}
.tourney-war-side-score-sub{
  font-size:12px;
  color:#7c6545;
  text-transform:uppercase;
  letter-spacing:.08em;
  margin-bottom:10px;
}
.tourney-war-side-meta{
  font-size:13px;
  color:#5f4e36;
  margin-top:4px;
}
.tourney-war-vs{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:8px;
  min-width:96px;
}
.tourney-war-vs-badge{
  width:70px;
  height:70px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(241,234,216,.96));
  border:1px solid rgba(111,82,33,.14);
  box-shadow:0 10px 20px rgba(33,22,8,.10);
  font-weight:900;
  color:#5d4528;
  letter-spacing:.08em;
}
.tourney-war-vs-text{
  font-size:12px;
  color:#7c6545;
  text-align:center;
  line-height:1.35;
}
.tourney-war-self{
  margin-top:14px;
  padding:14px 16px;
  border-radius:20px;
  background:rgba(255,255,255,.78);
  border:1px solid rgba(111,82,33,.10);
  box-shadow:0 8px 18px rgba(33,22,8,.06);
}
.tourney-war-self-title{
  font-size:15px;
  font-weight:900;
  color:#3b2b18;
  margin-bottom:8px;
}
.tourney-war-self-pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.tourney-war-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(250,244,233,.92);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
  color:#5d4528;
  font-size:12px;
}
.tourney-war-my-head{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:12px;
  overflow:visible;
}
.tourney-war-my-head .m-desc{
  min-width:0;
  overflow:visible;
  text-overflow:clip;
  white-space:normal;
}
.tourney-war-my-head-text{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.tourney-war-my-head-text strong{
  display:block;
  font-size:18px;
  line-height:1.22;
  color:#3b2b18;
}
.tourney-war-my-head-text small{
  display:block;
  line-height:1.55;
  color:#5f4e36;
}
.tourney-war-my-head-stats{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(110px, 1fr));
  gap:10px;
}
.tourney-war-my-stat{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:7px;
  padding:12px 14px;
  border-radius:18px;
  background:rgba(250,244,233,.92);
  border:1px solid rgba(111,82,33,.10);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.82), 0 8px 18px rgba(33,22,8,.05);
}
.tourney-war-my-stat-label{
  font-size:12px;
  line-height:1.25;
  color:#6c5232;
  font-weight:800;
}
.tourney-war-my-stat-value{
  min-width:0;
  display:flex;
  align-items:baseline;
  gap:8px;
  flex-wrap:wrap;
  font-variant-numeric:tabular-nums;
}
.tourney-war-my-stat-value b{
  font-size:24px;
  line-height:1;
  color:#3b2b18;
  white-space:nowrap;
}
.tourney-war-my-stat-draws{
  font-size:13px;
  line-height:1.2;
  color:#7a6141;
  font-weight:800;
  white-space:nowrap;
}
@media (max-width: 560px) {
  .tourney-war-my-head-stats{
    grid-template-columns:1fr;
  }
  .tourney-war-my-stat{
    padding:11px 12px;
  }
  .tourney-war-my-stat-value b{
    font-size:22px;
  }
}
.tourney-war-history{
  margin-top:14px;
}
.tourney-war-history-title{
  font-size:14px;
  font-weight:900;
  color:#3b2b18;
  margin-bottom:8px;
}
.tourney-war-history-list{
  display:grid;
  grid-template-columns:repeat( auto-fit, minmax(180px, 1fr) );
  gap:10px;
}
.tourney-war-round-chip{
  border-radius:18px;
  padding:12px 13px;
  background:rgba(255,255,255,.82);
  border:1px solid rgba(111,82,33,.10);
  box-shadow:0 8px 18px rgba(33,22,8,.06);
}
.tourney-war-round-chip.winner-light{
  background:linear-gradient(180deg, rgba(255,252,237,.98), rgba(255,236,181,.78));
}
.tourney-war-round-chip.winner-dark{
  background:linear-gradient(180deg, rgba(245,241,255,.98), rgba(219,210,255,.78));
}
.tourney-war-round-chip.winner-draw{
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(239,233,222,.90));
}
.tourney-war-round-chip-top{
  font-size:13px;
  font-weight:800;
  color:#3b2b18;
  margin-bottom:6px;
}
.tourney-war-round-chip-line{
  font-size:12px;
  color:#5f4e36;
  margin-top:2px;
}
.tourney-war-history-empty{
  padding:14px 16px;
  border-radius:18px;
  background:rgba(255,255,255,.74);
  border:1px dashed rgba(111,82,33,.18);
  color:#6a5641;
  line-height:1.45;
}
@media (max-width: 720px) {
  .tourney-war-callout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .tourney-war-live-head{
    flex-direction:column;
    align-items:stretch;
  }
  .tourney-war-grid{
    grid-template-columns:1fr;
  }
  .tourney-war-vs{
    min-width:0;
    order:2;
  }
  .tourney-war-vs-badge{
    width:58px;
    height:58px;
  }
  .tourney-war-side-score{
    font-size:34px;
  }
}


/* ===== cold boot splash ===== */
body.booting{ overflow:hidden; }
body.booting .page,
body.booting .titlebar{ pointer-events:none; user-select:none; }
body.booting .bg{ filter: blur(8px) brightness(.82); }
.boot-overlay{
  position:fixed;
  inset:0;
  z-index:120000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:
    radial-gradient(circle at top, rgba(28,145,188,.28), transparent 44%),
    radial-gradient(circle at bottom, rgba(255,127,39,.22), transparent 40%),
    linear-gradient(180deg, rgba(6,10,16,.80), rgba(6,10,16,.92)),
    url('./bg/lisn_miner_bg_fallback.jpg') center/cover no-repeat;
  opacity:1;
  visibility:visible;
  transition:opacity .34s ease, visibility .34s ease;
  backdrop-filter:blur(4px);
}
.boot-overlay.hidden{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}
.boot-overlay__inner{
  width:min(92vw, 460px);
  padding:24px 22px 20px;
  border-radius:26px;
  background:rgba(10,14,22,.72);
  border:1px solid rgba(255,255,255,.10);
  box-shadow:0 20px 60px rgba(0,0,0,.34);
  text-align:center;
  color:#fff;
}
.boot-overlay__logo{
  font-size:clamp(26px, 7vw, 42px);
  font-weight:900;
  letter-spacing:.14em;
  margin-bottom:18px;
  text-transform:uppercase;
  color:#fff3d6;
  text-shadow:0 2px 18px rgba(255,170,90,.26);
}
.boot-overlay__spinner{
  width:62px;
  height:62px;
  margin:0 auto 16px;
  border-radius:50%;
  border:4px solid rgba(255,255,255,.18);
  border-top-color:#ffd27f;
  border-right-color:#7be0ff;
  animation:lisnBootSpin .9s linear infinite;
}
.boot-overlay__title{
  font-size:20px;
  font-weight:800;
  margin-bottom:8px;
}
.boot-overlay__text{
  font-size:14px;
  line-height:1.5;
  color:rgba(255,255,255,.82);
  min-height:2.6em;
}
.boot-overlay__bar{
  width:100%;
  height:10px;
  margin:18px auto 10px;
  border-radius:999px;
  background:rgba(255,255,255,.10);
  overflow:hidden;
  box-shadow:inset 0 1px 4px rgba(0,0,0,.28);
}
.boot-overlay__bar-fill{
  width:0%;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg, #ffb85c 0%, #ffd87a 45%, #79deff 100%);
  transition:width .28s ease;
}
.boot-overlay__pct{
  font-size:13px;
  font-weight:700;
  letter-spacing:.08em;
  color:rgba(255,255,255,.74);
}
@keyframes lisnBootSpin{
  from{ transform:rotate(0deg); }
  to{ transform:rotate(360deg); }
}


.tourney-cutscene .tcs-visual{
    display:flex;
    align-items:center;
    justify-content:center;
    background:
        radial-gradient(circle at 50% 35%, rgba(255,214,137,.22), transparent 36%),
        radial-gradient(circle at 50% 65%, rgba(255,126,54,.18), transparent 44%),
        linear-gradient(180deg, rgba(14,18,28,.92), rgba(5,8,14,.96));
}
.tourney-cutscene .tcs-visual-mark{
    display:flex;
    align-items:center;
    justify-content:center;
    width:min(42vw, 220px);
    height:min(42vw, 220px);
    border-radius:999px;
    border:1px solid rgba(255,255,255,.12);
    box-shadow:0 20px 60px rgba(0,0,0,.35), inset 0 0 40px rgba(255,255,255,.05);
    color:#fff6df;
    font-size:clamp(42px, 10vw, 84px);
    font-weight:900;
    letter-spacing:.08em;
    background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
}

@media (prefers-reduced-motion: reduce){
    .title-gradient,
    .tourney-hero-fighter.winner,
    .tb-side.winner{
        animation:none !important;
    }
}

/* 1.9.12: Polymarket teaser + LISN exchange */
.polymarket-card{display:grid;gap:8px}
.pm-title{font-weight:700;opacity:.95}
.pm-question{font-weight:800;line-height:1.25}
.pm-desc{font-size:12px;opacity:.82;line-height:1.35}
.pm-outcomes{display:grid;gap:6px;margin-top:2px}
.pm-outcome{display:flex;justify-content:space-between;gap:8px;align-items:center;padding:6px 8px;border:1px solid rgba(255,255,255,.12);border-radius:10px;background:rgba(0,0,0,.16)}
.pm-outcome span{white-space:nowrap;opacity:.9}
.lisn-market-buy-amount{min-width:120px}
