/**
 * 琉璃塔 · 浅色扁平界面
 */
:root {
    --lt-bg0: #f8fafc;
    --lt-bg1: #f1f5f9;
    --lt-bg2: #e2e8f0;
    --lt-glass: #ffffff;
    --lt-glass-border: #e2e8f0;
    --lt-text: #0f172a;
    --lt-muted: #64748b;
    --lt-accent: #2563eb;
    --lt-gold: #d97706;
    --lt-success: #059669;
    --lt-danger: #dc2626;
    --lt-chunk-blue: #3b82f6;
    --lt-chunk-green: #10b981;
    --lt-chunk-purple: #8b5cf6;
    --lt-r-common: #94a3b8;
    --lt-r-rare: #3b82f6;
    --lt-r-epic: #8b5cf6;
    --lt-r-legend: #d97706;
    --lt-safe-top: env(safe-area-inset-top, 0px);
    --lt-safe-bottom: env(safe-area-inset-bottom, 0px);
    --lt-radius: 14px;
    --lt-shadow: none;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    min-height: 100dvh;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", sans-serif;
    background: var(--lt-bg1);
    background-attachment: fixed;
    color: var(--lt-text);
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 45% at 50% -8%, rgba(37, 99, 235, 0.08), transparent 55%),
        radial-gradient(ellipse 55% 35% at 100% 100%, rgba(14, 165, 233, 0.06), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

#lt-game-root, #lt-app { position: relative; z-index: 1; }

#lt-app-loading {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lt-bg1);
    z-index: 9999;
}
#lt-app-loading[hidden], #lt-app[hidden], .lt-screen[hidden] { display: none !important; }

.lt-loading-inner { text-align: center; color: var(--lt-muted); }
.lt-spinner {
    width: 44px; height: 44px; margin: 0 auto 14px;
    border: 3px solid rgba(37, 99, 235, 0.15);
    border-top-color: var(--lt-accent);
    border-radius: 50%;
    animation: lt-spin 0.75s linear infinite;
}
@keyframes lt-spin { to { transform: rotate(360deg); } }

#lt-app {
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    max-width: 430px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    background: var(--lt-bg0);
}

.lt-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: calc(10px + var(--lt-safe-top)) 16px calc(80px + var(--lt-safe-bottom));
    overflow-y: auto;
    animation: lt-in 0.25s ease;
    min-height: 0;
}
@keyframes lt-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 卡片 · 扁平白底 */
.lt-glass {
    background: var(--lt-glass);
    border: 1px solid var(--lt-glass-border);
    border-radius: var(--lt-radius);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    margin-bottom: 12px;
    padding: 14px;
}

.lt-muted { color: var(--lt-muted); font-size: 13px; }
.lt-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--lt-muted); margin-bottom: 8px; }
.lt-hint { text-align: center; color: var(--lt-muted); font-size: 13px; margin-bottom: 12px; }

/* 顶栏 */
.lt-top-bar, .lt-sub-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.lt-logo {
    flex: 1;
    text-align: center;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: var(--lt-text);
}
.lt-logo-gem { color: var(--lt-accent); -webkit-text-fill-color: var(--lt-accent); }
.lt-sub-header h2 { flex: 1; text-align: center; margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--lt-text); }
.lt-header-spacer { width: 40px; }

.lt-icon-btn {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--lt-glass-border);
    border-radius: 12px;
    background: #fff;
    color: var(--lt-text);
    text-decoration: none;
    cursor: pointer;
    font-size: 18px;
}
.lt-ico { line-height: 1; }

/* 资料栏 */
.lt-profile-bar { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.lt-avatar { position: relative; flex-shrink: 0; }
.lt-avatar-inner {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    font-weight: 800; font-size: 18px;
    border: 2px solid #bfdbfe;
}
.lt-level-badge {
    position: absolute; bottom: -4px; right: -4px;
    background: var(--lt-gold); color: #fff;
    font-size: 10px; font-weight: 800;
    padding: 2px 6px; border-radius: 8px;
}
.lt-currencies { display: flex; flex-wrap: wrap; gap: 12px; font-size: 14px; }
.lt-currency { display: flex; align-items: center; gap: 4px; }
.lt-currency em { font-style: normal; font-size: 16px; }
.lt-currency strong { font-weight: 700; }

/* 模式入口 */
.lt-mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.lt-mode-card {
    border: 1px solid var(--lt-glass-border);
    border-radius: var(--lt-radius);
    padding: 18px 12px;
    text-align: center;
    cursor: pointer;
    color: var(--lt-text);
    background: #fff;
    transition: border-color 0.15s, background 0.15s;
}
.lt-mode-card:active { transform: scale(0.98); }
.lt-mode-tower { background: #eff6ff; border-color: #bfdbfe; }
.lt-mode-versus { background: #f5f3ff; border-color: #ddd6fe; }
.lt-mode-emoji { font-size: 2rem; display: block; margin-bottom: 6px; }
.lt-mode-card strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.lt-mode-card small { color: var(--lt-muted); font-size: 11px; }

/* 排位横幅 */
.lt-ranked-banner {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #fde68a;
    border-radius: var(--lt-radius);
    background: #fffbeb;
    cursor: pointer;
    color: var(--lt-text);
    text-align: left;
}
.lt-ranked-info strong { display: block; font-size: 1rem; margin-bottom: 4px; }
.lt-ranked-info span { display: block; font-size: 12px; color: var(--lt-muted); }

/* 卡组预览 */
.lt-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 600; font-size: 14px; }
.lt-link-btn { background: none; border: none; color: var(--lt-accent); font-size: 13px; cursor: pointer; padding: 0; }
.lt-deck-slots { display: flex; gap: 8px; }
.lt-deck-mini {
    flex: 1; text-align: center; padding: 8px 4px;
    background: #f8fafc; border-radius: 12px; font-size: 10px;
    border: 1px solid var(--lt-glass-border);
}

/* 卡牌块 */
.lt-card-face {
    display: inline-flex; flex-direction: column; align-items: center;
    width: 56px; padding: 8px 4px 6px;
    border-radius: 10px;
    border: 2px solid var(--lt-r-common);
    background: #f8fafc;
    color: var(--lt-text);
    font-size: 10px; text-align: center; line-height: 1.3;
}
.lt-card-face .lt-card-emoji { font-size: 22px; margin-bottom: 4px; }
.lt-card-face.rare { border-color: var(--lt-r-rare); box-shadow: none; }
.lt-card-face.epic { border-color: var(--lt-r-epic); }
.lt-card-face.legendary { border-color: var(--lt-r-legend); box-shadow: none; }
.lt-card-face-lg { width: 72px; padding: 12px 6px; font-size: 11px; }
.lt-card-face-lg .lt-card-emoji { font-size: 28px; }

/* 底栏 · 全局固定 */
.lt-bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    z-index: 200;
    display: flex;
    justify-content: space-around;
    padding: 8px 8px calc(8px + var(--lt-safe-bottom));
    background: #ffffff;
    border-top: 1px solid var(--lt-glass-border);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}
.lt-bottom-nav[hidden] { display: none !important; }
.lt-nav-item {
    background: none;
    border: none;
    color: var(--lt-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 12px;
    min-width: 64px;
    transition: color 0.15s, background 0.15s;
}
.lt-nav-item.active {
    color: var(--lt-accent);
    background: #eff6ff;
}
.lt-nav-item:active { color: var(--lt-accent); }
.lt-nav-ico { font-size: 22px; line-height: 1; }

/* 对局/结算全屏页隐藏底栏，并减少底部留白 */
.lt-screen.lt-screen-immersive {
    padding-bottom: calc(16px + var(--lt-safe-bottom));
}

.lt-screen-play.lt-screen-immersive {
    padding-bottom: calc(12px + var(--lt-safe-bottom));
}

/* 按钮 · 扁平 */
.lt-btn {
    display: block; width: 100%; max-width: 320px; margin: 8px auto;
    padding: 14px 20px; border: none; border-radius: 12px;
    font-size: 15px; font-weight: 700; cursor: pointer;
    transition: opacity 0.12s, background 0.12s;
}
.lt-btn:active { transform: scale(0.98); }
.lt-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.lt-btn-primary {
    background: #2563eb;
    color: #fff;
    box-shadow: none;
}
.lt-btn-accent {
    background: #7c3aed;
    color: #fff;
}
.lt-btn-ghost {
    background: #fff;
    border: 1px solid var(--lt-glass-border);
    color: var(--lt-text);
}
.lt-btn-gold {
    background: #f59e0b;
    color: #fff;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
}
.lt-btn-sm { padding: 8px 14px; font-size: 13px; max-width: none; width: auto; margin: 0; display: inline-block; }


/* 群岛远征：地图全屏铺底，UI 叠在上层 */
.lt-screen-tower {
    position: relative;
    padding: 0 !important;
    overflow: hidden;
    display: block;
    min-height: 0;
    background: #071422;
}
.lt-screen-tower.is-bg-transparent {
    background: transparent;
}
.lt-tower-ui {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    padding: calc(10px + var(--lt-safe-top)) 14px calc(12px + var(--lt-safe-bottom));
}
.lt-tower-ui > *:not(.lt-tower-ui-spacer) {
    pointer-events: auto;
    flex-shrink: 0;
}
.lt-tower-ui-spacer {
    flex: 1 1 auto;
    min-height: 48px;
    pointer-events: none;
}
.lt-tower-chrome {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: none;
    color: var(--lt-text);
}

/* 标题栏：仅文字胶囊有背景，不再整条大底 */
.lt-screen-tower .lt-tower-header {
    position: relative;
    z-index: 7;
    width: fit-content;
    max-width: calc(100% - 150px);
    margin: 0 0 8px;
    padding: 0;
    gap: 8px;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.lt-screen-tower .lt-tower-header h2 {
    flex: 0 1 auto;
    text-align: left;
    margin: 0;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #e2e8f0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: none;
    text-shadow: none;
    color: var(--lt-text);
}
.lt-screen-tower .lt-tower-header .lt-icon-btn {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: none;
    color: var(--lt-text);
    border-color: #e2e8f0;
}

/* 右上角群岛折叠选择 */
.lt-tower-picker {
    position: absolute;
    top: calc(10px + var(--lt-safe-top));
    right: 14px;
    z-index: 8;
    width: auto;
    max-width: min(200px, 46vw);
    pointer-events: auto;
}
.lt-tower-picker-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 8px 10px 8px 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.94);
    color: var(--lt-text);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: none;
}
.lt-tower-picker-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lt-tower-picker-caret {
    flex-shrink: 0;
    font-size: 11px;
    color: var(--lt-muted);
    transition: transform 0.2s ease;
}
.lt-tower-picker.is-open .lt-tower-picker-caret {
    transform: rotate(180deg);
}
.lt-tower-picker-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 100%;
    width: max-content;
    max-width: min(220px, 70vw);
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.lt-tower-picker-menu[hidden] {
    display: none !important;
}
.lt-tower-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--lt-muted);
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.lt-tower-tab-emoji { font-size: 15px; line-height: 1; }
.lt-tower-tab.active {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: var(--lt-accent);
}
.lt-tower-tab:active:not(.locked) {
    background: #f8fafc;
}
.lt-tower-tab.locked { opacity: 0.4; }

/* 进度胶囊：左上，与远/中/近同一行 */
.lt-screen-tower {
    --lt-tower-tools-top: calc(12px + var(--lt-safe-top) + 52px);
}
.lt-tower-progress-bar {
    position: absolute;
    top: var(--lt-tower-tools-top);
    left: 14px;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 96px;
    height: 40px;
    margin: 0;
    padding: 0 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: none;
    pointer-events: none;
}
.lt-tower-progress-fill {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 0;
    background: #dbeafe;
    border-radius: 0;
    transition: width 0.4s ease;
    pointer-events: none;
}
.lt-tower-progress-text {
    position: relative;
    z-index: 1;
    display: block;
    height: auto;
    font-size: 12px;
    font-weight: 700;
    color: var(--lt-text);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* 主题色 */
.lt-tower-theme-cyan { --tt-primary: #38bdf8; --tt-secondary: #2dd4bf; --tt-glow: rgba(56,189,248,0.45); --tt-sea: #0e4a6e; }
.lt-tower-theme-white { --tt-primary: #e2e8f0; --tt-secondary: #94a3b8; --tt-glow: rgba(226,232,240,0.35); --tt-sea: #334155; }
.lt-tower-theme-blue { --tt-primary: #60a5fa; --tt-secondary: #3b82f6; --tt-glow: rgba(96,165,250,0.45); --tt-sea: #1e3a8a; }
.lt-tower-theme-purple { --tt-primary: #a78bfa; --tt-secondary: #8b5cf6; --tt-glow: rgba(167,139,250,0.45); --tt-sea: #4c1d95; }
.lt-tower-theme-gold { --tt-primary: #fbbf24; --tt-secondary: #f59e0b; --tt-glow: rgba(251,191,36,0.5); --tt-sea: #78350f; }

/* ========== Three.js 立体六边形蜂窝（全屏背景） ========== */
.lt-hex-map-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    overflow: hidden;
    background: #071422;
    box-shadow: none;
    min-height: 0;
}
.lt-hex-map-wrap.is-bg-transparent {
    background: transparent;
}
.lt-hex-map--bg-transparent .lt-hex-canvas {
    background: transparent;
}
.lt-hex-map {
    position: absolute;
    inset: 0;
}
.lt-screen-tower > .lt-hex-zoom,
.lt-hex-zoom {
    position: absolute;
    top: var(--lt-tower-tools-top, calc(12px + var(--lt-safe-top) + 52px));
    right: 14px;
    z-index: 6;
    display: flex;
    gap: 4px;
    height: 40px;
    box-sizing: border-box;
    padding: 4px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #e2e8f0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: auto;
}
.lt-hex-zoom-btn {
    min-width: 36px;
    height: 32px;
    padding: 0 10px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--lt-muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.lt-hex-zoom-btn.is-active {
    background: #2563eb;
    color: #fff;
    box-shadow: none;
}
.lt-hex-zoom-btn:active { transform: scale(0.96); }

/* 群岛远征：左右切岛 */
.lt-island-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    color: var(--lt-text);
    font-size: 28px;
    font-weight: 600;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: none;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
}
.lt-island-nav span {
    display: block;
    margin-top: -2px;
}
.lt-island-nav-prev { left: 10px; }
.lt-island-nav-next { right: 10px; }
.lt-island-nav:active:not(:disabled) {
    transform: translateY(-50%) scale(0.94);
    background: #eff6ff;
}
.lt-island-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
@media (min-width: 768px) {
    .lt-island-nav {
        width: 48px;
        height: 48px;
        font-size: 30px;
    }
    .lt-island-nav-prev { left: 18px; }
    .lt-island-nav-next { right: 18px; }
}
.lt-hex-map-title {
    display: none;
}
.lt-hex-canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    touch-action: none;
    cursor: grab;
}
.lt-hex-canvas:active { cursor: grabbing; }
.lt-hex-map-fallback {
    display: flex; align-items: center; justify-content: center;
    height: 100%; color: var(--lt-muted); font-size: 13px;
}
.lt-hex-labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}
.lt-hex-label {
    position: absolute;
    left: 0; top: 0;
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    height: 28px;
    gap: 0;
    padding: 0;
    margin: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #e2e8f0;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: none;
    overflow: hidden;
    white-space: nowrap;
    line-height: 0;
    text-shadow: none;
}
.lt-hex-label em,
.lt-hex-label span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    height: 100%;
    margin: 0;
    box-sizing: border-box;
    border: none;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    line-height: 1;
    vertical-align: middle;
}
.lt-hex-label em {
    font-style: normal;
    font-size: 15px;
    font-weight: 800;
    min-width: 28px;
    padding: 0 8px;
    gap: 4px;
    color: #0f172a;
    border-right: 1px solid #e2e8f0;
}
.lt-hex-label span {
    font-size: 13px;
    font-weight: 700;
    padding: 0 9px;
    color: #334155;
    text-shadow: none;
}
.lt-hex-lock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: #d97706;
}
.lt-hex-lock svg {
    display: block;
    width: 16px;
    height: 16px;
}
.lt-hex-label.current {
    border-color: #93c5fd;
    box-shadow: none;
}
.lt-hex-label.current em {
    background: #eff6ff;
    color: #2563eb;
}
.lt-hex-label.current span {
    font-size: 13px;
    font-weight: 800;
    color: #1e40af;
}
.lt-hex-label.locked {
    opacity: 0.95;
    border-color: #fde68a;
}
.lt-hex-label.locked em {
    min-width: 40px;
    padding: 0 8px;
    color: #92400e;
}
.lt-hex-label.locked span {
    color: #78716c;
}

/* 底部操作区：紧凑，把版面让给地图 */
.lt-tower-action {
    z-index: 5;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto;
    gap: 8px 10px;
    align-items: center;
    margin-bottom: 0;
    padding: 8px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #e2e8f0;
    color: var(--lt-text);
}
.lt-tower-floor-badge {
    grid-row: auto;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 11px;
    font-weight: 900; font-size: 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: var(--lt-accent);
    box-shadow: none;
}
.lt-tower-floor-badge.is-boss {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
    font-size: 12px;
}
.lt-tower-floor-meta { min-width: 0; }
.lt-tower-floor-meta p { margin: 0; }
#lt-tower-floor-info {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lt-btn-tower-start {
    grid-column: auto;
    margin-top: 0;
    width: auto;
    min-width: 88px;
    padding: 10px 14px;
    font-size: 13px;
    white-space: nowrap;
}

/* 对垒 */
.lt-versus-card {
    display: flex; align-items: center; gap: 16px;
    width: 100%; text-align: left;
    cursor: pointer; color: var(--lt-text);
    border: 1px solid var(--lt-glass-border);
}
.lt-versus-card.is-disabled { opacity: 0.5; cursor: not-allowed; }
.lt-vs-badge {
    width: 48px; height: 48px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #ef4444, #6366f1);
    font-weight: 900; font-size: 14px;
}
.lt-vs-muted { background: #e2e8f0; font-size: 22px; }
.lt-vs-gold { background: #f59e0b; font-size: 22px; color: #fff; }
.lt-versus-card strong { display: block; margin-bottom: 2px; }
.lt-versus-card small { color: var(--lt-muted); font-size: 12px; }

/* 排位 */
.lt-rank-badge { text-align: center; padding: 24px 16px; }
.lt-rank-tier {
    font-size: 1.6rem; font-weight: 800; margin-bottom: 16px;
    background: none;
    -webkit-background-clip: unset; background-clip: unset;
    color: var(--lt-gold);
}
.lt-lp-bar {
    height: 10px; border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden; margin: 10px 0;
}
.lt-lp-fill {
    height: 100%; border-radius: 999px;
    background: #f59e0b;
    transition: width 0.4s ease;
    box-shadow: none;
}
.lt-lp-text { font-weight: 700; font-size: 15px; }
.lt-lp-change { font-size: 2rem; font-weight: 800; text-align: center; margin: 12px 0; }

/* 道具 */
.lt-item-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.lt-item-pick {
    border: 2px solid var(--lt-glass-border);
    border-radius: 14px; padding: 12px 6px;
    background: #fff;
    color: var(--lt-text);
    cursor: pointer; text-align: center;
    transition: border-color 0.15s, background 0.15s;
}
.lt-item-pick.selected {
    border-color: var(--lt-accent);
    background: #eff6ff;
}
.lt-item-emoji { font-size: 28px; display: block; margin-bottom: 6px; }
.lt-item-pick span { font-size: 11px; color: var(--lt-muted); }

/* 对局 · 浅色扁平 */
.lt-screen-play {
    position: relative;
    isolation: isolate;
    padding: calc(8px + var(--lt-safe-top)) 12px calc(12px + var(--lt-safe-bottom));
    gap: 10px;
    overflow: hidden;
    color: #0f172a;
    background: #f1f5f9;
}

.lt-play-aurora,
.lt-play-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.lt-play-aurora {
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(56, 189, 248, 0.12), transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(99, 102, 241, 0.08), transparent 50%);
    animation: none;
}

.lt-play-grid {
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.18) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: none;
    -webkit-mask-image: none;
}

.lt-screen-play > *:not(.lt-play-aurora):not(.lt-play-grid) {
    position: relative;
    z-index: 1;
}

.lt-play-hud {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    flex-shrink: 0;
}

.lt-hud-meter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: none;
}

.lt-hud-ico {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 13px;
    background: #e0f2fe;
    color: #0284c7;
    flex-shrink: 0;
}

.lt-hud-timer .lt-hud-ico { color: #0284c7; background: #e0f2fe; }
.lt-hud-score .lt-hud-ico { color: #0d9488; background: #ccfbf1; }
.lt-hud-combo .lt-hud-ico {
    color: #d97706;
    background: #fef3c7;
}

.lt-hud-body {
    min-width: 0;
    line-height: 1.15;
}

.lt-hud-label {
    display: block;
    font-size: 10px;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 2px;
}

.lt-hud-meter strong {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.lt-hud-unit {
    margin-left: 1px;
    font-size: 12px;
    color: #94a3b8;
}

.lt-hud-combo.is-hot {
    animation: lt-combo-pulse 0.55s ease;
    border-color: #fbbf24;
    box-shadow: none;
    background: #fffbeb;
}

@keyframes lt-combo-pulse {
    0% { transform: scale(1); }
    40% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.lt-play-stage {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding-bottom: 4px;
}

.lt-play-panel,
.lt-play-arena,
.lt-play-ribbon {
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    margin-bottom: 0;
}

.lt-play-panel { padding: 12px 14px; }
.lt-play-arena { padding: 12px 14px; flex-shrink: 0; }

.lt-panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.lt-panel-head .lt-label {
    margin: 0;
    color: #475569;
}

.lt-panel-tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 3px 8px;
    border-radius: 6px;
    color: #0369a1;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
}

.lt-panel-tag-accent {
    color: #1d4ed8;
    background: #dbeafe;
    border-color: #bfdbfe;
}

.lt-panel-tag-mine {
    color: #047857;
    background: #d1fae5;
    border-color: #a7f3d0;
}

.lt-play-ribbon {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    flex-shrink: 0;
}

.lt-ribbon-dot {
    width: 8px;
    height: 8px;
    margin-top: 5px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: none;
    flex-shrink: 0;
    animation: none;
}

.lt-ribbon-copy { min-width: 0; flex: 1; }
.lt-ribbon-copy .lt-label {
    margin-bottom: 4px;
    color: #64748b;
}

.lt-last-result {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    transition: color 0.2s, transform 0.2s;
}

.lt-last-result.is-success {
    color: #059669;
    animation: lt-result-pop 0.35s ease;
}

.lt-last-result.is-error {
    color: #dc2626;
    animation: lt-result-shake 0.35s ease;
}

@keyframes lt-result-pop {
    0% { transform: translateY(4px); opacity: 0.4; }
    100% { transform: none; opacity: 1; }
}

@keyframes lt-result-shake {
    0%, 100% { transform: translateX(0); }
    30% { transform: translateX(-4px); }
    60% { transform: translateX(4px); }
}

.lt-compose-hint.is-success .lt-ribbon-dot {
    background: #10b981;
    box-shadow: none;
}

.lt-compose-hint.is-error .lt-ribbon-dot {
    background: #ef4444;
    box-shadow: none;
}

.lt-compose-slot {
    min-height: 64px;
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    box-shadow: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
    animation: none;
}

.lt-compose-placeholder {
    color: #94a3b8;
    font-size: 13px;
    letter-spacing: 0.02em;
}

.lt-compose-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.lt-screen-play .lt-btn-primary {
    background: #2563eb;
    box-shadow: none;
}

.lt-screen-play .lt-btn-ghost {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #334155;
}

.lt-btn-submit-glow {
    min-width: 96px;
    box-shadow: none;
}

/* 拆词池：占中间主视觉，更大更易点 */
.lt-play-pool {
    flex: 1.8 1 0;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    padding: 14px 14px 16px;
}

.lt-play-pool .lt-panel-head {
    margin-bottom: 12px;
}

.lt-play-pool .lt-chunk-row {
    flex: 1;
    gap: 12px;
    min-height: 120px;
    align-content: flex-start;
}

/* 拆词块 · 扁平 */
.lt-chunk-row { display: flex; flex-wrap: wrap; gap: 8px; min-height: 44px; }
.lt-chunk {
    position: relative;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    cursor: pointer;
    color: #fff;
    min-width: 52px;
    text-align: center;
    overflow: hidden;
    transition: background 0.12s ease, border-color 0.12s ease, opacity 0.12s ease;
    box-shadow: none;
}

.lt-chunk::after { display: none; }

.lt-chunk:active { transform: scale(0.97); }
.lt-chunk.phonics {
    background: #3b82f6;
    border-color: #2563eb;
    border-radius: 10px;
}
.lt-chunk.syllable {
    background: #10b981;
    border-color: #059669;
    border-radius: 10px;
}
.lt-chunk.morpheme {
    background: #8b5cf6;
    border-color: #7c3aed;
    border-radius: 10px;
    clip-path: none;
}
.lt-chunk.used { opacity: 0.32; pointer-events: none; filter: none; }
.lt-chunk.frozen { opacity: 0.45; filter: grayscale(1); pointer-events: none; }

.lt-play-pool .lt-chunk {
    padding: 16px 20px;
    font-size: 17px;
    min-width: 64px;
    border-radius: 12px;
}

.lt-compose-slot .lt-chunk {
    animation: lt-chunk-in 0.18s ease;
    padding: 10px 14px;
    font-size: 14px;
}

@keyframes lt-chunk-in {
    from { transform: scale(0.92); opacity: 0.35; }
    to { transform: none; opacity: 1; }
}

.lt-play-dock {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px));
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: none;
}

.lt-item-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0;
    scrollbar-width: none;
}
.lt-item-bar::-webkit-scrollbar { display: none; }

.lt-item-slot {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    cursor: pointer;
    font-size: 22px;
    transition: border-color 0.12s ease, background 0.12s ease;
    box-shadow: none;
}
.lt-item-slot:not(.empty):active { transform: scale(0.96); }
.lt-item-slot:not(.empty):hover {
    border-color: #93c5fd;
    box-shadow: none;
    background: #eff6ff;
}
.lt-item-slot.empty {
    opacity: 0.55;
    font-size: 16px;
    color: #94a3b8;
    border-style: dashed;
    background: #fff;
}

.lt-card-skill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 4px 2px;
}

.lt-main-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    min-width: 0;
    color: #334155;
}

.lt-main-card .lt-card-face {
    width: 48px;
    height: 60px;
    flex-shrink: 0;
    background: #f8fafc;
    box-shadow: none;
    color: #334155;
}

.lt-main-card strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
    color: #0f172a;
}

.lt-main-card small { color: #64748b; }

.lt-btn-skill:not(:disabled) {
    border-color: #f59e0b;
    color: #b45309;
    background: #fffbeb;
    box-shadow: none;
}

@media (min-width: 420px) {
    .lt-screen-play { padding-left: 16px; padding-right: 16px; }
    .lt-compose-slot { min-height: 72px; }
    .lt-play-pool { min-height: 240px; }
    .lt-play-pool .lt-chunk {
        padding: 18px 22px;
        font-size: 18px;
        min-width: 70px;
    }
}

/* 结算 */
.lt-result { text-align: center; padding: 32px 20px; margin-top: 12px; }
.lt-result-icon { font-size: 3rem; margin-bottom: 8px; }
.lt-result h2 { font-size: 1.5rem; margin: 0 0 12px; }
.lt-result-score strong { font-size: 2.2rem; color: var(--lt-accent); }
.lt-result-reward { color: var(--lt-success); font-weight: 600; margin: 12px 0; }

/* 卡组编辑 */
.lt-deck-edit { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.lt-deck-slot-lg { padding: 12px; }
.lt-slot-label { font-size: 11px; color: var(--lt-muted); display: block; margin-bottom: 10px; font-weight: 600; }

/* 商店 & 排行 */
.lt-shop-item, .lt-lb-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; border-bottom: 1px solid var(--lt-glass-border);
}
.lt-shop-item:last-child, .lt-lb-item:last-child { border-bottom: none; }
.lt-lb-list { list-style: none; margin: 0; padding: 12px; counter-reset: lb; }
.lt-lb-item { counter-increment: lb; }
.lt-lb-item::before {
    content: counter(lb);
    font-weight: 800; color: var(--lt-accent);
    width: 28px; flex-shrink: 0;
}
.lt-lb-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.lt-tab {
    flex: 1; padding: 10px;
    border: 1px solid var(--lt-glass-border);
    border-radius: 12px;
    background: #fff;
    color: var(--lt-muted);
    font-weight: 600; font-size: 13px;
    cursor: pointer;
}
.lt-tab.active {
    background: #eff6ff;
    border-color: var(--lt-accent);
    color: var(--lt-accent);
}

#lt-toast {
    position: fixed;
    bottom: calc(88px + var(--lt-safe-bottom));
    left: 50%; transform: translateX(-50%);
    background: #0f172a;
    border: 1px solid #1e293b;
    color: #f8fafc;
    padding: 12px 22px; border-radius: 999px;
    font-size: 14px; z-index: 9000;
    max-width: 90%; text-align: center;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
}
#lt-toast[hidden] { display: none !important; }

/* —— 设置页 —— */
#lt-screen-settings {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding-bottom: calc(24px + var(--lt-safe-bottom));
}

.lt-settings-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 16px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lt-settings-card {
    border-radius: 16px;
    padding: 14px 16px 16px;
}

.lt-settings-title {
    margin: 0 0 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--lt-accent, #7dd3fc);
    letter-spacing: 0.02em;
}

.lt-settings-account {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lt-settings-row,
.lt-settings-toggle,
.lt-settings-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--lt-glass-border);
    font-size: 0.95rem;
    color: var(--lt-text);
}

.lt-settings-card > .lt-settings-row:last-child,
.lt-settings-card > .lt-settings-toggle:last-of-type,
.lt-settings-card > .lt-settings-field:last-of-type {
    border-bottom: none;
    padding-bottom: 4px;
}

.lt-settings-row strong {
    font-weight: 700;
    color: var(--lt-text);
}

.lt-settings-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--lt-accent);
    flex: 0 0 auto;
}

.lt-settings-field select {
    min-width: 140px;
    max-width: 58%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--lt-glass-border);
    background: #fff;
    color: var(--lt-text);
    font-size: 0.9rem;
}

.lt-settings-hint {
    margin: 4px 0 12px;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--lt-muted, #94a3b8);
}

.lt-settings-actions {
    padding-top: 4px;
}

.lt-btn-block {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.lt-btn-danger {
    background: rgba(220, 38, 38, 0.18);
    border: 1px solid rgba(248, 113, 113, 0.45);
    color: #fecaca;
}

.lt-btn-danger:active {
    background: rgba(220, 38, 38, 0.28);
}

#lt-btn-tts-test,
#lt-btn-reset-tower,
#lt-btn-reset-all {
    margin-top: 10px;
}

@media (min-width: 480px) {
    #lt-app { box-shadow: 0 0 40px rgba(15, 23, 42, 0.08); }
}
