    :root {
      --bg: #07091a; --surface: #0d1326; --card: #111827;
      --border: #1e2d47; --accent: #00e5a0; --accent-dim: #00e5a022;
      --red: #ff4757; --red-dim: #ff475722; --yellow: #ffa502;
      --text: #e2e8f0; --muted: #6b7a99; --nav-h: 68px;
    }
    * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }
    html, body { height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: -apple-system,'SF Pro Display','Segoe UI',sans-serif; }

    /* ── Panels ── */
    .tab-panel { position: absolute; inset: 0; bottom: var(--nav-h); overflow-y: auto; overflow-x: hidden; padding: 16px 16px 28px; display: none; -webkit-overflow-scrolling: touch; }
    .tab-panel.active { display: block; }

    /* ── Bottom Nav ── */
    #bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: var(--nav-h); background: #0a0f22; border-top: 1px solid var(--border); display: flex; z-index: 100; }
    .nav-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); cursor: pointer; transition: color .2s; font-size: 9px; padding-bottom: 6px; background: none; border: none; }
    .nav-btn.active { color: var(--accent); }
    .nav-btn svg { width: 20px; height: 20px; }

    /* ── Cards ── */
    .card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; margin-bottom: 12px; }
    .card-title { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #6b8ab0; margin-bottom: 14px; font-weight: 700; }

    /* ── Inputs ── */
    .field-label { font-size: 13px; color: #94a3b8; margin-bottom: 8px; display: block; font-weight: 600; letter-spacing: .02em; }
    .input {
      width: 100%; background: #0d1730;
      border: 1.5px solid #2a3f60;
      border-radius: 12px; color: #f1f5f9;
      padding: 14px 16px; font-size: 16px;
      outline: none; transition: border-color .2s, background .2s, box-shadow .2s;
    }
    .input:focus {
      border-color: var(--accent);
      background: #0d1e3a;
      box-shadow: 0 0 0 3px rgba(0,229,160,.12);
    }
    .input::placeholder { color: #3d5070; }
    select.input { appearance: none; -webkit-appearance: none; }

    /* ── PnL Toggle ── */
    .pnl-toggle { display: flex; border-radius: 12px; overflow: hidden; border: 1.5px solid #2a3f60; margin-bottom: 14px; }
    .pnl-btn { flex: 1; padding: 14px; text-align: center; font-size: 15px; font-weight: 700; cursor: pointer; background: #0d1730; color: #3d5070; border: none; transition: all .2s; letter-spacing: .03em; }
    .pnl-btn.profit.active { background: rgba(0,229,160,.15); color: var(--accent); text-shadow: 0 0 12px rgba(0,229,160,.4); }
    .pnl-btn.loss.active { background: rgba(255,71,87,.15); color: var(--red); text-shadow: 0 0 12px rgba(255,71,87,.4); }

    /* ── Emotion ── */
    .emotion-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
    .emotion-card { border-radius: 14px; padding: 16px 8px; text-align: center; border: 1.5px solid #2a3f60; background: #0d1730; cursor: pointer; transition: all .2s; font-size: 26px; }
    .emotion-card span { display: block; font-size: 12px; font-weight: 600; margin-top: 6px; color: #3d5070; }
    .emotion-card.selected { border-color: var(--accent); background: rgba(0,229,160,.12); box-shadow: 0 0 0 3px rgba(0,229,160,.12); }
    .emotion-card.selected span { color: var(--accent); }

    /* ── Strategy ── */
    .strategy-toggle { display: flex; gap: 10px; }
    .strat-btn { flex: 1; padding: 15px; border-radius: 12px; border: 1.5px solid #2a3f60; background: #0d1730; color: #3d5070; text-align: center; font-size: 15px; font-weight: 700; cursor: pointer; transition: all .2s; letter-spacing: .03em; }
    .strat-btn.yes.active { border-color: var(--accent); background: rgba(0,229,160,.15); color: var(--accent); box-shadow: 0 0 0 3px rgba(0,229,160,.12); }
    .strat-btn.no.active { border-color: var(--red); background: rgba(255,71,87,.15); color: var(--red); box-shadow: 0 0 0 3px rgba(255,71,87,.12); }

    /* ── Buttons ── */
    .btn-primary { width: 100%; padding: 15px; border-radius: 12px; background: linear-gradient(135deg,#00e5a0,#00b87a); color: #07091a; font-size: 16px; font-weight: 700; border: none; cursor: pointer; margin-top: 8px; transition: opacity .2s; letter-spacing: .02em; }
    .btn-primary:active { opacity: .8; }
    .btn-danger { width: 100%; padding: 13px; border-radius: 12px; background: var(--red-dim); border: 1px solid var(--red); color: var(--red); font-size: 14px; font-weight: 600; cursor: pointer; margin-top: 4px; }

    /* ── Stats ── */
    .stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
    .stat-chip { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
    .stat-chip .label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
    .stat-chip .value { font-size: 22px; font-weight: 700; }
    .stat-chip .value.green { color: var(--accent); }
    .stat-chip .value.red { color: var(--red); }

    /* ── Page Header ── */
    .page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
    .page-header h1 { font-size: 22px; font-weight: 700; }

    /* ── User Badge ── */
    .user-badge { display: flex; align-items: center; gap: 8px; cursor: pointer; }
    .user-avatar { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--accent); object-fit: cover; }
    .user-avatar-placeholder { width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; color: var(--muted); }
    .sync-dot { width: 8px; height: 8px; border-radius: 50%; }
    .sync-dot.online { background: var(--accent); }
    .sync-dot.offline { background: var(--muted); }
    .sync-dot.syncing { background: var(--yellow); animation: pulse 1s infinite; }

    @keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

    /* ── Date Group Header ── */
    .date-group-header {
      display: flex; align-items: center; gap: 10px;
      font-size: 12px; color: var(--muted); font-weight: 600;
      text-transform: uppercase; letter-spacing: .06em;
      margin: 14px 0 8px;
    }
    .date-group-header::after { content:''; flex:1; height:1px; background:var(--border); }
    .date-group-header .dg-pnl { font-size: 13px; padding: 2px 10px; border-radius: 20px; }
    .date-group-header .dg-pnl.green { color: var(--accent); background: var(--accent-dim); }
    .date-group-header .dg-pnl.red { color: var(--red); background: var(--red-dim); }

    /* ── Chart ── */
    .chart-wrap { position: relative; width: 100%; }

    /* ── Filter Pills ── */
    .filter-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
    .filter-scroll::-webkit-scrollbar { display: none; }
    .filter-pill { flex-shrink: 0; padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; color: var(--muted); cursor: pointer; transition: all .2s; white-space: nowrap; }
    .filter-pill.active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

    /* ── Trade Item ── */
    .trade-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); margin-bottom: 8px; }
    .trade-item .t-icon { font-size: 22px; flex-shrink: 0; }
    .trade-item .t-info { flex: 1; min-width: 0; }
    .trade-item .t-product { font-size: 14px; font-weight: 600; }
    .trade-item .t-meta { font-size: 11px; color: var(--muted); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; }
    .trade-item .t-amount { font-size: 17px; font-weight: 700; flex-shrink: 0; }

    /* ── Risk Banner ── */
    .risk-banner { background: linear-gradient(135deg,#7c2d12,#991b1b); border: 1px solid #dc2626; border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; display: none; }
    .risk-banner.show { display: flex; align-items: flex-start; gap: 10px; }
    .risk-banner .ri-text { font-size: 13px; line-height: 1.5; }
    .risk-banner .ri-title { font-weight: 700; font-size: 14px; margin-bottom: 3px; }

    /* ── Modals ── */
    .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .3s; }
    .modal-overlay.show { opacity: 1; pointer-events: all; }
    .modal-box { background: #111827; border-radius: 24px; border: 1px solid var(--border); padding: 28px 24px; width: 100%; max-width: 340px; text-align: center; transform: scale(.9); transition: transform .3s; }
    .modal-overlay.show .modal-box { transform: scale(1); }
    .modal-icon { font-size: 54px; margin-bottom: 12px; display: block; }
    .modal-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
    .modal-msg { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }
    .modal-close { width: 100%; padding: 13px; border-radius: 12px; font-size: 15px; font-weight: 600; border: none; cursor: pointer; }
    .modal-close.green { background: linear-gradient(135deg,#00e5a0,#00b87a); color:#07091a; }
    .modal-close.blue { background: linear-gradient(135deg,#3b82f6,#2563eb); color:#fff; }

    /* ── Donate ── */
    .donate-btn {
      flex: 1; border-radius: 12px;
      background: linear-gradient(135deg,#22c55e,#16a34a);
      display: flex; align-items: center; justify-content: center;
      font-size: 20px; text-decoration: none; border: none; cursor: pointer;
      box-shadow: 0 4px 16px rgba(34,197,94,.3);
      transition: opacity .2s, transform .15s;
      position: relative;
    }
    .donate-btn:active { transform: scale(.96); opacity: .85; }
    .donate-btn::after {
      content: attr(data-tip);
      position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
      background: #1e293b; color: #e2e8f0; font-size: 11px; white-space: nowrap;
      padding: 5px 10px; border-radius: 8px; border: 1px solid var(--border);
      opacity: 0; pointer-events: none; transition: opacity .2s;
    }
    .donate-btn:hover::after { opacity: 1; }

    /* ── Tutorial Overlay ── */
    #tutorial-overlay {
      position: fixed; inset: 0; z-index: 600;
      background: rgba(5,8,20,.96);
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      padding: 24px; transition: opacity .3s;
    }
    #tutorial-overlay.hidden { opacity: 0; pointer-events: none; }
    .tut-box {
      background: var(--card); border: 1px solid var(--border); border-radius: 20px;
      width: 100%; max-width: 420px; overflow: hidden;
      display: flex; flex-direction: column;
    }
    .tut-hero {
      background: linear-gradient(135deg, #0d1e3a, #0d2b1e);
      padding: 32px 24px 24px; text-align: center;
    }
    .tut-emoji { font-size: 52px; margin-bottom: 12px; display: block; }
    .tut-title { font-size: 20px; font-weight: 800; color: var(--accent); margin-bottom: 8px; }
    .tut-desc { font-size: 14px; color: var(--muted); line-height: 1.7; }
    .tut-steps {
      padding: 20px 24px; display: flex; flex-direction: column; gap: 12px;
    }
    .tut-step {
      display: flex; align-items: flex-start; gap: 12px;
      background: var(--surface); border-radius: 12px; padding: 12px 14px;
    }
    .tut-step-num {
      min-width: 24px; height: 24px; border-radius: 50%;
      background: var(--accent); color: #07091a;
      font-size: 12px; font-weight: 800;
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }
    .tut-step-text { font-size: 13px; color: var(--text); line-height: 1.6; }
    .tut-step-text strong { color: var(--accent); }
    .tut-footer {
      padding: 16px 24px 20px; display: flex; flex-direction: column; gap: 10px;
      border-top: 1px solid var(--border);
    }
    .tut-progress {
      display: flex; justify-content: center; gap: 6px; margin-bottom: 4px;
    }
    .tut-dot {
      width: 6px; height: 6px; border-radius: 50%; background: var(--border); transition: all .3s;
    }
    .tut-dot.active { background: var(--accent); width: 18px; border-radius: 3px; }
    .tut-btn-row { display: flex; gap: 10px; }
    .tut-btn-next {
      flex: 1; padding: 13px; border-radius: 12px;
      background: linear-gradient(135deg,#00e5a0,#00b87a);
      color: #07091a; font-size: 15px; font-weight: 700; border: none; cursor: pointer;
    }
    .tut-btn-skip {
      padding: 13px 16px; border-radius: 12px; background: none;
      border: 1px solid var(--border); color: var(--muted); font-size: 14px; cursor: pointer;
    }
    .tut-no-show {
      display: flex; align-items: center; gap: 8px; cursor: pointer;
      font-size: 12px; color: var(--muted); justify-content: center;
    }
    .tut-no-show input { accent-color: var(--accent); width: 14px; height: 14px; }

    /* ── Login Overlay ── */
    #login-overlay {
      position: fixed; inset: 0; z-index: 500;
      background: linear-gradient(160deg, #070c1e 0%, #0d1a35 50%, #07091a 100%);
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      padding: 32px 24px; transition: opacity .4s;
    }
    #login-overlay.hidden { opacity: 0; pointer-events: none; }
    .login-logo { font-size: 64px; margin-bottom: 12px; }
    .login-title { font-size: 28px; font-weight: 800; margin-bottom: 6px; background: linear-gradient(135deg, #00e5a0, #3b82f6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
    .login-subtitle { font-size: 14px; color: var(--muted); margin-bottom: 40px; text-align: center; line-height: 1.6; }
    .google-btn {
      display: flex; align-items: center; gap: 12px;
      background: #fff; color: #3c4043; border: none;
      padding: 14px 24px; border-radius: 12px; font-size: 15px; font-weight: 600;
      cursor: pointer; width: 100%; max-width: 320px; justify-content: center;
      box-shadow: 0 4px 24px rgba(0,0,0,.4); transition: all .2s;
      margin-bottom: 16px;
    }
    .google-btn:active { transform: scale(.97); }
    .google-logo { width: 20px; height: 20px; }
    .local-mode-btn { background: none; border: 1px solid var(--border); color: var(--muted); padding: 12px 24px; border-radius: 12px; font-size: 14px; cursor: pointer; width: 100%; max-width: 320px; transition: all .2s; }
    .local-mode-btn:hover { border-color: var(--muted); color: var(--text); }
    .login-features { display: flex; gap: 20px; margin-bottom: 36px; flex-wrap: wrap; justify-content: center; }
    .login-feat { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }

    /* ── Settings ── */
    .settings-row { display: flex; align-items: center; gap: 10px; padding: 13px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 8px; }
    .settings-row label { flex: 1; font-size: 14px; }
    .settings-row .s-input { width: 90px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 8px 10px; font-size: 14px; outline: none; text-align: right; }
    .settings-row .s-input:focus { border-color: var(--accent); }
    .settings-row select.s-input { width: 140px; appearance: none; -webkit-appearance: none; text-align: left; }
    .divider { height: 1px; background: var(--border); margin: 16px 0; }
    .settings-section { margin-bottom: 20px; }
    .settings-section h3 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; margin-bottom: 10px; }

    /* ── Firebase Setup Card ── */
    .setup-steps { counter-reset: step; }
    .setup-step { display: flex; gap: 10px; margin-bottom: 10px; font-size: 13px; color: var(--muted); line-height: 1.5; }
    .setup-step::before { counter-increment: step; content: counter(step); min-width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--accent); flex-shrink: 0; margin-top: 1px; }
    .setup-step a { color: #60a5fa; text-decoration: underline; }
    .fb-config-area { width: 100%; min-height: 100px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; color: var(--accent); padding: 12px; font-family: monospace; font-size: 12px; resize: vertical; outline: none; line-height: 1.5; }
    .fb-config-area:focus { border-color: var(--accent); }
    .fb-status { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 10px; }
    .fb-status.configured { background: var(--accent-dim); border: 1px solid var(--accent); color: var(--accent); }
    .fb-status.not-configured { background: #1e1e2e; border: 1px solid var(--border); color: var(--muted); }

    /* ── User Profile Card ── */
    .profile-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 14px; background: var(--accent-dim); border: 1px solid var(--accent); margin-bottom: 14px; }
    .profile-avatar { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--accent); }
    .profile-name { font-size: 15px; font-weight: 600; }
    .profile-email { font-size: 12px; color: var(--muted); margin-top: 2px; }

    /* ── Export ── */
    .export-row { display: flex; align-items: center; justify-content: space-between; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 8px; font-size: 14px; }
    .export-row span { color: var(--muted); font-size: 13px; }
    .btn-export { width: 100%; padding: 15px; border-radius: 12px; background: linear-gradient(135deg,#3b82f6,#2563eb); color: #fff; font-size: 16px; font-weight: 700; border: none; cursor: pointer; margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 8px; }

    /* ── Confetti ── */
    @keyframes confettiFall { 0%{transform:translateY(-30px) rotate(0deg);opacity:1} 100%{transform:translateY(120vh) rotate(720deg);opacity:0} }
    .confetti-piece { position: fixed; width: 8px; height: 8px; border-radius: 2px; pointer-events: none; z-index: 300; animation: confettiFall linear forwards; }

    /* ── Toast ── */
    #toast { position:fixed; bottom:calc(var(--nav-h)+16px); left:50%; transform:translateX(-50%) translateY(20px); background:#1e293b; border:1px solid var(--accent); border-radius:24px; padding:10px 20px; font-size:13px; color:var(--accent); z-index:400; opacity:0; transition:all .3s; pointer-events:none; white-space:nowrap; }

    /* ── Loading Spinner ── */
    .spinner { width:20px; height:20px; border:2px solid var(--border); border-top-color:var(--accent); border-radius:50%; animation:spin .7s linear infinite; display:inline-block; }
    @keyframes spin{to{transform:rotate(360deg)}}

    /* ── Chart legend ── */
    .chart-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
    .legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
    .legend-dot { width: 8px; height: 8px; border-radius: 50%; }

    ::-webkit-scrollbar { width: 4px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

    /* ── Community Cards ── */
    .community-card {
      display: flex; align-items: center; gap: 16px;
      background: var(--card); border: 1px solid var(--border);
      border-radius: 18px; padding: 18px 16px; margin-bottom: 14px;
      text-decoration: none; color: var(--text);
      transition: border-color .2s, transform .15s, box-shadow .2s;
    }
    .community-card:active { transform: scale(.98); }
    .community-card:hover { border-color: #3a5070; box-shadow: 0 4px 24px rgba(0,0,0,.3); }
    .cc-icon { width: 54px; height: 54px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; }
    .cc-body { flex: 1; min-width: 0; }
    .cc-title { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
    .cc-sub { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
    .cc-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
    .cc-arrow { font-size: 24px; color: var(--muted); flex-shrink: 0; line-height: 1; }

    /* ── Welcome Banner ── */
    .welcome-banner {
      background: linear-gradient(135deg,#061428,#0a1e38);
      border: 1px solid var(--accent); border-radius: 16px;
      padding: 18px 16px; margin-bottom: 16px;
      position: relative;
    }
    .welcome-banner h2 { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--accent); }
    .welcome-banner p { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 14px; }
    .welcome-banner .wb-close { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; }
    .welcome-banner .wb-skip { font-size: 12px; color: var(--muted); text-decoration: underline; cursor: pointer; background: none; border: none; }

    /* ── Sidebar brand (hidden on mobile) ── */
    #sidebar-brand { display: none; }

    @media (min-width: 769px) {
      #sidebar-brand {
        display: flex !important;
        align-items: center;
        gap: 10px;
        padding: 0 20px 20px;
        font-size: 17px;
        font-weight: 700;
        color: var(--accent);
        border-bottom: 1px solid var(--border);
        margin-bottom: 8px;
        flex-shrink: 0;
      }
      #bottom-nav {
        position: fixed;
        left: 0; top: 0; bottom: 0;
        width: 220px;
        height: 100%;
        flex-direction: column;
        border-top: none;
        border-right: 1px solid var(--border);
        padding: 24px 0 16px;
        justify-content: flex-start;
        gap: 2px;
        overflow-y: auto;
      }
      .nav-btn {
        flex: none;
        width: calc(100% - 16px);
        flex-direction: row;
        justify-content: flex-start;
        padding: 11px 16px;
        gap: 12px;
        font-size: 14px;
        border-radius: 10px;
        margin: 0 8px;
      }
      .nav-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
      .tab-panel {
        left: 220px;
        bottom: 0;
        padding: 28px 32px 32px;
      }
      .tab-panel > .page-header,
      .tab-panel > .card,
      .tab-panel > .stat-row,
      .tab-panel > .filter-scroll,
      .tab-panel > .divider,
      .tab-panel > .settings-section,
      .tab-panel > .btn-primary,
      .tab-panel > .btn-danger,
      .tab-panel > h3,
      .tab-panel > p {
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
        display: block;
      }
      /* Two-column on record tab */
      #tab-record.active {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 24px;
        align-items: start;
      }
      #tab-record .page-header {
        grid-column: 1 / -1;
      }
      #form-section {
        grid-column: 1;
        display: flex;
        flex-direction: column;
        gap: 0;
      }
      #list-section {
        grid-column: 2;
        position: sticky;
        top: 28px;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
      }
    }

/* ══════════════════════════════════════
   祈福 TAB
══════════════════════════════════════ */
#tab-worship {
  background: radial-gradient(ellipse at 50% 15%, #2a0808 0%, #100505 55%, #06030c 100%);
  padding: 0;
}
.worship-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 16px 48px;
  gap: 0;
  min-height: 100%;
}
.worship-top { text-align: center; margin-bottom: 10px; }
.worship-top h1 {
  font-size: 20px; font-weight: 700; color: #f5c842; margin: 0;
  letter-spacing: .1em;
  text-shadow: 0 0 24px rgba(245,200,66,.45);
}
.worship-top p { font-size: 12px; color: #c8a050; margin: 4px 0 0; }

/* Deity selector */
.deity-pick { display: flex; gap: 8px; margin-bottom: 10px; }
.deity-pick-btn {
  padding: 7px 20px; border-radius: 20px;
  border: 1.5px solid rgba(139,69,19,.5);
  background: rgba(20,6,2,.6); color: #a07840;
  cursor: pointer; font-size: 13px; font-weight: 600;
  transition: all .25s;
}
.deity-pick-btn.active {
  border-color: #f5c842;
  background: rgba(245,200,66,.12); color: #f5c842;
  box-shadow: 0 0 14px rgba(245,200,66,.2);
}

/* Deity stage */
.deity-stage {
  position: relative; width: 290px; height: 200px;
  margin: 0 auto 2px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.deity-halo {
  position: absolute; inset: -14px;
  border-radius: 16px;
  background: radial-gradient(ellipse at 50% 50%, rgba(245,200,66,.28) 0%, transparent 70%);
  animation: haloBreath 4s ease-in-out infinite;
}
.deity-halo.blessing-flash { animation: haloBlessing .9s ease-out; }
@keyframes haloBreath {
  0%,100%{opacity:.65;transform:scale(1)} 50%{opacity:1;transform:scale(1.1)}
}
@keyframes haloBlessing {
  0%{opacity:.65;transform:scale(1)} 45%{opacity:1;transform:scale(1.6)} 100%{opacity:.65;transform:scale(1)}
}
.deity-figure {
  position: relative; z-index: 1;
  width: 280px; height: 190px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(0,0,0,.6), 0 0 0 2px rgba(245,200,66,.35);
  transition: transform .35s;
}
.deity-figure.bow { animation: deityBow .65s ease-out; }
@keyframes deityBow {
  0%,100%{transform:rotate(0) scale(1)}
  35%{transform:rotate(-5deg) scale(1.06) translateY(-4px)}
  65%{transform:rotate(2deg)}
}

/* Incense */
.incense-area { display:flex; flex-direction:column; align-items:center; margin: 2px 0 10px; }
.incense-row { display:flex; align-items:flex-end; gap:10px; position:relative; z-index:1; }
.incense-item { display:flex; flex-direction:column; align-items:center; width:22px; position:relative; }
.smoke-wrap { height:60px; width:22px; position:relative; overflow:visible; }
.wisp {
  position:absolute; bottom:0; left:50%;
  width:6px; height:6px; border-radius:50%;
  background:rgba(200,190,180,.52);
  animation: wispRise var(--dur,2.8s) ease-out infinite var(--del,0s);
  transform:translateX(-50%);
  pointer-events:none;
}
@keyframes wispRise {
  0%  { transform:translateX(-50%) scale(1,1);   opacity:.52; bottom:2px; }
  33% { transform:translateX(calc(-50% + var(--dx1, 5px))) scale(1.7,.7); opacity:.38; }
  66% { transform:translateX(calc(-50% + var(--dx2,-4px))) scale(2.4,.55); opacity:.2; }
  100%{ transform:translateX(calc(-50% + var(--dx3, 7px))) scale(3.2,.4); opacity:0;  bottom:58px; }
}
.incense-stick-body {
  width:5px; height:82px;
  background:linear-gradient(to bottom,#bb1800 0%,#7a1000 65%,#c8a050 65%,#a07828 100%);
  border-radius:3px 3px 0 0; position:relative;
}
.ember {
  position:absolute; top:-4px; left:50%; transform:translateX(-50%);
  width:8px; height:8px; border-radius:50%;
  background:#ff7700;
  box-shadow:0 0 6px 3px rgba(255,120,0,.65);
  animation:emberGlow 1.4s ease-in-out infinite;
  transition:box-shadow .3s;
}
@keyframes emberGlow {
  0%,100%{box-shadow:0 0 4px 2px rgba(255,100,0,.5);background:#ff6600}
  50%    {box-shadow:0 0 10px 6px rgba(255,150,0,.78);background:#ff9900}
}
.incense-cup {
  width:82px; height:20px;
  background:linear-gradient(to bottom,#c8a050,#8b6914);
  border-radius:0 0 10px 10px;
  box-shadow:0 4px 10px rgba(0,0,0,.45);
  margin-top:-2px; position:relative;
}
.incense-cup::after {
  content:''; position:absolute; top:5px; left:8px; right:8px; height:7px;
  background:rgba(245,200,66,.18); border-radius:4px;
}

/* Worship button */
.btn-worship {
  display:block; width:100%; max-width:270px; padding:15px;
  background:linear-gradient(135deg,#9c0e1e,#c41e3a,#9c0e1e);
  border:1.5px solid rgba(255,120,100,.35); border-radius:14px;
  color:#ffe8e8; font-size:17px; font-weight:700; letter-spacing:.07em;
  cursor:pointer; margin:0 auto 10px;
  transition:transform .15s;
  box-shadow:0 4px 22px rgba(156,14,30,.45);
}
.btn-worship:active { transform:scale(.97); }
.btn-worship.praying { animation:btnPray .55s ease-out; }
@keyframes btnPray {
  0%  {box-shadow:0 0 0 0 rgba(196,30,58,.75)}
  100%{box-shadow:0 0 0 30px rgba(196,30,58,0)}
}

/* Blessing */
.blessing-area { min-height:26px; text-align:center; margin-bottom:10px; }
.blessing-text {
  font-size:14px; font-weight:600; color:#f5c842;
  letter-spacing:.04em;
  animation:blessFade .4s ease;
  text-shadow:0 0 10px rgba(245,200,66,.4);
}
@keyframes blessFade { from{opacity:0;transform:translateY(7px)} to{opacity:1;transform:translateY(0)} }
.float-hands {
  position:fixed; pointer-events:none;
  font-size:30px; z-index:9999;
  animation:floatUp 1.3s ease-out forwards;
}
@keyframes floatUp {
  0%  {opacity:1;transform:translateY(0) scale(1)}
  100%{opacity:0;transform:translateY(-90px) scale(.65)}
}

/* Divider */
.w-divider {
  width:100%; max-width:300px; height:1px;
  background:linear-gradient(to right,transparent,rgba(245,200,66,.35),transparent);
  margin:4px auto 16px;
}

/* Fortune */
.fortune-wrap { width:100%; max-width:300px; text-align:center; }
.fortune-wrap h3 { font-size:16px; color:#f5c842; margin:0 0 12px; letter-spacing:.06em; }
.fortune-tube-area { display:flex; flex-direction:column; align-items:center; gap:6px; margin-bottom:10px; }
.fortune-tube {
  width:66px; position:relative; cursor:pointer;
  transition:transform .15s; flex-shrink:0;
}
.fortune-tube:hover { transform:scale(1.06); }
.fortune-tube.shaking { animation:tubeShake .58s ease-in-out; }
@keyframes tubeShake {
  0%,100%{transform:rotate(0) scale(1)}
  10%{transform:rotate(-14deg) scale(1.05)}
  25%{transform:rotate(12deg) scale(1.05)}
  40%{transform:rotate(-11deg) scale(1.05)}
  55%{transform:rotate(9deg)}
  70%{transform:rotate(-6deg)}
  85%{transform:rotate(3deg)}
}
.fortune-hint { font-size:11px; color:#7a6040; margin:0; }
.fortune-card {
  background:linear-gradient(145deg,rgba(60,22,4,.85),rgba(25,8,2,.92));
  border:1.5px solid rgba(245,200,66,.35);
  border-radius:16px; padding:20px 16px;
  animation:cardReveal .5s cubic-bezier(.22,1,.36,1);
  margin-top:6px;
}
@keyframes cardReveal {
  from{opacity:0;transform:scale(.88) translateY(12px)}
  to  {opacity:1;transform:scale(1)   translateY(0)}
}
.fortune-num { font-size:12px; color:#8b7040; margin-bottom:4px; letter-spacing:.1em; }
.fortune-grade-text {
  font-size:26px; font-weight:800; letter-spacing:.1em; margin-bottom:10px;
  text-shadow:0 0 14px currentColor;
}
.fortune-poem-text {
  font-size:13px; line-height:2; color:#c8a050;
  border-top:1px solid rgba(245,200,66,.2);
  border-bottom:1px solid rgba(245,200,66,.2);
  padding:10px 0; margin-bottom:10px;
  font-family:serif; letter-spacing:.06em;
  white-space:pre-line;
}
.fortune-advice-text { font-size:12px; color:var(--muted); line-height:1.65; margin-bottom:8px; }
.fortune-trading-text {
  font-size:13px; color:var(--text);
  background:rgba(245,200,66,.08);
  border-radius:8px; padding:9px 12px; font-weight:500;
}
.btn-draw-again {
  display:block; width:100%; margin-top:12px; padding:10px;
  border-radius:10px; border:1px solid rgba(245,200,66,.35);
  background:transparent; color:#c8a050;
  cursor:pointer; font-size:13px; font-weight:600;
  transition:background .2s;
}
.btn-draw-again:hover { background:rgba(245,200,66,.08); }
