/* === 風格統一修正 === */
      .site-main { max-width: 1200px; }
      
      /* 標題 */
      .page-title { 
          font-size: 2rem; color: #0284c7; font-weight: 900; 
          text-shadow: 2px 2px 0px #bae6fd; margin-bottom: 10px;
      }
      
      /* 導覽列 */
      .guide-subnav {
          display: flex; gap: 10px; padding: 15px 0; border-bottom: 1px solid #eee; 
          margin-bottom: 25px; overflow-x: auto; white-space: nowrap;
      }
      .guide-subnav-label { font-weight: bold; color: #555; align-self: center; }
      .guide-subnav a { 
          padding: 6px 14px; background: #f1f3f5; color: #333; border-radius: 20px; 
          text-decoration: none; font-size: 0.9rem; transition: 0.2s; display: inline-block;
      }
      .guide-subnav a:hover { background: #e2e6ea; }
      .guide-subnav a.active { background: #007bff; color: #fff; box-shadow: 0 2px 4px rgba(0, 123, 255, 0.4); }

      /* Hero 區塊 */
      .market-hero { 
          background: #fff; border-radius: 16px; padding: 25px; 
          border: 4px solid #f1f5f9; box-shadow: 0 4px 15px rgba(0,0,0,0.05);
      }
      .market-hero h1 { margin-top: 0; color: #0f172a; }
      
      /* 按鈕統一 */
      .btn-market-post {
          background: #f97316; color: white; border: none; padding: 12px 24px; 
          border-radius: 12px; font-weight: bold; font-size: 1.1rem; cursor: pointer;
          box-shadow: 0 4px 0 #ea580c; transition: transform 0.1s; text-decoration: none; display: inline-block;
      }
      .btn-market-post:active { transform: translateY(3px); box-shadow: none; }
      .market-flow-grid {
          display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
          gap: 10px; margin-top: 14px;
      }
      .market-flow-card {
          display: block; padding: 10px 12px; border-radius: 12px;
          background: #f8fafc; border: 1px solid #cbd5e1;
          color: #0f172a; text-decoration: none; font-size: 0.9rem;
      }
      .market-flow-card strong { display: block; color: #0369a1; margin-bottom: 2px; }
      .market-flow-card span { color: #475569; }
      
      .btn-action {
          padding: 6px 12px; border-radius: 8px; font-weight: bold; text-decoration: none;
          font-size: 0.9rem; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
      }
      .btn-contact { background: #10b981; color: white; box-shadow: 0 3px 0 #059669; }
      .btn-contact:active { transform: translateY(3px); box-shadow: none; }
      
      .btn-check-rep { background: #facc15; color: #854d0e; border: 1px solid #eab308; }
      .btn-share { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }

      /* 交易卡片 (Card) */
      .market-card {
          content-visibility: auto; contain-intrinsic-size: 0 360px;
          background: #fff; border-radius: 16px; padding: 0; margin-bottom: 20px;
          border: 3px solid #bfdbfe; box-shadow: 0 4px 6px rgba(0,0,0,0.02);
          overflow: hidden; transition: transform 0.1s;
      }
      .market-card:hover { transform: translateY(-4px); border-color: #2563eb; }
      
      .market-card-header {
          padding: 15px; background: #f8fafc; border-bottom: 2px solid #e2e8f0;
          display: flex; justify-content: space-between; align-items: center;
      }
      
      /* 使用者資訊區塊 (大頭照 + 名字) */
      .mc-user { display: flex; align-items: center; gap: 12px; }
      
      .mc-avatar { 
          width: 48px; height: 48px; border-radius: 50%; 
          background: #e2e8f0; 
          border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
          object-fit: cover; 
      }
      
      .mc-info { display: flex; flex-direction: column; }
      
      /* 顯示名稱格式： 顯示名 (帳號) */
      .mc-name-link { 
          font-weight: 800; color: #334155; font-size: 1rem; line-height: 1.3;
          text-decoration: none; transition: color 0.2s;
      }
      .mc-name-link:hover { color: #0284c7; text-decoration: underline; }
      
      /* 時間樣式 (修正滑鼠懸停) */
      .mc-time { font-size: 0.8rem; color: #94a3b8; margin-top: 2px; cursor: help; }
      
      .market-card-body { padding: 20px; display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
      
      /* 交易內容框 */
      .trade-box { 
          flex: 1; min-width: 280px; background: #fff; 
          border: 2px dashed #cbd5e1; border-radius: 12px; padding: 12px; 
      }
      .trade-give { background: #f0f9ff; border-color: #bae6fd; }
      .trade-get { background: #fffbeb; border-color: #fcd34d; }
      
      .trade-header { 
          display: flex; justify-content: space-between; font-weight: bold; margin-bottom: 10px; 
          font-size: 0.95rem; color: #475569;
      }
      .trade-arrow { font-size: 2rem; color: #94a3b8; align-self: center; }
      
      /* 果實項目 */
      .fruit-item { 
          display: flex; align-items: center; gap: 10px; padding: 8px; 
          background: #fff; border-radius: 8px; border: 1px solid #e2e8f0; margin-bottom: 8px;
      }
      .fi-icon { width: 40px; height: 40px; background-size: contain; background-repeat: no-repeat; background-position: center; }
      .fi-info { flex-grow: 1; }
      .fi-name { font-weight: bold; font-size: 0.9rem; color: #333; }
      .fi-val { font-size: 0.8rem; color: #64748b; }
      
      .fi-perm-tag { background: #f3e8ff; color: #7e22ce; padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; }
      .fi-real-tag { background: #e0f2fe; color: #0369a1; padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; }

      /* Modal 樣式 */
      .modal-container { background: #fff; border-radius: 16px; border: 4px solid #f1f5f9; }
      .modal-header { background: #fff; border-bottom: 2px solid #e2e8f0; padding: 15px; }
      
      /* === [NEW] 裝備特效樣式整合 === */
      
      /* 1. 置頂卡片特效 */
      .market-card.pinned {
          border-color: #fcd34d;
          background: #fffbeb;
          box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
          order: -1; /* 讓它排在最前面 */
      }
      .market-card.pinned .market-card-header {
          background: linear-gradient(to right, #fffbeb, #fff);
      }
      
      /* 2. 黃金框 (Gold Frame) */
      .market-card.frame-gold {
          border: 3px solid transparent;
          border-image: linear-gradient(45deg, #fcd34d, #b45309) 1;
          box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
      }
      .market-card.frame-gold .mc-avatar {
          border: 3px solid #f59e0b;
          box-shadow: 0 0 10px #fcd34d;
      }
      
      /* 3. 鑽石框 (Diamond Frame) */
      .market-card.frame-diamond {
          border: 3px solid #0ea5e9;
          box-shadow: 0 0 15px rgba(14, 165, 233, 0.4);
          background: #f0f9ff;
      }
      .market-card.frame-diamond .mc-avatar {
          border: 3px solid #0ea5e9;
          box-shadow: 0 0 10px #38bdf8;
      }

      /* 4. 名字顏色特效 */
      .name-fire {
          color: #dc2626 !important;
          text-shadow: 0 0 4px #fca5a5;
      }
      .name-rainbow {
          background: linear-gradient(90deg, #ef4444, #f59e0b, #10b981, #3b82f6, #8b5cf6);
          background-size: 200%;
          -webkit-background-clip: text;
          -webkit-text-fill-color: transparent;
          animation: rainbow-move 3s linear infinite;
          font-weight: 900;
      }
      @keyframes rainbow-move { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }

      /* 5. 稱號徽章 */
      .title-badge {
          display: inline-block; font-size: 0.75rem; padding: 2px 6px; 
          border-radius: 10px; margin-left: 5px; vertical-align: middle;
          font-weight: bold;
      }
      .title-rich {
          background: linear-gradient(180deg, #fcd34d 0%, #d97706 100%);
          color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,0.2);
          box-shadow: 0 2px 4px rgba(217, 119, 6, 0.3);
      }
      .pinned-badge {
          background: #ef4444; color: #fff; font-size: 0.7rem; padding: 2px 6px; 
          border-radius: 4px; margin-right: 5px; display: inline-block; font-weight: bold;
          animation: pulse 2s infinite;
      }
      @keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.7; } 100% { opacity: 1; } }

.market-page {
      --market-navy: #102a56;
      --market-blue: #2563eb;
      --market-gold: #f3b72d;
      max-width: 1120px;
    }
    .market-page .guide-subnav { scrollbar-width: none; }
    .market-page .guide-subnav::-webkit-scrollbar { display: none; }
    .market-hero {
      border-radius: 20px;
      border: 1px solid rgba(96,165,250,.3);
      background: linear-gradient(135deg,#f8fbff,#e7f4ff 62%,#fff8df);
      box-shadow: 0 14px 30px rgba(15,23,42,.08);
    }
    .market-hero-topline {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 18px;
    }
    .market-hero .page-title { margin-bottom: 6px; }
    .market-live-stat {
      flex: 0 0 auto;
      padding: 10px 13px;
      border: 1px solid #bfdbfe;
      border-radius: 13px;
      background: rgba(255,255,255,.86);
      color: #64748b;
      font-size: .78rem;
    }
    .market-live-stat strong { display:block; color:var(--market-navy); font-size:1.05rem; }
    .market-safety-note {
      margin-top: 10px;
      padding: 10px 12px;
      border: 1px solid #fecaca;
      border-radius: 12px;
      background: #fff7f7;
      color: #991b1b;
      font-size: .82rem;
      line-height: 1.55;
    }
    .market-filter-panel {
      position: sticky;
      top: 72px;
      z-index: 36;
      margin-bottom: 16px;
      padding: 12px;
      border: 1px solid rgba(148,163,184,.3);
      border-radius: 16px;
      background: rgba(248,251,255,.97);
      box-shadow: 0 12px 26px rgba(15,23,42,.1);
      backdrop-filter: blur(12px);
    }
    .market-filter-grid {
      display: grid;
      grid-template-columns: minmax(220px,1.5fr) repeat(5,minmax(112px,.72fr));
      gap: 8px;
    }
    .market-filter-grid input,
    .market-filter-grid select {
      width: 100%;
      min-height: 42px;
      padding: 8px 10px;
      border: 1px solid #cbd5e1;
      border-radius: 11px;
      background: #fff;
      color: #172033;
      font: inherit;
    }
    .market-filter-meta {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      margin-top: 8px;
      color: #64748b;
      font-size: .8rem;
    }
    .market-card[hidden] { display:none !important; }
    .market-card.is-expired { border-style:dashed; opacity:.88; }
    .market-card.is-expired::before {
      content:'已過期・只有你看得到';
      display:block;
      padding:7px 12px;
      background:#fff3cd;
      color:#7c4a03;
      font-size:.78rem;
      font-weight:900;
    }
    .market-card-header { gap:12px; }
    .mc-name-row { display:flex; align-items:center; flex-wrap:wrap; gap:5px; }
    .market-rep-pill {
      display:inline-flex;
      align-items:center;
      padding:3px 7px;
      border-radius:999px;
      background:#ecfdf5;
      color:#047857;
      font-size:.7rem;
      font-weight:850;
    }
    .market-value-summary {
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:12px;
      padding:10px 16px;
      border-bottom:1px solid #e2e8f0;
      background:#f8fafc;
      color:#334155;
      font-size:.86rem;
      font-weight:850;
    }
    .market-value-summary.is-unknown { background:#fff7ed; color:#9a3412; }
    .market-value-summary.is-balanced { background:#ecfdf5; color:#047857; }
    .market-value-summary small { color:inherit; font-weight:700; }
    .market-card-body {
      display:grid;
      grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
      flex-wrap:nowrap;
    }
    .trade-box { min-width:0; }
    .trade-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
    .fruit-item { min-width:0; margin:0; }
    .fi-val.is-unknown { color:#c2410c; font-weight:850; }
    .mc-actions { align-items:center; }
    .market-more-menu { position:relative; }
    .market-more-menu > summary {
      list-style:none;
      display:inline-flex;
      align-items:center;
      justify-content:center;
      width:38px;
      height:36px;
      border:1px solid #cbd5e1;
      border-radius:9px;
      background:#fff;
      color:#475569;
      cursor:pointer;
      font-weight:950;
    }
    .market-more-menu > summary::-webkit-details-marker { display:none; }
    .market-more-popover {
      position:absolute;
      right:0;
      top:42px;
      z-index:30;
      display:grid;
      gap:6px;
      min-width:150px;
      padding:8px;
      border:1px solid #cbd5e1;
      border-radius:12px;
      background:#fff;
      box-shadow:0 14px 28px rgba(15,23,42,.18);
    }
    .market-more-popover .btn-action,
    .market-more-popover form,
    .market-more-popover form button { width:100%; justify-content:center; margin:0; }
    .market-load-more {
      display:block;
      width:100%;
      min-height:48px;
      margin-top:14px;
      border:1px solid #93c5fd;
      border-radius:13px;
      background:#eff6ff;
      color:#1d4ed8;
      font-weight:950;
      cursor:pointer;
    }
    .market-empty-filter {
      padding:28px 16px;
      border:1px dashed #94a3b8;
      border-radius:14px;
      color:#64748b;
      text-align:center;
    }
    .market-mobile-tools { display:none; }
    @media (min-width:769px) and (max-width:1400px) {
      body.market-page-shell .line-float { right:12px; }
      body.market-page-shell .line-float-text { display:none; }
      body.market-page-shell .line-float a,
      body.market-page-shell .theme-toggle-btn { width:45px; height:45px; padding:10px; justify-content:center; border-radius:50%; }
      body.market-page-shell .bf-assistant { left:12px; }
      body.market-page-shell .bf-assistant-toggle { width:45px; height:45px; padding:10px; justify-content:center; border-radius:50%; }
      body.market-page-shell .bf-assistant-toggle-text { display:none; }
    }
    @media (max-width:768px) {
      .market-page { padding-bottom:74px; }
      .market-page .guide-subnav { flex-wrap:nowrap; overflow-x:auto; white-space:nowrap; }
      .market-page .guide-subnav-label { display:none; }
      .market-hero { padding:16px 14px; }
      .market-hero-topline { display:block; }
      .market-live-stat { margin-top:10px; }
      .market-flow-grid { grid-template-columns:1fr !important; gap:6px; }
      .market-flow-card { display:grid; grid-template-columns:auto 1fr; gap:8px; padding:8px 10px; }
      .market-flow-card strong { display:inline; margin:0; }
      .market-hero-content { grid-template-columns:1fr !important; }
      .market-hero-btn-wrapper { margin-top:10px; }
      .btn-market-post { width:100%; justify-content:center; }
      .market-filter-panel { top:70px; padding:9px; }
      .market-filter-grid { display:flex; overflow-x:auto; gap:7px; scrollbar-width:none; }
      .market-filter-grid::-webkit-scrollbar { display:none; }
      .market-filter-grid input { flex:0 0 230px; }
      .market-filter-grid select { flex:0 0 145px; }
      .market-filter-meta { font-size:.75rem; }
      .market-card-header { align-items:flex-start; }
      .mc-actions { display:grid !important; grid-template-columns:1fr 1fr auto; width:100%; margin-top:9px; }
      .market-card-header { flex-wrap:wrap; }
      .btn-action { justify-content:center; min-height:38px; }
      .market-card-body { grid-template-columns:1fr; gap:10px; padding:12px; }
      .trade-arrow { transform:rotate(90deg); justify-self:center; line-height:1; }
      .trade-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
      .fruit-item { padding:7px; gap:7px; }
      .fi-icon { width:34px; height:34px; }
      .market-value-summary { align-items:flex-start; flex-direction:column; gap:3px; padding:9px 12px; }
      body.market-page-shell .line-float,
      body.market-page-shell .bf-assistant:not(.is-open) { display:none !important; }
      .market-mobile-tools { position:fixed; right:14px; bottom:16px; z-index:1200; display:block; }
      .market-mobile-tool-toggle { min-width:86px; min-height:46px; border:1px solid #f4b62c; border-radius:999px; background:linear-gradient(135deg,#ffd95f,#f4b62c); color:#172033; box-shadow:0 10px 22px rgba(15,23,42,.24); font-weight:950; }
      .market-mobile-tool-menu { position:absolute; right:0; bottom:56px; display:none; width:min(290px,calc(100vw - 28px)); padding:10px; border:1px solid rgba(148,163,184,.36); border-radius:16px; background:#fff; box-shadow:0 18px 40px rgba(15,23,42,.24); }
      .market-mobile-tools.is-open .market-mobile-tool-menu,
      .market-mobile-tool-menu [data-market-social-links] { display:grid; gap:7px; }
      .market-mobile-tool-menu a,
      .market-mobile-tool-menu button { display:flex; align-items:center; min-height:42px; padding:9px 11px; border:0; border-radius:10px; background:#f1f5f9; color:#172033; font:inherit; font-weight:850; text-decoration:none; cursor:pointer; }
    }

.market-alert-backdrop {
      position: fixed;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(15,23,42,0.65);
      z-index: 9999;
    }

    .market-faq-section {
      padding: 24px;
      border: 1px solid rgba(96,165,250,.3);
      border-radius: 20px;
      background: linear-gradient(145deg,#ffffff 0%,#f8fbff 65%,#fff9e8 100%);
      box-shadow: 0 14px 30px rgba(15,23,42,.07);
    }
    .market-faq-heading {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: 16px;
    }
    .market-faq-eyebrow {
      display: block;
      margin-bottom: 4px;
      color: #2563eb;
      font-size: .76rem;
      font-weight: 900;
      letter-spacing: .12em;
    }
    .market-faq-heading h2 {
      margin: 0;
      color: #102a56;
      font-size: clamp(1.35rem,2.5vw,1.8rem);
    }
    .market-faq-calc-link {
      display: inline-flex;
      align-items: center;
      min-height: 42px;
      padding: 9px 14px;
      border: 1px solid #f3b72d;
      border-radius: 999px;
      background: #fff8d9;
      color: #7c4a03;
      font-size: .86rem;
      font-weight: 900;
      text-decoration: none;
      white-space: nowrap;
    }
    .market-faq-calc-link:hover { background:#ffefad; transform:translateY(-1px); }
    .market-faq-grid { display:grid; gap:10px; }
    .market-faq-item {
      overflow: hidden;
      border: 1px solid #dbe7f5;
      border-radius: 14px;
      background: rgba(255,255,255,.92);
    }
    .market-faq-item summary {
      display: flex;
      align-items: center;
      gap: 11px;
      min-height: 54px;
      padding: 11px 48px 11px 13px;
      color: #172033;
      font-weight: 900;
      cursor: pointer;
      list-style: none;
      position: relative;
    }
    .market-faq-item summary::-webkit-details-marker { display:none; }
    .market-faq-item summary::after {
      content: '+';
      position: absolute;
      right: 17px;
      color: #2563eb;
      font-size: 1.35rem;
      line-height: 1;
      transition: transform .18s ease;
    }
    .market-faq-item[open] summary::after { transform:rotate(45deg); }
    .market-faq-item[open] summary { border-bottom:1px solid #e5edf7; background:#f8fbff; }
    .market-faq-number {
      display: inline-grid;
      place-items: center;
      flex: 0 0 36px;
      width: 36px;
      height: 30px;
      border-radius: 9px;
      background: #e8f1ff;
      color: #1d4ed8;
      font-size: .76rem;
      font-weight: 950;
    }
    .market-faq-answer { padding: 13px 18px 16px 60px; color:#475569; line-height:1.7; }
    .market-faq-answer p { margin:0 0 7px; }
    .market-faq-answer p:last-child { margin-bottom:0; }
    .market-faq-answer ul { margin:7px 0 0; padding-left:1.2rem; }
    .market-faq-answer a { color:#0369a1; font-weight:850; text-underline-offset:3px; }
    @media (max-width: 640px) {
      .market-faq-section { padding:17px 14px; }
      .market-faq-heading { align-items:flex-start; flex-direction:column; gap:11px; }
      .market-faq-calc-link { width:100%; justify-content:center; }
      .market-faq-item summary { padding-left:10px; }
      .market-faq-answer { padding:12px 14px 15px; }
    }
    .market-alert-modal {
      background: #f8fafc;
      border-radius: 16px;
      padding: 24px 20px 18px;
      max-width: 320px;
      width: 90%;
      box-shadow: 0 20px 45px rgba(15,23,42,0.35);
      text-align: center;
      border: 1px solid #e2e8f0;
      animation: marketAlertPop 0.22s ease-out;
    }
    .market-alert-icon {
      font-size: 2.5rem;
      margin-bottom: 8px;
    }
    .market-alert-title {
      font-size: 1.15rem;
      font-weight: 700;
      color: #0f172a;
      margin-bottom: 6px;
    }
    .market-alert-text {
      font-size: 0.95rem;
      color: #475569;
      line-height: 1.6;
      margin-bottom: 14px;
    }
    .market-alert-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 8px 22px;
      border-radius: 999px;
      border: none;
      cursor: pointer;
      font-size: 0.95rem;
      font-weight: 600;
      background: linear-gradient(135deg, #38bdf8, #6366f1);
      color: #f9fafb;
      box-shadow: 0 8px 20px rgba(37,99,235,0.4);
      transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
    }
    .market-alert-btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 12px 26px rgba(37,99,235,0.45);
      filter: brightness(1.05);
    }
    .market-alert-btn:active {
      transform: translateY(0);
      box-shadow: 0 4px 12px rgba(37,99,235,0.3);
    }
    @keyframes marketAlertPop {
      from { transform: scale(0.86); opacity: 0; }
      to { transform: scale(1); opacity: 1; }
    }
    @media (max-width: 640px) {
      .market-alert-modal {
        max-width: 90%;
        padding: 20px 16px 16px;
      }
      .market-alert-title {
        font-size: 1.05rem;
      }
      .market-alert-text {
        font-size: 0.9rem;
      }
    }
