:root {
  --bg:var(--t-bg);
  --card:var(--t-card);
  --border:var(--t-line);
  --paper:var(--t-card);
  --ink:var(--t-text);
  --red:var(--t-rouge);
  --muted:var(--t-sub);
  --line:var(--t-line);
}
body {
  color: #f3e6d2;
  font-family: "Microsoft YaHei", sans-serif;
  background:var(--t-bg);
}
h1,h2,h3,.welcome-title,nav span:first-child {
  font-family: "STZhongsong", "SimSun", Georgia, serif;
}
button,input,textarea,select { font: inherit; }
button,a,input,textarea,select { touch-action: manipulation; }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible {
  outline: 2px solid #e3aa74; outline-offset: 3px;
}
button,a { transition: background-color .18s,color .18s; }
.workspace { height: 100dvh; }
.workspace > nav { background: #1c1916ed !important; border-color: #786050 !important; }
.workspace > nav > div { height: 72px; gap: 18px; }
.workspace nav span:first-child { color: #f4dfbd !important; font-size: 26px; letter-spacing: .03em; }
.workspace nav .nav-btn { white-space: nowrap; border-radius: 5px; color: #dac5b3; }
.workspace nav .nav-btn.text-white { background: #aa4435; color: white; }
.workspace main { min-height: 0; }
.workspace main > div { min-width: 0; }
.workspace main > div > div { min-width: 0; }
.workspace main aside { background: #1e1b18e8 !important; border-color: #685448; }
.workspace main aside input { min-width: 0; }
.workspace [class*="border-gray"] { border-color: #685448 !important; }
.workspace [class*="bg-[#1f2937]"],.workspace .metric-card { background: #2e2823; border-color: #685448; }
.workspace [class*="bg-gray-700"] { background: #514236; }
.workspace [class*="bg-blue-600"],.workspace [class*="bg-purple-600"] { background: #aa4435; }
.workspace button:hover { filter: brightness(1.12); }
.workspace .text-blue-400,.workspace .text-blue-300 { color: #f0b49a; }
.workspace .text-gray-500 { color: #c0ac9b; }
.workspace .text-gray-400 { color: #d0baaa; }
.workspace input,.workspace textarea,.workspace select { background: #231f1b; color: #f6e8d7; }
.workspace .data-table th { background: #3a3028; }
.workspace .data-table td { border-color: #665345; }
.workspace .data-table tr:hover td { background: #3a3028; }
.workspace .metric-card { background: #f3e6d2; color: #302921; box-shadow: 0 5px 20px #0002; }
.workspace .metric-card .metric-label { color: #6f5744; }
.workspace #messages { background: linear-gradient(#201a161a,#201a1680); }
.workspace #messages > .fade-in { animation: reveal .35s ease-out; }
.welcome-panel { max-width: 620px; padding: 35px; background: #1b1814b8; border: 1px solid #a88a6599; border-radius: 12px; backdrop-filter: blur(5px); }
.welcome-title { font-size: clamp(24px,3vw,36px); color: #f4dfbd; letter-spacing: .08em; }
.courtyard-seal { display: inline-grid; place-items: center; width: 54px; height: 54px; border: 1px solid #e49174; background: #aa4435; color: #fff0d9; font-family: "SimSun",serif; margin-bottom: 25px; letter-spacing: .15em; }
#account-link { display: none !important; }
.account-page { background:var(--t-bg); padding-top: 5vh; }
.account-page header { min-height: 170px; border-bottom: 1px solid #b58f6366; }
.account-page header h1 { font-size: 42px; letter-spacing: .12em; color: #f5e2c7; }
.account-page .card { color: #302921; background: linear-gradient(135deg,#f6ead9,#eaddc8); border: 1px solid #d8c2a6; border-radius: 10px; box-shadow: 0 18px 55px #0004; animation: reveal .5s ease-out; }
.account-page .card .muted { color: #6f5948; }
.account-page input { background: #fffbf1; color: #302921; border-color: #bba68f; }
.account-page button,.account-page a.button { background: #aa4435; color: #fff4e4; }
.account-page button.secondary { background: #605345; }
.account-page #message { color: #ffe2ad; }
.account-page h2 { letter-spacing: .1em; }
.account-page .auth { margin-left: 0; width: 100%; }
.account-page summary { color: #84382c; padding: 8px 0; }
.review-board { max-width: 920px; margin: 0 auto; color: #332b25; }
.review-toolbar { display:flex; align-items:center; gap:12px; padding: 8px 2px 14px; color:#f3e6d2; }
.review-toolbar strong { margin:auto; font-size: 15px; letter-spacing:.08em; }
.review-arrow,.review-refresh { border:1px solid #8d705b; background:#31251f; color:#f3e6d2; border-radius:8px; padding:7px 12px; }
.review-arrow { font-size:24px; line-height:1; padding:3px 12px; }
.review-tabs { display:flex; gap:4px; overflow:auto; border-bottom:1px solid #9b7e65; margin-bottom:14px; }
.review-tabs button { flex:0 0 auto; border:0; background:transparent; color:#cdb9a8; padding:10px 14px; border-bottom:3px solid transparent; }
.review-tabs button.active { color:#f3e6d2; border-color:#c75b48; }
.review-status,.review-metrics>div,.review-feature,.review-columns section { background:linear-gradient(135deg,#f5e8d6,#e6d4bd); border:1px solid #cbb198; border-radius:10px; box-shadow:0 8px 24px #0002; }
.review-status { padding:18px 20px; margin-bottom:10px; }
.review-status small,.review-metrics small,.review-feature small { color:#806b58; }
.review-status h2 { margin:8px 0 2px; font-size:24px; }
.review-status p { margin:0; color:#77604f; font-size:13px; }
.review-up h2 { color:#4e8065; }.review-down h2 { color:#a34e40; }.review-flat h2 { color:#806c55; }
.review-metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:8px; }
.review-metrics>div { padding:14px 16px; display:flex; flex-direction:column; gap:4px; }
.review-metrics b { font-size:25px; color:#477a65; }.review-metrics b i,.review-feature b { font-size:12px; font-style:normal; margin-left:3px; }.review-metrics em { color:#98806b; font-size:11px; font-style:normal; }.review-metrics .up { color:#b24f42; }.review-metrics .down { color:#51836d; }
.review-metrics.compact b { font-size:22px; color:#392e27; }
.review-feature { display:grid; grid-template-columns:1fr 2fr; gap:20px; padding:16px; margin-bottom:8px; }.review-feature b,.review-feature strong { display:block; margin-top:6px; color:#ad5143; }.review-feature strong { color:#3f352d; font-size:14px; }.streak-list,.review-list { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }.streak-list span,.review-list span { display:flex; justify-content:space-between; gap:16px; background:#eadbc7; padding:6px 9px; border-radius:6px; font-size:12px; }.streak-list em,.review-list em { color:#4e8065; font-style:normal; }
.review-columns { display:grid; grid-template-columns:1fr 1fr; gap:8px; }.review-columns section { padding:14px; }.review-columns header { color:#59483b; font-weight:bold; border-bottom:1px solid #cfb89f; padding-bottom:8px; }.review-columns header small { float:right; color:#947e6b; font-weight:normal; }
.review-loading,.review-error { max-width:920px; margin:30px auto; padding:22px; text-align:center; color:#e4c5a6; }
.review-error { color:#f19a8b; border:1px solid #a9584a; border-radius:8px; }
.review-note { color:#806b58; font-size:13px; line-height:1.8; margin-top:12px; }
.mobile-review-nav { display:none; }
.review-toolbar input { min-width:0; flex:1; padding:7px; border:1px solid #8d705b; border-radius:6px; color-scheme:dark; }
.review-toolbar button:disabled { opacity:.35; cursor:default; }
.review-paper { padding:20px; background:#f3e6d2; color:#332b25; border-radius:10px; margin-bottom:12px; }
.review-paper h3 { font-size:19px; margin-bottom:12px; }
.review-paper p { line-height:1.8; font-size:14px; margin:10px 0; }
.review-paper textarea { width:100%; display:block; margin:12px 0; padding:12px; border-radius:6px; }
.review-paper button,.review-stage-buttons button { padding:8px 12px; border:1px solid #9c6a50; border-radius:6px; background:#aa4435; color:#fff4e4; }
.review-stage-buttons { display:flex; gap:8px; padding:15px 0; }
.review-stage-buttons [aria-pressed="true"] { background:#594331; border-color:#edcfab; }
.review-table-scroll { overflow-x:auto; }
.review-table-scroll table { width:100%; border-collapse:collapse; text-align:left; font-size:13px; }
.review-table-scroll th,.review-table-scroll td { border-bottom:1px solid #ccb79d; padding:10px 8px; white-space:nowrap; }
.review-table-scroll td button { background:transparent; color:#843c30; border:0; text-align:left; padding:0; }
.review-table-scroll small { display:block; color:#6f5948; }
.streak-list .ladder-button { width:100%; text-align:left; padding:10px; border-radius:6px; background:#e5d2b9; color:#352b24; }
.ladder-button b,.ladder-button span { display:block; line-height:1.7; }
.ladder-button b { margin:0; }
.cycle-board { max-width:1000px; margin:0 auto; color:var(--bright-ink); }
.cycle-header { display:flex; align-items:center; justify-content:space-between; padding:18px 4px; }.cycle-header small,.cycle-card header small { color:var(--bright-muted); }.cycle-header h1 { margin:5px 0; font-size:32px; color:var(--bright-red); }.cycle-header p { color:var(--bright-muted); }.cycle-header button,.cycle-journal-actions button { border:1px solid #d6aaa0; border-radius:7px; padding:8px 14px; background:#fff; color:var(--bright-red); }
.cycle-rail { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; margin-bottom:12px; }.cycle-rail button { min-height:78px; text-align:left; border:1px solid var(--bright-line); background:#fff; color:var(--bright-ink); border-radius:9px; padding:12px; }.cycle-rail button b,.cycle-rail button span { display:block; }.cycle-rail button span { color:var(--bright-muted); font-size:12px; margin-top:7px; }.cycle-rail button.active { background:#fff0eb; border-color:#e0a197; box-shadow:inset 0 -3px #c55245; }.cycle-rail button.active b { color:var(--bright-red); }
.cycle-grid { display:grid; grid-template-columns:1.25fr 1fr; gap:10px; }.cycle-card { background:rgba(255,255,255,.94); border:1px solid var(--bright-line); border-radius:10px; padding:18px; margin-bottom:10px; box-shadow:0 7px 22px rgba(46,64,78,.07); }.cycle-card header { font-weight:700; border-bottom:1px solid var(--bright-line); padding-bottom:10px; display:flex; justify-content:space-between; }.cycle-metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:14px; }.cycle-metrics div { background:#f7fafc; border-radius:7px; padding:12px; }.cycle-metrics small { display:block; color:var(--bright-muted); }.cycle-metrics b { display:block; color:var(--bright-jade); font-size:25px; margin-top:4px; }.cycle-note { color:var(--bright-muted); line-height:1.7; }.cycle-checklist { list-style:none; padding:0; margin:12px 0 0; }.cycle-checklist li { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:10px 0; border-bottom:1px solid #edf0f2; }.cycle-checklist label { display:flex; align-items:center; gap:8px; }.cycle-checklist button { border:0; background:#fff0eb; color:var(--bright-red); border-radius:5px; padding:5px 9px; }.cycle-journal textarea { width:100%; margin-top:12px; background:#fff !important; color:var(--bright-ink) !important; border:1px solid #c9d3da; border-radius:7px; padding:12px; }.cycle-journal-actions { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:10px; color:var(--bright-muted); font-size:12px; }
/* Analysis and strategy workspaces keep picker and result visible side by side. */
#page-analysis, #page-strategies { flex-direction:row !important; }
#page-screener { flex-direction:row !important; }
#page-screener > aside { width:270px; flex:0 0 270px; border-right:1px solid #685448; border-bottom:0; }
#screener-content { min-width:0; min-height:0; }
#page-analysis > aside, #page-strategies > aside { width:270px; flex:0 0 270px; border-right:1px solid #685448; border-bottom:0; }
#analysis-content, #strategy-detail { min-width:0; min-height:0; }
#strategy-list { scrollbar-width:thin; }
#strategy-list > div { border-left:3px solid transparent; }
#strategy-list > div:hover { border-left-color:#c75b48; background:#382923; }
#strategy-list > button { width:100%; text-align:left; border-left:3px solid transparent; }
#strategy-list > button[aria-pressed="true"] { border-left-color:#edac86; background:#9a4235; color:#fff5e8; }
@keyframes reveal { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
@media(max-width:760px) {
  .workspace > nav > div { height: auto; min-height: 92px; padding: 10px 12px; }
  .workspace > nav > div > div { flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; width: 100%; }
  .workspace nav .flex.gap-1 { overflow-x: auto; width: 100%; padding-bottom: 3px; }
  .workspace nav .nav-btn { white-space: nowrap; flex-shrink: 0; padding: 6px 9px !important; font-size: 13px; }
  .workspace nav span.text-xs { display: none; }
  .workspace main > div:not(.hidden) { flex-direction: column; overflow-y: auto; }
  .workspace main aside { width: 100% !important; max-height: 180px; border-right: 0; border-bottom: 1px solid #685448; }
  #page-analysis, #page-strategies { flex-direction:row !important; overflow:hidden !important; }
  #page-screener { flex-direction:row !important; overflow:hidden !important; }
  #page-screener > aside { width:112px !important; min-width:112px !important; flex:0 0 112px; max-height:none; height:100%; overflow-y:auto; border-right:1px solid #685448; border-bottom:0; }
  #page-screener > div { flex:1; min-width:0; height:100%; overflow-y:auto; }
  #page-screener > aside .p-3 { padding:8px !important; }
  #page-screener > aside textarea { font-size:11px; }
  #page-screener > aside button { padding:8px 5px; font-size:11px; }
  #screener-content { padding:10px; overflow:auto; }
  #page-analysis > aside, #page-strategies > aside { width:145px !important; min-width:145px !important; flex:0 0 145px; max-height:none; height:100%; overflow-y:auto; border-right:1px solid #685448; border-bottom:0; }
  #page-analysis > div, #page-strategies > div { flex:1; min-width:0; height:100%; overflow-y:auto; }
  #page-analysis > aside .p-3, #page-strategies > aside .p-3 { padding:10px !important; }
  #page-analysis > aside .ana-btn, #page-strategies #strategy-list > div { padding:9px 7px !important; font-size:12px; }
  #page-analysis > aside .text-xs { font-size:10px; }
  #strategy-detail { overflow:auto; }
  #strategy-detail .markdown-body { padding:15px !important; font-size:14px; }
  .workspace #page-analysis > aside,.workspace #page-strategies > aside { width:112px !important; min-width:112px !important; flex-basis:112px; min-height:0; overflow:hidden; }
  #page-analysis > aside > div:first-child,#page-strategies > aside > div:first-child { flex-shrink:0; }
  #page-analysis > aside > div:last-child,#strategy-list { min-height:0; overflow-y:auto; overscroll-behavior-y:contain; -webkit-overflow-scrolling:touch; }
  #page-analysis > aside > div:first-child .flex { flex-direction:column; }
  #ana-code,#ana-days { width:100%; min-width:0; flex:none; font-size:13px; }
  #page-strategies > aside > div:first-child { flex-wrap:wrap; gap:6px; }
  #strategy-search { width:100%; flex-basis:100%; padding:6px; font-size:12px; }
  #strategy-list { padding:4px; }
  #strategy-list > button { padding:12px 5px; font-size:12px; min-height:44px; overflow-wrap:anywhere; }
  #strategy-list > button > div:last-child { display:none; }
  #analysis-content { padding:10px; overflow:auto; overscroll-behavior:contain; }
  #analysis-content .text-lg { font-size:15px; }
  #strategy-detail > div:first-child { flex-wrap:wrap; gap:6px; padding:8px; }
  #strategy-detail > div:first-child > div:first-child { flex-wrap:wrap; gap:4px; min-width:0; }
  #strategy-detail > div:first-child .text-xs { display:none; }
  #strategy-view { min-height:0; padding:8px; overscroll-behavior:contain; }
  #strategy-view .markdown-body { padding:10px !important; overflow-wrap:anywhere; line-height:1.8; }
  #strategy-view .markdown-body h1 { font-size:20px; }
  #strategy-view .markdown-body h2 { font-size:18px; }
  #strategy-view .markdown-body ul,#strategy-view .markdown-body ol { padding-left:18px; }
  #strategy-editor-wrap { min-height:0; }
  #strategy-editor-wrap > div:first-child { flex-direction:column; min-height:0; }
  #strategy-editor-wrap > div:first-child > div { min-height:0; }
  .workspace #page-chat > aside:first-child { max-height: 105px; }
  .workspace #page-chat > aside:last-child { max-height: 90px; }
  .workspace #page-chat > div { min-height: 260px; }
  .workspace #session-list { display: flex; gap: 6px; }
  .workspace #session-list > div { flex-shrink: 0; max-width: 200px; }
  .workspace #page-market > div > .p-3 { flex-wrap: wrap; }
  .workspace #page-market > div > .p-3 > .flex { flex-wrap: wrap; }
  .workspace #input { min-width: 0; }
  .review-metrics { grid-template-columns:repeat(2,1fr); }.review-metrics>div:last-child { grid-column:1/-1; }.review-feature,.review-columns { grid-template-columns:1fr; }.review-tabs button { padding:9px 11px; font-size:12px; }
  .mobile-review-nav { display:grid; grid-template-columns:repeat(5,1fr); position:fixed; z-index:20; bottom:0; left:0; right:0; padding:7px 8px calc(7px + env(safe-area-inset-bottom)); background:#1b1714ed; border-top:1px solid #725847; backdrop-filter:blur(12px); }
  .mobile-review-nav button { border:0; background:transparent; color:#c9b4a3; font-size:11px; padding:6px 2px; }.mobile-review-nav button.active { color:#f1b29a; }
  .workspace main { padding-bottom:env(safe-area-inset-bottom, 0px); }
  #page-market.review-mode > aside { display:none; }
  .review-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .review-metrics > div { padding:12px 8px; }
  .review-metrics > div:last-child { grid-column:auto; }
  .review-metrics b { font-size:21px; }
  .review-toolbar { gap:6px; }
  .review-toolbar button { padding:6px 9px; }
  .cycle-header h1 { font-size:25px; }.cycle-rail { grid-template-columns:repeat(5,minmax(92px,1fr)); overflow-x:auto; padding-bottom:4px; }.cycle-rail button { min-height:72px; }.cycle-grid { grid-template-columns:1fr; }.cycle-card { padding:14px; }.cycle-metrics b { font-size:20px; }.cycle-journal-actions { align-items:stretch; flex-direction:column; }.cycle-journal-actions button { width:100%; }
  .workspace #btn-send,.workspace #btn-stop,.workspace #btn-judge { padding: 8px; }
  .welcome-panel { padding: 24px 16px; }
  .account-page { padding: 20px 16px; background-position: 65% center; }
  .account-page header { min-height: 160px; }
  .account-page header h1 { font-size: 32px; }
  .account-page .auth { max-width: none; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation: none !important; transition: none !important; } }

/* Bright spring edition: warm Xuan-paper UI with restrained ink & cinnabar accents. */
:root { --bright-bg:var(--t-bg); --bright-paper:var(--t-card); --bright-paper-warm:var(--t-card-2); --bright-ink:var(--t-text); --bright-muted:var(--t-sub); --bright-line:var(--t-line); --bright-red:var(--t-rouge); --bright-jade:var(--t-down); --radius-card:10px; --radius-ctrl:6px; }
html,body { background:var(--bright-bg) !important; color:var(--bright-ink) !important; }
body { background:var(--t-bg); background-position:center,center; background-size:cover,cover; background-attachment:fixed; }

.workspace > nav { background:rgba(255,255,255,.94) !important; border-color:var(--bright-line) !important; box-shadow:0 2px 14px rgba(46,64,78,.08); }
.workspace > nav > div { height:68px; }
.workspace nav span:first-child { color:var(--bright-ink) !important; }
.workspace nav .nav-btn { color:#525b66 !important; background:transparent; border-radius:var(--radius-ctrl) !important; }
.workspace nav .nav-btn:hover { background:#f2ede6 !important; color:#2b3440 !important; }
.workspace nav .nav-btn.text-white { background:#2b3440 !important; color:#faf8f6 !important; font-weight:600; }
.workspace main aside { background:rgba(255,255,255,.9) !important; border-color:var(--bright-line) !important; }
.workspace [class*="border-gray"],.workspace [class*="border-gray-800"] { border-color:var(--bright-line) !important; }
.workspace [class*="bg-[#1f2937]"],.workspace [class*="bg-[#111827]"],.workspace [class*="bg-gray-700"] { background:var(--bright-paper) !important; color:var(--bright-ink) !important; }
.workspace input,.workspace textarea,.workspace select { background:#fff !important; border-color:#d4cdc3 !important; color:var(--bright-ink) !important; border-radius:var(--radius-ctrl) !important; }
.workspace input::placeholder,.workspace textarea::placeholder { color:#7a8490 !important; }
.workspace button.bg-blue-600,.workspace button.bg-purple-600,.workspace button.bg-green-600 { background:var(--bright-red) !important; }
.workspace button.bg-blue-600:hover,.workspace button.bg-purple-600:hover,.workspace button.bg-green-600:hover { background:#dd6d5c !important; }
.workspace .market-tab { border:1px solid #dfd8cf !important; background:#f5f1ea !important; color:#4f5863 !important; border-radius:var(--radius-ctrl) !important; font-size:12.5px !important; }
.workspace .market-tab.bg-blue-600 { background:#2b3440 !important; border-color:#2b3440 !important; color:#faf8f6 !important; font-weight:600; }
.workspace .ana-btn.bg-blue-600 { background:#2b3440 !important; border-color:#2b3440 !important; color:#faf8f6 !important; font-weight:600; }
.workspace #btn-judge { background:#f4f0ea !important; color:#2b3440 !important; border:1px solid #d6cec3 !important; border-radius:var(--radius-ctrl) !important; }
.workspace .text-gray-200,.workspace .text-gray-300,.workspace .text-gray-400 { color:var(--bright-ink) !important; }
.workspace .text-gray-500 { color:var(--bright-muted) !important; }
.workspace .text-blue-400,.workspace .text-blue-300,.workspace .text-blue-500 { color:#3d5875 !important; }
.workspace .text-green-400,.workspace .text-green-500 { color:var(--bright-jade) !important; }
.workspace .text-red-400,.workspace .text-red-500 { color:#bf554a !important; }
.workspace .metric-card { background:var(--bright-paper) !important; border-color:var(--bright-line) !important; border-radius:var(--radius-card) !important; color:var(--bright-ink); box-shadow:0 4px 14px rgba(43,52,64,.05); }
.workspace .metric-card .metric-label { color:#525b66 !important; font-size:12px !important; }
.workspace .text-xs { font-size:12px !important; }
.workspace #messages { background:rgba(246,249,251,.72); }
.workspace #messages .bg-blue-600 { background:#c95b4b !important; }
.workspace footer { background:rgba(255,255,255,.94) !important; border-color:var(--bright-line) !important; color:var(--bright-muted) !important; }
.workspace .welcome-panel { background:rgba(255,255,255,.84); border-color:#e2b6ad; box-shadow:0 16px 40px rgba(46,64,78,.12); }
.workspace .welcome-title { color:var(--bright-ink); }
.workspace .courtyard-seal { background:var(--bright-red); color:#fff; }
.review-board { color:var(--bright-ink); }
.review-toolbar { color:var(--bright-ink); }
.review-arrow,.review-refresh { background:#fff; color:var(--bright-ink); border-color:#c9d3da; }
.review-tabs button { color:#71808c; }.review-tabs button.active { color:var(--bright-red); border-color:var(--bright-red); }
.review-status,.review-metrics>div,.review-feature,.review-columns section { background:linear-gradient(135deg,#fff,#fffaf4); border-color:var(--bright-line); box-shadow:0 7px 22px rgba(46,64,78,.08); }
.review-status small,.review-metrics small,.review-feature small { color:#71808c; }
.review-status h2 { color:var(--bright-ink); }.review-status p,.review-note { color:#71808c; }
.review-metrics b { color:var(--bright-jade); }.review-metrics .up,.review-status .up h2 { color:var(--bright-red); }.review-metrics .down { color:var(--bright-jade); }
.review-feature strong { color:var(--bright-ink); }.streak-list span,.review-list span { background:#fff1eb; color:var(--bright-ink); }
.review-columns header { color:var(--bright-ink); border-color:var(--bright-line); }
.review-paper { background:#fff; color:var(--bright-ink); border:1px solid var(--bright-line); box-shadow:0 7px 22px rgba(46,64,78,.08); }
.review-paper textarea { background:#fff !important; color:var(--bright-ink) !important; border:1px solid #c9d3da; }
.review-table-scroll th,.review-table-scroll td { border-color:var(--bright-line); }.review-table-scroll td button { color:#b6493f; }
.streak-list .ladder-button { background:#fff1eb; color:var(--bright-ink); }
.mobile-review-nav { background:rgba(255,255,255,.96); border-color:var(--bright-line); }.mobile-review-nav button { color:#71808c; }.mobile-review-nav button.active { color:var(--bright-red); }
#page-analysis > aside,#page-strategies > aside,#page-screener > aside { background:rgba(255,255,255,.95) !important; }
#strategy-list > button[aria-pressed="true"] { background:#2b3440 !important; color:#faf8f6 !important; border-left-color:var(--bright-red); border-radius:var(--radius-ctrl); }
#strategy-list > button[aria-pressed="true"] div { color:#faf8f6 !important; }
#strategy-list > button:hover,#strategy-list > div:hover { background:#f3efe9; }

body { background:var(--t-bg); background-size:cover,cover; }

/* CycleView-inspired evidence cards keep the cycle journal readable on phones. */
.cycle-date { display:flex; align-items:center; gap:8px; margin:0 0 12px; }
.cycle-date input { flex:1; min-width:0; border:1px solid var(--bright-line); border-radius:7px; padding:9px 10px; color:var(--bright-ink); background:#fff; }
.cycle-date button,.cycle-links button { border:1px solid var(--bright-line); background:#fff; color:var(--bright-ink); border-radius:7px; padding:8px 11px; cursor:pointer; }
.cycle-date button:hover,.cycle-links button:hover { border-color:var(--bright-red); color:var(--bright-red); }
.cycle-fields { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:14px; }
.cycle-fields label { color:var(--bright-muted); font-size:12px; }
.cycle-fields input { display:block; width:100%; margin-top:6px; border:1px solid #c9d3da; border-radius:7px; padding:10px; color:var(--bright-ink); background:#fff; }
.cycle-industry { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.cycle-industry span { background:#fff2ed; color:#a94f42; border-radius:999px; padding:5px 9px; font-size:12px; }
.cycle-subtitle { margin-top:16px; font-weight:700; color:var(--bright-red); }
.cycle-emotion-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:8px; }
.cycle-emotion-grid div { background:#f7fafc; border-radius:7px; padding:10px; }
.cycle-emotion-grid small,.cycle-emotion-grid b,.cycle-emotion-grid span { display:block; }
.cycle-emotion-grid small { color:var(--bright-muted); }.cycle-emotion-grid b { font-size:20px; color:var(--bright-ink); margin:3px 0; }.cycle-emotion-grid span { font-size:11px; color:var(--bright-muted); }.cycle-emotion-grid .rise { color:var(--bright-jade); }.cycle-emotion-grid .fall { color:var(--bright-red); }
.cycle-history { display:grid; gap:7px; margin-top:10px; }.cycle-history button { display:grid; grid-template-columns:auto auto 1fr; gap:10px; align-items:center; text-align:left; border:1px solid var(--bright-line); background:#fff; border-radius:7px; padding:9px 10px; color:var(--bright-ink); cursor:pointer; }.cycle-history b { color:var(--bright-red); }.cycle-history span { color:var(--bright-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cycle-links { display:flex; flex-wrap:wrap; gap:8px; margin:4px 0 20px; }
@media (max-width:640px) { .cycle-fields { grid-template-columns:1fr; }.cycle-emotion-grid { grid-template-columns:repeat(2,1fr); }.cycle-date button { padding-inline:9px; }.cycle-history button { grid-template-columns:1fr auto; }.cycle-history span { grid-column:1 / -1; } }
.cycle-trend { display:grid; gap:7px; margin-top:12px; }
.cycle-trend-row { display:grid; grid-template-columns:48px 1fr 82px; align-items:center; gap:8px; font-size:11px; color:var(--bright-muted); }
.cycle-trend-row time { font-variant-numeric:tabular-nums; }.cycle-trend-row > span { text-align:right; font-variant-numeric:tabular-nums; }
.cycle-bar { display:flex; height:10px; gap:2px; background:#f3f5f5; border-radius:999px; overflow:hidden; }.cycle-bar i { display:block; height:100%; }.cycle-bar .up { background:#6eaf8d; }.cycle-bar .down { background:#e58a79; }

/* Cycle comparison workspace: fixed picker, flexible evidence table. */
.cycle-ranking-layout {display:grid;grid-template-columns:112px minmax(0,1fr);gap:18px;margin-top:16px}
.cycle-ranking-layout nav {display:flex;flex-direction:column;gap:8px}
.cycle-ranking-layout nav button {padding:12px 8px;border:1px solid #eadbd6;border-radius:8px;background:#fff;color:#765d56}
.cycle-ranking-layout nav button[aria-pressed="true"] {background:#fff0eb;border-color:#ce8275;color:#a7493d;font-weight:700}
#cycle-rankings {min-width:0}
#cycle-rankings table {width:100%;border-collapse:collapse;font-size:13px}
#cycle-rankings th,#cycle-rankings td {padding:11px 6px;border-bottom:1px solid #eee5e1;text-align:right;font-variant-numeric:tabular-nums}
#cycle-rankings th:first-child,#cycle-rankings td:first-child {text-align:left}
#cycle-rankings small {display:block;color:#827a76;font-size:11px}
.cycle-card header {gap:8px;flex-wrap:wrap}
.cycle-legend {display:flex;flex-wrap:wrap;gap:12px;font-size:12px;color:#716661}
.cycle-bar .up {background:#d37769}.cycle-bar .down {background:#62a187}
.cycle-emotion-grid .rise {color:#b75143}.cycle-emotion-grid .fall {color:#3e8464}
.cycle-rail {grid-template-columns:repeat(6,minmax(0,1fr));margin-top:14px}
#cycle-journal-text {width:100%;margin-top:10px;padding:12px;border:1px solid #decfc8;border-radius:8px;background:#fff;color:#403a36}
@media(max-width:640px) {
 .cycle-ranking-layout {grid-template-columns:76px minmax(0,1fr);gap:8px}
 #cycle-rankings table {font-size:11px}
 #cycle-rankings th,#cycle-rankings td {padding:10px 3px}
 .cycle-rail {grid-template-columns:repeat(3,minmax(0,1fr))}
 .cycle-rail button {min-height:48px;padding:8px}
}

/* Keep results readable without squeezing data columns into the mobile pane. */
.workspace .data-table th { background:#f5eeeb; color:#304451; border-color:#e5d9d3; }
.workspace .data-table td { border-color:#eee5e1; }
.workspace .data-table tr:hover td { background:#fff5f1; }
#screener-content .data-table { min-width:660px; }
#screener-content .data-table th,#screener-content .data-table td { white-space:nowrap; }
#screener-content .data-table th:nth-child(2),#screener-content .data-table td:nth-child(2) { min-width:96px; }
@media(max-width:640px) {
 #page-screener > aside { width:152px !important; min-width:152px !important; flex-basis:152px; }
 #screener-date { font-size:12px; padding-inline:3px; min-height:34px; }
 #screener-content:has(table)::before { content:"左右滑动查看完整结果"; display:block; color:#7d7069; font-size:11px; margin-bottom:10px; }
}

/* P1/P2 Light-theme unification for K-line canvas, chips, portfolio tabs, strategy editor, and judge cards. */
.workspace .kline-canvas { background:#fffdfa !important; border:1px solid #e2dad0 !important; border-radius:var(--radius-card); }
.workspace .screener-chip { display:inline-block; padding:3px 9px; border:1px solid #dcd3c8; border-radius:var(--radius-ctrl); background:#f4f0ea; color:#48525c; font-size:12px; line-height:1.45; cursor:pointer; }
.workspace .screener-chip:hover { background:#eae3d9; border-color:#8c7d70; color:#2b3440; }
.workspace .portfolio-tab-btn { border:1px solid #dcd3c8; border-radius:var(--radius-ctrl) !important; background:#f5f1ea !important; color:#4f5863 !important; font-size:13px; }
.workspace .portfolio-tab-btn.active { background:#2b3440 !important; border-color:#2b3440 !important; color:#faf8f6 !important; font-weight:600; }
.workspace #session-list > div { border:1px solid transparent; }
.workspace #session-list > div:hover { background:#f3efe9 !important; color:#2b3440 !important; }
.workspace #session-list > div.active-session { background:#eae3d9 !important; border-color:#cfc4b6 !important; color:#2b3440 !important; font-weight:600; }
.workspace #strategy-editor, .workspace #new-strategy-editor { background:#fffdfa !important; color:var(--bright-ink) !important; border:0 !important; }
.workspace .chat-error-card { background:#fff3f1 !important; border:1px solid #e5b2aa !important; color:#9d372d !important; border-radius:10px; }
.workspace .judge-card { background:#faf7f2 !important; border:1px solid #dfd6cb !important; color:var(--bright-ink) !important; border-radius:10px; }

/* Peach-blossom courtyard empty states, quick prompt capsules, and strategy paper cards */
.welcome-quick-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:18px; text-align:left; }
.welcome-quick-btn { display:flex; flex-direction:column; gap:4px; padding:11px 12px; border:1px solid #dfd7cd; border-radius:var(--radius-card); background:#faf8f5; color:var(--bright-ink); font-size:13px; cursor:pointer; transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease; }
.welcome-quick-btn:hover { transform:translateY(-1px); border-color:#8c7d70; box-shadow:0 6px 14px rgba(43,52,64,.08); }
.welcome-quick-btn b { color:#2b3440; font-size:13.5px; display:flex; align-items:center; gap:5px; }
.welcome-quick-btn small { color:#554c46; font-size:12px; }
.workspace-empty-card { max-width:680px; width:100%; padding:26px 24px; border:1px solid #dfd7cd; border-radius:var(--radius-card); background:rgba(255,255,255,.96); box-shadow:0 10px 28px rgba(43,52,64,.06); color:var(--bright-ink); }
.workspace-empty-head { display:flex; align-items:center; gap:14px; margin-bottom:16px; }
.workspace-empty-seal { width:44px; height:44px; border-radius:var(--radius-ctrl); background:var(--bright-red); color:#fff; display:inline-grid; place-items:center; font-family:'STZhongsong','SimSun',serif; font-size:16px; letter-spacing:.08em; flex-shrink:0; }
.workspace-empty-head h2 { margin:0; font-size:20px; color:var(--bright-ink); }
.workspace-empty-head p { margin:3px 0 0; font-size:12.5px; color:#525b66; }
.workspace-action-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:14px; }
.workspace-action-card { display:flex; flex-direction:column; gap:4px; text-align:left; padding:12px 14px; border:1px solid #dfd7cd; border-radius:var(--radius-card); background:#faf8f5; cursor:pointer; transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease; }
.workspace-action-card:hover { transform:translateY(-1px); border-color:#8c7d70; box-shadow:0 6px 16px rgba(43,52,64,.08); }
.workspace-action-card b { font-size:13.5px; color:#2b3440; display:flex; align-items:center; gap:5px; }
.workspace-action-card > span { font-size:12px; color:#554c46; line-height:1.5; }
.workspace-pill-row { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:12px; padding-top:12px; border-top:1px dashed #dfd7cd; font-size:12px; color:#525b66; }
.strategy-paper-card { background:#ffffff !important; border:1px solid #dfd7cd !important; border-radius:var(--radius-card) !important; box-shadow:0 6px 20px rgba(43,52,64,.05); }
#strategy-view .markdown-body,
.strategy-paper-card.markdown-body {
  line-height: 1.75 !important;
  color: #2b3440 !important;
}
#strategy-view .markdown-body h1,
.strategy-paper-card.markdown-body h1 {
  margin: 0.25rem 0 1.1rem !important;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #e6dfd5;
  line-height: 1.35;
}
#strategy-view .markdown-body h2,
.strategy-paper-card.markdown-body h2 {
  margin: 1.5rem 0 0.7rem !important;
  line-height: 1.4;
}
#strategy-view .markdown-body h3,
.strategy-paper-card.markdown-body h3 {
  margin: 1.2rem 0 0.55rem !important;
  line-height: 1.45;
}
#strategy-view .markdown-body p,
.strategy-paper-card.markdown-body p {
  margin: 0.65rem 0 !important;
  line-height: 1.75 !important;
}
#strategy-view .markdown-body ul,
#strategy-view .markdown-body ol,
.strategy-paper-card.markdown-body ul,
.strategy-paper-card.markdown-body ol {
  margin: 0.65rem 0 0.95rem !important;
}
#strategy-view .markdown-body li,
.strategy-paper-card.markdown-body li {
  margin: 0.38rem 0 !important;
  line-height: 1.75 !important;
}
@media(max-width:640px) { .welcome-quick-grid,.workspace-action-grid { grid-template-columns:1fr; } .workspace-empty-card { padding:18px 14px; } }

/* 国风朱砂小印章 & 统一骨架屏 / 错误态卡片 */
.seal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 5px;
  margin-right: 5px;
  border-radius: 4px;
  background: #c0554a !important;
  color: #faf8f6 !important;
  font-family: "STZhongsong", "SimSun", Georgia, serif;
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
  line-height: 1.3;
  letter-spacing: 0.04em;
  vertical-align: middle;
  flex-shrink: 0;
}
/* 选股命中标签单行横向滑动条 */
.strat-preview-scroll {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  gap: 5px;
  padding: 2px 20px 2px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-mask-image: linear-gradient(to right, #000 86%, transparent 100%);
  mask-image: linear-gradient(to right, #000 86%, transparent 100%);
}
.strat-preview-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.strat-preview-scroll .screener-chip {
  flex-shrink: 0;
  white-space: nowrap;
}
/* 顶部导航右上角连接状态小圆点 & 隐藏底部状态条 */
.workspace > footer {
  display: none !important;
}
.nav-conn-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #525b66;
}
.nav-conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2e7d5b;
  box-shadow: 0 0 0 2px rgba(46, 125, 91, 0.16);
  display: inline-block;
  flex-shrink: 0;
}
.nav-conn-dot.busy {
  background: #c9862b;
  box-shadow: 0 0 0 2px rgba(201, 134, 43, 0.2);
  animation: chat-breathe 1.2s ease-in-out infinite;
}
.nav-conn-dot.offline {
  background: #9ca3af;
  box-shadow: none;
}
/* 历史会话抽屉头部与空状态 */
.chat-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.chat-history-head strong {
  font-size: 13.5px;
  color: #2b3440;
}
.chat-history-close {
  display: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #dfd7cd;
  background: #faf8f5;
  color: #524943;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
@media (max-width: 700px) {
  .chat-history-close {
    display: inline-grid;
    place-items: center;
  }
}
.chat-session-empty {
  padding: 28px 12px;
  text-align: center;
  color: #554c46;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chat-session-empty span {
  font-size: 13px;
  font-weight: 600;
  color: #2b3440;
}
.chat-session-empty small {
  font-size: 12px;
  color: #6c625b;
  line-height: 1.5;
}
/* 桌面宽屏：AI对话左右空栏自动收起、分析页/组合页 960px 居中靠上对齐 */
@media (min-width: 761px) {
  #chat-history.is-empty-desktop,
  #chat-tool-aside.is-empty-desktop {
    display: none !important;
  }
  #page-chat .welcome-panel {
    max-width: 760px;
  }
  #page-chat #messages > div {
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
  }
}
#analysis-content > *,
#portfolio-content > * {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}
#analysis-content .workspace-empty-card {
  max-width: 960px;
  margin: 8px auto 0;
}
#page-portfolio > .portfolio-top-bar > .portfolio-bar-inner,
#trade-form-panel > form {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}
#portfolio-watchlist-input {
  max-width: 220px;
}
.th-skeleton-card {
  max-width: 720px;
  margin: 12px auto;
  padding: 16px;
  border-radius: var(--radius-card);
  border: 1px solid #e2dad0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.th-sk-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.th-sk-line, .th-sk-box, .th-sk-panel {
  background: linear-gradient(90deg, #f2ede6 25%, #e6dfd5 50%, #f2ede6 75%);
  background-size: 200% 100%;
  animation: th-sk-shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}
.th-sk-line { height: 14px; display: block; }
.th-sk-line.w-32 { width: 130px; }
.th-sk-line.w-48 { width: 190px; }
.th-sk-line.w-20 { width: 80px; }
.th-sk-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.th-sk-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.th-sk-box { height: 52px; }
.th-sk-box.tall { height: 74px; }
.th-sk-panel { height: 140px; border-radius: 8px; }
@keyframes th-sk-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.th-state-error {
  max-width: 540px;
  margin: 20px auto;
  padding: 16px 18px;
  border-radius: var(--radius-card);
  border: 1px solid #e0c8c3;
  background: #fdf9f8;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #2b3440;
}
.th-err-seal {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: #c0554a;
  color: #faf8f6;
  font-family: "STZhongsong", "SimSun", serif;
  font-size: 16px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.th-err-main { flex: 1; min-width: 0; text-align: left; }
.th-err-main strong { display: block; font-size: 14px; color: #2b3440; }
.th-err-main p { margin: 3px 0 0; font-size: 12px; color: #554c46; line-height: 1.5; overflow-wrap: anywhere; }
.th-retry-btn {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid #c0554a;
  background: #c0554a;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

/* P2 & P4: Strategy Lab Cards, Hot Money Seat Tags, Anomaly Pills */
.strat-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 1100px) {
  .strat-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .strat-cards-grid { grid-template-columns: minmax(0, 1fr); } .strat-lab-card { min-width: 0; }
}
.strat-btn-amber {
  background: #f4f0ea !important;
  color: #2b3440 !important;
  border: 1px solid #d5cbc0 !important;
  border-radius: var(--radius-ctrl) !important;
  box-shadow: none;
}
.strat-btn-amber:hover {
  background: #e9e2d8 !important;
  color: #2b3440 !important;
}
.strat-friendly-tag {
  font-size: 12px;
  font-weight: 600;
  color: #554c46;
  background: #f3efe9;
  border: 1px solid #dfd7cd;
  padding: 2px 7px;
  border-radius: var(--radius-ctrl);
}
.strat-brief-tag {
  font-size: 12px;
  font-weight: 500;
  color: #554c46;
  background: #f7f4ef;
  border: 1px solid #e3dcd3;
  padding: 2px 7px;
  border-radius: var(--radius-ctrl);
}
.strat-lab-card {
  background: #ffffff;
  border: 1px solid #dfd7cd;
  border-radius: var(--radius-card);
  padding: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.strat-lab-card:hover {
  transform: translateY(-2px);
  border-color: #8c7d70;
  box-shadow: 0 8px 20px rgba(43, 52, 64, 0.08);
}
.strat-rt-intraday {
  font-size: 12px;
  font-weight: 600;
  color: #7c423a;
  background: #f5ebe8;
  padding: 2px 7px;
  border-radius: var(--radius-ctrl);
}
.strat-rt-after {
  font-size: 12px;
  font-weight: 600;
  color: #465b73;
  background: #edf1f5;
  padding: 2px 7px;
  border-radius: var(--radius-ctrl);
}
.strat-rt-any {
  font-size: 12px;
  font-weight: 600;
  color: #2c6b52;
  background: #ebf4f0;
  padding: 2px 7px;
  border-radius: var(--radius-ctrl);
}
.strat-guide-banner {
  background: linear-gradient(135deg, #fff8ee 0%, #fffdf9 100%);
  border: 1px solid #ecd5b4;
  border-left: 4px solid #d48827;
  border-radius: 10px;
  padding: 12px 14px;
  color: #4a3b2c;
}
.seat-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}
.seat-hot_money {
  background: #fdeae8;
  color: #b8332a;
  border: 1px solid #f4c5c0;
}
.seat-institution {
  background: #f2ebfb;
  color: #6535a8;
  border: 1px solid #dac8f4;
}
.seat-northbound {
  background: #e8f1fc;
  color: #285999;
  border: 1px solid #c3daf7;
}
.seat-retail {
  background: #eaf5f0;
  color: #217856;
  border: 1px solid #bfe3d3;
}
.seat-quant {
  background: #fef4e6;
  color: #9e5c11;
  border: 1px solid #f5dab4;
}
.anom-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}
.anom-up {
  background: #fdeae8;
  color: #b8332a;
}
.anom-down {
  background: #e6f5ef;
  color: #187a57;
}

/* Mobile-First Responsive Cards & Navigation Overrides */
.nav-admin-mobile,
.mob-only-cards,
.mob-only-inline {
  display: none;
}

.mob-stock-card {
  background: #ffffff;
  border: 1px solid #dfd7cd;
  border-radius: var(--radius-card);
  padding: 12px 13px;
  box-shadow: 0 3px 10px rgba(43, 52, 64, 0.04);
}
.mob-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.mob-pill-theme {
  font-size: 12px;
  padding: 2px 7px;
  border-radius: var(--radius-ctrl);
  background: #f3efe9;
  color: #524943;
  border: 1px solid #dfd7cd;
  white-space: nowrap;
}
.mob-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.mob-metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  background: #faf5f1;
  border: 1px solid #eee2dc;
  border-radius: 8px;
  padding: 6px 8px;
  margin: 6px 0;
}
.mob-metrics-strip > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.mob-metrics-strip span {
  font-size: 12px;
  color: #554c46;
}
.mob-metrics-strip b {
  font-size: 12.5px;
  color: #2b3440;
}
.mob-ai-note {
  background: #faf7f2;
  border-left: 3px solid #8c7d70;
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.55;
  color: #3d322c;
  margin-bottom: 8px;
}
.mob-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px dashed #ede1db;
}
.mob-act-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #dfd0c8;
  background: #ffffff;
  color: #3b4854;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.mob-act-btn.add {
  color: #26785a;
  border-color: #b7dfd0;
  background: #f1fbf7;
}

/* 手机端专属底部 Tab 栏 + “更多”弹出抽屉（桌面端隐藏） */
#mobile-tabbar,
#mobile-more-sheet {
  display: none;
}

@media (max-width: 760px) {
  /* 1. 顶部全局导航栏精简为品牌栏 + 账号按钮，主入口收归底部 Tab 栏 */
  .nav-admin-mobile { display: inline-flex !important; align-items: center; }
  .nav-tabs-row { display: none !important; }
  .workspace > footer { display: none !important; }
  .workspace > nav > div {
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 12px !important;
  }
  .workspace > nav > div > .nav-main-group {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: auto !important;
    flex: 1 1 auto;
    min-width: 0;
  }
  .nav-brand-row {
    width: auto !important;
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }
  .workspace nav .nav-brand-row span:first-child {
    font-size: 19px !important;
  }
  .workspace main {
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)) !important;
  }
  #mobile-tabbar {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px));
    background: rgba(250, 248, 246, 0.97);
    border-top: 1px solid #dfd7cd;
    box-shadow: 0 -4px 16px rgba(43, 52, 64, 0.06);
    backdrop-filter: blur(10px);
  }
  .mob-tab-btn {
    border: 0;
    background: transparent !important;
    color: #5c6670;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 2px 0;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
  }
  .mob-tab-btn svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .mob-tab-btn.active {
    color: #c0554a;
    font-weight: 700;
  }
  #mobile-more-sheet {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 44;
    background: rgba(28, 25, 22, 0.35);
    align-items: flex-end;
    justify-content: center;
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }
  #mobile-more-sheet.is-open {
    display: flex !important;
  }
  .mob-more-card {
    width: 100%;
    background: #faf8f6;
    border-top: 1px solid #dfd7cd;
    border-radius: 12px 12px 0 0;
    padding: 14px 14px 16px;
    box-shadow: 0 -8px 24px rgba(43, 52, 64, 0.12);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .mob-more-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 12px 8px;
    border-radius: 8px;
    border: 1px solid #dfd7cd;
    background: #ffffff;
    color: #2b3440;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
  }
  .mob-more-item.active {
    border-color: #2b3440;
    background: #2b3440;
    color: #faf8f6;
  }
  .mob-more-item small {
    font-size: 12px;
    font-weight: 400;
    color: #554c46;
  }
  .mob-more-item.active small {
    color: #dcd6ce;
  }

  /* 2. 行情页顶部子导航栏紧凑排布 */
  .market-subnav-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 7px !important;
    padding: 8px 10px !important;
  }
  .market-subnav-spacer { display: none !important; }
  .market-subtabs {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px !important;
  }
  .market-subtabs .market-tab {
    padding: 6px 4px !important;
    font-size: 11.5px !important;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .market-search-row {
    width: 100%;
    display: flex;
    gap: 6px;
  }
  .market-search-row input {
    flex: 1;
    width: auto !important;
    min-width: 0;
    padding: 5px 10px !important;
    font-size: 13px !important;
  }
  #market-content {
    padding: 10px !important;
  }

  /* 3. 选股页 (P2 量化策略池) 手机端全宽上下布局，策略池置顶 100% 宽度 */
  #page-screener {
    flex-direction: column !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  #screener-content {
    order: 1;
    flex: none !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    padding: 10px !important;
  }
  #page-screener > aside {
    order: 2;
    width: 100% !important;
    min-width: 100% !important;
    flex: none !important;
    height: auto !important;
    max-height: none !important;
    border-right: 0 !important;
    border-top: 2px dashed #e2cfc7 !important;
    margin-top: 8px;
  }

  /* 4. 分析页与战法页：手机端改为上下全宽布局，告别左侧112px窄栏挤压 */
  #page-analysis, #page-strategies {
    flex-direction: column !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .workspace #page-analysis > aside,
  .workspace #page-strategies > aside {
    width: 100% !important;
    min-width: 100% !important;
    flex: none !important;
    height: auto !important;
    max-height: none !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--bright-line) !important;
  }
  #page-analysis > aside > div:first-child .flex {
    flex-direction: row !important;
  }
  #ana-code { flex: 1 !important; width: auto !important; }
  #ana-days { width: 72px !important; flex: none !important; }
  #page-analysis > aside > div:last-child {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 6px !important;
    padding: 8px 24px 8px 10px !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    -webkit-mask-image: linear-gradient(to right, #000 86%, transparent 100%);
    mask-image: linear-gradient(to right, #000 86%, transparent 100%);
  }
  #page-analysis > aside > div:last-child::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  #page-analysis > aside > div:last-child > div.text-xs {
    display: none !important;
  }
  #page-analysis > aside .ana-btn {
    width: auto !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    padding: 5px 11px !important;
    border: 1px solid #dfd7cd !important;
    border-radius: 6px !important;
    background: #fff !important;
    font-size: 12px !important;
  }
  #page-strategies #strategy-list {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 6px !important;
    padding: 8px 24px 8px 10px !important;
    max-height: 64px !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    -webkit-mask-image: linear-gradient(to right, #000 86%, transparent 100%);
    mask-image: linear-gradient(to right, #000 86%, transparent 100%);
  }
  #page-strategies #strategy-list::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  #page-strategies #strategy-list > button {
    width: auto !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    min-height: 34px !important;
    padding: 5px 11px !important;
    border: 1px solid #dfd7cd !important;
    border-radius: 6px !important;
  }
  #page-analysis > div, #page-strategies > div {
    flex: 1 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* 5. 手机端启用原生股票卡片视图，隐藏过宽的多列表格 */
  .mob-hide-table { display: none !important; }
  .mob-only-cards { display: block !important; }
  .mob-only-inline { display: inline-flex !important; align-items: center; }
  #screener-content:has(.mob-only-cards)::before { display: none !important; }
}
