/* ====================
   CORE VARIABLES & GLOBALS
   ==================== */
:root {
    --gold: #FFC857;
    --gold-glow: rgba(255, 200, 87, 0.4);
    --gold-dim: rgba(255, 200, 87, 0.15);
    --red: #FF6B6B;
    --blue: #4ECDC4;
    --purple: #A56CC1;
    --green: #2ecc71;
    
    --bg-glass: rgba(20, 20, 25, 0.95);
    --border-light: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(0, 0, 0, 0.3);
    
    --safe-top: env(safe-area-inset-top, 20px);
    --safe-bottom: env(safe-area-inset-bottom, 20px);
    
    --font-main: 'Nunito', 'Noto Sans TC', sans-serif;
    --font-tech: 'Orbitron', sans-serif;

    /* Boss HUD contract: boss HP bar is exactly half of the viewport width. */
    --boss-hud-hp-width: 50vw;
    --boss-hud-offset-default: calc(var(--safe-top) + 88px);
    --boss-hud-offset-mobile: calc(var(--safe-top) + 82px);
    --boss-hud-offset-compact: calc(var(--safe-top) + 78px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; user-select: none; }

body {
    margin: 0; padding: 0;
    background: #050507;
    height: 100vh; width: 100vw;
    overflow: hidden;
    font-family: var(--font-main);
    color: #fff;
    display: flex; justify-content: center; align-items: center;
}

.scene-layer { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

#app-bg { 
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    filter: brightness(0.6) blur(4px);
    transition: filter 0.8s ease, transform 0.8s ease;
    will-change: filter, transform;
}
.vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(0,0,0,0) 22%, rgba(0,0,0,0.78) 120%);
    opacity: 0.72;
}
body[data-view="login"] .vignette { opacity: 0.48; }

body[data-view="login"] #app-bg { filter: brightness(0.58) blur(4px); transform: scale(1.03); }
body[data-view="menu"] #app-bg { filter: brightness(0.6) blur(4px); transform: scale(1.05); }
body[data-view="game"] #app-bg { filter: brightness(0.7) blur(0px); transform: scale(1.0); }


body[data-view="boot"] .view-section { display: none !important; opacity: 0 !important; pointer-events: none !important; }
body[data-view="auth-resolving"] .view-section { display: none !important; opacity: 0 !important; pointer-events: none !important; }
body[data-view="auth-resolving"] .vignette { opacity: 0.5; }
body[data-view="auth-resolving"] #app-bg { filter: brightness(0.58) blur(4px); transform: scale(1.03); }

.login-container { padding: calc(var(--safe-top) + 18px) 16px calc(var(--safe-bottom) + 18px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.login-card { min-height: fit-content; }

@media (min-width: 900px) {
  .login-container { padding: 40px 24px; }
  .login-card {
    width: min(460px, 92vw);
    max-width: 460px;
    padding: 36px 30px;
    border-radius: 34px;
    box-shadow: 0 28px 80px rgba(0,0,0,0.46);
  }
  .app-title { font-size: 28px; letter-spacing: 1.2px; }
  .app-subtitle { font-size: 13px; }
  .glass-input { font-size: 16px; }
  .btn-submit, .btn-google, .btn-guest { min-height: 54px; }
}

body.blur-mode .scene-layer,
body.blur-mode .card-scroller,
body.blur-mode .drawer-layer,
body.blur-mode .top-nav,
body.blur-mode .weekly-container {
    filter: blur(8px) brightness(0.4);
    transform: scale(0.98);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease, filter 0.2s ease;
}

.view-section {
    position: absolute; inset: 0;
    display: none;
    flex-direction: column;
    opacity: 0; 
    transition: opacity 0.4s ease-in-out;
    z-index: 10;
    pointer-events: none;
}
.view-section.active { display: flex; opacity: 1; pointer-events: auto; }

/* ====================
   LOGIN VIEW
   ==================== */
.login-container { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; }
.login-card {
    position: relative; z-index: 10; width: 90%; max-width: 400px;
    background: var(--bg-glass); border: 1px solid var(--border-light);
    border-radius: 32px; padding: 32px 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.42); backdrop-filter: none; background: rgba(17, 20, 28, 0.72);
    display: flex; flex-direction: column; align-items: center;
    animation: floatUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.logo-area { margin-bottom: 24px; text-align: center; }
.app-icon { 
    width: 64px; height: 64px; background: linear-gradient(135deg, #2b2b30, #1a1a1f);
    border: 2px solid var(--gold); border-radius: 16px; 
    display: flex; justify-content: center; align-items: center;
    font-size: 32px; color: var(--gold); margin: 0 auto 12px;
    box-shadow: 0 0 20px var(--gold-glow);
}
.app-title { font-family: var(--font-tech); font-size: 24px; font-weight: 700; letter-spacing: 1px; color: #fff; }
.app-subtitle { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 4px; }

.tab-group { display: flex; background: rgba(255,255,255,0.05); padding: 4px; border-radius: 100px; width: 100%; margin-bottom: 20px; }
.tab-btn { flex: 1; padding: 10px; border-radius: 100px; text-align: center; font-size: 14px; font-weight: 700; color: #888; cursor: pointer; transition: 0.3s; }
.tab-btn.active { background: var(--gold); color: #000; box-shadow: 0 2px 10px rgba(0,0,0,0.3); }

.form-area { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.input-group { position: relative; }
.input-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,0.4); font-size: 20px; }
.glass-input {
    width: 100%; padding: 14px 16px 14px 48px;
    background: var(--input-bg); border: 1px solid var(--border-light);
    border-radius: 16px; color: #fff; font-size: 15px; outline: none; transition: 0.3s;
}
.glass-input:focus { border-color: var(--gold); background: rgba(0,0,0,0.5); }

.btn-submit {
    width: 100%; padding: 16px; margin-top: 8px;
    background: linear-gradient(135deg, var(--gold), #e6b33e);
    border: none; border-radius: 16px; color: #000; font-size: 14px; font-weight: 800;
    cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 8px;
}
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; width: 100%; color: rgba(255,255,255,0.3); font-size: 12px; font-weight: 600; }
.line { flex: 1; height: 1px; background: rgba(255,255,255,0.1); }
.btn-google { width: 100%; padding: 14px; background: #fff; border-radius: 16px; border: none; display: flex; justify-content: center; align-items: center; gap: 12px; cursor: pointer; margin-bottom: 10px; color:#333; font-weight:700; }
.btn-guest { width: 100%; padding: 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; color: #aaa; font-size: 13px; font-weight: 700; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 8px; }

/* ====================
   MENU VIEW STYLES & OVERLAYS
   ==================== */
.top-nav {
    position: absolute; top: 0; left: 0; right: 0; z-index: 20;
    padding: calc(var(--safe-top) + 12px) 16px 10px;
    display: flex; justify-content: space-between; align-items: center;
}
.brand-title {
    font-size: 22px; font-weight: 900;
    background: linear-gradient(180deg, #FFD700 0%, #F39C12 100%);
    -webkit-background-clip: text; color: transparent;
    letter-spacing: 2px; white-space: nowrap;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8)) drop-shadow(0 0 10px rgba(255, 215, 0, 0.4));
}
.nav-right { display: flex; align-items: center; gap: 8px; }
.premium-res-bar {
    display: flex; gap: 8px; background: rgba(10, 10, 12, 0.8);
    backdrop-filter: none; padding: 5px 10px; border-radius: 100px; cursor:pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 10px rgba(0, 0, 0, 0.4);
}
.res-item { display: flex; align-items: center; gap: 6px; font-size: 12px; font-family: var(--font-tech); font-weight: 800; }
.res-glyph { position: relative; display:inline-flex; width:14px; height:14px; align-items:center; justify-content:center; }
.res-glyph.coin::before { content:""; width:11px; height:11px; border-radius:50%; background: radial-gradient(circle at 30% 30%, #fff2b5 0%, #ffd86b 28%, #f4b21f 60%, #a76605 100%); box-shadow: 0 0 0 1px rgba(255,214,107,0.35), inset 0 1px 2px rgba(255,255,255,0.45), 0 0 12px rgba(255,200,87,0.25); }
.res-glyph.gem::before { content:""; width:10px; height:10px; transform: rotate(45deg); border-radius:2px; background: linear-gradient(135deg, #dffcff 0%, #79f4ff 38%, #3dc8ff 68%, #0c728a 100%); box-shadow: 0 0 0 1px rgba(78,205,196,0.35), inset 0 1px 2px rgba(255,255,255,0.45), 0 0 12px rgba(78,205,196,0.22); }
.res-item.gold { color: var(--gold); }
.res-item.dia { color: var(--blue); border-left: 1px solid rgba(255, 255, 255, 0.15); padding-left: 8px; }
.avatar-btn {
    width: 42px; height: 42px; border-radius: 50%; cursor:pointer;
    background: radial-gradient(circle at 32% 24%, rgba(255,255,255,0.22), rgba(255,255,255,0.05) 30%), linear-gradient(145deg, #303549, #151821 72%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 2px 6px rgba(255,255,255,0.08), inset 0 -8px 12px rgba(0,0,0,0.45), 0 8px 18px rgba(0,0,0,0.42), 0 0 20px rgba(89,138,255,0.14);
    display: flex; justify-content: center; align-items: center;
    position: relative; overflow: hidden;
}
.avatar-btn::before { content:""; position:absolute; inset: -6px; border-radius:50%; background: radial-gradient(circle, rgba(110,159,255,0.22), transparent 60%); opacity: .8; }
.avatar-btn::after { content:""; position:absolute; inset: 1px; border-radius:50%; border:1px solid rgba(255,255,255,0.08); pointer-events:none; }
.avatar-core { position: relative; display:block; width: 24px; height: 26px; z-index: 1; }
.avatar-halo { position:absolute; inset:-2px; border-radius:50%; background: radial-gradient(circle at 50% 42%, rgba(255,255,255,0.28), rgba(255,255,255,0) 68%); filter: blur(2px); }
.avatar-head { position:absolute; left:50%; top:0; width:11px; height:11px; margin-left:-5.5px; border-radius:50%; background: linear-gradient(180deg, #f6fbff 0%, #c8d4ff 100%); box-shadow: 0 0 12px rgba(198,216,255,0.35); }
.avatar-body { position:absolute; left:50%; bottom:0; width:20px; height:12px; margin-left:-10px; border-radius:12px 12px 8px 8px; background: linear-gradient(180deg, #6fd5ff 0%, #3b9fff 52%, #2449b5 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 6px 12px rgba(59,159,255,0.20); }
.avatar-crest { position:absolute; right:-1px; top:2px; width:7px; height:7px; border-radius:50%; background: linear-gradient(180deg, #ffe494, #f2b31b); box-shadow: 0 0 0 1px rgba(255,229,148,0.28), 0 0 10px rgba(242,179,27,0.40); }
.avatar-icon { display:none; }

.card-scroller { position: absolute; top: 18%; left: 0; right: 0; height: 38%; display: flex; gap: 20px; padding: 0 32px; overflow-x: auto; scroll-snap-type: x mandatory; z-index: 20; scrollbar-width: none; align-items: center; transition: 0.5s; }
.subject-card { flex: 0 0 240px; height: 90%; background: linear-gradient(160deg, #2b2b30 0%, #1a1a1f 100%); border: 1px solid var(--border-light); border-radius: 24px; scroll-snap-align: center; position: relative; transition: transform 0.18s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.16s ease, border-color 0.16s ease; box-shadow: 0 10px 30px rgba(0,0,0,0.5); opacity: 0.6; transform: scale(0.92); cursor: pointer; display: flex; flex-direction: column; overflow: hidden; }
.subject-card.active { border-color: var(--gold); opacity: 1; transform: scale(1); box-shadow: 0 15px 50px rgba(0,0,0,0.6), 0 0 20px var(--gold-dim); }
.card-image { height: 55%; width: 100%; display: flex; justify-content: center; align-items: center; font-size: 64px; background: rgba(0,0,0,0.2); }
.card-content { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.card-title { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.card-meta { font-size: 10px; color: rgba(255,255,255,0.4); }
.boss-tag { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.05); padding: 6px 10px; border-radius: 8px; font-size: 11px; color: var(--red); font-weight: 700; border: 1px solid rgba(255,255,255,0.05); }

.drawer-layer { position: absolute; bottom: 0; left: 0; right: 0; height: 42%; background: var(--bg-glass); border-radius: 32px 32px 0 0; border-top: 1px solid rgba(255,255,255,0.15); backdrop-filter: none; padding: 24px 24px var(--safe-bottom); z-index: 30; display: flex; flex-direction: column; box-shadow: 0 -20px 60px rgba(0,0,0,0.6); transition: 0.5s; }
.drawer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.sub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; overflow-y: auto; padding-bottom: 40px; }
.sub-chip { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 18px; padding: 14px; display: flex; justify-content: space-between; align-items: center; position: relative; overflow: hidden; animation: fadeUp 0.3s backwards; cursor: pointer; transition: transform 0.16s ease, opacity 0.16s ease, border-color 0.16s ease, background 0.16s ease; }
.sub-chip.selected { border-color: var(--gold); background: rgba(255, 200, 87, 0.1); box-shadow: 0 0 15px rgba(255, 200, 87, 0.3); transform: scale(1.02); z-index: 2; }
.sub-chip.selected .chip-name { color: var(--gold); text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
.sub-chip.selected .chip-level { color: #fff; }
.sub-chip.is-locked { opacity: 0.5; filter: grayscale(1); border-color: rgba(255,107,107,0.2); pointer-events: auto; } /* 允許點擊以觸發購買提示 */
.chip-name { font-size: 14px; font-weight: 700; color: #e0e0e0; margin-bottom: 4px; display: block; transition: color 0.2s; }
.chip-level { font-size: 10px; font-weight: 700; color: #aaa; font-family: var(--font-tech); letter-spacing: 1px; }
.chip-stat { font-size: 10px; font-weight: 600; color: var(--gold); display: flex; align-items: center; gap: 4px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #444; }
.lock-icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--red); opacity: 0.8; font-size: 16px; }

.overlay-container { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: 0.4s; }
.overlay-container.active { opacity: 1; pointer-events: auto; }
.overlay-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: none; }
.overlay-card { width: 90%; max-width: 380px; max-height: 85vh; background: rgba(15, 15, 20, 0.95); border: 1px solid rgba(255,255,255,0.1); border-radius: 32px; padding: 24px; box-shadow: 0 20px 80px rgba(0,0,0,0.8); transform: translateY(50px) scale(0.9); transition: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); position: relative; overflow: hidden; display: flex; flex-direction: column; backdrop-filter: none; }
.overlay-container.active .overlay-card { transform: translateY(0) scale(1); }

/* ====================
   PROFILE & SETTINGS
   ==================== */
.pf-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.pf-avatar-box { width: 84px; height: 84px; background: radial-gradient(circle at 50% 30%, rgba(110,159,255,0.18), rgba(255,255,255,0.03) 55%, transparent 72%); border-radius: 50%; border: 1px solid rgba(255,255,255,0.12); box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 26px rgba(0,0,0,0.34); display: flex; justify-content: center; align-items: center; }
.pf-hero { transform: scale(0.86); margin-top: 6px; } 
.pf-info { flex: 1; margin-left: 16px; }
.pf-name { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 4px; }
.pf-rank { font-size: 12px; color: var(--gold); display: inline-block; border: 1px solid var(--gold); padding: 2px 8px; border-radius: 100px; font-weight: 700; margin-bottom: 6px; }

.pf-tabs { display: flex; background: rgba(255,255,255,0.05); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.pf-tab-btn { flex: 1; text-align: center; padding: 10px; font-size: 13px; font-weight: 800; color: #888; border-radius: 8px; cursor: pointer; transition: 0.2s; border: none; background: transparent; outline: none; }
.pf-tab-btn.active { background: var(--gold); color: #000; box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.pf-tab-content { animation: fadeUp 0.3s ease-out; }

.setting-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.setting-row:last-child { border-bottom: none; }
.setting-label { font-size: 14px; font-weight: 700; color: #ccc; }
.segmented-control { display: flex; background: rgba(0,0,0,0.4); border-radius: 12px; padding: 4px; gap: 4px; border: 1px solid rgba(255,255,255,0.1); }
.lang-btn { background: transparent; border: none; color: #888; padding: 8px 16px; border-radius: 8px; font-size: 12px; font-weight: 800; cursor: pointer; transition: 0.2s; outline: none; }
.lang-btn.active { background: rgba(255,255,255,0.15); color: var(--gold); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }

.btn-logout { background: rgba(255, 107, 107, 0.1); border: 1px solid rgba(255, 107, 107, 0.3); color: var(--red); padding: 12px 32px; border-radius: 100px; font-size: 13px; font-weight: 800; cursor: pointer; transition: 0.2s; }
.btn-logout:active { transform: scale(0.95); background: rgba(255, 107, 107, 0.2); }

.radar-container { width: 100%; height: 200px; position: relative; display: flex; justify-content: center; align-items: center; margin-bottom: 24px; }
.radar-svg { width: 200px; height: 200px; transform: rotate(-90deg); }
.radar-bg { fill: none; stroke: rgba(255,255,255,0.1); stroke-width: 1; }
.radar-shape { fill: rgba(78, 205, 196, 0.2); stroke: var(--blue); stroke-width: 2; filter: drop-shadow(0 0 10px rgba(78, 205, 196, 0.4)); transition: transform 0.22s ease-out, opacity 0.22s ease-out; }
.stat-float { position: absolute; font-family: var(--font-tech); font-weight: 700; font-size: 14px; text-shadow: 0 0 10px currentColor; }
.career-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.career-box { background: rgba(255,255,255,0.03); border-radius: 16px; padding: 12px; text-align: center; border: 1px solid rgba(255,255,255,0.05); }
.cb-label { font-size: 10px; color: #666; font-weight: 700; margin-bottom: 4px; text-transform: uppercase; }
.cb-val { font-size: 16px; font-weight: 800; color: #eee; font-family: var(--font-tech); }
/* ====================
   MONETIZATION SHOP (DUAL PRICING & LIMITS)
   ==================== */
.shop-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.shop-title { font-size: 20px; font-weight: 900; color: #fff; letter-spacing: 0.5px; }
.shop-tabs { display: flex; background: rgba(255,255,255,0.05); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.shop-tab { flex: 1; text-align: center; padding: 10px 8px; font-size: 13px; font-weight: 800; color: #888; border-radius: 8px; cursor: pointer; transition: 0.2s; white-space: nowrap; }
.shop-tab.active { background: var(--gold); color: #000; box-shadow: 0 2px 10px rgba(0,0,0,0.2); }

.shop-scroll-area { overflow-y: auto; max-height: 55vh; padding-bottom: 20px; scrollbar-width: none; }
.shop-scroll-area::-webkit-scrollbar { display: none; }

.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.shop-grid[data-filter="sup"] [data-type]:not([data-type="sup"]) { display: none; }
.shop-grid[data-filter="skill"] [data-type]:not([data-type="skill"]) { display: none; }
.shop-grid[data-filter="gem"] [data-type]:not([data-type="gem"]) { display: none; }
.shop-grid[data-filter="vip"] [data-type]:not([data-type="vip"]) { display: none; }

.iap-card { 
    position: relative; background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(0,0,0,0.2)); 
    border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 24px 12px 16px; 
    text-align: center; cursor: pointer; transition: transform 0.16s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.16s ease, border-color 0.16s ease, background 0.16s ease; 
    overflow: hidden; display: flex; flex-direction: column; align-items: center;
}
.iap-card:active { transform: scale(0.96); background: rgba(255,255,255,0.1); }
.iap-card.disabled { opacity: 0.5; filter: grayscale(1); pointer-events: none; border-color: rgba(255,107,107,0.3); }

.limit-tag {
    position: absolute; top: 0; left: 0; right: 0; background: rgba(0,0,0,0.6);
    color: #aaa; font-size: 10px; font-weight: 800; padding: 4px; letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.iap-card.hot { 
    border-color: rgba(241,197,90,0.4); 
    background: linear-gradient(145deg, rgba(241,197,90,0.12), rgba(0,0,0,0.3)); 
    box-shadow: 0 8px 30px rgba(241,197,90,0.15); 
}
.hot .limit-tag { background: linear-gradient(90deg, #f1c55a, #e67e22); color: #000; }
.iap-icon { font-size: 38px; margin-bottom: 12px; filter: drop-shadow(0 0 12px rgba(78, 205, 196, 0.3)); }
.hot .iap-icon { filter: drop-shadow(0 0 15px rgba(241,197,90,0.5)); transform: scale(1.1); }
.iap-amt { font-size: 14px; font-weight: 900; color: #fff; margin-bottom: 10px; }

/* Dual Pricing Display */
.dual-price {
    display: flex; flex-direction: column; gap: 4px; width: 100%;
}
.price-btn {
    width: 100%; background: rgba(255,255,255,0.08); padding: 6px; border-radius: 8px; 
    font-size: 12px; font-weight: 800; border: 1px solid rgba(255,255,255,0.05);
    display: flex; justify-content: center; align-items: center; gap: 4px;
    transition: 0.2s;
}
.price-btn:active { background: rgba(255,255,255,0.2); }
.price-btn.coin { color: var(--gold); }
.price-btn.dia { color: var(--blue); }
.price-btn.fiat { background: var(--gold); color: #000; border: none; font-size: 14px; padding: 8px; }

/* Subscriptions */
.pass-banner { 
    background: linear-gradient(135deg, #1e1e24, #0b0b10); border: 1px solid var(--gold); 
    border-radius: 20px; padding: 20px; margin-bottom: 12px; text-align: left; 
    position: relative; overflow: hidden; cursor: pointer; display: flex; 
    justify-content: space-between; align-items: center; box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}
.pass-banner.lifetime { border-color: #a29bfe; }
.pass-banner:active { transform: scale(0.98); }
.pass-info { flex: 1; z-index: 2; }
.pass-title { color: var(--gold); font-weight: 900; font-size: 18px; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; letter-spacing: 0.5px; }
.lifetime .pass-title { color: #a29bfe; }
.pass-desc { font-size: 12px; color: rgba(255,255,255,0.6); line-height: 1.5; margin-bottom: 12px; padding-right: 10px;}
.pass-price { font-size: 15px; font-weight: 900; color: #000; background: linear-gradient(90deg, #f1c55a, #e6b33e); padding: 6px 14px; border-radius: 10px; display: inline-block; box-shadow: 0 4px 15px rgba(241,197,90,0.3); }
.lifetime .pass-price { background: linear-gradient(90deg, #a29bfe, #6c5ce7); color: #fff; }

/* ====================
   SYSTEM MODAL (GLOBAL ALERTS)
   ==================== */
.sys-modal-overlay {
    position: fixed; inset: 0; z-index: 9999; display: flex; justify-content: center; align-items: center; 
    opacity: 0; pointer-events: none; transition: 0.3s; background: rgba(0,0,0,0.7); backdrop-filter: none;
}
.sys-modal-overlay.active { opacity: 1; pointer-events: auto; }
.sys-modal-card {
    width: 85%; max-width: 320px; background: rgba(20, 20, 25, 0.95); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px; padding: 24px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    transform: scale(0.9); transition: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sys-modal-overlay.active .sys-modal-card { transform: scale(1); }
.sys-icon { font-size: 40px; margin-bottom: 12px; }
.sys-icon.warning { color: var(--red); text-shadow: 0 0 15px rgba(255, 107, 107, 0.5); }
.sys-icon.success { color: var(--green); text-shadow: 0 0 15px rgba(46, 204, 113, 0.5); }
.sys-title { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.sys-msg { font-size: 13px; color: rgba(255,255,255,0.7); line-height: 1.5; margin-bottom: 20px; }
.sys-btn-group { display: flex; gap: 10px; }
.sys-btn { flex: 1; padding: 12px; border-radius: 12px; font-size: 14px; font-weight: 800; border: none; cursor: pointer; transition: 0.2s; }
.sys-btn:active { transform: scale(0.95); }
.sys-btn.confirm { background: var(--gold); color: #000; }
.sys-btn.cancel { background: rgba(255,255,255,0.1); color: #fff; }

/* ====================
   INVENTORY INTEGRATED INTO PROFILE
   ==================== */
.inv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 10px 0; }
.inv-item { background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.05); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; position: relative; }
.inv-item-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.inv-icon { font-size: 24px; filter: drop-shadow(0 0 8px rgba(255,255,255,0.2)); }
.inv-count { font-size: 20px; font-weight: 900; font-family: var(--font-tech); }
.inv-name { font-size: 12px; font-weight: 700; color: #ddd; margin-bottom: 4px; }
.inv-breakdown { font-size: 10px; color: #888; display: flex; justify-content: space-between; }
.inv-breakdown span.temp { color: var(--red); }
.inv-breakdown span.perm { color: var(--blue); }
.inv-progress-track { height: 4px; background: rgba(255,255,255,0.1); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.inv-progress-bar { height: 100%; background: var(--gold); border-radius: 4px; transition: width 0.3s ease;}

/* 讓 Profile 視窗適應 3 個 Tab */
.pf-tabs { display: flex; background: rgba(255,255,255,0.05); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.pf-tab-btn { flex: 1; text-align: center; padding: 10px 4px; font-size: 12px; font-weight: 800; color: #888; border-radius: 8px; cursor: pointer; transition: 0.2s; border: none; background: transparent; outline: none; white-space: nowrap;}
.pf-tab-btn.active { background: var(--gold); color: #000; box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
/* ====================
   DIFFICULTY PANEL (V3.8 MERGE - HAPPY METER)
   ==================== */
.diff-card { max-width: 420px; background: rgba(15, 15, 20, 0.98); padding: 24px; }
.diff-header { text-align: center; margin-bottom: 24px; }
.diff-header h2 { font-size: 22px; font-weight: 900; margin: 0 0 4px; color: var(--gold); letter-spacing: 1px; }
.diff-header p { font-size: 12px; color: #888; margin: 0; }

.diff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.diff-option {
    background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(0,0,0,0.3));
    border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 16px;
    text-align: center; cursor: pointer; transition: 0.2s; position: relative; overflow: hidden;
}
.diff-option.active { border-color: var(--gold); background: rgba(255,200,87,0.1); box-shadow: 0 0 20px rgba(255, 200, 87, 0.2); transform: scale(1.02); }
.diff-option:active { transform: scale(0.98); }

.diff-name { font-size: 16px; font-weight: 800; margin-bottom: 4px; color: #eee; }
.diff-multi { font-size: 24px; font-family: var(--font-tech); font-weight: 700; color: #fff; letter-spacing: 1px; }
.streak-tag { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.5); font-size: 9px; padding: 2px 6px; border-radius: 8px; color: var(--gold); border: 1px solid rgba(255,200,87,0.3); }
.diff-desc { font-size: 10px; color: #888; margin-top: 4px; }

.diff-info-panel {
    background: rgba(0,0,0,0.5); border-radius: 16px; padding: 16px;
    display: flex; justify-content: space-between; align-items: center;
    border: 1px solid rgba(255,255,255,0.05); margin-bottom: 20px;
}
.info-col { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.info-label { font-size: 11px; color: #666; font-weight: 700; }
.info-val { font-size: 16px; color: #fff; font-weight: 900; font-family: var(--font-tech); }

.btn-start-game {
    width: 100%; padding: 16px; border-radius: 16px; border: none;
    background: linear-gradient(135deg, var(--gold), #e6b33e); color: #000;
    font-size: 16px; font-weight: 900; cursor: pointer; transition: 0.2s; box-shadow: 0 5px 20px rgba(255, 200, 87, 0.3);
}
.btn-start-game:active { transform: scale(0.96); }
/* ====================
   FEATURE DOCK / TRIAL HUB
   ==================== */
.feature-shell {
    position: absolute;
    top: calc(var(--safe-top) + 78px);
    right: 12px;
    z-index: 25;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 74px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 203, 82, 0.28);
    background: rgba(10, 13, 20, 0.72);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow: 
        0 16px 36px rgba(0,0,0,0.5), 
        inset 0 1px 0 rgba(255,255,255,0.12), 
        0 0 20px rgba(255, 203, 82, 0.05);
    overflow: hidden;
    isolation: isolate;
    transform-origin: top right;
    transition: transform .26s cubic-bezier(.22,1,.36,1), box-shadow .24s ease, border-color .24s ease;
}
.feature-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 18% 20%, rgba(98,215,255,0.14), transparent 24%), radial-gradient(circle at 82% 50%, rgba(255,196,74,0.18), transparent 22%);
    pointer-events: none;
}
.feature-shell::after { display: none; }
.feature-shell:not(.open) {
    transform: translate3d(0,0,0) scale(.985);
    box-shadow: 0 14px 28px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
}
.feature-dock {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    overflow: hidden;
    max-width: 320px;
    min-height: 54px;
    padding: 0;
    opacity: 1;
    transition: max-width .34s cubic-bezier(.22,1,.36,1), opacity .18s ease, margin-right .24s ease;
}
.feature-shell:not(.open) .feature-dock {
    max-width: 0;
    opacity: 0;
    margin-right: -2px;
}
.feature-dock-highlight { display: none !important; }
.feature-dock-btn {
    appearance: none;
    position: relative;
    z-index: 1;
    border: 0;
    background: transparent;
    display: grid;
    grid-template-rows: 46px auto;
    gap: 5px;
    justify-items: center;
    color: #fff;
    cursor: pointer;
    min-width: 56px;
    padding: 0 2px 4px 2px;
    opacity: 1;
    transform: translate3d(0,0,0) scale(1);
    transition: transform .22s cubic-bezier(.22,1,.36,1), opacity .18s ease, filter .18s ease;
}
.feature-dock-btn:nth-of-type(2), .feature-dock-btn:nth-of-type(3), .feature-dock-btn:nth-of-type(4) { transition-delay: 0s; }
.feature-shell:not(.open) .feature-dock-btn {
    opacity: 0;
    transform: translate3d(12px,0,0) scale(.96);
    filter: blur(.5px);
    pointer-events: none;
}
.feature-dock-icon {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02) 52%, rgba(0,0,0,0.15));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 4px 10px rgba(0,0,0,0.2);
    transition: transform .2s cubic-bezier(0.2, 0.8, 0.2, 1), background .2s ease, box-shadow .2s ease;
}
.feature-dock-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
    pointer-events: none;
}
.feature-dock-icon.tone-gold { color: #ffd86b; --icon-glow: rgba(255, 216, 107, 0.4); }
.feature-dock-icon.tone-cyan { color: #8df8ff; --icon-glow: rgba(141, 248, 255, 0.4); }
.feature-dock-icon.tone-violet { color: #d7b8ff; --icon-glow: rgba(215, 184, 255, 0.4); }
.feature-dock-icon.tone-emerald { color: #9ff7d8; --icon-glow: rgba(159, 247, 216, 0.4); }

.feature-dock-btn:hover .feature-dock-icon,
.feature-dock-btn.active .feature-dock-icon {
    transform: translateY(-3px) scale(1.04);
    background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06) 50%, rgba(0,0,0,0.12));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 8px 18px rgba(0,0,0,0.35), 0 0 14px var(--icon-glow);
}
.feature-dock-btn:active .feature-dock-icon { transform: translateY(1px) scale(.985); }

.feature-dock-btn.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    width: 12px;
    height: 3px;
    background: currentColor;
    border-radius: 99px;
    box-shadow: 0 0 8px currentColor;
    animation: nav-active-pulse 1.8s ease-in-out infinite alternate;
}
@keyframes nav-active-pulse {
    0% { transform: scaleX(0.8); opacity: 0.6; }
    100% { transform: scaleX(1.2); opacity: 1; }
}

.feature-emoji {
    font-size: 25px;
    line-height: 1;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3));
}
.feature-dock-label {
    font-size: 11px;
    font-weight: 900;
    color: rgba(255,255,255,0.85);
    letter-spacing: .02em;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
    transition: color .18s ease;
}
.feature-dock-btn:hover .feature-dock-label { color: #fff; text-shadow: 0 0 8px rgba(255,255,255,0.5); }
.feature-dock-btn.active .feature-dock-label,
.feature-dock-btn:active .feature-dock-label { color: #fff; }

.feature-launcher {
    position: relative;
    z-index: 2;
    width: 50px;
    min-width: 50px;
    height: 50px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffd86b 0%, #ffcb52 50%, #b38419 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 
        inset 0 1px 0 rgba(255,255,255,0.4), 
        0 6px 16px rgba(255, 196, 74, 0.3), 
        0 0 8px rgba(255, 203, 82, 0.2);
    transition: transform .22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow .22s ease;
}
.feature-launcher::before {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 999px;
    background: radial-gradient(circle at 34% 30%, rgba(255,255,255,0.35), rgba(255,191,42,0.1) 48%, transparent 72%);
    pointer-events: none;
}
.feature-launcher:hover,
.feature-launcher:focus-visible {
    transform: translateY(-2px) rotate(15deg);
    box-shadow: 
        inset 0 1px 0 rgba(255,255,255,0.5), 
        0 8px 20px rgba(255, 196, 74, 0.4), 
        0 0 15px rgba(255, 203, 82, 0.4);
}
.feature-launcher:active { transform: translateY(1px) scale(.98); }
.feature-caret { width: 22px; height: 22px; overflow: visible; }
.feature-caret path {
    fill: none;
    stroke: #12141a;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 1px 2px rgba(255,255,255,0.3));
    transition: transform .28s cubic-bezier(.22,1,.36,1);
    transform-origin: 50% 50%;
}
.feature-shell.open .feature-caret path { transform: rotate(180deg); }
.feature-entry-pill[hidden] { display: none !important; }
@media (max-width: 520px) {
  .feature-shell { top: calc(var(--safe-top) + 78px); right: 12px; min-height: 72px; padding: 10px 12px; }
  .feature-dock { gap: 9px; max-width: 294px; }
  .feature-dock-btn { min-width: 54px; }
  .feature-dock-icon { width: 44px; height: 44px; border-radius: 14px; }
  .feature-emoji { font-size: 23px; }
  .feature-dock-label { font-size: 10px; }
  .feature-launcher { width: 46px; min-width: 46px; height: 46px; }
}

.feature-workspace {
    position: absolute;
    inset: calc(var(--safe-top) + 118px) 12px calc(var(--safe-bottom) + 12px) 12px;
    z-index: 26;
}
.feature-workspace[hidden] { display: none !important; }
.feature-workspace-backdrop {
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: rgba(2,2,8,0.32);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.feature-workspace-card {
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(12,12,18,0.96), rgba(6,6,12,0.98));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 28px 60px rgba(0,0,0,0.58), inset 0 1px 0 rgba(255,255,255,0.05);
    padding: 20px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.feature-workspace-head {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap: 12px;
}
.feature-workspace-eyebrow {
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.44);
    margin-bottom: 4px;
}
.feature-workspace-title {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
}
.feature-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.84);
    display: inline-flex;
    align-items:center;
    justify-content:center;
}
.feature-page {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: none;
    flex-direction: column;
    gap: 14px;
    padding-right: 2px;
}
.feature-page.active { display: flex; }
.feature-page[hidden] { display: none !important; }
.feature-page::-webkit-scrollbar { display:none; }
.feature-section-title {
    font-size: 15px;
    font-weight: 900;
    color: #fff;
}
.feature-subtitle-inline {
    margin-top: -8px;
    font-size: 12px;
    color: rgba(255,255,255,0.62);
}
.glass-block {
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 12px 26px rgba(0,0,0,0.28);
    padding: 14px;
}
.trial-hero-card {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap: 12px;
    border-radius: 24px;
    border: 1px solid rgba(255,200,87,0.18);
    background: linear-gradient(140deg, rgba(255,200,87,0.12), rgba(8,8,14,0.82));
    padding: 16px;
}
.trial-hero-title { font-size: 18px; font-weight: 900; color: #fff; }
.trial-hero-sub { font-size: 12px; color: rgba(255,255,255,0.68); margin-top: 4px; }
.trial-cycle-chip {
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    color: var(--gold);
    background: rgba(0,0,0,0.34);
    border: 1px solid rgba(255,200,87,0.18);
}
.trial-panel-grid {
    display:grid;
    gap: 14px;
}
.trial-subject-grid,
.trial-sub-grid,
.codex-grid {
    display:grid;
    gap: 12px;
}
.trial-subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.trial-sub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.codex-grid { grid-template-columns: 1fr; }
.trial-subject-card,
.trial-sub-card,
.codex-card {
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    padding: 14px;
    color: #fff;
    text-align: left;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 20px rgba(0,0,0,0.24);
}
.trial-subject-card.active,
.trial-sub-card.active,
.codex-card.active {
    border-color: rgba(255,200,87,0.50);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 10px 24px rgba(255,200,87,0.12);
}
.trial-subject-card .top,
.trial-sub-card .top,
.codex-card .top {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap: 10px;
}
.trial-subject-card .icon-badge,
.codex-card .icon-badge {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display:flex;
    align-items:center;
    justify-content:center;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.22), rgba(255,255,255,0.04));
    color: var(--gold);
    font-size: 22px;
}
.card-title-text { font-size: 15px; font-weight: 900; color: #fff; }
.card-sub-text { font-size: 11px; color: rgba(255,255,255,0.62); margin-top: 3px; }
.stat-chip-row {
    display:flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.stat-chip {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.84);
}
.stat-chip.gold { color: var(--gold); }
.stat-chip.cyan { color: var(--blue); }
.stat-chip.violet { color: #b79cff; }
.trial-meta-row {
    display:grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 10px;
}
.trial-meta-box {
    min-height: 74px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap: 6px;
}
.meta-label {
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.44);
}
.meta-value {
    font-size: 15px;
    font-weight: 900;
    color: #fff;
}
.trial-rules ul { margin: 10px 0 0 18px; padding: 0; color: rgba(255,255,255,0.76); font-size: 13px; line-height: 1.6; }
.feature-footer-actions {
    display:flex;
    justify-content:flex-end;
    padding-bottom: 4px;
}
.feature-primary-btn {
    min-width: 176px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 0;
    background: linear-gradient(135deg, #ffd97a, #f6b93b);
    color: #121212;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(255,200,87,0.26);
}
.ranking-toolbar { display:flex; justify-content:space-between; align-items:center; }
.ranking-list {
    display:grid;
    gap: 10px;
}
.ranking-row {
    display:grid;
    grid-template-columns: 42px 1fr auto;
    gap: 12px;
    align-items:center;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}
.ranking-rank {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display:flex;
    align-items:center;
    justify-content:center;
    background: rgba(255,255,255,0.04);
    font-weight: 900;
    color: #fff;
}
.ranking-rank.top3 { background: linear-gradient(135deg, rgba(255,200,87,0.22), rgba(255,255,255,0.06)); color: var(--gold); }
.ranking-name { font-size: 14px; font-weight: 900; color:#fff; }
.ranking-meta { font-size: 11px; color: rgba(255,255,255,0.62); margin-top: 3px; }
.ranking-score { text-align:right; }
.ranking-score .pts { font-size: 16px; font-weight: 900; color: var(--gold); }
.ranking-score .sub { font-size: 11px; color: rgba(255,255,255,0.56); margin-top: 4px; }
.trial-session-banner {
    position: absolute;
    top: calc(var(--safe-top) + 122px);
    right: 14px;
    max-width: min(44vw, 176px);
    display:flex;
    gap: 10px;
    align-items:center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,200,87,0.18);
    background: rgba(5,5,10,0.72);
    box-shadow: 0 12px 26px rgba(0,0,0,0.38);
    z-index: 13;
}
.trial-session-banner[hidden] { display:none !important; }
.trial-session-label { font-size: 11px; font-weight: 800; color: rgba(255,255,255,0.74); }
.trial-session-time { font-size: 13px; font-weight: 900; color: var(--gold); }
@media (max-width: 640px) {
    .feature-shell { top: calc(var(--safe-top) + 62px); right: 14px; }
    .feature-workspace { inset: calc(var(--safe-top) + 106px) 10px calc(var(--safe-bottom) + 10px); }
    .trial-panel-grid, .trial-meta-row { grid-template-columns: 1fr; }
    .trial-subject-grid, .trial-sub-grid { grid-template-columns: 1fr 1fr; }
    .feature-primary-btn { width: 100%; }
}

/* ====================
   GAME VIEW & EFFECTS
   ==================== */
.boss-stage { position: absolute; top: 0; left: 0; right: 0; height: 34%; z-index: 10; display: flex; flex-direction: column; align-items: center; padding-top: calc(var(--safe-top) + 166px); }
.score-board { position:absolute; top: calc(var(--safe-top) + 10px); left: 14px; right: 14px; min-height: 80px; font-size: 17px; font-weight: 900; color: rgba(255,255,255,0.86); text-shadow: 0 2px 10px rgba(0,0,0,0.55); margin: 0; z-index: 12; display:grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items:start; }
.battle-topbar { align-items:flex-start; justify-content:flex-start; gap:12px; }
.score-stack { grid-column:1; display:flex; flex-direction:column; align-items:flex-start; gap:2px; z-index:5; max-width: min(42vw, 180px); min-width:0; }
.score-group { display:flex; align-items:center; gap:6px; min-width:0; font-family: var(--font-tech); letter-spacing: 0.04em; }
.score-val { color: var(--gold); }
.combo-group { display:flex; align-items:center; gap:6px; min-height: 16px; }
.combo-value { font-family: var(--font-tech); font-size:16px; font-weight:900; letter-spacing:0.04em; color: rgba(255,255,255,0.92); text-shadow: 0 0 10px rgba(0,0,0,0.35); white-space:nowrap; }
.combo-max-hint { font-size:10px; font-weight:900; color: var(--gold); opacity:0; transform: translateY(4px) scale(0.9); pointer-events:none; }
.combo-group.combo-max-fx .combo-value { animation: comboTextPulse 0.5s ease, comboTextGlowFade 3s ease forwards; }
.combo-group.combo-max-fx .combo-max-hint { animation: comboHintFade 3s ease forwards; }
.boss-container { width:100%; display:flex; justify-content:center; align-items:center; margin-top: 0; }
.boss-top-center { position:relative; grid-column:2; left:auto; top:auto; transform:none; width:min(24vw, 112px); display:flex; flex-direction:column; align-items:center; justify-content:center; justify-self:center; z-index:13; pointer-events:none; }
.boss-hud { display:none !important; }
.boss-name-wrap { min-width: 0; }
.boss-name-text { font-size: 14px; font-weight: 900; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.boss-meta-row { display:flex; gap:8px; margin-top:6px; }
.boss-mode-badge, .boss-tier-pill, .boss-defense-pill { display:inline-flex; align-items:center; justify-content:center; padding:4px 8px; border-radius:999px; background: rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.10); font-size:10px; font-weight:800; color: rgba(255,255,255,0.76); }
.boss-mode-badge { color: var(--gold); }
.boss-hp-strip { position:absolute; top: var(--boss-hud-offset-default); left:50%; right:auto; width:var(--boss-hud-hp-width); max-width:var(--boss-hud-hp-width); min-width:var(--boss-hud-hp-width); transform:translateX(-50%); z-index: 11; display:flex; flex-direction:column; gap:6px; pointer-events:none; }
.boss-hp-strip-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.boss-hp-strip-label { font-family: var(--font-tech); font-size: 11px; font-weight: 900; letter-spacing: 0.16em; color: rgba(255,255,255,0.62); }
.boss-hp-text { font-family: var(--font-tech); font-size:12px; font-weight:800; color: rgba(255,255,255,0.9); white-space:nowrap; text-shadow: 0 0 10px rgba(0,0,0,0.35); }
.boss-hp-strip-track { position:relative; width:100%; height: 10px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow:hidden; }
.boss-hp-trail, .boss-hp-bar { position:absolute; inset:0 auto 0 0; width:100%; border-radius:999px; transition: width 0.18s linear; }
.boss-hp-trail { background: rgba(255, 144, 144, 0.28); }
.boss-hp-bar { background: linear-gradient(90deg, #ff6b6b, #f39c12); box-shadow: 0 0 14px rgba(255,107,107,0.40); }
.boss-defense-row { display:flex; gap:6px; margin-top:8px; flex-wrap:wrap; }
.boss-aux-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip-path: inset(50%); white-space: nowrap; }
.boss-entity { font-size: 60px; filter: drop-shadow(0 0 14px rgba(255, 200, 87, 0.46)); z-index: 2; animation: float 3s ease-in-out infinite; transform-origin: center; will-change: transform; transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, opacity 0.16s ease; }
.boss-entity.hurt { filter: drop-shadow(0 0 25px rgba(255, 107, 107, 0.8)); transform: scale(0.9); }

.dialogue-box { background: rgba(14, 16, 24, 0.84); border-radius: 24px; padding: 16px 20px 18px; width: min(94%, 452px); max-width: 452px; min-height: 122px; max-height: 210px; text-align: center; position: relative; box-shadow: 0 10px 28px rgba(0,0,0,0.26); margin-top: 14px; backdrop-filter: none; }
.dialogue-box::after { display:none; }
.q-text { font-size: 15px; line-height: 1.5; font-weight: 700; background: linear-gradient(to bottom, #fff, #ddd); -webkit-background-clip: text; color: transparent; margin: 0; max-height: 158px; overflow-y: auto; scrollbar-width: thin; }
.q-type { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 200, 87, 0.82); margin-bottom: 8px; font-weight: 800; }
.q-type.correct { color: #71f2b3; }
.q-type.wrong { color: #ff9b9b; }
.q-iq-band { font-size: 10px; letter-spacing: .08em; color: rgba(255,255,255,0.52); margin-bottom: 10px; font-weight: 700; }
.q-passage { font-size: 12px; line-height: 1.55; color: rgba(255,255,255,0.82); padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); margin-bottom: 10px; text-align: left; max-height: 96px; overflow-y: auto; }
.q-prompt { line-height: 1.5; font-weight: 700; color: #f7f7fb; word-break: break-word; overflow-wrap: anywhere; }
.q-prompt.q-prompt-size-1 { font-size: 18px; }
.q-prompt.q-prompt-size-2 { font-size: 17px; }
.q-prompt.q-prompt-size-3 { font-size: 16px; }
.q-prompt.q-prompt-size-4 { font-size: 15px; }
.q-explanation { margin-top: 10px; font-size: 12px; line-height: 1.55; color: rgba(255,255,255,0.76); }

.options-stage { position: absolute; top: 47%; left: 0; right: 0; bottom: 24%; z-index: 15; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.opt-btn { width: 88%; max-width: 350px; min-height: 54px; background: var(--bg-glass); border: 1px solid var(--border-light); border-radius: 18px; padding: 0 16px; display: flex; align-items: center; transition: transform 0.08s ease, border-color 0.08s ease, background 0.08s ease; box-shadow: 0 4px 10px rgba(0,0,0,0.2); backdrop-filter: none; color: #fff; cursor: pointer; }
.opt-btn:active { transform: scale(0.95); background: rgba(255,255,255,0.2); }
.opt-btn.is-disabled { opacity: 0.9; }
.opt-btn.is-correct { border-color: rgba(113, 242, 179, 0.9); box-shadow: 0 0 0 1px rgba(113, 242, 179, 0.45), 0 6px 16px rgba(33, 150, 83, 0.25); background: rgba(27, 79, 52, 0.42); }
.opt-btn.is-wrong { border-color: rgba(255, 138, 138, 0.95); box-shadow: 0 0 0 1px rgba(255, 138, 138, 0.4), 0 6px 16px rgba(198, 40, 40, 0.22); background: rgba(110, 31, 31, 0.42); }
.opt-key { width: 30px; height: 30px; background: linear-gradient(135deg, #444, #222); color: var(--gold); border: 1px solid rgba(255,255,255,0.2); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: 800; font-size: 14px; margin-right: 14px; flex-shrink: 0;}
.opt-text { font-weight: 600; color: #f0f0f5; text-align: left; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; overflow-wrap: anywhere; }
.opt-text.opt-text-size-1 { font-size: 18px; }
.opt-text.opt-text-size-2 { font-size: 17px; }
.opt-text.opt-text-size-3 { font-size: 16px; }
.opt-text.opt-text-size-4 { font-size: 15px; }

.player-stage { position: absolute; bottom: 0; left: 0; right: 0; height: 24%; z-index: 20; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.hero-section-wrapper { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: clamp(6px, 2vw, 12px); margin-bottom: -2px; z-index: 25; padding-bottom: 8px; }
.timer-float { position: absolute; top: -46px; left: 50%; transform: translateX(-50%); width: 44px; height: 44px; background: #111; border: 2px solid var(--gold); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: 800; font-size: 20px; color: #fff; box-shadow: 0 0 20px var(--gold-glow), inset 0 0 10px var(--gold-glow); animation: pulse-time 2s infinite; z-index: 30; }

.hero-avatar { position: relative; width: clamp(52px, 14vw, 60px); height: 80px; transform: scale(1.1); margin: 0 5px; cursor: pointer;}
.h-head, .hero-head { width: 30px; height: 34px; background: linear-gradient(180deg, #36414a, #1d2328); margin: 0 auto; border-radius: 12px 12px 6px 6px; border: 1px solid rgba(255,255,255,0.22); box-shadow: 0 6px 14px rgba(0,0,0,0.28); position: relative; z-index: 3; }
.h-body, .hero-body { width: 46px; height: 42px; background: linear-gradient(180deg, #55b8ff, #2b80ff 52%, #1f46b1 100%); margin: -4px auto 0; border-radius: 12px 12px 0 0; border: 1px solid rgba(255,255,255,0.22); box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 10px 20px rgba(43,128,255,0.22); position: relative; z-index: 2; }
.h-pack, .hero-backpack { position: absolute; top: 35px; left: 50%; transform: translateX(-50%); width: 34px; height: 30px; background: #6D4C41; border-radius: 8px; border: 1px solid rgba(0,0,0,0.3); z-index: 4; box-shadow: 0 2px 5px rgba(0,0,0,0.4); transition: 0.2s;}
.hero-avatar:active .h-pack { transform: translateX(-50%) scale(1.1); border-color: var(--gold); box-shadow: 0 0 15px var(--gold-glow); }
.h-pack::before, .hero-backpack::before { content: ''; position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 20px; height: 12px; background: #8D6E63; border-radius: 4px; }
.hero-cape { position: absolute; top: 22px; left: 4px; right: 4px; height: 50px; background: #d63031; border-radius: 4px; z-index: 1; }

.skill-btn { width: clamp(40px, 11vw, 48px); height: clamp(40px, 11vw, 48px); background: rgba(45, 52, 54, 0.9); border: 2px solid rgba(255,255,255,0.2); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 22px; color: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.4); transition: 0.1s; cursor: pointer; position: relative; }
.skill-badge { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 12px; background: var(--red); color: white; border: 2px solid #2d3436; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900; box-shadow: 0 2px 4px rgba(0,0,0,0.5); z-index: 5; pointer-events: none;}
.skill-btn:active { transform: scale(0.9); }
.skill-btn.empty { opacity: 0.4; filter: grayscale(100%); pointer-events: none; }
.skill-btn.empty .skill-badge { background: #555; }
.skill-btn.cooldown .cd-overlay { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:20px; font-family:var(--font-tech); font-weight:900; color:#fff; z-index:4; text-shadow:0 2px 6px #000; background:rgba(0,0,0,0.5); border-radius: 50%;}

.player-hud { width: 100%; background: linear-gradient(to top, rgba(0,0,0,1), rgba(10,10,10,0.85)); backdrop-filter: none; border-top: 1px solid rgba(255,255,255,0.1); padding: 12px 20px calc(var(--safe-bottom) + 10px); display: flex !important; flex-wrap: nowrap !important; gap: 6px !important; justify-content: space-between !important; align-items: stretch !important; border-radius: 24px 24px 0 0; box-shadow: 0 -5px 20px rgba(0,0,0,0.5); }
.hud-block { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 10px 8px !important; display: flex; flex-direction: column; justify-content: center; flex: 1 1 0 !important; min-width: 0 !important; }
.hud-label { font-size: 10px !important; font-weight: 700; color: rgba(255,255,255,0.5); margin-bottom: 4px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.val-text { font-size: 14px !important; font-weight: 800; }
.val-int { color: var(--blue); } .val-agi { color: var(--green); } .val-hp { color: var(--red); }
.hud-hp-track { height: 6px; width: 100%; background: rgba(0,0,0,0.3); border-radius: 100px; margin-top: 4px; overflow: hidden; }
.hud-hp-bar { height: 100%; width: 100%; background: var(--red); border-radius: 100px; box-shadow: 0 0 8px rgba(255, 107, 107, 0.4); transition: width 0.3s ease; }

/* REVIVE MODAL */
.revive-card { text-align: center; padding: 32px 24px; border-color: rgba(255, 107, 107, 0.4); box-shadow: 0 0 50px rgba(255, 107, 107, 0.15); }
.revive-header { font-size: 24px; font-weight: 900; color: var(--red); margin-bottom: 8px; }
.revive-desc { font-size: 13px; color: rgba(255,255,255,0.6); margin-bottom: 16px; line-height: 1.5; }
.revive-score { font-size: 16px; font-weight: 800; margin-bottom: 24px; background: rgba(255, 200, 87, 0.08); padding: 10px; border-radius: 12px; border: 1px solid rgba(255, 200, 87, 0.2); }
.revive-actions { display: flex; flex-direction: column; gap: 12px; }
.btn-revive { width: 100%; padding: 16px; border-radius: 16px; font-size: 14px; font-weight: 800; display: flex; justify-content: center; align-items: center; gap: 8px; cursor: pointer; transition: 0.2s; border: none; outline: none; }
.btn-revive:active { transform: scale(0.96); }
.btn-revive.primary { background: linear-gradient(135deg, var(--gold), #e6b33e); color: #000; box-shadow: 0 4px 15px rgba(255, 200, 87, 0.3); }
.btn-revive.item { background: linear-gradient(135deg, var(--red), #c0392b); color: #fff; }
.btn-revive.item:disabled { opacity: 0.5; filter: grayscale(1); pointer-events: none; }
.btn-revive.secondary { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.2); color: #fff; }
.btn-revive.ghost { background: transparent; border: none; color: rgba(255,255,255,0.4); font-size: 13px; font-weight: 600; padding: 10px; }

/* AAA SETTLEMENT OVERLAY */
.settlement-overlay {
    position: fixed; inset: 0; z-index: 200; display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: 0.4s ease-out;
    backdrop-filter: none;
    background:
        radial-gradient(circle at 18% 18%, rgba(92,78,255,0.18), transparent 28%),
        radial-gradient(circle at 82% 18%, rgba(255,196,87,0.18), transparent 30%),
        linear-gradient(180deg, rgba(2,3,8,0.82), rgba(0,0,0,0.9));
}
.settlement-overlay.active { opacity: 1; pointer-events: auto; }
.settlement-card {
    width: min(92vw, 408px);
    padding: 30px 24px 24px;
    background:
        radial-gradient(circle at top right, rgba(255,200,87,0.16), transparent 34%),
        radial-gradient(circle at top left, rgba(111,116,255,0.18), transparent 34%),
        linear-gradient(180deg, rgba(21,24,40,0.96), rgba(10,11,19,0.985));
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 34px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.72), inset 0 1px 0 rgba(255,255,255,0.08);
    text-align: center;
    transform: translateY(16px) scale(0.96);
    opacity: 0;
}
.settlement-overlay.active .settlement-card { transform: translateY(0) scale(1); opacity: 1; }
.settlement-card.legacy-25d { border-color: rgba(255,200,87,0.52); box-shadow: 0 24px 74px rgba(0,0,0,0.72), inset 0 1px 0 rgba(255,255,255,0.08), 0 0 0 1px rgba(255,200,87,0.12), 0 0 40px rgba(111,116,255,0.10); }
.settlement-card.theme-victory { background:
        radial-gradient(circle at 80% 12%, rgba(255,208,92,0.20), transparent 32%),
        radial-gradient(circle at 14% 14%, rgba(87,225,255,0.18), transparent 30%),
        linear-gradient(180deg, rgba(24,28,52,0.96), rgba(8,10,18,0.99)); }
.settlement-card.theme-defeat { background:
        radial-gradient(circle at 80% 12%, rgba(255,110,110,0.18), transparent 32%),
        radial-gradient(circle at 14% 14%, rgba(167,108,193,0.16), transparent 30%),
        linear-gradient(180deg, rgba(38,20,28,0.96), rgba(10,8,15,0.99)); }
.settlement-title { font-size: 40px; font-weight: 900; font-family: var(--font-tech); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 2px; }
.settlement-title.victory { background: linear-gradient(to bottom, #fff3b9, #ffbf2a); -webkit-background-clip: text; color: transparent; filter: drop-shadow(0 8px 20px rgba(255,191,42,0.34)); }
.settlement-title.defeat { background: linear-gradient(to bottom, #ffbbb1, #ff6262); -webkit-background-clip: text; color: transparent; filter: drop-shadow(0 8px 20px rgba(255,98,98,0.28)); }
.settlement-sub {
    font-size: 14px;
    color: rgba(255,255,255,0.78);
    margin-bottom: 22px;
    font-weight: 700;
    line-height: 1.55;
    padding: 12px 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
    border: 1px solid rgba(255,255,255,0.06);
}
.settlement-score-label { font-size: 12px; color: #ffe58f; font-weight: 900; letter-spacing: .18em; margin-bottom: 10px; }
.settlement-score-val { font-size: 66px; font-weight: 900; font-family: var(--font-tech); color: #fff; text-shadow: 0 0 24px rgba(255,255,255,0.28), 0 0 44px rgba(103,125,255,0.10); margin-bottom: 24px; line-height: 1; }
.settlement-rewards {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 26px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(6,8,18,0.86), rgba(8,9,16,0.98));
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), inset 0 -24px 28px rgba(255,191,42,0.04);
}
.settlement-rewards .reward-item { min-width: auto; width: 100%; background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)); }
.reward-gold { min-height: 74px; }
.reward-stack { display:flex; flex-direction:column; gap:4px; text-align:left; }
.reward-label { font-size: 10px; color: rgba(255,255,255,0.62); letter-spacing: .16em; font-weight: 800; }
.reward-val { font-size: 34px; font-weight: 900; color: #fff1b1; text-shadow: 0 0 18px rgba(255,200,87,0.26); }
.reward-glyph.coin-glyph { width: 32px; height: 32px; border-radius:50%; background: radial-gradient(circle at 32% 28%, #fff4cf 0%, #ffd86b 30%, #f4b21f 64%, #8f5a05 100%); box-shadow: 0 0 0 1px rgba(255,214,107,0.24), inset 0 1px 2px rgba(255,255,255,0.48), 0 0 18px rgba(255,200,87,0.24); }
.settlement-actions { display: flex; flex-direction: column; gap: 12px; }
.btn-continue,
.btn-return {
    width: 100%;
    min-height: 56px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.16);
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    transition: 0.2s;
}
.btn-continue {
    background: linear-gradient(180deg, #ffe08a, #f4b21f);
    color: #241603;
    border-color: rgba(255,214,107,0.48);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), 0 14px 26px rgba(255,191,42,0.24);
}
.btn-continue.retry {
    background: linear-gradient(180deg, #9cc4ff, #6b87ff);
    color: #081325;
    border-color: rgba(156,196,255,0.48);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), 0 14px 26px rgba(107,135,255,0.22);
}
.btn-return { background: linear-gradient(180deg, rgba(34,38,58,0.96), rgba(14,15,22,0.98)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 24px rgba(0,0,0,0.24); }
.btn-return.accent { background: linear-gradient(180deg, rgba(255,233,171,0.96), rgba(255,192,64,0.96)); color: #241603; border-color: rgba(255,214,107,0.46); box-shadow: inset 0 1px 0 rgba(255,255,255,0.26), 0 12px 26px rgba(255,191,42,0.26); }

.float-score { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); font-size: 32px; font-weight: 900; color: var(--gold); text-shadow: 0 0 20px var(--gold); animation: floatUpText 1s ease-out forwards; pointer-events: none; z-index: 100; }
@keyframes floatUpText { 0% { opacity: 0; transform: translate(-50%, 0) scale(0.5); } 20% { opacity: 1; transform: translate(-50%, -50px) scale(1.2); } 100% { opacity: 0; transform: translate(-50%, -100px) scale(1); } }
@keyframes pulse-time { 0% { box-shadow: 0 0 20px var(--gold-glow); transform: translateX(-50%) scale(1); } 50% { box-shadow: 0 0 30px var(--gold-glow); transform: translateX(-50%) scale(1.05); } 100% { box-shadow: 0 0 20px var(--gold-glow); transform: translateX(-50%) scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes floatUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@keyframes dodgeTeleport{ 0%{ transform:translateX(0) scale(1); opacity:1; } 20%{ transform:translateX(-30px) scale(0.95); opacity:0; } 60%{ transform:translateX(30px) scale(0.95); opacity:0; } 100%{ transform:translateX(0) scale(1); opacity:1; } }
.hero-avatar.fx-dodge{ animation:dodgeTeleport .45s ease; }
@keyframes shieldBreak{ 0%{ box-shadow:0 0 0 rgba(0,255,255,0); } 30%{ box-shadow:0 0 26px rgba(0,255,255,0.9); } 70%{ box-shadow:0 0 40px rgba(0,255,255,0.95); transform:scale(1.06); } 100%{ box-shadow:0 0 0 rgba(0,255,255,0); transform:scale(1); } }
.hero-avatar.fx-shield-break{ animation:shieldBreak .55s ease; }

@keyframes auraSpin{ 0%{ transform:translate(-50%,-50%) rotate(0deg); opacity:.35; } 50%{ opacity:.75; } 100%{ transform:translate(-50%,-50%) rotate(360deg); opacity:.35; } }
.player-character.shield-aura::after{ content:""; position:absolute; left:50%; top:50%; width:110px; height:110px; border-radius:50%; border:2px solid rgba(120,255,255,0.75); box-shadow:0 0 18px rgba(120,255,255,0.35), inset 0 0 12px rgba(120,255,255,0.15); transform:translate(-50%,-50%); animation:auraSpin 1.2s linear infinite; pointer-events:none; z-index:1; }

@keyframes greenPulse{ 0%{ opacity:.25; transform:translate(-50%,-50%) scale(0.95); } 50%{ opacity:.65; transform:translate(-50%,-50%) scale(1.05); } 100%{ opacity:.25; transform:translate(-50%,-50%) scale(0.95); } }
.player-character.agility-aura::before{ content:""; position:absolute; left:50%; top:50%; width:120px; height:120px; border-radius:50%; background:radial-gradient(circle, rgba(120,255,140,0.0) 40%, rgba(120,255,140,0.25) 70%, rgba(120,255,140,0.0) 100%); box-shadow:0 0 22px rgba(120,255,140,0.25); transform:translate(-50%,-50%); animation:greenPulse .9s ease-in-out infinite; pointer-events:none; z-index:0; }


.subject-card.is-locked {
    opacity: 0.9;
    border-color: rgba(245, 201, 106, 0.28);
}
.subject-card.is-locked::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7,7,10,0.12), rgba(7,7,10,0.78));
    pointer-events: none;
}
.subject-card.is-locked .card-content,
.subject-card.is-locked .card-image { position: relative; z-index: 1; }
.subject-card .card-lock-shell {
    position: absolute;
    inset: auto 12px 12px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid rgba(245, 201, 106, 0.24);
    background: rgba(10, 10, 14, 0.74);
    backdrop-filter: none;
    z-index: 2;
}
.subject-card .lock-copy { display:flex; flex-direction:column; gap:2px; }
.subject-card .lock-badge {
    display:inline-flex;
    align-items:center;
    gap:6px;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(245, 201, 106, 0.16);
    color: var(--gold);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
}
.subject-card .lock-desc { color: rgba(255,255,255,0.72); font-size: 11px; }
.subject-card .lock-arrow { color: var(--gold); font-size: 18px; }

.event-overlay .overlay-card.event-card {
    max-width: 410px;
    gap: 18px;
    border: 1px solid rgba(245, 201, 106, 0.16);
    background:
        radial-gradient(circle at top left, rgba(245, 201, 106, 0.10), transparent 40%),
        rgba(13, 13, 18, 0.96);
}
.event-head { display:flex; gap:14px; align-items:flex-start; }
.event-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display:flex;
    align-items:center;
    justify-content:center;
    color: var(--gold);
    background: rgba(245, 201, 106, 0.12);
    border: 1px solid rgba(245, 201, 106, 0.18);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    font-size: 22px;
    flex: 0 0 auto;
}
.event-copy { display:flex; flex-direction:column; gap:6px; }
.event-eyebrow {
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(245, 201, 106, 0.72);
    font-weight: 800;
}
.event-title { font-size: 24px; font-weight: 900; color:#fff; line-height:1.15; }
.event-subtitle { color: rgba(255,255,255,0.72); font-size: 13px; line-height: 1.6; }
.event-list { display:flex; flex-direction:column; gap:10px; }
.event-list:empty { display:none; }
.event-item {
    display:flex;
    gap:12px;
    align-items:flex-start;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
}
.event-item-icon { color: var(--gold); font-size: 18px; line-height: 1.2; padding-top: 1px; }
.event-item-main { display:flex; flex-direction:column; gap:3px; }
.event-item-title { color:#fff; font-size: 14px; font-weight: 800; }
.event-item-desc { color: rgba(255,255,255,0.6); font-size: 12px; line-height:1.5; }
.event-footer { display:flex; gap:10px; }
.event-btn {
    flex:1;
    min-height: 48px;
    border-radius: 16px;
    border: none;
    outline: none;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s ease, opacity .2s ease, box-shadow .2s ease;
}
.event-btn:active { transform: scale(0.98); }
.event-btn.primary {
    color: #111;
    background: linear-gradient(135deg, #f5c96a, #f0b83f);
    box-shadow: 0 10px 24px rgba(245, 201, 106, 0.18);
}
.event-btn.secondary {
    color: #fff;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.14);
}
.event-card.tone-red .event-icon,
.event-card.tone-red .event-btn.primary {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.22), rgba(255, 107, 107, 0.10));
    color: #fff;
}
.event-card.tone-red .event-btn.primary {
    background: linear-gradient(135deg, #ff7b7b, #ff5e5e);
}
.event-card.tone-blue .event-icon,
.event-card.tone-blue .event-btn.primary {
    background: linear-gradient(135deg, rgba(78,205,196,0.24), rgba(78,205,196,0.12));
    color: #eaffff;
}
.event-card.tone-blue .event-btn.primary {
    background: linear-gradient(135deg, #65d6cf, #2ea8d8);
    color: #06151f;
}

/* ====================
   PATCH V5.9.9 — MEMBER FLOW / PROFILE HP / SHOP POLISH
   ==================== */
.btn-google {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
    color: #f5f6fa;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn-google:active { transform: scale(.985); }
.btn-google:hover { border-color: rgba(255,200,87,0.38); box-shadow: 0 12px 28px rgba(0,0,0,.28), 0 0 0 1px rgba(255,200,87,.08) inset; }
.auth-google-btn { margin-top: 14px; max-width: 100%; }
.setting-auth-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.setting-auth-title { color: #fff; font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.setting-auth-sub { color: #9a9aab; font-size: 12px; line-height: 1.55; }

.pf-header { align-items: flex-start; gap: 14px; }
.pf-info { min-width: 0; }
.pf-vitals-inline {
    width: 104px;
    margin-left: auto;
    padding-top: 4px;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pf-vital-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    color: rgba(255,255,255,0.52);
}
.pf-vital-label.muted { margin-top: 6px; }
.pf-vital-value {
    color: #fff;
    font-family: var(--font-tech);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .02em;
    text-shadow: 0 0 12px rgba(255,200,87,.12);
}
.pf-vital-time {
    color: var(--gold);
    font-family: var(--font-tech);
    font-size: 16px;
    font-weight: 700;
    text-shadow: 0 0 12px rgba(255,200,87,.18);
}

.shop-subtitle {
    margin-top: 4px;
    color: rgba(255,255,255,0.54);
    font-size: 12px;
    line-height: 1.45;
}
.shop-premium-strip {
    margin: 0 8px 16px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255,200,87,0.12);
    background: linear-gradient(135deg, rgba(255,200,87,0.12), rgba(255,255,255,0.035));
    box-shadow: 0 14px 34px rgba(0,0,0,0.22);
}
.shop-strip-kicker {
    color: var(--gold);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .16em;
    margin-bottom: 6px;
}
.shop-strip-copy {
    color: rgba(255,255,255,0.76);
    font-size: 12px;
    line-height: 1.5;
}
.iap-card,
.pass-banner {
    box-shadow: 0 18px 38px rgba(0,0,0,.24);
}
.iap-card::after,
.pass-banner::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0));
    opacity: .7;
}
.pass-info { position: relative; z-index: 1; }
.pass-perks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 14px;
}
.pass-perks span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.86);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .02em;
}
.pass-banner.lifetime .pass-perks span {
    background: rgba(162,155,254,0.12);
    border-color: rgba(162,155,254,0.2);
}

.cooldown-hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0 18px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.74);
    font-size: 12px;
    line-height: 1.5;
}
.cooldown-hint i { font-size: 16px; margin-top: 1px; }
.cooldown-hint.ready { border-color: rgba(46, 204, 113, 0.18); color: rgba(209,255,223,.9); }
.cooldown-hint.ready i { color: #53d77b; }
.cooldown-hint.locked { border-color: rgba(255,200,87,0.2); background: linear-gradient(180deg, rgba(255,200,87,0.08), rgba(255,255,255,0.03)); color: rgba(255,240,208,.92); }
.cooldown-hint.locked i { color: var(--gold); }

.overlay-card.event-card,
.revive-card,
.settlement-card {
    position: relative;
    overflow: hidden;
}
.overlay-card.event-card::before,
.revive-card::before,
.settlement-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255,200,87,0.15), transparent 42%), linear-gradient(180deg, rgba(255,255,255,0.05), transparent 28%);
    pointer-events: none;
}
.overlay-container.active .overlay-card,
.settlement-overlay.active .settlement-card {
    animation: panelRise .42s cubic-bezier(.22,1,.36,1);
}
@keyframes panelRise {
    0% { opacity: 0; transform: translateY(28px) scale(.94); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
.revive-header,
.settlement-title,
.event-title { text-shadow: 0 0 18px rgba(255,200,87,0.12); }
.revive-actions,
.settlement-actions,
.event-footer { position: relative; z-index: 1; }
.reward-item {
    min-width: 120px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.event-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.btn-revive,
.btn-return,
.btn-ad-double,
.event-btn,
.sys-btn.confirm {
    transition: transform .18s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-revive:active,
.btn-return:active,
.btn-ad-double:active,
.event-btn:active,
.sys-btn.confirm:active { transform: scale(.98); }

@media (max-width: 420px) {
    .pf-header { gap: 10px; }
    .pf-avatar-box { width: 72px; height: 72px; }
    .pf-name { font-size: 18px; }
    .pf-vitals-inline { width: 96px; padding-top: 2px; }
    .pf-vital-value { font-size: 16px; }
    .pf-vital-time { font-size: 12px; }
    .shop-premium-strip { padding: 12px 14px; }
}

.shop-close-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    background: rgba(255,255,255,0.05);
    color: #f3f4f8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
    flex: 0 0 auto;
}
.shop-close-btn i { font-size: 18px; }
.shop-close-btn:active { transform: scale(.96); }
.shop-close-btn:hover {
    border-color: rgba(255,200,87,0.28);
    background: rgba(255,255,255,0.08);
}


/* ===== Subject UI refresh from 001 prototype ===== */
.card-scroller.carousel-stage {
    top: 16.2%;
    height: 44.2%;
    gap: 20px;
    padding: 0 calc(50vw - 110px) 0;
    perspective: 1200px;
    transform-style: preserve-3d;
    scroll-padding-inline: calc(50vw - 110px);
    scroll-snap-stop: normal;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    z-index: 34;
    will-change: scroll-position;
    align-items: flex-end;
}
.card-scroller.carousel-stage::-webkit-scrollbar,
.tactical-grid::-webkit-scrollbar { display:none; }
.subject-card {
    --subject-rgb: 255,200,87;
    flex: 0 0 220px;
    height: 92%;
    border-radius: 28px;
    border: 2px solid rgba(255,255,255,0.05);
    background: linear-gradient(160deg, rgba(30,30,35,0.7) 0%, rgba(10,10,15,0.9) 100%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
    opacity: 0.52;
    transform: scale(0.85) translateZ(-40px) rotateX(5deg);
    -webkit-transform: scale(0.85) translateZ(-40px) rotateX(5deg);
    transform-origin: center center;
    overflow: hidden;
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
    display: flex;
    flex-direction: column;
    padding: 22px 18px 18px;
    position: relative;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform, opacity;
    contain: layout paint style;
}
.subject-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(var(--subject-rgb),0.22), transparent 44%);
    pointer-events:none;
}
.subject-card:hover {
    opacity: 0.8;
    border-color: rgba(var(--subject-rgb), 0.4);
    transform: scale(0.9) translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
}
.subject-card.active {
    opacity: 1;
    transform: scale(1.03) translateZ(0px) rotateX(0deg);
    -webkit-transform: scale(1.03) translateZ(0px) rotateX(0deg);
    border-color: rgba(var(--subject-rgb), 0.96);
    background: linear-gradient(135deg, rgba(var(--subject-rgb), 0.16) 0%, rgba(12, 14, 22, 0.96) 100%);
    box-shadow: 
        0 14px 38px rgba(0,0,0,0.45), 
        inset 0 0 26px rgba(var(--subject-rgb),0.26), 
        0 0 22px rgba(var(--subject-rgb),0.16),
        0 0 0 1px rgba(var(--subject-rgb), 0.3);
}
.subject-card.active:hover {
    opacity: 1;
    transform: scale(1.05) translateY(-6px);
    box-shadow: 
        0 18px 48px rgba(0,0,0,0.52), 
        inset 0 0 32px rgba(var(--subject-rgb),0.35), 
        0 0 30px rgba(var(--subject-rgb),0.24),
        0 0 0 1px rgba(var(--subject-rgb), 0.45);
}
.subject-card.is-side { opacity: 0.72; transform: scale(0.92) translateZ(-24px) rotateX(4deg); }
.subject-card.active.is-side { transform: scale(1.02) translateZ(0px) rotateX(0deg); }
.subject-card .card-icon-stage {
    width: 100%;
    min-height: 138px;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom: 12px;
    position: relative;
}
.subject-card .card-icon-stage::after {
    content:'';
    position:absolute;
    inset:auto 12% 8px;
    height: 54px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(var(--subject-rgb),0.26), transparent 68%);
    filter: blur(8px);
    transition: all 0.22s ease;
}
.subject-card.active .card-icon-stage::after {
    background: radial-gradient(circle, rgba(var(--subject-rgb),0.4), transparent 68%);
    filter: blur(10px);
    animation: card-aura-breathe 2.5s ease-in-out infinite alternate;
}
.subject-card .card-icon-glow {
    width: 76px;
    height: 76px;
    line-height: 1;
    display: grid;
    place-items: center;
    filter: drop-shadow(0 8px 24px rgba(var(--subject-rgb),0.32));
    position: relative;
    z-index: 1;
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.22s ease;
}
.subject-card.active:hover .card-icon-glow {
    transform: scale(1.12);
    filter: drop-shadow(0 10px 28px rgba(var(--subject-rgb),0.5));
}
.subject-card .card-icon-glow .mq-svg-icon { width: 76px; height: 76px; color: rgb(var(--subject-rgb)); }
.subject-card .card-body, .subject-card .card-content {
    position: relative;
    z-index: 1;
    display:flex;
    flex-direction:column;
    gap: 8px;
    min-height: 0;
    flex: 1;
}
.subject-card .subject-name, .subject-card .card-title {
    font-size: 19px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.5px;
    text-shadow: 0 0 12px rgba(255,255,255,0.1);
    transition: text-shadow 0.22s ease, color 0.22s ease;
}
.subject-card.active .subject-name {
    color: #ffffff;
    text-shadow: 0 0 15px rgba(var(--subject-rgb), 0.6), 0 2px 4px rgba(0,0,0,0.5);
}
.subject-card .subject-meta, .subject-card .card-meta {
    font-size: 10px;
    color: rgba(var(--subject-rgb), 0.95);
    background: rgba(var(--subject-rgb), 0.1);
    border: 1px solid rgba(var(--subject-rgb), 0.25);
    border-radius: 99px;
    padding: 3px 10px;
    width: fit-content;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.22s ease;
}
.subject-card.active .subject-meta {
    background: rgba(var(--subject-rgb), 0.22);
    border-color: rgba(var(--subject-rgb), 0.5);
    box-shadow: 0 2px 10px rgba(var(--subject-rgb), 0.2);
}
.subject-card .boss-tag-danger, .subject-card .boss-tag {
    margin-top: auto;
    display:inline-flex;
    align-items:center;
    gap: 8px;
    align-self: flex-start;
    padding: 7px 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(20, 10, 10, 0.72) 0%, rgba(5, 5, 8, 0.9) 100%);
    border: 1px solid rgba(255, 107, 107, 0.25);
    box-shadow: inset 0 0 12px rgba(255, 107, 107, 0.08), 0 4px 10px rgba(0, 0, 0, 0.3);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 800;
    transition: all 0.22s ease;
}
.subject-card.active .boss-tag-danger {
    background: linear-gradient(135deg, rgba(var(--subject-rgb), 0.16) 0%, rgba(20, 10, 10, 0.88) 100%);
    border-color: rgba(255, 107, 107, 0.6);
    box-shadow: inset 0 0 16px rgba(255, 107, 107, 0.18), 0 4px 12px rgba(255, 107, 107, 0.25);
    color: #ffcccc;
}
.subject-card .danger-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff4a4a;
    box-shadow: 0 0 10px #ff4a4a, 0 0 20px #ff4a4a;
    animation: pulse-danger 1.4s infinite;
}
@keyframes card-aura-breathe {
    0% { transform: scale(0.9); opacity: 0.7; }
    100% { transform: scale(1.15); opacity: 1; }
}
.subject-card.is-locked {
    opacity: 0.92;
    filter: none;
}
.subject-card.is-locked::after {
    content:'';
    position:absolute;
    inset:0;
    background: linear-gradient(180deg, rgba(2,2,5,0.02) 0%, rgba(5,5,8,0.44) 48%, rgba(5,5,8,0.76) 100%);
    z-index:2;
}
.subject-card .card-lock-shell {
    position: absolute;
    inset: auto 16px 16px 16px;
    z-index: 3;
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap: 12px;
    padding: 14px 14px 12px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(22,22,28,0.72) 0%, rgba(10,10,15,0.92) 100%);
    border: 1px solid rgba(255,200,87,0.18);
    backdrop-filter: none;
}
.subject-card .lock-copy { display:flex; flex-direction:column; gap:4px; }
.subject-card .lock-badge {
    display:inline-flex;
    align-items:center;
    gap: 6px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.4px;
}
.subject-card .lock-desc {
    color: rgba(255,255,255,0.74);
    font-size: 11px;
    line-height: 1.35;
}
.subject-card .lock-arrow {
    color: var(--gold);
    font-size: 18px;
    margin-bottom: 2px;
}
.glass-drawer.drawer-layer {
    height: 39.8%;
    background: linear-gradient(180deg, rgba(18, 20, 26, 0.10) 0%, rgba(15, 15, 20, 0.24) 12%, rgba(15, 15, 20, 0.54) 100%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-radius: 36px 36px 0 0;
    padding: 10px 24px var(--safe-bottom);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.drawer-pull-indicator {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255,255,255,0.18);
    margin: 0 auto 10px;
    flex: 0 0 auto;
}
.glass-drawer.drawer-layer::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -18px;
    height: 18px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(10, 12, 18, 0) 0%, rgba(10, 12, 18, 0.04) 100%);
}
.glass-drawer .drawer-header {
    margin-bottom: 18px;
    align-items: flex-end;
}
.glass-drawer .drawer-title {
    font-size: 16px;
    font-weight: 800;
    color: rgba(255,255,255,0.92);
}
.sub-grid.tactical-grid {
    position: relative;
    display:block;
    flex: 1 1 auto;
    min-height: 0;
    overflow: visible;
    padding-bottom: 0;
}
.subject-subgrid.tactical-grid {
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    overflow-y:auto;
    overflow-x: visible;
    padding: 8px 4px 28px;
    min-height: 100%;
    max-height: 100%;
    align-content: start;
    contain: layout paint;
    -webkit-overflow-scrolling: touch;
}
.subject-subgrid.tactical-grid[hidden] { display: none !important; }
.sub-chip.tactical-chip, .sub-grid.tactical-grid .sub-chip {
    background: rgba(0,0,0,0.30);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 14px 16px;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    gap: 8px;
    position:relative;
    overflow:visible;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.02), 0 4px 10px rgba(0,0,0,0.2);
    transition: transform .18s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
    contain: layout paint style;
}
.sub-chip.tactical-chip:active { transform: scale(0.97); }
.sub-chip.tactical-chip.selected {
    background: rgba(78,205,196,0.10);
    border-color: rgba(78,205,196,0.88);
    box-shadow: inset 0 2px 10px rgba(78,205,196,0.12), 0 6px 18px rgba(0,0,0,0.34), 0 0 0 1px rgba(78,205,196,0.18), 0 0 22px rgba(78,205,196,0.14);
    transform: translateY(-1px);
}
.sub-chip.tactical-chip.selected .chip-name { color: var(--blue); }
.sub-chip.tactical-chip.is-locked {
    opacity: 1;
    filter: none;
    border-color: rgba(255,200,87,0.12);
    background: rgba(0,0,0,0.34);
}
.sub-chip .chip-top {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap: 10px;
}
.sub-chip .chip-name {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
}
.sub-chip .status-indicator {
    display:flex;
    align-items:center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    color: #888;
    white-space: nowrap;
}
.sub-chip .pulse-blue {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 8px var(--blue);
    animation: pulse-core 2s infinite;
}
.sub-chip .micro-progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}
.sub-chip .micro-progress-bar {
    height: 100%;
    background: var(--gold);
    border-radius: 4px;
}
.sub-chip .chip-bottom-row {
    display:flex;
    justify-content:space-between;
    align-items:center;
    width:100%;
    font-size: 10px;
    font-family: var(--font-tech);
    font-weight: 700;
    color: #aaa;
    margin-top: 4px;
}
.sub-chip .chip-meta-stack { display:flex; flex-direction:column; gap:4px; width:100%; margin-top:4px; }
.sub-chip .chip-metric-value.cyan { color: var(--blue); }
.sub-chip .chip-chevron, .sub-chip .lock-icon {
    color: rgba(255,255,255,0.42);
    font-size: 18px;
    align-self: flex-end;
}
.sub-chip.is-locked .lock-icon { color: var(--gold); }
.sub-chip .lock-help {
    font-size: 11px;
    color: rgba(255,255,255,0.72);
    line-height: 1.35;
}
.sub-chip .chip-desc {
    font-size: 11px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.48);
    margin: 6px 0 8px;
    font-weight: 500;
    letter-spacing: 0.2px;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sub-chip.selected .chip-desc {
    color: rgba(255, 255, 255, 0.76);
}
.sub-chip.is-locked .chip-desc {
    color: rgba(255, 255, 255, 0.32);
}
.pass-banner.focused-offer {
    animation: focusedOfferPulse 1.2s ease-in-out infinite alternate;
    border-color: rgba(255,200,87,0.68);
    box-shadow: 0 0 0 1px rgba(255,200,87,0.22), 0 16px 38px rgba(0,0,0,0.5), 0 0 28px rgba(255,200,87,0.22);
}
@keyframes focusedOfferPulse {
    from { transform: translateY(0); }
    to { transform: translateY(-2px); }
}
@keyframes pulse-danger {
    0%,100% { transform: scale(1); opacity: .65; }
    50% { transform: scale(1.28); opacity: 1; box-shadow: 0 0 14px var(--red); }
}
@media (max-width: 430px) {
    .card-scroller.carousel-stage {
        top: 22.4%;
        height: 36%;
        padding: 0 calc(50vw - 104px);
    }
    .subject-card { flex-basis: 208px; }
    .subject-card .card-icon-stage { min-height: 124px; }
    .subject-card .card-icon-glow { width: 68px; height: 68px; }
    .subject-card .card-icon-glow .mq-svg-icon { width: 68px; height: 68px; }
    .glass-drawer.drawer-layer { height: 39%; padding-top: 8px; padding-left: 18px; padding-right: 18px; }
    .sub-grid.tactical-grid { gap: 12px; }
    .sub-chip .chip-name { font-size: 14px; }
}

@media (max-width: 420px) {
  .top-nav { padding: calc(var(--safe-top) + 10px) 14px 8px; }
  .brand-title { font-size: 20px; letter-spacing: 1.5px; }
  .premium-res-bar { gap: 6px; padding: 5px 9px; }
  .res-item { font-size: 11px; }
  .avatar-btn { width: 36px; height: 36px; }
  .weekly-container { top: calc(var(--safe-top) + 62px); left: 14px; right: 14px; }
  .weekly-vip-card { padding: 13px 14px; }
  .weekly-title { font-size: 14px; }
  .weekly-sub { font-size: 10px; }
  .btn-enter-glow { padding: 7px 12px; font-size: 11px; }
}


.session-resume-card{margin-top:14px;padding:14px 14px 12px;border-radius:18px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);box-shadow:0 10px 30px rgba(0,0,0,.18)}
.session-resume-title{font-size:13px;font-weight:700;letter-spacing:.16em;color:var(--gold);margin-bottom:8px;text-transform:uppercase}
.session-resume-text{font-size:13px;line-height:1.55;color:rgba(255,255,255,.78);margin-bottom:12px}
.session-resume-actions{display:flex;gap:10px;flex-direction:column}
.btn-session-switch{height:44px;border-radius:14px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.05);color:#fff;font-size:14px;font-weight:600;display:flex;align-items:center;justify-content:center;gap:8px}
.btn-session-switch:active{transform:scale(.99)}


.sub-chip .chip-metric-label { color: rgba(255,255,255,0.58); font-size: 10px; font-weight: 700; }
.sub-chip .chip-metric-value { color: #fff; font-size: 11px; font-weight: 900; }
.sub-chip .chip-metric-value.gold { color: var(--gold); }


/* === Integrated Weekly Trial workspace (from uploaded 試煉 page) === */
.feature-entry-pill { min-width: 68px; text-align:left; }
.trial-entry-card {
  position: relative;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border-color: rgba(255,255,255,.10);
}
.trial-entry-card::before {
  content: "";
  position: absolute; inset: -25% -15% auto -15%; height: 220px;
  background: radial-gradient(circle at 50% 35%, rgba(255,200,87,.18), transparent 60%);
  pointer-events: none;
}
.trial-entry-top {
  position: relative;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.trial-entry-left { display:flex; gap:12px; align-items:flex-start; min-width:0; }
.trial-entry-badge {
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
  display:grid; place-items:center;
  background: linear-gradient(145deg, rgba(255,200,87,.24), rgba(255,255,255,.05));
  border:1px solid rgba(255,200,87,.32);
  box-shadow: 0 10px 30px rgba(255,200,87,.14);
}
.trial-entry-meta { min-width:0; }
.trial-entry-title { margin:0 0 4px; font-size:16px; font-weight:900; color:#fff; letter-spacing:.2px; }
.trial-entry-desc { margin:0; font-size:12px; color:rgba(255,255,255,.68); line-height:1.5; }
.trial-entry-cta { position:relative; display:flex; flex-direction:column; align-items:flex-end; gap:8px; flex:0 0 auto; }
.trial-entry-btn { min-width: 132px; }
.trial-state-pill {
  font-size:11px; font-weight:800; padding:6px 10px; border-radius:999px;
  border:1px solid rgba(255,255,255,.10); background: rgba(0,0,0,.22); color: rgba(255,255,255,.84);
}
.trial-state-pill.ok { border-color: rgba(53,208,127,.30); background: rgba(53,208,127,.12); color: rgba(205,255,230,.95); }
.trial-state-pill.lock { border-color: rgba(255,90,106,.30); background: rgba(255,90,106,.12); color: rgba(255,210,215,.95); }
.trial-state-pill.done { border-color: rgba(255,200,87,.28); background: rgba(255,200,87,.12); color: rgba(255,235,195,.95); }
.trial-countdown-box {
  position: relative; margin-top: 14px; padding: 12px 16px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.25);
  display:flex; align-items:center; justify-content:space-between; gap:10px;
}
.trial-countdown-sub { font-size:11px; margin-top:4px; color:rgba(255,255,255,.56); }
.trial-countdown-time { font-variant-numeric: tabular-nums; font-weight: 900; letter-spacing: 1px; color: #fff; font-size: 15px; }
.trial-rule-tags { position:relative; margin-top:12px; display:flex; flex-wrap:wrap; gap:8px; }
.trial-rule-tag {
  font-size:11px; padding:6px 10px; border-radius:999px; border:1px solid rgba(255,200,87,.18);
  background: rgba(255,200,87,.08); color:#ffe7ad; line-height:1; font-weight:600;
}
.trial-rule-tag strong { color:#fff; font-weight:900; }
.trial-subject-card,
.trial-sub-card {
  text-align:left;
  background: linear-gradient(135deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.035) 100%);
  border:1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,.24);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.trial-subject-card:active,
.trial-sub-card:active { transform: scale(.98); }
.trial-subject-card.active,
.trial-sub-card.active {
  border-color: rgba(126, 232, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(126, 232, 255, 0.35), 0 14px 36px rgba(80, 203, 255, 0.16);
  background: linear-gradient(135deg, rgba(126,232,255,.14), rgba(255,255,255,.06));
}
.trial-subject-card .icon-badge {
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(145deg, rgba(255,200,87,.22), rgba(255,255,255,.05));
  border:1px solid rgba(255,200,87,.22);
}
.trial-sub-card .top .card-sub-text { color: rgba(255,255,255,.76); }
.trial-rules ul li { line-height: 1.55; }
@media (max-width: 760px) {
  .trial-entry-top { flex-direction: column; }
  .trial-entry-cta { width:100%; align-items:stretch; }
  .trial-entry-btn { width: 100%; min-width: 0; }
}

.feature-primary-btn.disabled { opacity: .56; cursor: not-allowed; box-shadow: none; filter: saturate(.7); }


/* ===== Feature scene: full-screen, no-flash integrated trial screen ===== */
.feature-workspace.feature-scene {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: radial-gradient(1200px 700px at 40% 10%, rgba(241,197,90,.12), transparent 55%), radial-gradient(900px 600px at 82% 28%, rgba(120,120,255,.12), transparent 55%), rgba(11,11,16,.76);
  transition: opacity .22s ease, visibility .22s ease;
}
.feature-workspace.feature-scene[hidden] { display: block !important; }
.feature-workspace.feature-scene.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.feature-scene-backdrop {
  position: absolute;
  inset: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.feature-scene-panel {
  position: absolute;
  inset: 0;
  transform: translate3d(28px,0,0);
  opacity: .98;
  transition: transform .26s cubic-bezier(.2,.8,.2,1), opacity .22s ease;
}
.feature-workspace.feature-scene.is-open .feature-scene-panel {
  transform: translate3d(0,0,0);
  opacity: 1;
}
.feature-scene-safe {
  min-height: 100%;
  padding: max(14px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom));
}
.feature-scene-phone {
  max-width: 460px;
  margin: 0 auto;
  min-height: calc(100vh - max(14px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom)));
  display: flex;
  flex-direction: column;
}
.feature-scene-appbar {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 0 12px;
  background: linear-gradient(to bottom, rgba(11,11,16,.97), rgba(11,11,16,.8), rgba(11,11,16,0));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.feature-scene-row, .feature-scene-heading-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.feature-scene-heading-row { align-items:flex-start; margin-top: 12px; }
.feature-scene-back {
  width: 42px; height: 42px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: #fff; display:inline-flex; align-items:center; justify-content:center;
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
}
.feature-scene-brand {
  min-width: 0; flex: 1 1 auto; display:flex; align-items:center; gap:10px;
  padding: 10px 12px; border:1px solid rgba(255,255,255,.08); border-radius: 999px; background: rgba(255,255,255,.04);
}
.feature-scene-logo {
  width: 28px; height: 28px; border-radius: 10px;
  background: radial-gradient(circle at 30% 30%, rgba(241,197,90,.85), rgba(241,197,90,.18) 55%, rgba(255,255,255,.06) 100%);
  border: 1px solid rgba(241,197,90,.25);
  box-shadow: 0 8px 22px rgba(241,197,90,.14);
}
.feature-scene-brand-title { font-size:14px; font-weight:800; color:#fff; letter-spacing:.2px; }
.feature-scene-brand-sub { font-size:12px; color:rgba(255,255,255,.55); }
.feature-scene-tabs { display:flex; align-items:center; gap:8px; }
.feature-dock-btn.compact {
  width: 44px; height: 44px; padding: 0; border-radius: 14px; gap: 0;
}
.feature-dock-btn.compact .feature-dock-label { display:none; }
.feature-scene-scroll {
  flex: 1 1 auto; overflow-y: auto; min-height: 0; padding: 4px 0 14px;
}
.feature-scene-scroll::-webkit-scrollbar { display:none; }
.feature-page { padding-right: 0; }
.trial-cycle-chip {
  padding:8px 10px; border-radius:999px; border:1px solid rgba(241,197,90,.22); background: rgba(241,197,90,.10); color:#ffe7ad; font-size:12px; font-weight:700; white-space:nowrap;
}
.trial-scene-card {
  position: relative; padding: 16px; background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.04)); overflow: hidden;
}
.trial-scene-card::before {
  content: ""; position:absolute; inset:-30% -20% auto -20%; height:220px; background: radial-gradient(circle at 50% 40%, rgba(241,197,90,.18), transparent 60%); pointer-events:none;
}
.trial-scene-top, .trial-scene-left { display:flex; align-items:flex-start; gap:12px; }
.trial-scene-top { justify-content:space-between; }
.trial-scene-left { min-width:0; }
.trial-scene-badge {
  width:44px; height:44px; border-radius:14px; flex-shrink:0; display:grid; place-items:center;
  background: linear-gradient(145deg, rgba(241,197,90,.23), rgba(255,255,255,.05));
  border:1px solid rgba(241,197,90,.28); box-shadow: 0 10px 30px rgba(241,197,90,.12);
}
.trial-scene-meta { min-width:0; }
.trial-scene-title { margin:0 0 4px; font-weight:900; font-size:16px; letter-spacing:.2px; color:#fff; }
.trial-scene-desc { margin:0; font-size:12px; line-height:1.45; color: rgba(255,255,255,.68); }
.trial-scene-cta { display:flex; flex-direction:column; align-items:flex-end; gap:8px; flex:0 0 auto; }
.trial-scene-btn { min-width: 132px; }
.trial-scene-countdown {
  position:relative; margin-top:14px; padding:12px 16px; border-radius:14px; border:1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.25); display:flex; align-items:center; justify-content:space-between; gap:10px;
}
.trial-countdown-label { font-size:12px; color: rgba(255,255,255,.62); font-weight:700; }
.trial-countdown-sub { margin-top:4px; font-size:11px; color: rgba(255,255,255,.5); }
.trial-countdown-time { font-variant-numeric: tabular-nums; font-weight:900; letter-spacing:1px; color:#fff; font-size: 15px; }
.trial-scene-rules { margin-top:12px; display:flex; flex-wrap:wrap; gap:8px; }
.trial-rule-tag {
  font-size:11px; padding:6px 10px; border-radius:999px; border:1px solid rgba(241,197,90,.18); background: rgba(241,197,90,.08); color:#ffe7ad; line-height:1; font-weight:600;
}
.trial-rule-tag strong { color:#fff; font-weight:900; }
.trial-scene-section { margin-top:16px; }
.feature-plain-section, .trial-rules-block { padding:16px; }
.trial-scene-section-title { margin:0 0 12px; display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.trial-scene-section-title h2 { margin:0; font-size:16px; color:#fff; font-weight:800; }
.trial-scene-section-title .sub { font-size:12px; color: var(--gold); font-weight:700; }
.trial-scene-meta-grid {
  margin-top:16px; display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:12px;
}
.trial-rules-list { margin:0; padding-left:18px; display:grid; gap:8px; color:rgba(255,255,255,.76); }
.compact-toolbar { padding: 12px 14px; margin-bottom: 12px; }
@media (max-width: 680px) {
  .feature-scene-tabs { gap: 6px; }
  .trial-scene-top { flex-direction: column; }
  .trial-scene-cta { width:100%; align-items:stretch; }
  .trial-scene-btn { width:100%; min-width:0; }
  .trial-scene-meta-grid { grid-template-columns: 1fr; }
}


/* === uploaded trial page integration === */
.trial-uploaded-page{
      --bg:#0b0b10;
      --card:rgba(255,255,255,.06);
      --stroke:rgba(255,255,255,.10);
      --text:#eaeaf2;
      --muted:#a7a9b8;
      --gold:#f1c55a;
      --shadow:0 18px 60px rgba(0,0,0,.55);
      --radius:18px;
    }.trial-uploaded-page *{box-sizing:border-box; -webkit-tap-highlight-color: transparent;}.trial-uploaded-page{
      margin:0;
      background: radial-gradient(1200px 700px at 40% 10%, rgba(241,197,90,.12), transparent 55%),
                  radial-gradient(900px 600px at 80% 30%, rgba(120,120,255,.12), transparent 55%),
                  var(--bg);
      color:var(--text);
      font-family: system-ui, -apple-system, "Noto Sans TC", "PingFang TC", Segoe UI, Roboto, Arial, sans-serif;
    }.trial-uploaded-page .safe{
      padding: max(14px, env(safe-area-inset-top)) 14px 14px;
      min-height: 100vh;
      display:flex; justify-content:center;
    }.trial-uploaded-page .phone{ width:min(420px, 100%); padding-bottom: max(16px, env(safe-area-inset-bottom)); position: relative;}.trial-uploaded-page /* App bar */
    .appbar{
      position:sticky; top:0; z-index:20;
      padding:10px 0 10px;
      background: linear-gradient(to bottom, rgba(11,11,16,.95), rgba(11,11,16,.55), rgba(11,11,16,0));
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }.trial-uploaded-page .appbar .row{ display:flex; align-items:center; justify-content:space-between; gap:10px; width: 100%; }.trial-uploaded-page .brand{
      display:flex; align-items:center; gap:10px;
      padding:10px 12px;
      border:1px solid rgba(255,255,255,.08);
      background: rgba(255,255,255,.04);
      border-radius: 999px;
    }.trial-uploaded-page .logo{
      width:28px; height:28px; border-radius:10px;
      background: radial-gradient(circle at 30% 30%, rgba(241,197,90,.85), rgba(241,197,90,.18) 55%, rgba(255,255,255,.06) 100%);
      border: 1px solid rgba(241,197,90,.25);
      box-shadow: 0 8px 22px rgba(241,197,90,.14);
    }.trial-uploaded-page .brand .t1{font-weight:800; letter-spacing:.2px; font-size:14px}.trial-uploaded-page .brand .t2{font-size:12px; color:var(--muted)}.trial-uploaded-page .chip{
      padding:8px 10px;
      border-radius:999px;
      border:1px solid rgba(241,197,90,.22);
      background: rgba(241,197,90,.10);
      color:#ffe7ad;
      font-size:12px;
      font-weight: 700;
      white-space:nowrap;
    }.trial-uploaded-page /* Card base */
    .glass{
      width: 100%;
      background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.04));
      border:1px solid rgba(255,255,255,.10);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      overflow:hidden;
    }.trial-uploaded-page .section-title{
      margin:24px 4px 14px;
      display:flex; align-items:baseline; justify-content:space-between;
      gap:10px;
    }.trial-uploaded-page .section-title h2{ margin:0; font-size:16px; color: rgba(255,255,255,.95); letter-spacing:.5px; font-weight: 800; }.trial-uploaded-page .section-title .sub{ font-size:12px; color:var(--gold); font-weight: 700; }.trial-uploaded-page /* Trial card */
    .trial{ position:relative; padding:16px; }.trial-uploaded-page .trial::before{
      content:"";
      position:absolute; inset:-30% -20% auto -20%;
      height:220px;
      background: radial-gradient(circle at 50% 40%, rgba(241,197,90,.18), transparent 60%);
      pointer-events:none;
    }.trial-uploaded-page .trial .top{ position:relative; display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }.trial-uploaded-page .trial .left{ display:flex; gap:12px; align-items:flex-start; min-width:0; }.trial-uploaded-page .badge{
      width:44px; height:44px; border-radius:14px;
      background: linear-gradient(145deg, rgba(241,197,90,.23), rgba(255,255,255,.05));
      border:1px solid rgba(241,197,90,.28);
      box-shadow: 0 10px 30px rgba(241,197,90,.12);
      display:grid; place-items:center; flex-shrink: 0;
    }.trial-uploaded-page .trial .meta{ min-width:0; }.trial-uploaded-page .trial .meta .title{ font-weight:900; font-size:16px; letter-spacing:.2px; margin:0 0 4px; color:#fff; }.trial-uploaded-page .trial .meta .desc{ margin:0; font-size:12px; color:var(--muted); line-height:1.4; }.trial-uploaded-page .trial .cta{ position:relative; display:flex; flex-direction:column; align-items:flex-end; gap:8px; flex:0 0 auto; }.trial-uploaded-page .btn{
      border:1px solid rgba(255,255,255,.14);
      background: rgba(255,255,255,.06);
      color: var(--text);
      padding:10px 14px;
      border-radius: 12px;
      font-weight:800;
      font-size:13px;
      letter-spacing:.2px;
      cursor:pointer;
      user-select:none;
      transition: transform .12s ease, background .12s ease, border-color .12s ease;
      white-space:nowrap;
      outline: none;
    }.trial-uploaded-page .btn:active{transform: scale(.96); filter: brightness(1.1);}.trial-uploaded-page .btn.primary{
      border-color: rgba(241,197,90,.30);
      background: linear-gradient(180deg, rgba(241,197,90,.22), rgba(241,197,90,.08));
      color:#ffeec4;
      box-shadow: 0 4px 15px rgba(241,197,90,.15);
    }.trial-uploaded-page .btn.disabled{ opacity:.55; cursor:not-allowed; box-shadow: none; }.trial-uploaded-page .pill{
      font-size:11px; font-weight: 800;
      padding:6px 10px;
      border-radius:999px;
      border:1px solid rgba(255,255,255,.10);
      background: rgba(0,0,0,.22);
      color: rgba(255,255,255,.84);
      white-space:nowrap;
    }.trial-uploaded-page .pill.ok{border-color: rgba(53,208,127,.3); background: rgba(53,208,127,.12); color: rgba(205,255,230,.95)}.trial-uploaded-page .pill.lock{border-color: rgba(255,90,106,.3); background: rgba(255,90,106,.12); color: rgba(255,210,215,.95)}.trial-uploaded-page .pill.done{border-color: rgba(241,197,90,.3); background: rgba(241,197,90,.12); color: rgba(255,232,190,.95)}.trial-uploaded-page .countdown{
      position:relative;
      margin-top:14px;
      padding:12px 16px;
      border-radius: 14px;
      border:1px solid rgba(255,255,255,.08);
      background: rgba(0,0,0,.25);
      display:flex; align-items:center; justify-content:space-between; gap:10px;
    }.trial-uploaded-page .countdown .label{font-size:12px; color:var(--muted); font-weight: 700;}.trial-uploaded-page .countdown .time{ font-variant-numeric: tabular-nums; font-weight:900; letter-spacing:1px; color:#fff; font-size: 15px;}.trial-uploaded-page .rules{ position:relative; margin-top:12px; display:flex; flex-wrap:wrap; gap:8px; }.trial-uploaded-page .ruleTag{
      font-size:11px; padding:6px 10px; border-radius: 999px;
      border:1px solid rgba(241,197,90,.18);
      background: rgba(241,197,90,.08);
      color:#ffe7ad; line-height:1; font-weight: 600;
    }.trial-uploaded-page .ruleTag strong{color:#fff; font-weight:900}.trial-uploaded-page /* Subjects */
    .subjects{ padding:0; background: transparent; border: none; box-shadow: none; width: 100%; min-width: 0; }.trial-uploaded-page /* 防破圖核心：minmax(0, .trial-uploaded-page 1fr) 鎖死最大寬度 */
    .grid{ display:grid; grid-template-columns: minmax(0, 1fr); gap:12px; width: 100%; min-width: 0; }.trial-uploaded-page .subcard{
      width: 100%; min-width: 0; /* 防破圖：允許內部元件收縮 */
      display:flex; align-items:center; gap:12px;
      padding:16px; border-radius: 20px;
      /* 高階色彩美化：渲染科目專屬動態色光 */
      border: 1px solid rgba(var(--c-rgb), 0.25);
      background: linear-gradient(135deg, rgba(255,255,255,.04) 0%, rgba(var(--c-rgb), 0.12) 100%);
      cursor:pointer; transition: transform 0.16s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.16s ease, border-color 0.16s ease, background 0.16s ease;
      box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    }.trial-uploaded-page .subcard:active{ 
    transform: scale(0.97); 
      background: linear-gradient(135deg, rgba(255,255,255,.05) 0%, rgba(var(--c-rgb), 0.18) 100%); 
      border-color: rgba(var(--c-rgb), 0.4);
    }.trial-uploaded-page /* 防破圖核心：min-width: 0 確保文字過長時自動截斷 */
    .subleft{ display:flex; align-items:center; gap:14px; flex: 1; min-width:0; overflow: hidden; }.trial-uploaded-page .icon{
      width:48px; height:48px; border-radius: 14px;
      border:1px solid rgba(var(--c-rgb), 0.4);
      background: rgba(var(--c-rgb), 0.15);
      color: rgb(var(--c-rgb));
      display:grid; place-items:center;
      font-weight:900; font-size: 18px;
      flex-shrink: 0; box-shadow: 0 4px 12px rgba(var(--c-rgb), 0.25);
    }.trial-uploaded-page .submeta{ flex: 1; min-width:0; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }.trial-uploaded-page .submeta .name{ 
      font-weight:800; margin:0 0 4px; font-size: 16px; color:#fff; letter-spacing: 0.5px;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }.trial-uploaded-page .submeta .hint{ 
      margin:0; color:rgba(255,255,255,0.65); font-size:12px; 
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }.trial-uploaded-page /* 防破圖核心：flex-shrink: 0 保障右側元件永遠完整顯示 */
    .subright{ display:flex; align-items:center; gap:8px; flex-shrink: 0; white-space: nowrap; }.trial-uploaded-page .mini{
      font-size:12px; color:rgb(var(--c-rgb)); font-weight: 800;
      border:1px solid rgba(var(--c-rgb), 0.3);
      background: rgba(var(--c-rgb), 0.15);
      padding:6px 10px; border-radius: 10px;
      white-space:nowrap;
    }.trial-uploaded-page .arrow{
      width:28px; height:28px; border-radius: 10px;
      border:1px solid rgba(255,255,255,.12);
      background: rgba(255,255,255,.08);
      display:grid; place-items:center;
      color: #fff; font-size: 16px; font-weight: 800;
      flex-shrink: 0;
    }.trial-uploaded-page /* Demo controls */
    .demo{
      margin-top:14px;
      padding:12px 14px;
      border-radius: 16px;
      border:1px dashed rgba(255,255,255,.15);
      background: rgba(0,0,0,.2);
    }.trial-uploaded-page .demo .row{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; justify-content:space-between; }.trial-uploaded-page .demo .left{ display:flex; gap:8px; flex-wrap:wrap; }.trial-uploaded-page .demo small{color:var(--muted); font-size: 11px;}.trial-uploaded-page .btn.small{padding:8px 12px; font-size:11px; border-radius: 10px;}.trial-uploaded-page .foot{ margin:20px 0 10px; color: rgba(255,255,255,.4); font-size:12px; text-align:center; font-weight: 600;}.trial-uploaded-page /* Custom Beautiful Modal UI */
    .modal-overlay{
      position: fixed; inset: 0; z-index: 100;
      background: rgba(0,0,0,0.65); 
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      display: flex; justify-content: center; align-items: center;
      opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
    }.trial-uploaded-page .modal-overlay.active{ opacity: 1; pointer-events: auto; }.trial-uploaded-page .modal-card{
      width: min(340px, 88%);
      background: linear-gradient(160deg, rgba(30,30,35,0.95), rgba(15,15,20,0.98));
      border: 1px solid rgba(241,197,90,0.25);
      border-radius: 24px;
      padding: 28px 24px;
      text-align: center;
      box-shadow: 0 30px 60px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.1);
      transform: translateY(20px) scale(0.95);
      transition: transform 0.2s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.16s ease;
    }.trial-uploaded-page .modal-overlay.active .modal-card{
      transform: translateY(0) scale(1);
    }.trial-uploaded-page .modal-icon{
      width: 54px; height: 54px; margin: 0 auto 16px;
      border-radius: 16px; 
      background: linear-gradient(135deg, rgba(241,197,90,0.2), rgba(241,197,90,0.05));
      border: 1px solid rgba(241,197,90,0.4);
      display: flex; justify-content: center; align-items: center;
      color: var(--gold); font-size: 26px;
      box-shadow: 0 8px 20px rgba(241,197,90,0.15);
    }.trial-uploaded-page .modal-title{ margin: 0 0 10px; font-size: 18px; font-weight: 900; color: #fff; letter-spacing: 0.5px; }.trial-uploaded-page .modal-desc{ margin: 0 0 24px; font-size: 14px; color: rgba(255,255,255,0.75); line-height: 1.6; font-weight: 500;}.trial-uploaded-page .modal-btn{ width: 100%; padding: 14px; font-size: 15px; border-radius: 14px; letter-spacing: 1px;}
  

.feature-workspace.trial-shell-mode .feature-scene-appbar {
  display: none;
}
.feature-workspace.trial-shell-mode .feature-scene-brand,
.feature-workspace.trial-shell-mode .feature-scene-heading-row {
  display: none;
}
.feature-workspace.trial-shell-mode .feature-scene-row {
  gap: 8px;
  justify-content: flex-end;
}
.feature-workspace.trial-shell-mode .feature-scene-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}
.feature-workspace.trial-shell-mode .feature-scene-back {
  width: 42px;
  height: 42px;
}
.feature-workspace.trial-shell-mode .feature-scene-scroll {
  padding-top: 0;
}
.trial-uploaded-page {
  width: 100%;
  min-height: 100%;
}
.trial-uploaded-page .safe {
  padding: 0;
  min-height: auto;
  display: block;
}
.trial-uploaded-page .phone {
  width: min(420px, 100%);
  margin: 0 auto;
  padding-bottom: 0;
  position: relative;
}
.trial-uploaded-page .appbar {
  position: sticky;
  top: 0;
  z-index: 3;
}
.trial-uploaded-page .demo {
  display: none;
}
.trial-uploaded-page .subcard.active {
  border-color: rgba(var(--c-rgb), 0.55);
  background: linear-gradient(135deg, rgba(255,255,255,.06) 0%, rgba(var(--c-rgb), 0.22) 100%);
  box-shadow: 0 10px 26px rgba(var(--c-rgb), 0.22);
}
.trial-uploaded-page .modal-btn.secondary {
  margin-top: 10px;
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-color: rgba(255,255,255,.12);
}
.trial-uploaded-page .modal-actions {
  display:flex;
  flex-direction:column;
  gap:10px;
}


/* v6.2.0 merged subject expansion + trial health id fix */
.trial-uploaded-page .trial-head-row{
  align-items:center;
  gap:12px;
  padding-inline: 2px;
}
.trial-uploaded-page .trial-head-title-pill{
  min-width:0;
  flex:1 1 auto;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  padding:0;
  border:none;
  background:transparent;
  box-shadow:none;
}
.trial-uploaded-page .trial-head-title{
  font-size:22px;
  font-weight:950;
  letter-spacing:.8px;
  color:#fff6d8;
  text-shadow: 0 2px 16px rgba(241,197,90,.18), 0 1px 0 rgba(255,255,255,.08);
}
.trial-uploaded-page .trial-head-back,
.trial-uploaded-page .trial-head-icon{
  position:relative;
  width:50px;
  height:50px;
  border:none;
  border-radius:18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.05)),
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.18), transparent 42%),
    linear-gradient(135deg, rgba(33,36,53,.92), rgba(17,19,29,.86));
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 -1px 0 rgba(255,255,255,.05),
    0 14px 28px rgba(0,0,0,.30),
    0 0 0 1px rgba(255,255,255,.06);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.trial-uploaded-page .trial-head-back::before,
.trial-uploaded-page .trial-head-icon::before{
  content:"";
  position:absolute;
  inset:1px;
  border-radius:17px;
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0));
  pointer-events:none;
}
.trial-uploaded-page .trial-head-back{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 -1px 0 rgba(255,255,255,.05),
    0 16px 30px rgba(0,0,0,.32),
    0 0 0 1px rgba(241,197,90,.16),
    0 0 22px rgba(241,197,90,.12);
}
.trial-uploaded-page .trial-head-icon{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 -1px 0 rgba(255,255,255,.05),
    0 14px 28px rgba(0,0,0,.30),
    0 0 0 1px rgba(106,186,255,.10),
    0 0 18px rgba(106,186,255,.08);
}
.trial-uploaded-page .trial-head-back:hover,
.trial-uploaded-page .trial-head-icon:hover{
  transform: translateY(-1px);
  filter: brightness(1.06);
}
.trial-uploaded-page .trial-head-back:active,
.trial-uploaded-page .trial-head-icon:active{
  transform: translateY(1px) scale(.98);
}
.trial-uploaded-page .trial-head-back i,
.trial-uploaded-page .trial-head-icon i{
  font-size:23px;
  text-shadow: 0 1px 8px rgba(0,0,0,.28);
}
.trial-uploaded-page .section-title{
  margin:22px 4px 12px;
}
.trial-uploaded-page .subjects{
  width:100%;
  min-width:0;
  max-height: clamp(320px, 48vh, 560px);
  overflow:auto;
  padding: 2px 4px 10px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(241,197,90,.28) rgba(255,255,255,.05);
  mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 24px), transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 24px), transparent 100%);
}
.trial-uploaded-page .subjects::-webkit-scrollbar{ width: 6px; }
.trial-uploaded-page .subjects::-webkit-scrollbar-track{ background: rgba(255,255,255,.04); border-radius: 999px; }
.trial-uploaded-page .subjects::-webkit-scrollbar-thumb{ background: rgba(241,197,90,.28); border-radius: 999px; }
.trial-uploaded-page .grid{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:12px;
  width:100%;
  min-width:0;
  padding: 4px 2px 16px;
}
.trial-uploaded-page .subcard{
  min-height: 84px;
  padding:14px 15px;
  border-radius:20px;
}
.trial-uploaded-page .icon{
  width:46px;
  height:46px;
  border-radius:15px;
}
.trial-uploaded-page .submeta .name{
  font-size:15px;
}
.trial-uploaded-page .submeta .hint{
  white-space:normal;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  line-height:1.35;
  max-height: calc(1.35em * 2);
}
.trial-uploaded-page .mini{
  font-size:11px;
  padding:6px 9px;
}
@media (min-width: 900px){
  .trial-uploaded-page .subjects{
    max-height: clamp(360px, 50vh, 640px);
  }
  .trial-uploaded-page .grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 430px){
  .trial-uploaded-page .trial-head-row{ gap:8px; }
  .trial-uploaded-page .trial-head-back,
  .trial-uploaded-page .trial-head-icon{ width:46px; height:46px; border-radius:16px; }
  .trial-uploaded-page .trial-head-title{ font-size:20px; letter-spacing:.5px; }
  .trial-uploaded-page .subjects{ max-height: clamp(300px, 46vh, 520px); }
}
.trial-intro-overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(5,10,20,.58);backdrop-filter:none;-webkit-backdrop-filter:none;opacity:0;pointer-events:none;transition:opacity .28s ease;z-index:1800;}
.trial-intro-overlay.active{opacity:1;pointer-events:auto;}
.trial-intro-card{min-width:220px;padding:22px 24px;border-radius:28px;background:linear-gradient(180deg, rgba(18,26,44,.86), rgba(10,14,24,.9));border:1px solid rgba(255,255,255,.10);box-shadow:0 24px 60px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.08);display:flex;flex-direction:column;align-items:center;gap:8px;color:#fff;}
.trial-intro-eyebrow{font-size:11px;letter-spacing:1.4px;color:rgba(245,214,126,.86);font-weight:700;}
.trial-intro-value{font-size:72px;line-height:1;font-weight:900;color:#fff;text-shadow:0 10px 36px rgba(255,255,255,.16);}
.trial-intro-sub{font-size:14px;color:rgba(255,255,255,.76);}
.trial-uploaded-page .modal-overlay{will-change:opacity;backface-visibility:hidden;}
.trial-uploaded-page .modal-card{will-change:transform, opacity;backface-visibility:hidden;}


@keyframes comboTextPulse { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-1px) scale(1.05); } 100% { transform: translateY(0) scale(1); } }
@keyframes comboHintFade { 0% { opacity:0; transform: translateY(4px) scale(0.92); } 15% { opacity:1; transform: translateY(0) scale(1); } 100% { opacity:0; transform: translateY(-2px) scale(0.96); } }
@keyframes comboTextGlowFade { 0% { text-shadow:0 0 10px rgba(0,0,0,0.35), 0 0 0 rgba(255,200,87,0); } 15% { text-shadow:0 0 10px rgba(0,0,0,0.35), 0 0 16px rgba(255,200,87,0.45); } 100% { text-shadow:0 0 10px rgba(0,0,0,0.35), 0 0 0 rgba(255,200,87,0); } }
.settlement-extra-grid, .settlement-extra-item, .extra-label, .extra-val, .settlement-hidden-meta { display:none !important; }
/* ===== Level Up Card (Overlay) - v7.5.2 repo-alignment shell ===== */
.levelup-card{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom:calc(var(--safe-bottom) + 96px);
  width:min(92vw, 520px);
  background:
    radial-gradient(circle at 18% 14%, rgba(255,220,120,0.12), transparent 26%),
    radial-gradient(circle at 82% 18%, rgba(94,141,255,0.16), transparent 34%),
    linear-gradient(180deg, rgba(30,24,15,0.92), rgba(12,12,18,0.95));
  border:1px solid rgba(255,215,0,0.26);
  box-shadow:0 18px 55px rgba(0,0,0,0.48), inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: none;
  border-radius:22px;
  padding:14px 14px 12px;
  z-index:205;
}
.levelup-card.hidden{ display:none; }
.levelup-card-header{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.levelup-title{
  font-family:'Cinzel', serif;
  letter-spacing:1px;
  font-weight:800;
  color:#FFD700;
  font-size:16px;
  text-shadow:0 0 12px rgba(255,215,0,0.12);
}
.levelup-close{
  width:34px; height:34px;
  border-radius:12px;
  border:1px solid rgba(255,215,0,0.22);
  background:rgba(255,255,255,0.06);
  color:#FFD700;
  font-size:20px;
  line-height:1;
  cursor:pointer;
}
.levelup-close:active{ transform: scale(0.98); }
.levelup-meta{ display:flex; gap:10px; justify-content:space-between; margin-bottom:10px; }
.levelup-meta-item{
  flex:1 1 0; min-width:0;
  border:1px solid rgba(255,215,0,0.14);
  background:rgba(255,255,255,0.05);
  border-radius:14px;
  padding:8px 10px;
  display:flex; align-items:baseline; justify-content:space-between;
}
.meta-label{ color:rgba(255,255,255,0.7); font-size:11px; letter-spacing:0.8px; }
.meta-value{ color:#FFD700; font-weight:800; font-size:13px; }
.levelup-grid{ display:flex; flex-direction:column; gap:8px; }
.lu-row{
  display:flex; align-items:center; justify-content:space-between;
  border:1px solid rgba(255,215,0,0.14);
  background:rgba(255,255,255,0.05);
  border-radius:14px;
  padding:10px 10px;
  gap:10px;
}
.lu-left{ display:flex; flex-direction:column; gap:4px; min-width:0; }
.lu-stat{ color:#FFD700; font-weight:900; font-size:13px; letter-spacing:0.8px; }
.lu-desc{ color:rgba(255,255,255,0.75); font-size:12px; }
.lu-right{ display:flex; align-items:center; gap:8px; }
.lu-btn{
  width:34px; height:34px;
  border-radius:12px;
  border:1px solid rgba(255,215,0,0.22);
  background:rgba(255,255,255,0.06);
  color:#FFD700;
  font-size:18px;
  font-weight:900;
  cursor:pointer;
}
.lu-btn:active{ transform:scale(0.98); }
.lu-btn[disabled]{ opacity:0.45; pointer-events:none; }
.lu-val{ min-width:48px; text-align:center; color:white; font-weight:900; font-size:14px; }
.levelup-actions{ display:flex; gap:10px; justify-content:flex-end; margin-top:10px; }
.levelup-secondary, .levelup-primary{
  height:38px; border-radius:14px; padding:0 14px;
  font-weight:900; letter-spacing:0.6px;
  cursor:pointer;
}
.levelup-secondary{
  background:rgba(255,255,255,0.06);
  color:rgba(255,255,255,0.85);
  border:1px solid rgba(255,215,0,0.18);
}
.levelup-primary{
  background:rgba(255,215,0,0.92);
  color:#120f08;
  border:1px solid rgba(255,215,0,0.45);
  box-shadow:0 10px 28px rgba(255,215,0,0.18);
}
@media (max-width:420px){
  .levelup-card{ bottom:calc(var(--safe-bottom) + 84px); padding:12px 12px 10px; }
  .lu-row{ padding:9px 9px; }
  .lu-val{ min-width:42px; }
}

@media (max-width: 640px) {
  .score-board { left: 12px; right: 12px; top: calc(var(--safe-top) + 8px); min-height: 84px; font-size: 16px; }
  .combo-value { font-size: 14px; }
  .score-stack { max-width: min(44vw, 166px); }
  .boss-stage { height: 35%; padding-top: calc(var(--safe-top) + 160px); }
  .boss-top-center { width: min(30vw, 110px); }
  .boss-entity { font-size: 56px; }
  .boss-hp-strip { top: var(--boss-hud-offset-mobile); left:50%; right:auto; width:var(--boss-hud-hp-width); max-width:var(--boss-hud-hp-width); min-width:var(--boss-hud-hp-width); transform:translateX(-50%); gap: 5px; }
  .boss-hp-strip-track { height: 9px; }
  .dialogue-box { width: calc(100% - 24px); min-height: 116px; max-height: 184px; padding: 14px 16px 16px; }
  .player-hud { padding: 10px 12px calc(var(--safe-bottom) + 10px); }
  .hud-block { padding: 9px 6px !important; }
  .settlement-extra-grid { grid-template-columns: 1fr 1fr; }
  .levelup-card { width: calc(100vw - 20px); bottom: calc(var(--safe-bottom) + 76px); }
}

@media (max-width: 640px) and (max-height: 780px) {
  .boss-stage { height: 34%; padding-top: calc(var(--safe-top) + 150px); }
  .score-board { min-height: 78px; }
  .boss-top-center { width: min(28vw, 104px); }
  .boss-entity { font-size: 54px; }
  .boss-hp-strip { top: var(--boss-hud-offset-compact); left:50%; right:auto; width:var(--boss-hud-hp-width); max-width:var(--boss-hud-hp-width); min-width:var(--boss-hud-hp-width); transform:translateX(-50%); }
  .boss-hp-strip-label { font-size: 10px; }
  .boss-hp-text { font-size: 11px; }
  .dialogue-box { min-height: 104px; max-height: 166px; margin-top: 12px; }
  .options-stage { top: 45%; bottom: 24%; }
  .opt-btn { min-height: 52px; }
}

.settlement-actions .btn-return + .btn-return { margin-top: 0; }


/* ===== v7.0.9 feature dock motion ===== */
.settlement-card::after {
    content: "";
    position: absolute;
    inset: auto 18px 16px 18px;
    height: 90px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(87,225,255,0.08), transparent 56%), radial-gradient(circle at 80% 50%, rgba(255,191,42,0.10), transparent 54%);
    filter: blur(18px);
    pointer-events: none;
}
@media (max-width: 420px) {
    .settlement-card { width: min(93vw, 396px); padding: 26px 20px 20px; border-radius: 30px; }
    .settlement-title { font-size: 36px; }
    .settlement-score-val { font-size: 60px; }
}


/* ====================
   SUBJECT CHAT + RANKING SURFACES
   ==================== */
.mq-subject-chat-trigger {
    position: fixed;
    right: 0;
    top: 58%;
    transform: translateY(-50%);
    background: rgba(20, 20, 25, 0.88);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255,255,255,0.10);
    border-right: none;
    border-radius: 18px 0 0 18px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    z-index: 120;
    box-shadow: -8px 0 18px rgba(0,0,0,0.42);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.mq-subject-chat-trigger:hover { border-color: var(--blue); box-shadow: -8px 0 22px rgba(78,205,196,0.16); }
.mq-subject-chat-trigger:active { transform: translateY(-50%) translateX(4px); }
.mq-subject-chat-trigger-icon { font-size: 28px; color: var(--blue); text-shadow: 0 0 12px rgba(78,205,196,0.42); }
.mq-subject-chat-trigger-text { font-family: var(--font-tech); font-size: 10px; font-weight: 900; writing-mode: vertical-lr; text-orientation: mixed; color: rgba(255,255,255,0.54); letter-spacing: 2px; }
.mq-subject-chat-badge { position: absolute; top: -6px; left: -6px; min-width: 20px; height: 20px; border-radius: 999px; padding: 0 6px; display:flex; align-items:center; justify-content:center; background: var(--red); color: #fff; font-family: var(--font-tech); font-size: 11px; font-weight: 900; border: 1px solid rgba(255,255,255,0.9); box-shadow: 0 0 16px rgba(255,107,107,0.48); }
.mq-subject-chat-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: none; opacity: 0; pointer-events: none; transition: opacity .3s ease; z-index: 140; }
.mq-subject-chat-backdrop.open { opacity: 1; pointer-events: auto; }
.mq-subject-chat-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(100%, 420px); background: rgba(10, 10, 12, 0.96); border-left: 1px solid rgba(255,255,255,0.10); box-shadow: -16px 0 40px rgba(0,0,0,0.78); z-index: 150; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .36s cubic-bezier(.19,1,.22,1); }
.mq-subject-chat-drawer.open { transform: translateX(0); }
.mq-subject-chat-header { padding: calc(var(--safe-top) + 12px) 16px 12px; border-bottom: 1px solid rgba(255,255,255,0.08); background: rgba(20, 20, 25, 0.88); display:flex; flex-direction:column; gap: 14px; flex-shrink: 0; }
.mq-subject-chat-header-top { display:flex; align-items:center; justify-content:space-between; gap: 10px; }
.mq-subject-chat-title { font-family: var(--font-tech); font-size: 15px; font-weight: 800; letter-spacing: 0.08em; color: var(--gold); display:flex; align-items:center; gap: 8px; text-shadow: 0 0 10px rgba(255,200,87,0.24); }
.mq-subject-chat-context { font-size: 12px; color: rgba(255,255,255,0.58); font-weight: 700; }
.mq-subject-chat-icon { width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.10); color: #fff; font-size: 20px; display:flex; align-items:center; justify-content:center; cursor:pointer; transition: transform .14s ease, opacity .14s ease, border-color .14s ease, background .14s ease; }
.mq-subject-chat-icon:active { transform: scale(.95); }
.mq-subject-chat-close { color: var(--red); border-color: rgba(255,107,107,0.24); }
.mq-subject-chat-lock { color: rgba(255,255,255,0.62); }
.mq-subject-chat-tabs { display:flex; background: rgba(0,0,0,0.34); border-radius: 10px; padding: 4px; border: 1px solid rgba(255,255,255,0.05); }
.mq-subject-chat-tab { flex: 1; border: none; background: transparent; color: rgba(255,255,255,0.48); font-size: 13px; font-weight: 800; padding: 9px 0; border-radius: 8px; cursor: pointer; transition: transform .14s ease, opacity .14s ease, border-color .14s ease, background .14s ease; }
.mq-subject-chat-tab.active { background: rgba(255,255,255,0.10); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.36); }
.mq-lock-inline { color: var(--gold); font-size: 10px; margin-left: 4px; }
.mq-subject-chat-board { flex:1; overflow-y:auto; padding: 20px 16px; display:flex; flex-direction:column; gap: 20px; }
.mq-chat-system-row { display:flex; justify-content:center; }
.mq-chat-system-pill { background: rgba(78,205,196,0.10); border: 1px solid rgba(78,205,196,0.28); color: var(--blue); font-size: 11px; font-family: var(--font-tech); padding: 6px 16px; border-radius: 999px; letter-spacing: 1px; }
.mq-chat-row { display:flex; align-items:flex-start; gap: 12px; max-width: 90%; }
.mq-chat-row.self { align-self:flex-end; flex-direction: row-reverse; }
.mq-chat-avatar { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; display:flex; align-items:center; justify-content:center; font-size: 20px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.10); color: #fff; }
.mq-chat-avatar.tone-blue { color: var(--blue); border-color: rgba(78,205,196,0.36); }
.mq-chat-avatar.tone-purple { color: var(--purple); border-color: rgba(165,108,193,0.36); box-shadow: 0 0 10px rgba(165,108,193,0.18); }
.mq-chat-content { display:flex; flex-direction:column; gap: 4px; align-items:flex-start; }
.mq-chat-row.self .mq-chat-content { align-items:flex-end; }
.mq-chat-sender { font-size: 12px; font-weight: 800; color: rgba(255,255,255,0.64); display:flex; align-items:center; gap: 6px; }
.mq-chat-rank { font-family: var(--font-tech); font-size: 10px; color: var(--gold); border: 1px solid rgba(255,200,87,0.16); padding: 2px 6px; border-radius: 4px; background: rgba(255,200,87,0.08); }
.mq-chat-bubble { background: rgba(255,255,255,0.08); color: #fff; padding: 12px 16px; border-radius: 4px 14px 14px 14px; font-size: 14px; font-weight: 500; line-height: 1.5; border: 1px solid rgba(255,255,255,0.10); word-break: break-word; }
.mq-chat-row.self .mq-chat-bubble { background: rgba(165,108,193,0.15); border-color: rgba(165,108,193,0.34); border-radius: 14px 4px 14px 14px; }
.mq-chat-locked-card { margin: auto 0; padding: 18px; border-radius: 18px; background: rgba(0,0,0,0.30); border: 1px solid rgba(255,200,87,0.18); text-align:center; display:flex; flex-direction:column; gap: 10px; color: rgba(255,255,255,0.72); }
.mq-chat-locked-card .mq-svg-icon { width: 34px; height: 34px; color: var(--gold); margin: 0 auto; }
.mq-chat-empty-card { margin: auto 0; padding: 18px; border-radius: 18px; background: rgba(255,255,255,0.04); border: 1px dashed rgba(255,255,255,0.12); text-align:center; color: rgba(255,255,255,0.62); }
.mq-subject-chat-input-wrap { background: rgba(20, 20, 25, 0.88); border-top: 1px solid rgba(255,255,255,0.08); padding: 12px 16px calc(12px + var(--safe-bottom)); display:flex; gap: 12px; align-items:center; flex-shrink:0; }
.mq-subject-chat-input-shell { flex:1; background: rgba(0,0,0,0.30); border-radius: 10px; border: 1px solid rgba(255,255,255,0.10); padding: 4px 16px; display:flex; align-items:center; transition: border-color .2s ease, box-shadow .2s ease; }
.mq-subject-chat-input-shell:focus-within { border-color: var(--gold); box-shadow: 0 0 12px rgba(255,200,87,0.16); }
.mq-subject-chat-input { width: 100%; border:none; background: transparent; outline:none; padding: 12px 0; font-size: 14px; color:#fff; font-family: var(--font-main); }
.mq-subject-chat-input::placeholder { color: rgba(255,255,255,0.28); }
.mq-subject-chat-send { width: 48px; height: 48px; border-radius: 10px; flex-shrink:0; background: rgba(255,200,87,0.10); color: var(--gold); border:1px solid var(--gold); display:flex; align-items:center; justify-content:center; font-size: 24px; cursor:pointer; transition: transform .14s ease, opacity .14s ease, border-color .14s ease, background .14s ease; box-shadow: 0 0 10px rgba(255,200,87,0.16); }
.mq-subject-chat-send:active { transform: scale(.95); background: var(--gold); color: #000; }
.mq-subject-chat-send:disabled { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.10); color: rgba(255,255,255,0.2); box-shadow: none; cursor:not-allowed; }
.mq-ranking-shell { min-height: 100%; background: radial-gradient(circle at 50% 0%, #1a1a24 0%, #050507 60%); color: #E2E8F0; padding-bottom: calc(120px + var(--safe-bottom)); }
.mq-ranking-header { position: sticky; top: 0; z-index: 5; background: rgba(10, 10, 15, 0.95); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 1px solid rgba(255,255,255,0.10); padding: calc(var(--safe-top) + 12px) 20px 16px; display:flex; flex-direction:column; gap: 16px; }
.mq-ranking-top-row { display:flex; justify-content:space-between; align-items:center; }
.mq-ranking-back, .mq-ranking-spacer { width: 40px; height: 40px; }
.mq-ranking-back { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.10); border-radius: 12px; color: #fff; font-size: 20px; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.mq-ranking-title { font-family: var(--font-tech); font-size: 18px; font-weight: 700; letter-spacing: 0.12em; color: var(--gold); text-shadow: 0 0 10px rgba(255,200,87,0.30); }
.mq-ranking-spacer { opacity:0; }
.mq-ranking-mode-switcher { position:relative; display:flex; background: rgba(0,0,0,0.6); border-radius: 999px; border:1px solid rgba(255,255,255,0.10); padding: 4px; }
.mq-ranking-mode-btn { flex:1; padding: 10px 0; border:none; background: transparent; border-radius: 999px; color: #8B949E; font-weight: 800; font-size: 14px; display:flex; align-items:center; justify-content:center; gap: 6px; cursor:pointer; z-index: 1; }
.mq-ranking-mode-btn.active { color:#fff; }
.mq-ranking-switcher-bg { position:absolute; top:4px; bottom:4px; left:4px; width: calc(50% - 4px); border-radius: 999px; transition: transform .3s cubic-bezier(.4,0,.2,1), background .2s ease, box-shadow .2s ease, border-color .2s ease; }
.mq-ranking-switcher-bg.bg-abyss { background: rgba(255,107,107,0.15); border:1px solid var(--red); box-shadow: 0 0 15px rgba(255,107,107,0.25); transform: translateX(0%); }
.mq-ranking-switcher-bg.bg-subject { background: rgba(165,108,193,0.15); border:1px solid var(--purple); box-shadow: 0 0 15px rgba(165,108,193,0.25); transform: translateX(100%); }
.mq-ranking-cycle-chip { align-self:flex-end; font-family: var(--font-tech); font-size: 11px; color: rgba(255,255,255,0.66); }
.mq-ranking-ribbon-wrap { display:none; flex-direction:column; gap: 12px; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.03); background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%); }
.mq-ranking-ribbon-wrap.active { display:flex; }
.mq-ranking-ribbon { display:flex; gap: 12px; padding: 0 20px; overflow-x:auto; scrollbar-width:none; }
.mq-ranking-ribbon::-webkit-scrollbar { display:none; }
.mq-ranking-ribbon-main { flex-shrink:0; background: rgba(20,20,25,0.85); border: 1px solid rgba(255,255,255,0.10); border-radius: 16px; padding: 12px 16px; display:flex; align-items:center; gap:8px; color: #8B949E; font-weight: 700; font-size: 14px; cursor:pointer; transition: transform .14s ease, opacity .14s ease, border-color .14s ease, background .14s ease; }
.mq-ranking-ribbon-main.active { background: rgba(165,108,193,0.10); border-color: var(--purple); color:#fff; box-shadow: inset 0 0 10px rgba(165,108,193,0.18); }
.mq-ranking-ribbon-main.abyss-btn-main.active { background: rgba(255,107,107,0.10); border-color: var(--red); box-shadow: inset 0 0 10px rgba(255,107,107,0.18); }
.mq-ranking-ribbon-sub { padding-bottom: 2px; }
.mq-ranking-ribbon-subbtn { flex-shrink:0; background: transparent; border:1px solid rgba(255,255,255,0.10); border-radius: 999px; padding: 6px 14px; color: #8B949E; font-weight:700; font-size:13px; cursor:pointer; transition: transform .14s ease, opacity .14s ease, border-color .14s ease, background .14s ease; }
.mq-ranking-ribbon-subbtn.active { background:#fff; color:#050507; border-color:#fff; }
.mq-ranking-podium { display:flex; justify-content:center; align-items:flex-end; gap: 12px; padding: 32px 20px 40px; min-height: 260px; }
.mq-ranking-podium-item { display:flex; flex-direction:column; align-items:center; position:relative; width: 30%; }
.mq-ranking-podium-item.rank-1 { transform: translateY(-20px); width: 36%; z-index: 2; }
.mq-ranking-avatar-wrap { position:relative; display:flex; justify-content:center; margin-bottom: 12px; }
.mq-ranking-avatar { width: 65px; height: 65px; border-radius: 50%; background: #2D3142; display:flex; align-items:center; justify-content:center; color: rgba(255,255,255,0.7); font-size: 22px; font-weight: 900; border: 3px solid rgba(255,255,255,0.18); box-shadow: 0 0 15px rgba(255,255,255,0.12); overflow:hidden; }
.mq-ranking-podium-item.rank-1 .mq-ranking-avatar { width: 85px; height: 85px; border-color: var(--gold); box-shadow: 0 0 25px rgba(255,200,87,0.32); }
.mq-ranking-podium-item.rank-2 .mq-ranking-avatar { border-color: #E2E8F0; }
.mq-ranking-podium-item.rank-3 .mq-ranking-avatar { border-color: #D97706; }
.mq-ranking-crown { position:absolute; top: -20px; color: var(--gold); font-size: 32px; filter: drop-shadow(0 0 8px var(--gold)); animation: float 3s ease-in-out infinite; }
.mq-ranking-rank-badge { position:absolute; bottom: -8px; width: 24px; height: 24px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-family: var(--font-tech); font-weight:900; font-size:12px; color:#fff; box-shadow: 0 4px 8px rgba(0,0,0,0.5); z-index: 2; background: #94A3B8; }
.mq-ranking-podium-item.rank-1 .mq-ranking-rank-badge { width: 28px; height: 28px; font-size: 14px; background: var(--gold); color:#000; }
.mq-ranking-podium-item.rank-3 .mq-ranking-rank-badge { background:#B45309; }
.mq-ranking-player-name { font-size: 13px; font-weight: 800; color:#fff; text-align:center; margin-bottom:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; width:100%; }
.mq-ranking-player-score { font-family: var(--font-tech); font-size: 14px; font-weight: 900; color: var(--gold); }
.mq-ranking-player-meta { font-size: 11px; color: rgba(255,255,255,0.58); text-align:center; margin-top: 4px; }
.mq-ranking-podium-item.rank-1 .mq-ranking-player-name { font-size: 15px; }
.mq-ranking-podium-item.rank-1 .mq-ranking-player-score { font-size: 16px; text-shadow: 0 0 8px rgba(255,200,87,0.24); }
.mq-ranking-list { padding: 0 20px calc(100px + var(--safe-bottom)); display:flex; flex-direction:column; gap: 12px; }
.mq-ranking-list-card { background: rgba(20,20,25,0.85); border: 1px solid rgba(255,255,255,0.10); border-radius: 16px; padding: 12px 16px; display:flex; align-items:center; gap: 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.30); }
.mq-ranking-list-num { font-family: var(--font-tech); font-size: 16px; font-weight: 900; color: #8B949E; width: 28px; text-align:center; }
.mq-ranking-list-avatar { width: 40px; height: 40px; border-radius:50%; background:#2D3142; display:flex; align-items:center; justify-content:center; font-size: 18px; color: rgba(255,255,255,0.78); flex-shrink:0; }
.mq-ranking-list-info { display:flex; flex-direction:column; gap: 2px; flex:1; min-width:0; }
.mq-ranking-list-name { font-size: 14px; font-weight: 800; color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mq-ranking-list-sub { font-size: 11px; color: #8B949E; font-weight: 600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mq-ranking-list-score { font-family: var(--font-tech); font-size: 15px; font-weight: 900; color: var(--gold); text-align:right; }
.mq-ranking-list-score .sub { font-size: 11px; color: rgba(255,255,255,0.58); margin-top: 2px; }
.mq-ranking-empty { padding: 18px; border-radius: 18px; background: rgba(255,255,255,0.04); border: 1px dashed rgba(255,255,255,0.12); text-align:center; color: rgba(255,255,255,0.62); }
.mq-ranking-mebar { position: sticky; bottom: 0; left: 0; right: 0; z-index: 4; background: rgba(15,15,20,0.95); backdrop-filter: none; -webkit-backdrop-filter: none; border-top: 1px solid rgba(255,255,255,0.16); padding: 16px 20px calc(16px + var(--safe-bottom)); display:flex; align-items:center; gap: 16px; box-shadow: 0 -10px 30px rgba(0,0,0,0.6); }
.mq-ranking-me-rank { font-size: 11px; font-weight: 800; color: #8B949E; text-transform: uppercase; letter-spacing: 1px; display:flex; flex-direction:column; align-items:center; gap: 4px; }
.mq-ranking-me-rank strong { font-family: var(--font-tech); font-size: 20px; color:#fff; }
.mq-ranking-me-avatar { width: 40px; height: 40px; border-radius:50%; border:2px solid var(--purple); display:flex; align-items:center; justify-content:center; flex-shrink:0; color: var(--purple); background: rgba(165,108,193,0.10); }
.mq-ranking-me-info { display:flex; flex-direction:column; gap: 2px; flex:1; min-width:0; }
.mq-ranking-me-name { color: var(--purple); font-weight:800; font-size:14px; }
.mq-ranking-me-gap { color:#8B949E; font-size:11px; }
.mq-ranking-me-score { font-family: var(--font-tech); font-size: 18px; font-weight: 900; color: var(--gold); }
@media (max-width: 640px) { .mq-subject-chat-drawer { width: 100%; max-width: none; } .mq-ranking-podium { gap: 8px; padding-left: 14px; padding-right: 14px; } .mq-ranking-list { padding-left: 14px; padding-right: 14px; } .mq-ranking-mebar { padding-left: 14px; padding-right: 14px; } }
.mq-subject-chat-input:disabled { opacity: 0.62; cursor: not-allowed; }

/* ==========================================================================
   [TITLE CODEX] Uploaded title gallery integration, DB-neutral visual contract
   ========================================================================== */
.mq-title-codex-shell {
    --mq-title-gold: var(--gold, #FFC857);
    --mq-title-gold-glow: rgba(255, 200, 87, 0.6);
    --mq-title-red: var(--red, #FF6B6B);
    --mq-title-red-glow: rgba(255, 107, 107, 0.6);
    --mq-title-blue: var(--blue, #4ECDC4);
    --mq-title-blue-glow: rgba(78, 205, 196, 0.6);
    --mq-title-purple: var(--purple, #A56CC1);
    --mq-title-purple-glow: rgba(165, 108, 193, 0.6);
    --mq-title-bg-base: var(--bg-base, #050507);
    --mq-title-bg-glass: rgba(20, 20, 25, 0.85);
    --mq-title-bg-obsidian: rgba(10, 10, 12, 0.95);
    --mq-title-border-light: rgba(255, 255, 255, 0.1);
    --mq-title-text-main: #E2E8F0;
    --mq-title-text-muted: #64748B;
    min-height: 100%;
    color: var(--mq-title-text-main);
    background: var(--mq-title-bg-base);
    font-family: var(--font-main, 'Nunito', 'Noto Sans TC', sans-serif);
    overflow-x: hidden;
    isolation: isolate;
}

.mq-title-codex-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--mq-title-bg-obsidian);
    border-bottom: 1px solid var(--mq-title-border-light);
    padding: calc(12px + var(--safe-top, env(safe-area-inset-top, 20px))) 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mq-title-codex-header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mq-title-codex-back {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--mq-title-border-light);
    border-radius: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.mq-title-codex-header-title {
    font-family: var(--font-tech, 'Orbitron', sans-serif);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--mq-title-gold-glow);
    color: var(--mq-title-gold);
}

.mq-title-codex-header-spacer { width: 40px; }

.mq-title-codex-tab-container {
    display: flex;
    background: rgba(0,0,0,0.6);
    border-radius: 999px;
    border: 1px solid var(--mq-title-border-light);
    padding: 4px;
}

.mq-title-codex-tab {
    flex: 1;
    padding: 8px 0;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--mq-title-text-muted);
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.mq-title-codex-tab.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
    box-shadow: inset 0 0 10px rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
}

.mq-title-codex-gallery-container { padding: 20px 16px calc(100px + var(--safe-bottom, env(safe-area-inset-bottom, 24px))); }
.mq-title-codex-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.mq-title-codex-card {
    background: var(--mq-title-bg-glass);
    border: 1px solid var(--mq-title-border-light);
    border-radius: 16px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 195px;
    height: 100%;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    transition: transform 0.2s;
}

.mq-title-codex-card:active { transform: scale(0.96); }
.mq-title-codex-card.locked { opacity: 0.6; filter: grayscale(100%); background: #0a0a0c; border-color: #222; }
.mq-title-codex-card.locked .mq-title-codex-icon-3d { opacity: 0.3; text-shadow: none; box-shadow: inset 0 0 10px #000; }

@keyframes mq-title-codex-pulse-purple {
    0% { box-shadow: inset 0 0 10px rgba(165,108,193,0.1), 0 0 10px rgba(165,108,193,0.2); }
    50% { box-shadow: inset 0 0 25px rgba(165,108,193,0.4), 0 0 20px rgba(165,108,193,0.5); }
    100% { box-shadow: inset 0 0 10px rgba(165,108,193,0.1), 0 0 10px rgba(165,108,193,0.2); }
}
@keyframes mq-title-codex-pulse-gold {
    0% { box-shadow: inset 0 0 10px rgba(255,200,87,0.1), 0 0 10px rgba(255,200,87,0.2); }
    50% { box-shadow: inset 0 0 25px rgba(255,200,87,0.4), 0 0 20px rgba(255,200,87,0.5); }
    100% { box-shadow: inset 0 0 10px rgba(255,200,87,0.1), 0 0 10px rgba(255,200,87,0.2); }
}
@keyframes mq-title-codex-pulse-blue {
    0% { box-shadow: inset 0 0 10px rgba(78,205,196,0.1), 0 0 10px rgba(78,205,196,0.2); }
    50% { box-shadow: inset 0 0 25px rgba(78,205,196,0.4), 0 0 20px rgba(78,205,196,0.5); }
    100% { box-shadow: inset 0 0 10px rgba(78,205,196,0.1), 0 0 10px rgba(78,205,196,0.2); }
}
@keyframes mq-title-codex-pulse-red {
    0% { box-shadow: inset 0 0 10px rgba(255,107,107,0.1), 0 0 10px rgba(255,107,107,0.2); }
    50% { box-shadow: inset 0 0 25px rgba(255,107,107,0.4), 0 0 20px rgba(255,107,107,0.5); }
    100% { box-shadow: inset 0 0 10px rgba(255,107,107,0.1), 0 0 10px rgba(255,107,107,0.2); }
}

.mq-title-codex-card.unlocked.glow-purple { border-color: var(--mq-title-purple); animation: mq-title-codex-pulse-purple 3s infinite alternate ease-in-out; }
.mq-title-codex-card.unlocked.glow-gold { border-color: var(--mq-title-gold); animation: mq-title-codex-pulse-gold 3s infinite alternate ease-in-out; }
.mq-title-codex-card.unlocked.glow-blue { border-color: var(--mq-title-blue); animation: mq-title-codex-pulse-blue 3s infinite alternate ease-in-out; }
.mq-title-codex-card.unlocked.glow-red { border-color: var(--mq-title-red); animation: mq-title-codex-pulse-red 3s infinite alternate ease-in-out; }

.mq-title-codex-icon-3d {
    font-size: 36px;
    margin-bottom: 12px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(0,0,0,0.5);
    border: 2px ridge rgba(255,255,255,0.1);
    flex-shrink: 0;
    transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.unlocked.glow-purple .mq-title-codex-icon-3d { color: var(--mq-title-purple); text-shadow: 0 0 15px var(--mq-title-purple); border-color: rgba(165,108,193,0.3); }
.unlocked.glow-gold .mq-title-codex-icon-3d { color: var(--mq-title-gold); text-shadow: 0 0 15px var(--mq-title-gold); border-color: rgba(255,200,87,0.3); }
.unlocked.glow-blue .mq-title-codex-icon-3d { color: var(--mq-title-blue); text-shadow: 0 0 15px var(--mq-title-blue); border-color: rgba(78,205,196,0.3); }
.unlocked.glow-red .mq-title-codex-icon-3d { color: var(--mq-title-red); text-shadow: 0 0 15px var(--mq-title-red); border-color: rgba(255,107,107,0.3); }

.mq-title-codex-title-name {
    font-size: 14px;
    font-weight: 900;
    color: #fff;
    line-height: 1.3;
    width: 100%;
    min-height: 36px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: auto;
}

.mq-title-codex-title-subject { font-size: 11px; color: #8B949E; }

.mq-title-codex-holder-info {
    width: 100%;
    background: rgba(0,0,0,0.4);
    border-radius: 8px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid rgba(255,255,255,0.05);
    margin-top: 12px;
}

.mq-title-codex-holder-name { font-size: 11px; font-weight: 800; color: var(--mq-title-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
.mq-title-codex-holder-score { font-family: var(--font-tech, 'Orbitron', sans-serif); font-size: 13px; font-weight: 900; color: #fff; }
.mq-title-codex-card.locked .mq-title-codex-holder-info { background: transparent; border: none; }
.mq-title-codex-card.locked .mq-title-codex-holder-name { color: #444; font-size: 12px; }

.mq-title-codex-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    z-index: 2100;
}
.mq-title-codex-backdrop.active { opacity: 1; pointer-events: auto; }

.mq-title-codex-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 12, 0.95);
    border-top: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px 24px 0 0;
    padding: 20px 24px calc(24px + var(--safe-bottom, env(safe-area-inset-bottom, 24px)));
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 2200;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.9);
}
.mq-title-codex-sheet.active { transform: translateY(0); }
.mq-title-codex-sheet-handle { width: 40px; height: 4px; background: rgba(255,255,255,0.2); border-radius: 4px; margin: 0 auto 20px; }
.mq-title-codex-sheet-icon { font-size: 48px; text-align: center; margin-bottom: 12px; transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, opacity 0.16s ease; }
.mq-title-codex-sheet-title { font-size: 20px; font-weight: 900; text-align: center; color: #fff; margin-bottom: 8px; }
.mq-title-codex-sheet-desc { font-size: 14px; color: #64748B; text-align: center; margin-bottom: 24px; line-height: 1.5; }
.mq-title-codex-stat-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.05); gap: 16px; }
.mq-title-codex-stat-label { font-size: 13px; font-weight: 700; color: #64748B; }
.mq-title-codex-stat-val { font-family: var(--font-tech, 'Orbitron', sans-serif); font-size: 15px; font-weight: 900; color: var(--gold, #FFC857); text-align: right; }
.mq-title-codex-stat-holder { color: #fff; }

@media (min-width: 760px) {
    .mq-title-codex-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mq-title-codex-sheet { left: 50%; right: auto; width: min(520px, calc(100vw - 32px)); transform: translate(-50%, 100%); border-left: 1px solid rgba(255,255,255,0.1); border-right: 1px solid rgba(255,255,255,0.1); }
    .mq-title-codex-sheet.active { transform: translate(-50%, 0); }
}

@media (max-width: 380px) {
    .mq-title-codex-header { padding-left: 14px; padding-right: 14px; }
    .mq-title-codex-gallery-container { padding-left: 12px; padding-right: 12px; }
    .mq-title-codex-tab { font-size: 12px; }
    .mq-title-codex-card { padding: 14px 10px; }
}


/* Title equipment surfaces share the title codex black-gold glass language. */
.mq-equipped-title-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    border-radius: 999px;
    padding: 4px 10px;
    font-family: var(--font-tech, 'Orbitron', sans-serif);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .04em;
    color: #fff;
    background: rgba(0,0,0,.42);
    border: 1px solid rgba(255,255,255,.1);
    box-shadow: inset 0 0 12px rgba(255,255,255,.04), 0 0 14px rgba(0,0,0,.38);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mq-equipped-title-badge i { font-size: 13px; flex-shrink: 0; }
.mq-equipped-title-badge.glow-gold { border-color: rgba(255,200,87,.55); color: var(--mq-title-gold, #FFC857); text-shadow: 0 0 12px rgba(255,200,87,.45); }
.mq-equipped-title-badge.glow-purple { border-color: rgba(165,108,193,.55); color: var(--mq-title-purple, #A56CC1); text-shadow: 0 0 12px rgba(165,108,193,.45); }
.mq-equipped-title-badge.glow-blue { border-color: rgba(78,205,196,.55); color: var(--mq-title-blue, #4ECDC4); text-shadow: 0 0 12px rgba(78,205,196,.45); }
.mq-equipped-title-badge.glow-red { border-color: rgba(255,107,107,.55); color: var(--mq-title-red, #FF6B6B); text-shadow: 0 0 12px rgba(255,107,107,.45); }
.mq-equipped-title-empty { color: rgba(226,232,240,.48); font-size: 11px; font-weight: 800; }
.pf-equipped-title { display: flex; margin: 4px 0 6px; max-width: 220px; }
.settlement-equipped-title { display: flex; justify-content: center; margin: 8px auto 14px; min-height: 24px; }
.mq-ranking-title-badge-row { display: flex; justify-content: center; margin: 4px 0 2px; max-width: 100%; }
.mq-ranking-list-info .mq-ranking-title-badge-row,
.mq-ranking-me-info .mq-ranking-title-badge-row { justify-content: flex-start; }
.mq-title-codex-equipped-chip {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(255,200,87,.12);
    border: 1px solid rgba(255,200,87,.55);
    color: var(--mq-title-gold, #FFC857);
    font-size: 10px;
    font-weight: 900;
    box-shadow: 0 0 16px rgba(255,200,87,.22);
}
.mq-title-codex-empty {
    grid-column: 1 / -1;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(20,20,25,.72);
    border: 1px solid rgba(255,255,255,.1);
    color: rgba(226,232,240,.66);
    font-weight: 900;
}
.mq-title-codex-equip-btn {
    width: 100%;
    margin-top: 20px;
    border: 1px solid var(--mq-title-gold, #FFC857);
    border-radius: 14px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(255,200,87,.18), rgba(255,200,87,.08));
    color: var(--mq-title-gold, #FFC857);
    font-family: var(--font-main, 'Nunito', sans-serif);
    font-size: 14px;
    font-weight: 900;
    box-shadow: inset 0 0 14px rgba(255,200,87,.12), 0 0 18px rgba(255,200,87,.18);
    cursor: pointer;
    transition: transform .2s ease, opacity .2s ease, background .2s ease;
}
.mq-title-codex-equip-btn:active { transform: scale(.98); }
.mq-title-codex-equip-btn:disabled { opacity: .58; cursor: default; background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.16); color: rgba(255,255,255,.58); box-shadow: none; }


/* [TITLE UNLOCK QUEUE] 稱號圖鑑同質感解鎖事件與取得狀態 */
.mq-title-codex-owned-chip,
.mq-title-codex-locked-chip {
    position:absolute; top:10px; right:10px; z-index:2;
    display:inline-flex; align-items:center; gap:4px;
    padding:4px 8px; border-radius:999px;
    font-family:var(--font-tech); font-size:10px; font-weight:900; letter-spacing:0.4px;
    backdrop-filter:none; -webkit-backdrop-filter:none;
}
.mq-title-codex-owned-chip { color:var(--blue); background:rgba(78,205,196,0.12); border:1px solid rgba(78,205,196,0.45); box-shadow:0 0 12px rgba(78,205,196,0.18); }
.mq-title-codex-locked-chip { color:rgba(226,232,240,0.68); background:rgba(0,0,0,0.42); border:1px solid rgba(255,255,255,0.12); }
.event-card.tone-gold,
.event-card.tone-purple,
.event-card.tone-blue,
.event-card.tone-red {
    background:linear-gradient(180deg, rgba(20,20,25,0.96), rgba(8,8,12,0.98));
    border:1px solid rgba(255,255,255,0.12);
    box-shadow:0 24px 80px rgba(0,0,0,0.82), inset 0 0 24px rgba(255,255,255,0.035);
}
.event-card.tone-purple .event-icon,
.event-card.tone-purple .event-btn.primary { border-color:var(--purple); color:#fff; box-shadow:0 0 22px rgba(165,108,193,0.34); }
.event-card.tone-gold .event-icon,
.event-card.tone-gold .event-btn.primary { box-shadow:0 0 24px rgba(255,200,87,0.34); }
.event-card.tone-blue .event-icon,
.event-card.tone-blue .event-btn.primary { box-shadow:0 0 22px rgba(78,205,196,0.34); }
.event-card.tone-red .event-icon,
.event-card.tone-red .event-btn.primary { box-shadow:0 0 22px rgba(255,107,107,0.34); }
.event-eyebrow { font-family:var(--font-tech); letter-spacing:2px; }
.event-title { text-shadow:0 0 16px rgba(255,200,87,0.26); }


/* ==========================================================================
   [DESKTOP VERIFY ROOTFIX] Feature workspace density, reliable icons, ranking/catalog completeness
   ========================================================================== */
.mq-inline-icon {
    width: 22px;
    height: 22px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 1px 8px rgba(0,0,0,.28));
}
.feature-scene-back,
.trial-uploaded-page .trial-head-back,
.trial-uploaded-page .trial-head-icon,
.feature-dock-btn.compact .feature-dock-icon {
    color: rgba(255,255,255,.92);
}
.feature-dock-btn.compact .feature-dock-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.feature-dock-btn.compact .mq-inline-icon,
.trial-uploaded-page .trial-head-icon .mq-inline-icon {
    width: 23px;
    height: 23px;
}
.event-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.15;
}
@media (min-width: 900px) {
    .feature-scene-safe {
        padding: 24px;
    }
    .feature-scene-phone {
        width: min(1180px, calc(100vw - 48px));
        max-width: none;
        min-height: calc(100vh - 48px);
    }
    .feature-scene-appbar {
        padding-bottom: 16px;
    }
    .feature-scene-row,
    .feature-scene-heading-row {
        gap: 16px;
    }
    .feature-scene-brand {
        flex: 0 1 420px;
        max-width: 420px;
        padding: 12px 16px;
    }
    .feature-scene-tabs {
        gap: 12px;
    }
    .feature-dock-btn.compact {
        width: 52px;
        height: 52px;
        border-radius: 18px;
    }
    .feature-scene-scroll {
        padding: 8px 0 24px;
    }
    .trial-uploaded-page .phone {
        width: 100%;
        max-width: none;
    }
    .trial-uploaded-page .subjects {
        max-height: none;
        overflow: visible;
        padding-right: 0;
        mask-image: none;
        -webkit-mask-image: none;
    }
    .trial-uploaded-page .grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 16px;
    }
    .trial-uploaded-page .subcard {
        min-height: 96px;
        padding: 16px;
    }
    .mq-ranking-ribbon {
        flex-wrap: wrap;
        overflow-x: visible;
        padding-right: 20px;
        scrollbar-width: none;
    }
    .mq-ranking-ribbon::-webkit-scrollbar { display: none; }
    .mq-ranking-ribbon-main {
        flex: 0 0 auto;
    }
    .mq-title-codex-gallery-container {
        padding: 24px 20px calc(100px + var(--safe-bottom, env(safe-area-inset-bottom, 24px)));
    }
    .mq-title-codex-grid {
        grid-template-columns: repeat(auto-fit, minmax(184px, 1fr));
        gap: 16px;
    }
    .mq-title-codex-card {
        min-height: 214px;
        padding: 18px 14px;
    }
}
@media (min-width: 760px) and (max-width: 899px) {
    .mq-title-codex-grid {
        grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
        gap: 14px;
    }
}
@media (max-width: 520px) {
    .feature-scene-row {
        gap: 8px;
    }
    .feature-scene-brand {
        padding: 9px 10px;
    }
    .feature-dock-btn.compact {
        width: 44px;
        height: 44px;
    }
}


/* ===========================================================================
   [UNIFIED SVG FEATURE SURFACES] Deep trial / ranking / title codex visual contract
   =========================================================================== */
.feature-scene-scroll { padding-top: 0; }
.mq-svg-icon,
.mq-title-codex-svg,
.mq-title-codex-sheet-svg,
.mq-title-codex-chip-svg,
.mq-ranking-crown-svg {
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.05;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}
.mq-svg-icon { width: 20px; height: 20px; }
.mq-title-codex-chip-svg { width: 13px; height: 13px; }
.mq-title-codex-svg { width: 34px; height: 34px; }
.mq-title-codex-sheet-svg { width: 52px; height: 52px; margin: 0 auto; }
.mq-ranking-crown-svg { position: absolute; top: -21px; width: 32px; height: 32px; color: var(--gold); filter: drop-shadow(0 0 8px rgba(255,200,87,.72)); animation: float 3s ease-in-out infinite; }
.trial-uploaded-page .trial-head-back,
.trial-uploaded-page .trial-head-icon,
.mq-title-codex-back,
.mq-ranking-back {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.14);
    background: linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.035));
    color: rgba(255,255,255,.94);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 12px 28px rgba(0,0,0,.32);
    clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, filter .18s ease;
}
.trial-uploaded-page .trial-head-back:hover,
.trial-uploaded-page .trial-head-icon:hover,
.mq-title-codex-back:hover,
.mq-ranking-back:hover {
    transform: translateY(-1px);
    border-color: rgba(255,200,87,.36);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 14px 30px rgba(0,0,0,.38), 0 0 22px rgba(255,200,87,.12);
}
.trial-uploaded-page .trial-head-back:active,
.trial-uploaded-page .trial-head-icon:active,
.mq-title-codex-back:active,
.mq-ranking-back:active { transform: translateY(1px) scale(.98); }
.trial-uploaded-page .trial-head-back::before,
.trial-uploaded-page .trial-head-icon::before { border-radius: 11px; }
.trial-uploaded-page .trial-head-title { letter-spacing: .5px; }
.mq-title-codex-header,
.mq-ranking-header {
    background: linear-gradient(180deg, rgba(10,10,15,.98), rgba(10,10,15,.92));
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.mq-title-codex-tab-container,
.mq-ranking-mode-switcher {
    border-radius: 14px;
    padding: 3px;
    background: rgba(0,0,0,.56);
}
.mq-title-codex-tab,
.mq-ranking-mode-btn,
.mq-ranking-switcher-bg,
.mq-ranking-ribbon-subbtn { border-radius: 10px; }
.mq-ranking-ribbon-main { border-radius: 12px; }
.mq-ranking-mode-btn .mq-svg-icon,
.mq-ranking-ribbon-main .mq-svg-icon { width: 18px; height: 18px; }
.mq-title-codex-card { border-radius: 14px; }
.mq-title-codex-icon-3d {
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.46);
    border: 1px solid rgba(255,255,255,.12);
}
.mq-title-codex-sheet-icon { min-height: 54px; display: flex; align-items: center; justify-content: center; }
.mq-title-codex-equip-btn { display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; }
.mq-equipped-title-badge .mq-badge-svg { width: 14px; height: 14px; }
.mq-title-codex-owned-chip,
.mq-title-codex-locked-chip,
.mq-title-codex-equipped-chip { border-radius: 10px; }
@media (min-width: 900px) {
    .trial-uploaded-page .grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 16px;
    }
    .trial-uploaded-page .subcard {
        display: grid;
        grid-template-columns: 46px minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 12px;
        min-height: 92px;
    }
    .trial-uploaded-page .subleft { display: contents; }
    .trial-uploaded-page .submeta { min-width: 0; overflow: hidden; }
    .trial-uploaded-page .submeta .name,
    .trial-uploaded-page .submeta .hint {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
        max-height: none;
        -webkit-line-clamp: unset;
    }
    .trial-uploaded-page .subright { justify-self: end; min-width: max-content; }
    .trial-uploaded-page .mini { max-width: 94px; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 430px) {
    .trial-uploaded-page .trial-head-back,
    .trial-uploaded-page .trial-head-icon,
    .mq-title-codex-back,
    .mq-ranking-back { width: 42px; height: 42px; border-radius: 11px; }
}

/* ===========================================================================
   [FULL SVG ICON HARDENING] Static shop/login/game-entry + dynamic hydration
   =========================================================================== */
.app-icon .mq-svg-icon { width: 34px; height: 34px; }
.input-icon.mq-svg-icon { width: 20px; height: 20px; }
.btn-submit .mq-svg-icon,
.btn-google .mq-svg-icon,
.btn-guest .mq-svg-icon,
.pf-tab-btn .mq-svg-icon,
.btn-revive .mq-svg-icon,
.auth-google-btn .mq-svg-icon { display: inline-block; width: 18px; height: 18px; }
.sys-icon .mq-svg-icon { width: 42px; height: 42px; margin: 0 auto; }
.event-icon .mq-svg-icon { width: 36px; height: 36px; }
.event-item-icon .mq-svg-icon { width: 18px; height: 18px; }
.iap-icon { display: flex; align-items: center; justify-content: center; }
.iap-icon .mq-svg-icon { width: 40px; height: 40px; }
.price-btn .mq-svg-icon { display: inline-block; width: 14px; height: 14px; }
.pass-title .mq-svg-icon { width: 18px; height: 18px; }
.inv-icon .mq-svg-icon { width: 24px; height: 24px; }
.feature-dock-icon .mq-svg-icon { width: 24px; height: 24px; filter: drop-shadow(0 1px 5px rgba(0,0,0,.28)); }
.skill-btn > .mq-svg-icon { width: 22px; height: 22px; }
.mq-subject-chat-trigger-icon.mq-svg-icon { width: 28px; height: 28px; color: var(--blue); filter: drop-shadow(0 0 10px rgba(78,205,196,.42)); }
.mq-subject-chat-icon .mq-svg-icon,
.mq-subject-chat-title .mq-svg-icon,
.mq-subject-chat-send .mq-svg-icon,
.drawer-header .mq-svg-icon { display: inline-block; width: 20px; height: 20px; }
.mq-chat-avatar .mq-svg-icon { width: 20px; height: 20px; }
.status-indicator .mq-svg-icon,
.chip-chevron.mq-svg-icon,
.shop-close-btn .mq-svg-icon { display: inline-block; width: 16px; height: 16px; }
.mq-svg-spin { animation: mq-svg-spin 1s linear infinite; }
@keyframes mq-svg-spin { to { transform: rotate(360deg); } }


/* ===========================================================================
   [SVG EMPTY ICON SENTINEL] Runtime protection for dialog/chat/shop surfaces
   =========================================================================== */
.mq-icon-sentinel-fallback { display: inline-block; flex-shrink: 0; }
.mq-chat-avatar-svg { width: 20px; height: 20px; }
.mq-chat-locked-svg { width: 34px; height: 34px; }
.trial-uploaded-page .modal-icon .mq-svg-icon { width: 26px; height: 26px; }
.trial-uploaded-page .subcard .icon .mq-svg-icon,
.mq-trial-subcard-svg { width: 24px; height: 24px; }
.mq-subject-card-svg { width: 76px; height: 76px; }
#shopVipBadge .mq-svg-icon { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.cooldown-hint .mq-svg-icon { width: 16px; height: 16px; flex-shrink: 0; }


/* ==========================================================================
   v7.5.10 commercial smooth hot-path lock
   Scope: only the measured INP/LCP hot surfaces from v7.5.10 screenshots.
   ========================================================================== */
:root {
  --mq-smooth-fast: 120ms;
  --mq-smooth-med: 180ms;
  --mq-smooth-ease: cubic-bezier(.2,.8,.2,1);
  --mq-fake-glass-bg: rgba(12,14,20,.88);
  --mq-fake-glass-border: rgba(255,255,255,.08);
}

#app-bg {
  filter: none !important;
  opacity: .62;
  transform: translateZ(0) scale(1.02);
  transition: opacity var(--mq-smooth-med) ease, transform var(--mq-smooth-med) ease;
  will-change: auto;
}
body[data-view="login"] #app-bg,
body[data-view="menu"] #app-bg,
body[data-view="game"] #app-bg,
body[data-view="auth-resolving"] #app-bg {
  filter: none !important;
}
body.blur-mode .scene-layer,
body.blur-mode .card-scroller,
body.blur-mode .drawer-layer,
body.blur-mode .top-nav,
body.blur-mode .weekly-container {
  filter: none !important;
  transform: translateZ(0) scale(.99);
  transition: transform var(--mq-smooth-med) var(--mq-smooth-ease), opacity var(--mq-smooth-fast) ease;
}

.overlay-backdrop,
.mq-title-codex-backdrop,
.feature-scene-backdrop,
.mq-subject-chat-backdrop,
.trial-intro-overlay {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(0,0,0,.68);
  transition: opacity var(--mq-smooth-fast) ease;
}
.overlay-card,
.drawer-layer,
.glass-drawer.drawer-layer,
.feature-shell,
.subject-card,
.subject-card .card-lock-shell,
.feature-scene-appbar,
.dialogue-box,
.opt-btn,
.player-hud,
.mq-ranking-header,
.mq-ranking-mebar,
.login-card,
.weekly-vip-card {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.feature-shell {
  background: linear-gradient(145deg, rgba(14,18,28,.96), rgba(5,7,14,.98));
  box-shadow: 0 10px 22px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.05);
  clip-path: inset(0 0 0 0 round 999px);
  contain: layout paint style;
  transition: clip-path var(--mq-smooth-med) var(--mq-smooth-ease), transform var(--mq-smooth-fast) var(--mq-smooth-ease), border-color var(--mq-smooth-fast) ease;
}
.feature-shell:not(.open) {
  clip-path: inset(0 0 0 calc(100% - 74px) round 999px);
  box-shadow: 0 8px 18px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.04);
}
.feature-dock {
  max-width: 320px;
  transform-origin: right center;
  transition: opacity var(--mq-smooth-fast) ease, transform var(--mq-smooth-med) var(--mq-smooth-ease);
}
.feature-shell:not(.open) .feature-dock {
  max-width: 320px;
  opacity: 0;
  margin-right: 0;
  transform: translate3d(10px,0,0) scaleX(.92);
  pointer-events: none;
}
.feature-shell:not(.open) .feature-dock-btn {
  filter: none !important;
}
.feature-dock-icon,
.feature-launcher,
.btn-start-game,
.sub-chip.tactical-chip,
.subject-card,
.mq-title-codex-card,
.mq-title-codex-back,
.mq-ranking-back,
.trial-uploaded-page .trial-head-back,
.trial-uploaded-page .trial-head-icon {
  will-change: auto;
}
.feature-caret path,
.feature-emoji,
.feature-dock-icon .mq-svg-icon,
.mq-inline-icon,
.mq-title-codex-svg,
.mq-title-codex-sheet-svg,
.mq-ranking-crown-svg,
.card-icon-glow,
.subject-card .card-icon-glow {
  filter: none !important;
}

.subject-card {
  background: linear-gradient(160deg, rgba(28,30,38,.72), rgba(10,10,15,.90));
  box-shadow: 0 4px 12px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.04);
  transition: transform var(--mq-smooth-fast) var(--mq-smooth-ease), opacity var(--mq-smooth-fast) ease, border-color var(--mq-smooth-fast) ease;
}
.subject-card.active {
  box-shadow: 0 6px 14px rgba(0,0,0,.22), inset 0 0 0 1px rgba(var(--subject-rgb),.20);
}
.subject-card .card-icon-stage::after {
  filter: none !important;
  opacity: .45;
}
.subject-card .subject-meta,
.subject-card .card-body,
.subject-card .card-content {
  contain: layout paint style;
}
.glass-drawer.drawer-layer {
  background: linear-gradient(180deg, rgba(18,20,26,.30), rgba(12,13,18,.88));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.sub-chip.tactical-chip,
.sub-grid.tactical-grid .sub-chip {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 2px 8px rgba(0,0,0,.18);
  transition: transform var(--mq-smooth-fast) var(--mq-smooth-ease), border-color var(--mq-smooth-fast) ease, background var(--mq-smooth-fast) ease;
}
.sub-chip.tactical-chip.selected {
  box-shadow: inset 0 1px 0 rgba(78,205,196,.12), 0 4px 12px rgba(0,0,0,.22);
  transform: translate3d(0,-1px,0);
}
.sub-chip .pulse-blue,
.pass-banner.focused-offer,
.mq-title-codex-card.unlocked.glow-purple,
.mq-title-codex-card.unlocked.glow-gold,
.mq-title-codex-card.unlocked.glow-blue,
.mq-title-codex-card.unlocked.glow-red,
.mq-ranking-crown,
.mq-ranking-crown-svg,
.boss-entity {
  animation: none !important;
}

.btn-start-game {
  box-shadow: 0 3px 10px rgba(255,200,87,.18);
  transition: transform 80ms ease, opacity var(--mq-smooth-fast) ease;
}
.btn-start-game:active { transform: translateY(1px); }

.mq-title-codex-card {
  box-shadow: 0 3px 10px rgba(0,0,0,.26);
  transition: transform 90ms ease, border-color var(--mq-smooth-fast) ease, opacity var(--mq-smooth-fast) ease;
  contain: layout paint style;
}
.mq-title-codex-card:active { transform: translateY(1px); }
.mq-title-codex-card.locked { filter: none !important; opacity: .64; }
.mq-title-codex-icon-3d,
.mq-title-codex-sheet-icon {
  text-shadow: none !important;
  transition: color var(--mq-smooth-fast) ease, opacity var(--mq-smooth-fast) ease;
}
.mq-title-codex-backdrop { background: rgba(0,0,0,.72); }
.mq-title-codex-sheet {
  box-shadow: 0 -8px 22px rgba(0,0,0,.54);
  transition: transform var(--mq-smooth-med) var(--mq-smooth-ease);
  contain: layout paint style;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* ====================
   COMMERCIAL SMOOTH HOTPATH LOCK v7.5.10-B
   Non-destructive local override for DevTools INP hot selectors observed on overlay/profile/shop/game entry.
   ==================== */
.overlay-container,
.sys-modal-overlay {
  contain: layout paint style;
  transition: opacity 110ms ease !important;
}
.overlay-backdrop,
.sys-modal-overlay,
.mq-title-codex-backdrop,
.trial-intro-overlay {
  touch-action: manipulation;
  transition: opacity 90ms ease !important;
}
.overlay-card,
.overlay-card.event-card,
.revive-card,
.settlement-card,
.sys-modal-card {
  contain: layout paint style;
  box-shadow: 0 10px 28px rgba(0,0,0,.46) !important;
  transition: transform 110ms cubic-bezier(.22,1,.36,1), opacity 90ms ease !important;
  animation: none !important;
}
.overlay-card.event-card::before,
.revive-card::before,
.settlement-card::before { opacity: .55; }
.overlay-container.active .overlay-card,
.settlement-overlay.active .settlement-card { animation: none !important; }
.event-icon,
.event-btn.primary,
.event-card.tone-purple .event-icon,
.event-card.tone-purple .event-btn.primary,
.event-card.tone-gold .event-icon,
.event-card.tone-gold .event-btn.primary,
.event-card.tone-blue .event-icon,
.event-card.tone-blue .event-btn.primary,
.event-card.tone-red .event-icon,
.event-card.tone-red .event-btn.primary {
  box-shadow: 0 4px 12px rgba(0,0,0,.22) !important;
}
.event-title,
.revive-header,
.settlement-title,
.mq-title-codex-header-title,
.mq-equipped-title-badge { text-shadow: none !important; }
.avatar-btn,
.avatar-core,
.avatar-halo,
.card-icon-stage,
.price-btn,
.pf-tab-btn,
.sub-chip.tactical-chip,
.btn-start-game,
.event-title,
.event-btn {
  touch-action: manipulation;
}
.avatar-halo {
  filter: none !important;
  opacity: .58;
}
.avatar-btn,
.pf-avatar-box,
.subject-card .card-icon-stage,
.subject-card .card-icon-stage::after,
.subject-card .card-icon-glow,
.price-btn,
.iap-card,
.pf-tab-btn,
.sub-chip.tactical-chip,
.btn-start-game,
.event-title {
  contain: layout paint style;
}
.pf-tab-btn,
.shop-tab,
.lang-btn,
.btn-logout,
.price-btn,
.iap-card,
.event-btn {
  transition: transform 80ms ease, opacity 90ms ease, background 90ms ease, border-color 90ms ease !important;
}
.pf-tab-btn.active,
.shop-tab.active,
.lang-btn.active,
.price-btn,
.pass-price,
.sub-chip.tactical-chip.selected {
  box-shadow: none !important;
}
.pf-tab-content[hidden] { display: none !important; }
.sub-chip,
.sub-chip.tactical-chip { animation: none !important; }
.sub-chip.tactical-chip.selected {
  transform: translate3d(0,0,0) !important;
}
.sub-chip.selected .chip-name { text-shadow: none !important; }
.subject-card .card-icon-stage::after {
  filter: none !important;
  opacity: .28 !important;
}
.subject-card .card-icon-glow,
.iap-icon,
.hot .iap-icon,
.radar-shape,
.res-glyph.coin::before,
.res-glyph.gem::before {
  filter: none !important;
}
.btn-start-game {
  contain: layout paint style;
  box-shadow: none !important;
  transition: transform 70ms ease, opacity 90ms ease, background 90ms ease !important;
}
.btn-start-game:active,
.event-btn:active,
.price-btn:active,
.iap-card:active { transform: translateY(1px) !important; }

/* ====================
   COMMERCIAL SMOOTH HOTPATH LOCK v7.5.10-C
   Strong local INP clamp for observed 300-900ms selectors.
   ==================== */
body.blur-mode .scene-layer,
body.blur-mode .card-scroller,
body.blur-mode .drawer-layer,
body.blur-mode .top-nav,
body.blur-mode .weekly-container {
  transform: none !important;
  opacity: 1 !important;
  filter: none !important;
  transition: none !important;
}
.overlay-container,
.overlay-container.active,
.overlay-backdrop,
.sys-modal-overlay,
.mq-title-codex-backdrop,
.trial-intro-overlay {
  transition: none !important;
  animation: none !important;
  contain: layout paint style !important;
}
.overlay-card,
.overlay-card.event-card,
.sys-modal-card,
.revive-card,
.settlement-card {
  transform: translate3d(0,0,0) scale(1) !important;
  transition: none !important;
  animation: none !important;
  box-shadow: 0 6px 16px rgba(0,0,0,.38) !important;
  contain: layout paint style !important;
}
.overlay-container.active .overlay-card,
.settlement-overlay.active .settlement-card {
  transform: translate3d(0,0,0) scale(1) !important;
}
.feature-shell,
.feature-shell.open,
.feature-shell:not(.open) {
  clip-path: none !important;
  transition: none !important;
  box-shadow: 0 6px 14px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.04) !important;
  contain: layout paint style !important;
}
.feature-shell:not(.open) {
  width: 74px;
  min-width: 74px;
}
.feature-shell.open {
  width: auto;
}
.feature-dock,
.feature-shell:not(.open) .feature-dock,
.feature-dock-btn,
.feature-dock-icon,
.feature-launcher,
.feature-launcher::before,
.feature-caret,
.feature-caret path {
  transition: none !important;
  animation: none !important;
  filter: none !important;
  box-shadow: none !important;
}
.feature-shell:not(.open) .feature-dock {
  position: absolute;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translate3d(8px,0,0) !important;
}
.feature-shell.open .feature-dock {
  position: relative;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translate3d(0,0,0) !important;
}
.feature-shell.open .feature-caret path,
.feature-caret path {
  transform: none !important;
}

.avatar-btn,
.avatar-core,
.avatar-halo,
.avatar-head,
.avatar-body,
.avatar-crest,
.pf-avatar-box,
.pf-tab-btn,
.price-btn,
.iap-card,
.card-icon-stage,
.subject-card .card-icon-stage,
.subject-card .card-icon-stage::after,
.subject-card .card-icon-glow,
.subject-card .card-icon-glow .mq-svg-icon,
.sub-chip.tactical-chip,
.sub-chip.tactical-chip.is-locked,
.sub-chip.tactical-chip.selected,
.btn-start-game,
.event-title,
.event-btn,
.mq-svg-icon,
.mq-svg-icon path {
  filter: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  transition: none !important;
  animation: none !important;
}

.subject-card,
.subject-card.active,
.subject-card.is-side,
.subject-card.active.is-side {
  transform: translate3d(0,0,0) !important;
  transition: opacity 60ms ease, border-color 60ms ease !important;
  box-shadow: none !important;
  contain: layout paint style !important;
}
.subject-card { opacity: .74 !important; }
.subject-card.active { opacity: 1 !important; }
.sub-chip.tactical-chip,
.sub-chip.tactical-chip.selected,
.sub-chip.tactical-chip:active {
  transform: translate3d(0,0,0) !important;
}
.pf-tab-btn.active,
.price-btn,
.price-btn.coin,
.price-btn.dia,
.price-btn.fiat,
.sub-chip.tactical-chip.selected {
  box-shadow: none !important;
}
.btn-start-game:active,
.event-btn:active,
.price-btn:active,
.iap-card:active,
.feature-launcher:active {
  transform: none !important;
}


/* ====================
   COMMERCIAL SMOOTH HOTPATH LOCK v7.5.10-D
   Final local clamp for overlay/title/profile/chat/inline-svg selectors measured above 200ms.
   ==================== */
body:not(.blur-mode) {
  filter: none !important;
}
body.blur-mode .scene-layer,
body.blur-mode .card-scroller,
body.blur-mode .drawer-layer,
body.blur-mode .top-nav,
body.blur-mode .weekly-container {
  transform: none !important;
  opacity: 1 !important;
  filter: none !important;
  transition: none !important;
}
#eventOverlay,
#profileOverlay,
#shopOverlay,
#inventoryOverlay,
#difficultyOverlay,
#reviveOverlay,
#settlementOverlay,
.overlay-container,
.overlay-container.active,
.overlay-container .overlay-backdrop,
#mqTitleCodexBackdrop,
#customModal,
#subjectChatBackdrop,
#subjectChatDrawer,
.sys-modal-overlay,
.modal-overlay,
.mq-subject-chat-backdrop,
.mq-subject-chat-drawer,
.mq-title-codex-backdrop,
.mq-title-codex-sheet {
  transition: none !important;
  animation: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.overlay-container .overlay-backdrop,
#mqTitleCodexBackdrop,
#subjectChatBackdrop,
.feature-scene-backdrop,
.modal-overlay {
  background: rgba(0,0,0,.70) !important;
  opacity: 1;
  transform: none !important;
  touch-action: manipulation;
}
#customModal:not(.active),
#subjectChatBackdrop:not(.open),
#mqTitleCodexBackdrop:not(.active) {
  opacity: 0 !important;
  pointer-events: none !important;
}
.mq-subject-chat-drawer,
.mq-subject-chat-drawer.open {
  transform: none !important;
  box-shadow: -6px 0 14px rgba(0,0,0,.42) !important;
  contain: layout paint style !important;
}
.mq-subject-chat-icon,
.mq-subject-chat-close,
.mq-subject-chat-tab,
.mq-subject-chat-send,
.trial-uploaded-page .modal-btn,
.trial-uploaded-page .modal-btn.secondary,
.trial-uploaded-page .trial-head-back,
.trial-uploaded-page .trial-head-icon,
.mq-title-codex-back,
.mq-ranking-back,
.pf-tab-btn,
.avatar-btn,
.avatar-halo,
.avatar-body,
.subject-card,
.subject-card.active,
.subject-card .card-icon-stage,
.subject-card .subject-name,
.card-icon-stage,
.subject-name,
.mq-title-codex-card,
.mq-title-codex-card.unlocked,
.mq-title-codex-card.unlocked.glow-red,
.mq-title-codex-card.unlocked.glow-gold,
.mq-title-codex-card.unlocked.glow-blue,
.mq-title-codex-card.unlocked.glow-purple,
.mq-title-codex-icon-3d,
.mq-title-codex-title-name,
.mq-title-codex-holder-info,
.mq-inline-icon,
.mq-inline-icon path,
.mq-svg-icon,
.mq-svg-icon path,
path {
  animation: none !important;
  transition: none !important;
  filter: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  touch-action: manipulation;
  will-change: auto !important;
}
.mq-inline-icon,
.mq-svg-icon,
.mq-inline-icon path,
.mq-svg-icon path,
.feature-caret,
.feature-caret path {
  pointer-events: none;
}
.mq-title-codex-card,
.subject-card,
.pf-tab-btn,
.trial-uploaded-page .trial-head-back,
.trial-uploaded-page .trial-head-icon,
.trial-uploaded-page .modal-btn.secondary,
.mq-subject-chat-icon,
.modal-btn.secondary,
.overlay-backdrop,
.mq-title-codex-backdrop {
  cursor: pointer;
  contain: layout paint style !important;
}
.mq-title-codex-card:active,
.subject-card:active,
.pf-tab-btn:active,
.trial-uploaded-page .trial-head-back:active,
.trial-uploaded-page .trial-head-icon:active,
.mq-subject-chat-icon:active,
.modal-btn.secondary:active {
  transform: none !important;
}
.mq-title-codex-card.unlocked .mq-title-codex-icon-3d,
.unlocked.glow-red .mq-title-codex-icon-3d,
.unlocked.glow-gold .mq-title-codex-icon-3d,
.unlocked.glow-blue .mq-title-codex-icon-3d,
.unlocked.glow-purple .mq-title-codex-icon-3d {
  border-color: rgba(255,255,255,.12) !important;
  background: rgba(0,0,0,.24) !important;
  color: currentColor;
}
.pf-tab-btn.active {
  background: rgba(255,200,87,.92) !important;
  color: #050505 !important;
}


/* ====================
   COMMERCIAL SMOOTH HOTPATH LOCK v7.5.10-E
   No-trial deterministic input-frame shield for remaining >200ms selectors.
   Scope: temporary input window, SVG hit-target normalization, overlay zero-work close.
   ==================== */
.overlay-container.mq-fast-closing,
.overlay-container.mq-fast-closing .overlay-backdrop,
.overlay-container.mq-fast-closing .overlay-card,
#mqTitleCodexBackdrop.mq-fast-closing,
#subjectChatBackdrop.mq-fast-closing,
#subjectChatDrawer.mq-fast-closing {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: none !important;
  animation: none !important;
  transform: none !important;
}
#featureLauncher,
#featureLauncher *,
.subject-card svg,
.subject-card svg *,
.card-icon-stage svg,
.card-icon-stage svg *,
.mq-title-codex-card svg,
.mq-title-codex-card svg *,
.mq-title-codex-back svg,
.mq-title-codex-back svg *,
.mq-ranking-back svg,
.mq-ranking-back svg *,
.trial-uploaded-page .trial-head-back svg,
.trial-uploaded-page .trial-head-back svg *,
.trial-uploaded-page .trial-head-icon svg,
.trial-uploaded-page .trial-head-icon svg *,
.pf-tab-btn svg,
.pf-tab-btn svg *,
.mq-subject-chat-icon svg,
.mq-subject-chat-icon svg *,
.modal-btn svg,
.modal-btn svg * {
  pointer-events: none !important;
}
.mq-title-codex-card,
.subject-card,
.sub-chip.tactical-chip,
.pf-tab-btn,
.btn-start-game,
.trial-uploaded-page .modal-btn.secondary,
.mq-subject-chat-icon,
.overlay-backdrop,
#mqTitleCodexBackdrop,
#subjectChatBackdrop {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  contain: layout paint style !important;
}
.mq-title-codex-grid,
.subject-subgrid,
#cardContainer,
#subjectChatDrawer,
#profileOverlay,
#shopOverlay,
#difficultyOverlay,
#eventOverlay {
  contain: layout paint style !important;
}
.mq-title-codex-card,
.subject-card {
  content-visibility: auto;
  contain-intrinsic-size: 180px 220px;
}
#drawerTitle {
  contain: layout paint style;
  text-rendering: optimizeSpeed;
}


/* ====================
   COMMERCIAL SMOOTH HOTPATH LOCK v7.5.10-F
   Final local closure: move remaining >200ms targets out of the input frame.
   ==================== */
svg,
svg *,
.mq-svg-icon,
.mq-svg-icon *,
.mq-inline-icon,
.mq-inline-icon *,
.feature-dock-icon,
.feature-dock-icon *,
.card-icon-stage svg,
.card-icon-stage svg *,
.trial-head-row svg,
.trial-head-row svg * {
  pointer-events: none !important;
}
.feature-dock-btn,
.feature-dock-btn.active,
.feature-dock-btn:hover,
.feature-dock-btn:focus-visible,
.feature-dock-btn:active,
.feature-dock-btn.active .feature-dock-icon,
.feature-dock-btn:hover .feature-dock-icon,
.feature-dock-btn:focus-visible .feature-dock-icon,
.feature-dock-btn:active .feature-dock-icon,
.trial-uploaded-page .trial-head-back,
.trial-uploaded-page .trial-head-back:hover,
.trial-uploaded-page .trial-head-back:active,
.mq-ranking-back,
.mq-ranking-back:hover,
.mq-ranking-back:active,
.mq-title-codex-back,
.mq-title-codex-back:hover,
.mq-title-codex-back:active,
.event-btn,
.event-btn:active,
.btn-start-game,
.btn-start-game:active {
  animation: none !important;
  transition: none !important;
  filter: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  transform: none !important;
  will-change: auto !important;
  touch-action: manipulation;
}
.feature-workspace.mq-fast-closing,
.trial-scene-modal.mq-fast-closing,
.mq-title-codex-sheet.mq-fast-closing,
.mq-subject-chat-drawer.mq-fast-closing {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: none !important;
  animation: none !important;
  transform: none !important;
}
.mq-title-codex-grid,
.mq-ranking-list,
.mq-ranking-table,
.feature-page,
#featureWorkspace,
#featurePage-codex,
#featurePage-ranking,
#featurePage-trial {
  contain: layout paint style !important;
}

/* ====================
   COMMERCIAL SMOOTH HOTPATH LOCK v7.5.10-G
   Visible-first input response clamp: keep closed chat drawer inert and avoid delayed visual actions.
   ==================== */
.mq-subject-chat-drawer:not(.open),
.mq-subject-chat-backdrop:not(.open),
#subjectChatDrawer:not(.open),
#subjectChatBackdrop:not(.open) {
  pointer-events: none !important;
}
#subjectChatDrawer[hidden],
#subjectChatBackdrop[hidden] {
  display: none !important;
}

#featureLauncher,
.feature-launcher {
  pointer-events: auto !important;
}
#featureLauncher > *,
.feature-launcher > *,
.feature-caret,
.feature-caret * {
  pointer-events: none !important;
}


/* ====================
   COMMERCIAL SMOOTH HOTPATH LOCK v7.5.10-K
   Targeted closure for remaining real-device >200ms selectors: shop tabs, profile tabs, subject card inner nodes, chat controls, modal/backdrop, SVG path targets.
   ==================== */
.card-body,
.subject-meta,
.chip-bottom-row,
.shop-tab,
.shop-tab.active,
.pf-tab-btn,
.pf-tab-btn.active,
.avatar-halo,
.mq-subject-chat-icon,
.mq-subject-chat-lock,
.mq-subject-chat-close,
#customModal.modal-overlay,
#customModal .modal-btn.secondary,
.overlay-backdrop,
.feature-caret,
.feature-caret *,
.mq-svg-icon,
.mq-svg-icon *,
.mq-inline-icon,
.mq-inline-icon *,
path {
  animation: none !important;
  transition: none !important;
  filter: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  will-change: auto !important;
  touch-action: manipulation;
}
.card-body,
.subject-meta,
.chip-bottom-row,
.shop-tab,
.pf-tab-btn,
.avatar-halo,
.mq-subject-chat-icon,
#customModal.modal-overlay,
.overlay-backdrop {
  contain: layout paint style !important;
}
.shop-tab.active,
.pf-tab-btn.active {
  transform: none !important;
}
#customModal.modal-overlay:not(.active),
.overlay-container:not(.active),
#mqTitleCodexBackdrop:not(.active),
#subjectChatBackdrop:not(.open) {
  pointer-events: none !important;
}


/* ====================
   COMMERCIAL SMOOTH HOTPATH LOCK v7.5.10-L
   Selector budget and visible-first virtualization surfaces.
   ==================== */
.mq-virtualized-list {
  content-visibility: auto;
  contain: layout paint style !important;
}
.mq-virtual-load-more {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  color: var(--text-main);
  font-weight: 800;
  touch-action: manipulation;
  transition: none !important;
}
.shop-grid .iap-card[hidden],
.shop-grid .iap-card[data-mq-virtual-hidden="true"] {
  display: none !important;
}
.mq-inp-debug-panel {
  position: fixed;
  left: 12px;
  bottom: calc(12px + var(--safe-bottom, 0px));
  z-index: 3000;
  max-width: min(92vw, 420px);
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px;
  background: rgba(5,5,7,.88);
  color: #E2E8F0;
  font: 800 11px/1.35 var(--font-tech, monospace);
  pointer-events: none;
  contain: layout paint style;
}

/* v7.5.10-L hotpath target normalization: SVG graphics never own tap targets. */
.mq-svg-icon, .mq-svg-icon * { pointer-events: none !important; }

/* [Q] Answer submit optimistic pending state: immediate visual feedback before server-authoritative verification. */
.q-type.judging { color: var(--gold, #FFC857); text-shadow: 0 0 10px rgba(255, 200, 87, 0.35); }
.opt-btn.is-pending-choice { border-color: var(--gold, #FFC857) !important; box-shadow: 0 0 0 2px rgba(255, 200, 87, 0.18), 0 8px 24px rgba(255, 200, 87, 0.12); transform: translateY(-1px); }
.opt-btn.is-pending-choice::after { content: '判定中'; margin-left: 8px; font-size: 11px; font-weight: 900; color: var(--gold, #FFC857); letter-spacing: 0.04em; }

/* [PUBLIC LEGAL LINKS] Login-before public information surface */
.login-public-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.login-public-links a {
    color: rgba(226,232,240,0.72);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    padding: 7px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.035);
}
.login-public-links a:hover,
.login-public-links a:focus-visible {
    color: #fff;
    border-color: rgba(255,200,87,0.34);
    background: rgba(255,200,87,0.09);
    outline: none;
}
.mq-web-ad-shell {
    margin-top: 16px;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
}
.login-web-ad-shell {
    box-shadow: 0 16px 42px rgba(0,0,0,0.22);
}
.mq-web-ad-label {
    color: #4ECDC4;
    font-family: var(--font-tech, 'Orbitron', sans-serif);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.mq-web-ad-copy {
    margin: 8px 0 14px;
    color: rgba(226,232,240,0.7);
    font-size: 12.5px;
    line-height: 1.6;
}
.mq-web-ad-slot {
    min-height: 110px;
}


/* U release: login legal modal */
html.legal-modal-open { overflow: hidden; }
.legal-modal-overlay { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
.legal-modal-overlay[hidden] { display: none; }
.legal-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(16px); }
.legal-modal-card { position: relative; width: min(720px, 100%); max-height: min(760px, calc(100vh - 32px)); display:flex; flex-direction:column; border:1px solid rgba(255,255,255,.16); border-radius: 28px; background: linear-gradient(180deg, rgba(19, 26, 52, .98), rgba(8, 11, 24, .98)); box-shadow: 0 30px 90px rgba(0,0,0,.58); overflow:hidden; }
.legal-modal-head { display:flex; align-items:center; gap:12px; justify-content:space-between; padding:18px 18px 14px; border-bottom:1px solid rgba(255,255,255,.1); }
.legal-modal-eyebrow { color:#4ECDC4; font-family: var(--font-tech, 'Orbitron', sans-serif); font-size:11px; font-weight:900; letter-spacing:.14em; text-transform:uppercase; }
.legal-modal-head h2 { margin:4px 0 0; font-size:22px; color:#fff; letter-spacing:-.02em; }
.legal-modal-open { margin-left:auto; color:#FFC857; text-decoration:none; font-size:13px; font-weight:900; border:1px solid rgba(255,200,87,.3); border-radius:999px; padding:9px 12px; white-space:nowrap; }
.legal-modal-close { width:40px; height:40px; border-radius:14px; border:1px solid rgba(255,255,255,.16); background:rgba(255,255,255,.06); color:#fff; font-size:26px; line-height:1; cursor:pointer; }
.legal-modal-body { padding:20px 22px 24px; overflow:auto; outline:none; }
.legal-modal-body .legal-lead { color:#eaf2ff; font-size:16px; line-height:1.75; }
.legal-modal-body h3 { color:#fff; margin:20px 0 8px; font-size:17px; }
.legal-modal-body p, .legal-modal-body li { color:#aebbd6; line-height:1.72; font-size:14.5px; }
.legal-modal-body a { color:#FFC857; }
@media (max-width: 560px) { .legal-modal-head { align-items:flex-start; flex-wrap:wrap; } .legal-modal-open { order:3; width:100%; justify-content:center; text-align:center; } .legal-modal-close { margin-left:auto; } }

/* ==========================================================================
   [MANUAL PAYMENT] Bank transfer commerce panel
   ========================================================================== */
.manual-payment-panel {
    grid-column: 1 / -1;
    display: grid;
    gap: 16px;
    padding: 18px;
    border-radius: 24px;
    border: 1px solid rgba(78, 205, 196, 0.25);
    background:
        radial-gradient(circle at 10% 0%, rgba(78, 205, 196, 0.18), transparent 32%),
        linear-gradient(180deg, rgba(14, 22, 34, 0.98), rgba(8, 10, 18, 0.94));
    box-shadow: 0 20px 50px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.08);
}
.manual-payment-panel[hidden] { display: none !important; }
.manual-payment-hero { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.manual-payment-eyebrow { font-family: var(--font-tech); font-size: 10px; letter-spacing: .16em; color: var(--blue); font-weight: 900; }
.manual-payment-hero h3 { margin: 6px 0 8px; font-size: 22px; color: #fff; letter-spacing: .02em; }
.manual-payment-hero p { margin: 0; color: rgba(226,232,240,.72); line-height: 1.55; font-size: 13px; }
.manual-payment-badge { flex-shrink: 0; border: 1px solid rgba(255,200,87,.38); color: var(--gold); border-radius: 999px; padding: 8px 12px; font-size: 11px; font-weight: 900; background: rgba(255,200,87,.08); }
.manual-payment-form-grid, .manual-payment-proof-grid { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
.manual-payment-proof-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.manual-field { display: grid; gap: 7px; color: rgba(226,232,240,.76); font-size: 12px; font-weight: 900; }
.manual-field span { color: rgba(226,232,240,.68); }
.manual-field-wide { grid-column: 1 / -1; }
.manual-field input, .manual-field select, .manual-field textarea {
    width: 100%; border: 1px solid rgba(255,255,255,.12); border-radius: 14px;
    background: rgba(0,0,0,.26); color: #fff; padding: 12px 13px; outline: none;
    font-family: var(--font-main); font-size: 14px;
}
.manual-field textarea { resize: vertical; min-height: 76px; }
.manual-field input:focus, .manual-field select:focus, .manual-field textarea:focus { border-color: rgba(78,205,196,.72); box-shadow: 0 0 0 3px rgba(78,205,196,.10); }
.manual-primary-btn { border: 0; border-radius: 14px; padding: 13px 16px; font-weight: 1000; cursor: pointer; color: #061014; background: linear-gradient(135deg, #4ECDC4, #FFC857); box-shadow: 0 12px 28px rgba(78,205,196,.18); }
.manual-primary-btn:active { transform: translateY(1px) scale(.99); }

.manual-payment-selection-preview { min-height: 0; }
.manual-preview-card {
    display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px;
    border: 1px solid rgba(255,200,87,.22); border-radius: 18px; padding: 14px;
    background: linear-gradient(135deg, rgba(255,200,87,.10), rgba(78,205,196,.06));
}
.manual-preview-card div, .manual-order-product {
    display: grid; gap: 5px; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 11px;
    background: rgba(0,0,0,.18);
}
.manual-preview-card small, .manual-order-product small { color: rgba(226,232,240,.56); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.manual-preview-card strong, .manual-order-product b { color: #fff; font-size: 15px; font-weight: 1000; }
.manual-preview-card span, .manual-order-product em { color: rgba(226,232,240,.66); font-size: 12px; line-height: 1.45; font-style: normal; }
.manual-preview-card div:nth-child(2) strong { color: var(--gold); font-family: var(--font-tech); }
.manual-preview-empty { border: 1px dashed rgba(255,255,255,.16); border-radius: 16px; padding: 12px; color: rgba(226,232,240,.62); background: rgba(255,255,255,.035); font-size: 13px; }
.manual-order-product { margin-bottom: 12px; border-color: rgba(255,200,87,.18); }
.manual-payment-order-detail { display: grid; gap: 12px; }
.manual-order-detail-card { border: 1px solid rgba(255,255,255,.12); border-radius: 18px; padding: 14px; background: rgba(255,255,255,.045); }
.manual-order-head { display: flex; justify-content: space-between; gap: 12px; color: #fff; font-weight: 1000; margin-bottom: 12px; }
.manual-order-head strong { color: var(--gold); font-family: var(--font-tech); }
.manual-bank-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.manual-bank-grid div { border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 10px; background: rgba(0,0,0,.20); }
.manual-bank-grid small { display:block; color: rgba(226,232,240,.54); font-size: 10px; margin-bottom: 4px; }
.manual-bank-grid b { color: #fff; font-size: 13px; word-break: break-word; }
.manual-note { margin: 12px 0 0; color: rgba(226,232,240,.68); line-height: 1.5; font-size: 12px; }
.manual-payment-status { border: 1px solid rgba(78,205,196,.20); border-radius: 14px; padding: 11px 12px; color: rgba(226,232,240,.76); background: rgba(78,205,196,.06); font-size: 13px; }
.manual-payment-history { display: grid; gap: 10px; }
.manual-history-title { color: #fff; font-weight: 1000; font-size: 13px; }
.manual-order-list { display: grid; gap: 8px; }
.manual-order-chip { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.035); border-radius: 14px; padding: 10px 12px; }
.manual-order-chip span { color: #fff; font-weight: 900; font-size: 12px; }
.manual-order-chip strong { color: var(--blue); font-size: 12px; }
.manual-order-chip em { grid-column: 1 / -1; color: rgba(226,232,240,.58); font-style: normal; font-size: 11px; }
.manual-order-empty { color: rgba(226,232,240,.52); font-size: 12px; }
@media (max-width: 680px) {
    .manual-payment-hero, .manual-payment-form-grid, .manual-payment-proof-grid { grid-template-columns: 1fr; display: grid; }
    .manual-bank-grid, .manual-preview-card { grid-template-columns: 1fr; }
    .manual-payment-badge { width: fit-content; }
}


/* [Y] Focus/Wisdom item UI parity */
.iap-desc-mini { min-height: 30px; margin: 2px 0 8px; padding: 0 8px; color: rgba(255,255,255,0.58); font-size: 11px; line-height: 1.35; text-align: center; }
.btn-focus { border-color: rgba(125, 211, 252, 0.46); box-shadow: 0 4px 10px rgba(0,0,0,.4), 0 0 18px rgba(125,211,252,.14); }
.btn-wisdom { border-color: rgba(192, 132, 252, 0.48); box-shadow: 0 4px 10px rgba(0,0,0,.4), 0 0 18px rgba(192,132,252,.16); }
.hero-avatar.wisdom-aura .h-pack, .hero-avatar.wisdom-aura .hero-backpack { border-color: rgba(192,132,252,.8); box-shadow: 0 0 18px rgba(192,132,252,.5); }
.hero-avatar.wisdom-aura::after { content: ''; position: absolute; inset: -10px -8px; border-radius: 22px; border: 1px solid rgba(192,132,252,.35); box-shadow: 0 0 22px rgba(192,132,252,.28); pointer-events: none; animation: mq-wisdom-pulse 1.8s ease-in-out infinite; }
@keyframes mq-wisdom-pulse { 0%, 100% { opacity:.45; transform: scale(.96); } 50% { opacity:1; transform: scale(1.04); } }
@media (max-width: 390px) { .skill-badge { min-width: 20px; height: 20px; font-size: 10px; } }


/* [Z] Payment intent modal routing: hidden from default shop tabs, opened only by top-up/insufficient-diamond flows. */
.payment-intent-panel {
    position: relative;
    overflow: hidden;
}
.payment-intent-panel::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(78,205,196,.95), rgba(255,200,87,.95));
    pointer-events: none;
}
.manual-payment-compliance {
    display: grid;
    gap: 10px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 16px;
    padding: 12px 14px;
    background: rgba(0,0,0,.20);
    color: rgba(226,232,240,.66);
    font-size: 11px;
    line-height: 1.55;
}
.manual-payment-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.manual-payment-link-row a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,200,87,.24);
    background: rgba(255,200,87,.08);
    color: var(--gold);
    text-decoration: none;
    font-weight: 900;
}
.manual-payment-link-row a:focus-visible,
.manual-primary-btn:focus-visible {
    outline: 2px solid rgba(78,205,196,.78);
    outline-offset: 2px;
}
.price-btn.dia,
.price-btn.fiat {
    cursor: pointer;
}
@media (max-width: 680px) {
    .manual-payment-link-row a { flex: 1 1 calc(50% - 8px); }
}

/* v7.5.16 shop-membership-tabs-payment-back: store tabs separate diamonds and membership plans. */
.payment-modal-overlay {
    z-index: 132;
    padding: 18px;
    align-items: center;
}
.payment-modal-backdrop {
    background:
        radial-gradient(circle at 18% 10%, rgba(78,205,196,.18), transparent 30%),
        radial-gradient(circle at 85% 0%, rgba(255,200,87,.15), transparent 28%),
        rgba(4,8,18,.76);
}
.payment-modal-card {
    width: min(94vw, 760px);
    max-width: 760px;
    max-height: min(88vh, 860px);
    padding: 0;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,.14);
    background:
        linear-gradient(180deg, rgba(18,28,46,.96), rgba(8,12,22,.98));
    box-shadow: 0 26px 90px rgba(0,0,0,.62), inset 0 1px 0 rgba(255,255,255,.08);
    overflow: hidden;
}
.payment-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid rgba(255,255,255,.10);
    background:
        linear-gradient(135deg, rgba(78,205,196,.13), rgba(255,200,87,.08)),
        rgba(255,255,255,.035);
}
.payment-modal-kicker {
    font-family: var(--font-tech);
    font-size: 10px;
    letter-spacing: .18em;
    font-weight: 1000;
    color: rgba(78,205,196,.92);
}
.payment-modal-title {
    margin-top: 6px;
    color: #fff;
    font-size: clamp(20px, 3vw, 28px);
    line-height: 1.12;
    font-weight: 1000;
    letter-spacing: .02em;
}
.payment-modal-subtitle {
    margin-top: 7px;
    color: rgba(226,232,240,.68);
    font-size: 12px;
    line-height: 1.45;
}
.payment-modal-close {
    flex: 0 0 auto;
    position: relative;
    top: auto;
    right: auto;
}
.payment-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}
.payment-modal-back {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px solid rgba(78,205,196,.32);
    background: rgba(78,205,196,.10);
    color: rgba(229,255,252,.92);
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.payment-modal-back .mq-svg-icon {
    width: 16px;
    height: 16px;
}
.payment-modal-back:active { transform: translateY(1px); }
.payment-modal-scroll {
    overflow: auto;
    padding: 18px 20px 22px;
    max-height: calc(min(88vh, 860px) - 94px);
    scrollbar-width: thin;
    scrollbar-color: rgba(78,205,196,.35) rgba(255,255,255,.06);
}
.payment-modal-scroll::-webkit-scrollbar { width: 7px; }
.payment-modal-scroll::-webkit-scrollbar-track { background: rgba(255,255,255,.05); border-radius: 999px; }
.payment-modal-scroll::-webkit-scrollbar-thumb { background: rgba(78,205,196,.34); border-radius: 999px; }
.payment-modal-card .manual-payment-panel {
    display: grid;
    gap: 15px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.payment-modal-card .manual-payment-panel::before { display: none; }
.payment-modal-card .manual-payment-hero {
    padding: 14px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 20px;
    background: rgba(255,255,255,.045);
}
@media (max-width: 620px) {
    .payment-modal-overlay { padding: 10px; align-items: stretch; }
    .payment-modal-card { width: 100%; max-height: 94vh; border-radius: 24px; align-self: center; }
    .payment-modal-header { padding: 17px 16px 14px; }
    .payment-modal-actions { gap: 8px; }
    .payment-modal-back { padding: 0 10px; min-height: 40px; }
    .payment-modal-back span { display: none; }
    .payment-modal-scroll { padding: 14px 14px 18px; max-height: calc(94vh - 90px); }
    .payment-modal-card .manual-payment-hero { grid-template-columns: 1fr; }
}


/* [ABCD v7.5.17] Shop frame and product-card parity: keep 技能 / 補給 / 鑽石 / 月卡 tabs visually consistent. */
.shop-overlay-card {
    height: min(680px, 85vh);
    max-height: 85vh;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
}
.shop-overlay-card .shop-scroll-area {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
}
.shop-grid {
    align-items: stretch;
    grid-auto-rows: minmax(190px, auto);
}
.shop-grid .iap-card {
    min-height: 190px;
    height: 100%;
    justify-content: flex-start;
}
.shop-grid .iap-card .dual-price,
.shop-grid .iap-card > .price-btn.fiat {
    margin-top: auto;
}
.shop-grid .iap-desc-mini {
    display: flex;
    align-items: center;
    justify-content: center;
}
@media (max-width: 390px) {
    .shop-overlay-card { height: min(660px, 86vh); }
    .shop-grid { gap: 10px; grid-auto-rows: minmax(184px, auto); }
    .shop-grid .iap-card { min-height: 184px; }
}
/* v7.6.14 Precision login install CTA, ad cleanup, and stable logo guard. */
#installPwaButton.install-pill-cta {
    position: fixed !important;
    top: max(16px, calc(env(safe-area-inset-top, 0px) + 16px)) !important;
    right: max(18px, calc(env(safe-area-inset-right, 0px) + 18px)) !important;
    left: auto !important;
    bottom: auto !important;
    width: auto !important;
    max-width: min(168px, calc(100vw - 32px)) !important;
    min-width: 104px !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    color: #eff6ff !important;
    font: inherit !important;
    text-align: center !important;
    cursor: pointer !important;
    z-index: 1200 !important;
    pointer-events: auto !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    filter: drop-shadow(0 18px 30px rgba(37, 99, 235, 0.38)) !important;
}
#installPwaButton.install-pill-cta .install-pill-core {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-width: 104px !important;
    min-height: 38px !important;
    padding: 9px 16px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(219, 234, 254, 0.72) !important;
    background: radial-gradient(circle at 24% 16%, rgba(255, 255, 255, 0.42), transparent 30%), linear-gradient(135deg, #38bdf8 0%, #2563eb 56%, #1d4ed8 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.44), inset 0 -1px 0 rgba(15, 23, 42, 0.24), 0 14px 30px rgba(37, 99, 235, 0.36) !important;
    color: #f8fbff !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: 0.08em !important;
    white-space: nowrap !important;
    backdrop-filter: blur(16px) saturate(1.25) !important;
    -webkit-backdrop-filter: blur(16px) saturate(1.25) !important;
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease !important;
}
#installPwaButton.install-pill-cta .install-pill-arrow {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    color: #dbeafe !important;
    font-size: 17px !important;
    font-weight: 1000 !important;
    line-height: 1 !important;
    text-shadow: 0 0 12px rgba(96, 165, 250, 0.98) !important;
    animation: installArrowBounce 1.08s cubic-bezier(0.33, 1, 0.68, 1) infinite !important;
}
#installPwaButton.install-pill-cta .install-pill-svg {
    width: 16px !important;
    height: 16px !important;
    flex: 0 0 auto !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}
#installPwaButton.install-pill-cta:hover .install-pill-core,
#installPwaButton.install-pill-cta:focus-visible .install-pill-core {
    transform: translateY(-1px) translateZ(0) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48), inset 0 -1px 0 rgba(15, 23, 42, 0.22), 0 18px 36px rgba(37, 99, 235, 0.46) !important;
}
#installPwaButton.install-pill-cta:active .install-pill-core { transform: translateY(1px) scale(0.985) translateZ(0) !important; }
body:not([data-view="login"]) #installPwaButton.install-pill-cta,
#installPwaButton.install-pill-cta[hidden] { display: none !important; }
.login-web-ad-shell,
#loginWebAdShell { display: none !important; visibility: hidden !important; }
.app-icon .app-icon-svg,
.app-icon svg.app-icon-svg {
    width: 34px !important;
    height: 34px !important;
    display: block !important;
    color: var(--gold) !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 1.9 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}
@keyframes installArrowBounce {
    0%, 100% { transform: translateY(0); opacity: 0.86; }
    45% { transform: translateY(4px); opacity: 1; }
}
@media (max-width: 520px) {
    #installPwaButton.install-pill-cta { top: max(12px, calc(env(safe-area-inset-top, 0px) + 12px)) !important; right: max(12px, calc(env(safe-area-inset-right, 0px) + 12px)) !important; min-width: 92px !important; }
    #installPwaButton.install-pill-cta .install-pill-core { min-width: 92px !important; min-height: 36px !important; padding: 8px 13px !important; font-size: 12px !important; }
}
@media (prefers-reduced-motion: reduce) {
    #installPwaButton.install-pill-cta .install-pill-arrow { animation: none !important; }
    #installPwaButton.install-pill-cta .install-pill-core { transition: none !important; }
}
/* end v7.6.14 precision login install CTA */
