:root{
    --bg-main:#020617;
    --card:#0b1120;
    --card2:#020617;

    --text:#e5e7eb;
    --muted:#9ca3af;

    --b1: rgba(148,163,184,0.22);
    --b2: rgba(30,64,175,0.75);

    --accent:#6366f1;
    --green:#22c55e;
    --gold:#facc15;

    --nav-height:64px;

    --grad-a: linear-gradient(135deg, #6366f1, #8b5cf6, #22c55e);
    --grad-soft: radial-gradient(circle at top, rgba(2,6,23,0.75), rgba(15,23,42,0.95));
    --progress: linear-gradient(90deg, #4f46e5, #22c55e);
    --progress2: linear-gradient(90deg, #22c55e, #2dd4bf);
}

*{ box-sizing:border-box; }
html,body{
    height:100%;
    margin:0;
    padding:0;
    background: radial-gradient(circle at top, #1d2540 0, #020617 55%, #000 100%);
    color:var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    overflow-x:hidden;
}

body{
    overflow:hidden;
    overscroll-behavior: none;
    display:flex;
    justify-content:center;
}

#app{
    width:100%;
    max-width:520px;
    height:100vh;
    display:flex;
    flex-direction:column;
    padding:8px 10px 8px;
    overflow:hidden;
}

@supports(padding: max(0px)){
    #app{ padding-bottom:max(env(safe-area-inset-bottom), 8px); }
}

/* particles */
#particles-container{
    position:fixed;
    inset:0;
    pointer-events:none;
    z-index:9999;
}
.coin,.bonus{
    position:absolute;
    width:20px;height:20px;
    font-size:18px;
    user-select:none;
    pointer-events:none;
}

/* header */
.app-header{ margin-bottom:8px; }
.profile-header{
    position:relative;
    display:flex;
    flex-direction:column;
    gap:8px;
    padding:8px 10px;
    border-radius:18px;
    background: linear-gradient(135deg, rgba(15,23,42,0.95), rgba(30,64,175,0.90));
    border:1px solid rgba(148,163,184,0.30);
    box-shadow: 0 10px 25px rgba(0,0,0,0.9);
    overflow:hidden;
}
.profile-header::before{
    content:"";
    position:absolute;
    inset:-60% -40%;
    background: radial-gradient(circle at 30% 20%, rgba(99,102,241,0.22), transparent 60%);
    pointer-events:none;
}

.profile-top{
    position:relative;
    z-index:1;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}

.profile-user{
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
}

.profile-avatar-wrap{
    position:relative;
    width:40px;height:40px;
    flex-shrink:0;
}
.profile-avatar{
    width:40px;height:40px;
    border-radius:999px;
    border:2px solid rgba(248,250,252,0.25);
    object-fit:cover;
    background: radial-gradient(circle at 30% 20%, #38bdf8, #1d4ed8);
    display:block;
}
.profile-level-badge{
    position:absolute;
    right:-6px;
    bottom:-6px;
    display:inline-flex;
    align-items:center;
    gap:4px;
    padding:2px 6px;
    border-radius:999px;
    font-size:10px;
    line-height:1;
    color: rgba(226,232,240,0.95);
    background: radial-gradient(circle at top, rgba(15,23,42,0.95), rgba(30,64,175,0.9));
    border: 1px solid rgba(129,140,248,0.65);
    box-shadow: 0 8px 18px rgba(0,0,0,0.55), 0 0 12px rgba(79,70,229,0.35);
}

.profile-name-row{ min-width:0; }
.profile-name-col{ display:flex; flex-direction:column; gap:3px; min-width:0; }
#profile-name{
    font-size:14px;
    font-weight:650;
    line-height:1.1;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.profile-clan{
    display:inline-flex;
    align-items:center;
    gap:6px;
    width:fit-content;
    max-width:100%;
    padding:3px 8px;
    border-radius:999px;
    font-size:11px;
    color: rgba(226,232,240,0.88);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    background: radial-gradient(circle at top, rgba(15,23,42,0.92), rgba(15,23,42,1));
    border:1px solid rgba(148,163,184,0.25);
}

.profile-actions{
    position:relative;
    z-index:1;
    display:flex;
    align-items:center;
    gap:14px;
    flex-shrink:0;
}
.profile-icon-btn{
    position:relative;
    width:38px;height:38px;
    border-radius:999px;
    border:1px solid rgba(148,163,184,0.30);
    background: radial-gradient(circle at top, rgba(15,23,42,0.92), rgba(15,23,42,1));
    box-shadow: inset 0 0 10px rgba(15,23,42,0.95), 0 6px 16px rgba(0,0,0,0.55);
    color: rgba(226,232,240,0.95);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0;
    cursor:pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.08s ease, filter 0.12s ease;
}
.profile-icon-btn svg{ width:16px; height:16px; display:block; }
.profile-icon-btn:active{ transform: scale(0.96); filter: brightness(0.98); }
.profile-icon-btn:focus-visible{ outline:2px solid rgba(99,102,241,0.8); outline-offset:2px; }

.notif-dot{
    position:absolute;
    top:6px; right:6px;
    width:8px;height:8px;
    border-radius:999px;
    background:#22c55e;
    box-shadow:0 0 10px rgba(34,197,94,0.95);
}

.profile-divider{
    position:relative;
    z-index:1;
    height:1px;
    width:100%;
    border-radius:999px;
    background: linear-gradient(90deg, transparent, rgba(148,163,184,0.30), rgba(99,102,241,0.40), rgba(148,163,184,0.30), transparent);
    opacity:0.9;
}

/* resources */
.profile-resources{
    position:relative;
    z-index:1;
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap:6px;
    font-size:11px;
    color:#e5e7eb;
}
.resource-badge{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    padding:6px 10px;
    border-radius:999px;
    background: radial-gradient(circle at top, rgba(15,23,42,0.90), rgba(15,23,42,0.98));
    border:1px solid var(--b2);
    box-shadow: inset 0 0 8px rgba(15,23,42,0.95);
}
.resource-emoji{ width:18px;height:18px; display:flex; align-items:center; justify-content:center; }
.resource-emoji img{ width:18px;height:18px; object-fit:contain; display:block; }
#coins,#tickets,#gems{ font-variant-numeric: tabular-nums; font-weight:600; }

/* minimal tiles */
.profile-quick-grid{
    position:relative;
    z-index:1;
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:8px;
}
@media (max-width:360px){ .profile-quick-grid{ grid-template-columns:1fr; } }

.mini-tile{
    border-radius:14px;
    padding:10px 10px;
    background: var(--grad-soft);
    border:1px solid var(--b1);
    box-shadow: inset 0 0 10px rgba(15,23,42,0.55);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    min-width:0;
    cursor:pointer;
    -webkit-tap-highlight-color: transparent;
    color:inherit;
}
.mini-tile:active{ transform: translateY(1px); }
.mini-tile-left{ display:flex; align-items:center; gap:10px; min-width:0; }
.mini-icon{
    width:34px;height:34px;
    border-radius:12px;
    display:flex;
    align-items:center;
    justify-content:center;
    background: radial-gradient(circle at 30% 20%, rgba(99,102,241,0.35), rgba(15,23,42,1));
    border:1px solid rgba(129,140,248,0.35);
    box-shadow:0 0 12px rgba(79,70,229,0.20);
    font-size:16px;
    flex-shrink:0;
}
.mini-icon-portal{
    background: radial-gradient(circle at 30% 20%, rgba(34,197,94,0.30), rgba(15,23,42,1));
    border-color: rgba(34,197,94,0.35);
    box-shadow:0 0 12px rgba(34,197,94,0.16);
}
.mini-text{ min-width:0; display:flex; flex-direction:column; gap:3px; }
.mini-title{
    font-size:12px;
    font-weight:700;
    line-height:1.1;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.mini-sub{
    font-size:11px;
    color: rgba(148,163,184,0.95);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.mini-tile-right{ display:flex; align-items:center; gap:8px; flex-shrink:0; }
.mini-cta{
    font-size:11px;
    padding:5px 10px;
    border-radius:999px;
    background: radial-gradient(circle at top, rgba(15,23,42,0.92), rgba(15,23,42,1));
    border:1px solid rgba(148,163,184,0.26);
    color: rgba(226,232,240,0.92);
}
.mini-dot{
    width:8px;height:8px;border-radius:999px;
    background: transparent;
    box-shadow:none;
}
.mini-dot.is-on{
    background:#22c55e;
    box-shadow:0 0 10px rgba(34,197,94,0.95);
}
.mini-sep{ opacity:0.7; padding:0 4px; }

/* main */
.app-main{
    flex:1;
    display:flex;
    flex-direction:column;
    gap:8px;
    overflow-y:auto;
    overflow-x:hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0) + 16px);
    scrollbar-width:none;
    -ms-overflow-style:none;
}
.app-main::-webkit-scrollbar{ width:0; height:0; }

.screen{ display:none; flex-direction:column; gap:8px; }
.screen-active{ display:flex; }

/* panels */
.panel{
    background: radial-gradient(circle at top left, #111827 0, #020617 60%);
    border-radius:18px;
    padding:10px 12px;
    border:1px solid rgba(15,23,42,0.9);
    box-shadow: 0 6px 20px rgba(0,0,0,0.6);
}
.panel-soft{
    background: radial-gradient(circle at top, #020617 0, #020617 60%);
    box-shadow: 0 3px 12px rgba(0,0,0,0.5);
}
.panel-title{
    font-size:13px;
    color: var(--muted);
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:6px;
}
.panel-title-main{ display:inline-flex; align-items:center; gap:4px; }
.panel-title-main span.icon{ font-size:16px; }
.panel-sub{ font-size:11px; color:var(--muted); }

/* progress */
.progress-bar{
    position:relative;
    width:100%;
    height:10px;
    background: radial-gradient(circle at top, #020617, #020617);
    border-radius:999px;
    overflow:hidden;
    border:1px solid rgba(31,41,55,0.9);
    box-shadow: inset 0 0 10px rgba(15,23,42,0.9);
}
.progress-fill-gold{
    position:absolute;
    inset:0;
    width:0%;
    background: var(--progress);
    box-shadow: 0 0 12px rgba(79,70,229,0.75);
    transition: width 0.3s ease;
}
.progress-fill-green{
    position:absolute;
    inset:0;
    width:0%;
    background: var(--progress2);
    box-shadow: 0 0 12px rgba(34,197,94,0.90);
    transition: width 0.3s ease;
}

/* chest */
.chest-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    margin-bottom:6px;
}
.chest-header-main{ display:flex; align-items:center; gap:8px; }
.chest-icon-wrap{
    width:30px;height:30px;
    border-radius:10px;
    background: radial-gradient(circle at 20% 20%, #facc15, #b45309);
    display:flex; align-items:center; justify-content:center;
    box-shadow: 0 0 14px rgba(250,204,21,0.5);
    font-size:17px;
}
.chest-title{ font-size:13px; font-weight:700; }
.chest-subtitle{ font-size:11px; color:var(--muted); }
.chest-header-side{ display:flex; align-items:center; gap:6px; }
.chest-level-pill{
    padding:2px 8px;
    border-radius:999px;
    font-size:11px;
    background: radial-gradient(circle at top, rgba(250,204,21,0.18), rgba(15,23,42,1));
    border: 1px solid rgba(250,204,21,0.6);
    color:#fef9c3;
    box-shadow: 0 0 10px rgba(250,204,21,0.25);
}
.chest-progress-wrap{ display:flex; flex-direction:column; gap:4px; }
.chest-progress-top, .chest-progress-bottom{
    display:flex;
    justify-content:space-between;
    font-size:11px;
    color:var(--muted);
}
.chest-progress-bar{ height:12px; }
.chest-footer{ margin-top:8px; display:flex; gap:6px; }

/* slot */
.slot-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    margin-bottom:4px;
}
.slot-header-main{ display:flex; align-items:center; gap:8px; }
.slot-icon-wrap{
    width:32px;height:32px;
    border-radius:999px;
    background: radial-gradient(circle at 30% 20%, #f97316, #7c2d12);
    display:flex; align-items:center; justify-content:center;
    box-shadow: 0 0 14px rgba(248,250,252,0.20);
    font-size:18px;
}
.slot-title{ font-size:14px; font-weight:750; }
.slot-subtitle{ font-size:11px; color:var(--muted); }

.slots-wrapper{ position:relative; margin-top:6px; }
.slots{
    position:relative;
    display:flex;
    gap:6px;
    margin-bottom:6px;
    justify-content:center;
    z-index:10;
}
.reel{
    width:64px;height:210px;
    background: radial-gradient(circle at top, #020617, #020617);
    border-radius:14px;
    overflow:hidden;
    position:relative;
    border:1px solid rgba(30,64,175,0.85);
    box-shadow: inset 0 0 18px rgba(15,23,42,0.95), 0 8px 18px rgba(15,23,42,0.9);
}
.reel-inner{
    position:absolute;
    top:0; left:0;
    width:100%;
    will-change: transform;
    transform: translateZ(0);
}
.cell{
    width:64px;height:70px;
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:0;
    position:relative;
    overflow:hidden;
}
.cell-icon{
    width:42px;height:42px;
    object-fit:contain;
    display:block;
}
#linesCanvas{
    position:absolute;
    left:0; top:0;
    pointer-events:none;
    z-index:50;
}
#slot-message{
    position:absolute;
    top:50%; left:50%;
    transform: translate(-50%, -50%) scale(0);
    font-size:26px;
    font-weight:800;
    color:#ffe066;
    text-shadow: 0 0 15px rgba(255,255,255,0.9);
    pointer-events:none;
    z-index:1000;
    white-space:nowrap;
}
#win-amount{
    font-size:16px;
    font-weight:750;
    margin-bottom:4px;
    color: var(--gold);
    text-shadow: 0 0 6px rgba(250,204,21,0.65);
    min-height:20px;
    text-align:center;
}
#messages{
    margin-top:4px;
    min-height:18px;
    font-size:12px;
    text-align:center;
    color: var(--muted);
}
@media (max-width:400px){
    .reel{ width:58px; height:190px; }
    .cell{ width:58px; height:64px; }
    .cell-icon{ width:36px; height:36px; }
}

/* lists */
.item-list{ display:flex; flex-direction:column; gap:6px; }
.section-title{ margin-top:8px; margin-bottom:4px; font-size:13px; font-weight:700; }
#boss-locked{ font-size:12px; color:var(--muted); }
#boss-message{ font-size:12px; margin-top:6px; min-height:16px; }

/* buttons */
button{ font-family:inherit; border:none; }
.btn{
    position:relative;
    padding:10px 14px;
    font-size:14px;
    border-radius:999px;
    cursor:pointer;
    color:#f9fafb;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    background-image: var(--grad-a);
    border:1px solid rgba(191,219,254,0.28);
    box-shadow: 0 8px 18px rgba(15,23,42,0.9), 0 0 14px rgba(79,70,229,0.65);
    transition: transform 0.08s ease, filter 0.12s ease, opacity 0.2s;
    overflow:hidden;
}
.btn::before{
    content:"";
    position:absolute;
    inset:1px;
    border-radius:inherit;
    background: radial-gradient(circle at top, rgba(15,23,42,0.35), transparent 65%);
    opacity:0.85;
    pointer-events:none;
}
.btn span{ position:relative; z-index:1; }
.btn:active{ transform: translateY(1px) scale(0.99); filter: brightness(0.96); }

.btn-secondary{
    position:relative;
    padding:8px 12px;
    font-size:13px;
    border-radius:999px;
    cursor:pointer;
    background: radial-gradient(circle at top, rgba(15,23,42,0.95), rgba(15,23,42,1));
    color:#e5e7eb;
    border:1px solid rgba(75,85,99,0.9);
    box-shadow: 0 4px 10px rgba(0,0,0,0.6), inset 0 0 8px rgba(15,23,42,0.95);
    transition: transform 0.08s ease, filter 0.12s ease, opacity 0.2s;
}
.btn-secondary:active{ transform: translateY(1px) scale(0.99); filter: brightness(0.98); }
.btn-full{ width:100%; }
.btn-small{ padding:6px 10px; font-size:12px; }

button:disabled{ opacity:0.45; cursor:default; box-shadow:none; transform:none; filter:none; }

/* hint */
.hint-icon{
    border:none;
    background: rgba(15,23,42,0.9);
    color:#e5e7eb;
    border-radius:999px;
    width:20px;height:20px;
    font-size:12px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    padding:0;
    box-shadow: 0 0 8px rgba(148,163,184,0.35);
}
.hint-icon:active{ transform: scale(0.95); }
.hint-bubble{
    position:fixed;
    max-width:260px;
    padding:8px 10px;
    font-size:12px;
    line-height:1.4;
    background: radial-gradient(circle at top, #020617, #020617 70%);
    color:#e5e7eb;
    border-radius:10px;
    border:1px solid rgba(55,65,81,0.9);
    box-shadow: 0 10px 24px rgba(0,0,0,0.8);
    z-index:2000;
    opacity:0;
    transform: translate(-50%, -4px) scale(0.95);
    pointer-events:none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.hint-bubble-visible{
    opacity:1;
    transform: translate(-50%, -8px) scale(1);
}

/* bottom nav */
.bottom-nav{
    position:fixed;
    left:50%;
    transform: translateX(-50%);
    bottom:0;
    width:100%;
    max-width:520px;
    z-index:40;
    padding:6px 10px calc(env(safe-area-inset-bottom, 0) + 4px);
}
.bottom-nav-inner{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:6px 10px;
    border-radius:16px;
    background: linear-gradient(135deg, rgba(15,23,42,0.96), rgba(17,24,39,0.97));
    box-shadow: 0 18px 35px rgba(0,0,0,0.9);
    border:1px solid rgba(30,64,175,0.8);
    backdrop-filter: blur(18px);
}
.nav-item{
    flex:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:2px;
    padding:4px 0;
    border-radius:999px;
    color: var(--muted);
    font-size:10px;
    cursor:pointer;
    position:relative;
    transition: color 0.15s ease, background 0.15s ease, transform 0.08s ease;
}
.nav-icon{ height:24px; display:flex; align-items:center; justify-content:center; }
.nav-icon img{ width:22px; height:22px; object-fit:contain; display:block; }
.nav-item-active{
    color:#f9fafb;
    background: radial-gradient(circle at top, rgba(99,102,241,0.45), transparent 60%);
    transform: translateY(-1px);
}
.nav-item-active::before{
    content:"";
    position:absolute;
    bottom:-2px;
    width:18px;height:3px;
    border-radius:999px;
    background: linear-gradient(90deg, #22c55e, #a3e635);
}
.nav-item-disabled{ opacity:0.4; cursor:default; }

/* =========================
   MODALS
   ========================= */

html.modal-open, body.modal-open{
    overflow:hidden;
}

.modal{
    position:fixed;
    inset:0;
    z-index:5000;
    display:none;
}
.modal.is-open{ display:block; }

.modal-backdrop{
    position:absolute;
    inset:0;
    background: rgba(0,0,0,0.62);
    backdrop-filter: blur(8px);
    animation: fadeIn 160ms ease-out;
}

@keyframes fadeIn{
    from{ opacity:0; } to{ opacity:1; }
}

.modal-shell{
    position:relative;
    height:100%;
    width:100%;
    display:flex;
    align-items:flex-end;
    justify-content:center;
    padding: 12px 10px calc(env(safe-area-inset-bottom,0) + 10px);
}

.modal-card{
    width:100%;
    max-width:520px;
    border-radius:22px;
    border:1px solid rgba(148,163,184,0.24);
    background:
            radial-gradient(circle at top left, rgba(99,102,241,0.12), transparent 50%),
            radial-gradient(circle at top right, rgba(34,197,94,0.10), transparent 45%),
            rgba(2,6,23,0.92);
    box-shadow: 0 22px 60px rgba(0,0,0,0.85);
    overflow:hidden;
    transform: translateY(14px);
    opacity:0;
    animation: sheetIn 190ms ease-out forwards;
}

@keyframes sheetIn{
    to{ transform: translateY(0); opacity:1; }
}

.modal-header{
    padding:12px 12px 8px;
    border-bottom:1px solid rgba(148,163,184,0.12);
}
.modal-title-row{
    display:flex;
    align-items:center;
    gap:10px;
}
.modal-title-col{ min-width:0; display:flex; flex-direction:column; gap:2px; }
.modal-title{
    font-size:14px;
    font-weight:800;
    letter-spacing:0.2px;
}
.modal-subtitle{
    font-size:11px;
    color: rgba(148,163,184,0.95);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.modal-badge{
    width:36px;height:36px;
    border-radius:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:17px;
    background: radial-gradient(circle at 30% 20%, rgba(99,102,241,0.35), rgba(15,23,42,1));
    border:1px solid rgba(129,140,248,0.35);
    box-shadow:0 0 14px rgba(79,70,229,0.22);
    flex-shrink:0;
}
.modal-badge.portal{
    background: radial-gradient(circle at 30% 20%, rgba(34,197,94,0.30), rgba(15,23,42,1));
    border-color: rgba(34,197,94,0.35);
    box-shadow:0 0 14px rgba(34,197,94,0.16);
}
.modal-x{
    margin-left:auto;
    width:34px;height:34px;
    border-radius:12px;
    background: rgba(15,23,42,0.75);
    border:1px solid rgba(148,163,184,0.20);
    color: rgba(226,232,240,0.95);
    cursor:pointer;
}
.modal-x:active{ transform: scale(0.98); }

.modal-header-right{
    margin-left:auto;
    display:flex;
    align-items:center;
    gap:8px;
}
.level-pill{
    padding:3px 9px;
    border-radius:999px;
    font-size:11px;
    background: radial-gradient(circle at top, rgba(34,197,94,0.12), rgba(15,23,42,1));
    border: 1px solid rgba(34,197,94,0.55);
    color: #bbf7d0;
    box-shadow: 0 0 12px rgba(34,197,94,0.18);
    font-variant-numeric: tabular-nums;
}

.modal-body{
    padding:12px;
}

/* DAILY MODAL */
.daily-layout{ display:flex; flex-direction:column; gap:10px; }

.daily-hero{
    position:relative;
    border-radius:18px;
    padding:12px;
    background:
            radial-gradient(circle at 25% 15%, rgba(99,102,241,0.22), transparent 60%),
            radial-gradient(circle at 80% 20%, rgba(34,197,94,0.14), transparent 55%),
            rgba(15,23,42,0.65);
    border:1px solid rgba(148,163,184,0.18);
    overflow:hidden;
}
.daily-hero-title{ font-size:12px; font-weight:800; }
.daily-hero-sub{
    margin-top:4px;
    font-size:11px;
    color: rgba(148,163,184,0.95);
    margin-bottom:10px;
}
.daily-hero-glow{
    position:absolute;
    inset:-40% -20%;
    background: radial-gradient(circle at 40% 30%, rgba(99,102,241,0.18), transparent 56%);
    pointer-events:none;
}

.daily-cards{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:10px;
}
@media (max-width:380px){
    .daily-cards{ grid-template-columns:1fr; }
}

.day-card{
    border-radius:16px;
    padding:10px;
    background: rgba(15,23,42,0.55);
    border:1px solid rgba(148,163,184,0.16);
}
.day-kicker{ font-size:11px; color: rgba(148,163,184,0.95); }
.day-main{ margin-top:6px; font-size:12px; font-weight:750; }
.day-note{ margin-top:6px; font-size:11px; color: rgba(148,163,184,0.92); }

.daily-footnote{
    font-size:11px;
    color: rgba(148,163,184,0.95);
    opacity:0.9;
}

/* stats chips */
.modal-stats{
    margin-top:10px;
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}
.stat-chip{
    font-size:11px;
    padding:6px 10px;
    border-radius:999px;
    background: rgba(15,23,42,0.72);
    border:1px solid rgba(148,163,184,0.18);
}

/* PORTAL MODAL */
.portal-layout{
    display:grid;
    grid-template-columns: 160px 1fr;
    gap:12px;
    align-items:stretch;
}
@media (max-width:420px){
    .portal-layout{ grid-template-columns:1fr; }
}

.portal-ring{
    border-radius:20px;
    padding:12px;
    background:
            radial-gradient(circle at 30% 20%, rgba(34,197,94,0.18), transparent 60%),
            rgba(15,23,42,0.55);
    border:1px solid rgba(148,163,184,0.16);
    position:relative;
    overflow:hidden;
}
.portal-ring-inner{
    border-radius:18px;
    padding:14px 12px;
    background: rgba(2,6,23,0.70);
    border:1px solid rgba(148,163,184,0.14);
    min-height:136px;
    display:flex;
    align-items:center;
    justify-content:center;
}
.portal-percent{ text-align:center; }
.portal-percent-top{ font-size:11px; color: rgba(148,163,184,0.95); }
.portal-percent-big{
    margin-top:6px;
    font-size:26px;
    font-weight:900;
    letter-spacing:0.5px;
    color: #eaf2ff;
    text-shadow: 0 0 18px rgba(99,102,241,0.18);
}
.portal-percent-sub{ margin-top:6px; font-size:11px; color: rgba(148,163,184,0.95); }

.portal-ring-bar{ margin-top:10px; }
.portal-bar{ height:12px; }

.portal-info{
    border-radius:20px;
    padding:12px;
    background: rgba(15,23,42,0.55);
    border:1px solid rgba(148,163,184,0.16);
    display:flex;
    flex-direction:column;
    gap:10px;
}
.info-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    flex-wrap:wrap;
}
.info-pill{
    font-size:11px;
    padding:8px 10px;
    border-radius:999px;
    background: rgba(2,6,23,0.65);
    border:1px solid rgba(148,163,184,0.16);
    color: rgba(226,232,240,0.95);
}
.portal-actions{ display:flex; flex-direction:column; gap:8px; }
.portal-note{
    margin-top:2px;
    font-size:11px;
    color: rgba(148,163,184,0.95);
}

/* if JS toggles full state */
.ticket-bank-panel-full{
    box-shadow:
            0 0 0 1px rgba(250,204,21,0.26),
            0 0 32px rgba(250,204,21,0.14),
            inset 0 0 10px rgba(15,23,42,0.55);
    border-color: rgba(250,204,21,0.26);
}

/* helpers */
.sr-only{
    position:absolute !important;
    width:1px !important;
    height:1px !important;
    padding:0 !important;
    margin:-1px !important;
    overflow:hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space:nowrap !important;
    border:0 !important;
}

/* reduced motion */
@media (prefers-reduced-motion: reduce){
    .modal-backdrop, .modal-card{ animation:none !important; }
}

/* === убираем правую часть плиток (кнопку "Открыть") и даём тексту больше места === */
.mini-tile-right,
.mini-cta{
    display: none !important;
}
.mini-tile{ padding-right: 12px; }

/* точка-индикатор справа */
.mini-dot{
    width:9px;
    height:9px;
    border-radius:999px;
    background: rgba(148,163,184,0.35);
    box-shadow: none;
    flex-shrink:0;
    margin-left:10px;
}
.mini-dot.is-on{
    background:#22c55e;
    box-shadow:0 0 10px rgba(34,197,94,0.95);
}

/* Пульсации */
@keyframes pulseDaily {
    0%{ box-shadow: inset 0 0 10px rgba(15,23,42,0.55), 0 0 0 rgba(99,102,241,0); }
    50%{ box-shadow: inset 0 0 10px rgba(15,23,42,0.55), 0 0 18px rgba(99,102,241,0.35); }
    100%{ box-shadow: inset 0 0 10px rgba(15,23,42,0.55), 0 0 0 rgba(99,102,241,0); }
}
@keyframes pulsePortal {
    0%{ box-shadow: inset 0 0 10px rgba(15,23,42,0.55), 0 0 0 rgba(34,197,94,0); }
    50%{ box-shadow: inset 0 0 10px rgba(15,23,42,0.55), 0 0 18px rgba(34,197,94,0.30); }
    100%{ box-shadow: inset 0 0 10px rgba(15,23,42,0.55), 0 0 0 rgba(34,197,94,0); }
}
@keyframes pulseFull {
    0%{ box-shadow: inset 0 0 10px rgba(15,23,42,0.55), 0 0 0 rgba(239,68,68,0); }
    50%{ box-shadow: inset 0 0 10px rgba(15,23,42,0.55), 0 0 20px rgba(239,68,68,0.35); }
    100%{ box-shadow: inset 0 0 10px rgba(15,23,42,0.55), 0 0 0 rgba(239,68,68,0); }
}

/* состояния плиток */
.mini-tile.is-attn-daily{
    animation: pulseDaily 1.1s ease-in-out infinite;
    border-color: rgba(129,140,248,0.50);
}
.mini-tile.is-attn-portal{
    animation: pulsePortal 1.1s ease-in-out infinite;
    border-color: rgba(34,197,94,0.45);
}
.mini-tile.is-full{
    border-color: rgba(239,68,68,0.55);
    background:
            radial-gradient(circle at 25% 15%, rgba(239,68,68,0.18), transparent 60%),
            radial-gradient(circle at 80% 20%, rgba(239,68,68,0.10), transparent 55%),
            rgba(2,6,23,0.90);
    animation: pulseFull 1.1s ease-in-out infinite;
}

/* ✅ FIX: "Ежедневные награды" и любые длинные названия — в 2 строки */
.mini-title{
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================
   CHEST PICKER + CHEST SHOP
   ========================= */

.chest-picker{
    width:100%;
    margin-top:8px;
    padding:10px 10px;
    border-radius:16px;
    background: rgba(15,23,42,0.55);
    border:1px solid rgba(148,163,184,0.16);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    cursor:pointer;
    color:inherit;
    -webkit-tap-highlight-color: transparent;
}
.chest-picker:active{ transform: translateY(1px); }

.chest-picker-left{
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
}
.chest-picker-emoji{
    width:34px;height:34px;
    border-radius:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    background: radial-gradient(circle at 30% 20%, rgba(250,204,21,0.18), rgba(15,23,42,1));
    border: 1px solid rgba(250,204,21,0.35);
    box-shadow: 0 0 12px rgba(250,204,21,0.12);
    flex-shrink:0;
    font-size:16px;
}
.chest-picker-text{ min-width:0; display:flex; flex-direction:column; gap:3px; }
.chest-picker-title{
    font-size:12px;
    font-weight:800;
    line-height:1.1;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.chest-picker-sub{
    font-size:11px;
    color: rgba(148,163,184,0.95);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.chest-picker-right{ flex-shrink:0; display:flex; align-items:center; }
.chest-picker-arrow{
    font-size:20px;
    line-height:1;
    opacity:0.6;
}

/* Модалка магазина сундуков */
.modal-card-chestshop{
    background:
            radial-gradient(circle at top left, rgba(250,204,21,0.10), transparent 55%),
            radial-gradient(circle at top right, rgba(99,102,241,0.10), transparent 50%),
            rgba(2,6,23,0.92);
}
.chest-shop-note{
    font-size:11px;
    color: rgba(148,163,184,0.95);
    margin-bottom:10px;
}
.chest-shop-list{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.chest-offer{
    border-radius:16px;
    padding:10px;
    background: rgba(15,23,42,0.55);
    border:1px solid rgba(148,163,184,0.16);
    display:flex;
    justify-content:space-between;
    gap:10px;
    align-items:flex-start;
}
.chest-offer.is-selected{
    border-color: rgba(99,102,241,0.55);
    box-shadow: 0 0 0 1px rgba(99,102,241,0.15), 0 0 18px rgba(99,102,241,0.10);
}
.chest-offer-main{ min-width:0; }
.chest-offer-title{ font-size:13px; font-weight:900; }
.chest-offer-desc{ margin-top:4px; font-size:11px; color: rgba(148,163,184,0.95); }
.chest-offer-actions{
    display:flex;
    flex-direction:column;
    gap:6px;
    flex-shrink:0;
}

