/* Reference-led mobile composition. Shared by working app and live spec. */
.market-feature{background:var(--brand-indigo)!important;color:white}.market-feature small{color:#e1e6fa}.market-feature .tool-symbol{background:#ffffff16;color:var(--accent)}
.market-intro{display:flex;gap:8px;justify-content:space-between;font-size:11px;color:var(--muted);padding-bottom:8px;border-bottom:1px solid var(--line)}
.market .field[hidden]{display:none}
.market .field select{appearance:none;height:50px;background:#fff;padding-right:22px;background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);background-position:calc(100% - 15px) 23px,calc(100% - 10px) 23px;background-size:5px 5px;background-repeat:no-repeat}
.market-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 12px}.market .field{margin:12px 0;font-size:12px}.market .field input,.market .field select{min-width:0;max-width:100%;padding:10px;font-size:16px}.market .field input[type=date]{appearance:none;min-height:50px;text-align:left}
.market-filters,.market-analysis,.market-source{border:1px solid var(--line);border-radius:16px;padding:12px 14px;margin:14px 0;background:#fff}.market summary{min-height:28px;font-size:13px;font-weight:650;cursor:pointer}.market-filters summary span{display:block;font-size:11px;font-weight:400;color:var(--muted);margin-top:5px}
.market-check{display:flex;align-items:center;gap:9px;min-height:48px;font-size:12px}.market-check input{width:19px;height:19px;accent-color:var(--brand-indigo);flex:none}.market-actions{display:flex;gap:10px}.market-actions .primary{flex:1;background:var(--accent);color:var(--ink)}
.market-help,.market-source p{font-size:11px;line-height:1.8;color:var(--muted);overflow-wrap:anywhere;margin:12px 0}.market-source a{font-size:12px;color:var(--brand-indigo)}.market-results{margin-top:30px;scroll-margin-top:15px}.market-results h2{font-size:19px}.market-stat{border-radius:20px;padding:20px;background:var(--brand-indigo);color:white;margin:12px 0}.market-stat>span{font-size:12px;color:#d7dff8}.market-stat>strong{display:block;font-size:32px;letter-spacing:-.03em;margin:8px 0;color:var(--accent)}.market-stat small{font-size:12px;font-weight:400}.market-stat p{font-size:10px;color:#d7dff8}.market-analysis h3{font-size:13px;margin-top:18px}.market-stat-row{display:flex;justify-content:space-between;gap:8px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line);font-size:12px}.market-stat-row small{display:block;color:var(--muted);font-size:10px}.market-stat-row strong{font-size:12px}
.market-list{display:grid;gap:12px}.market-card{display:block;width:100%;text-align:left;background:white;border:1px solid var(--line);border-radius:20px;padding:18px;overflow-wrap:anywhere}.market-card-top{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:var(--muted);gap:8px}.market-card-top svg{width:16px;height:16px;flex:none}.market-address{display:block;font-size:16px;line-height:1.6;margin:10px 0 14px}.market-card-price{display:flex;align-items:baseline;gap:5px;font-size:23px;font-weight:750;color:var(--brand-indigo);flex-wrap:wrap}.market-card-price small{font-size:11px;font-weight:400}.market-card-price>span{font-size:12px;font-weight:600;margin-left:auto}.market-card-meta{display:block;font-size:11px;line-height:1.7;color:var(--muted);margin-top:10px}.market-card .badge{margin-top:12px}.market-pagination{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:20px 0}.market-pagination>span{font-size:11px}.market-pagination button{font-size:12px;padding:10px 14px}.market button:disabled{opacity:.4}.market-detail-head{background:var(--brand-indigo);color:white;border-radius:24px;padding:24px}.market-detail-head h2{font-size:22px;line-height:1.6;margin:16px 0;overflow-wrap:anywhere}.market-detail-head>strong{font-size:36px;color:var(--accent)}.market-detail-head small{font-size:14px}.market-detail{margin:18px 0;background:white;border-radius:18px;padding:6px 16px}.market-detail>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);gap:14px;border-bottom:1px solid var(--line);padding:13px 0;font-size:12px}.market-detail>div:last-child{border:0}.market-detail dt{color:var(--muted)}.market-detail dd{margin:0;overflow-wrap:anywhere;text-align:right}.market-note{background:#fff4cc;padding:18px;border-radius:18px}.market-note h3{font-size:13px}.market-note p{font-size:12px;line-height:1.8;margin-top:7px;overflow-wrap:anywhere}
.app.home-theme,.live-home-preview{background:var(--brand-indigo) url('./assets/explore-background-v05.png') center top/100% 740px no-repeat;color:white}
.app .topbar{min-height:56px;padding:calc(4px + env(safe-area-inset-top,0px)) 20px 4px}
.app .brand{font-size:14px;letter-spacing:.04em}
.app .avatar{width:40px;height:48px;border:0;background:#e7edf6;color:var(--brand-indigo);font-size:14px}
.home-theme .topbar{background:none;color:white}
.home-theme .avatar{background:#ffffff18;color:white;border:1px solid #ffffff38;border-radius:50%}
.home-theme .brand-dot{background:var(--accent)}
.explore-head{padding:4px 24px 8px;text-align:center}
.explore-label{font-size:10px;letter-spacing:.2em;font-weight:650;opacity:.8}
.explore-head h1{font-size:38px;line-height:1.12;letter-spacing:-.04em;margin:4px 0 0;font-weight:750;color:white}
.explore-search{display:flex;align-items:center;gap:10px;margin:6px 40px 0;padding:0 4px 0 14px;background:#ffffff14;border:1px solid #ffffff40;border-radius:24px;color:white}
.explore-search>svg{width:18px;flex:none}
.explore-search input{width:100%;min-width:0;background:none;border:0;color:white;font-size:16px;min-height:44px;outline:none}
.explore-search input::placeholder{color:#e0eafb;font-size:13px}
.explore-search:focus-within{outline:2px solid var(--accent);outline-offset:3px}
.explore-search button{display:grid;place-items:center;min-width:44px;min-height:44px;color:white}
.app input[type="search"]::-webkit-search-cancel-button{display:none}
.source-explorer{position:relative;isolation:isolate}
.source-deck{position:relative;--card-width:min(60vw,260px);display:flex;gap:18px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scrollbar-width:none;padding:82px calc((100% - var(--card-width))/2) 32px;align-items:flex-end}
.source-deck::-webkit-scrollbar{display:none}
.explore-card{text-align:left;cursor:pointer;position:relative;flex:0 0 var(--card-width);height:198px;padding:68px 20px 26px;background:var(--surface);color:var(--ink);border-radius:28px;scroll-snap-align:center;box-shadow:0 14px 28px #14124426;isolation:isolate;opacity:.52;transform:scale(.9);transform-origin:center 70%;transition:opacity .18s ease,transform .18s ease}
.explore-card.is-current{opacity:1;transform:none}
.explore-art{position:absolute;top:-78px;left:50%;transform:translateX(-50%);width:164px;height:164px;object-fit:contain;z-index:2;filter:drop-shadow(0 10px 8px #15285d22);pointer-events:none}
.explore-card[data-source="安平"] .explore-art{filter:hue-rotate(25deg) drop-shadow(0 10px 8px #15285d22)}
.explore-card[data-source="永華"] .explore-art{filter:hue-rotate(-22deg) drop-shadow(0 10px 8px #15285d22)}
.explore-number{position:absolute;right:15px;top:59px;font-size:90px;line-height:1;font-weight:800;color:#e9e9ed;letter-spacing:-.08em;z-index:-1}
.explore-tag{font-size:10px;letter-spacing:.04em;color:var(--muted)}
.explore-copy h2{font-size:27px;line-height:1.2;margin:2px 0 7px;font-weight:750;letter-spacing:-.03em}
.explore-copy p{font-size:12px;line-height:1.55;color:var(--muted);margin:0}
.explore-open{position:absolute;bottom:-25px;left:50%;transform:translateX(-50%);width:54px;height:54px;display:grid;place-items:center;border:4px solid var(--surface);border-radius:50%;background:var(--accent);color:var(--ink);box-shadow:0 6px 15px #10154424}
.explore-open svg{width:23px;height:23px}
.explore-open:active{background:#f7c916}
.deck-tabs{display:flex;justify-content:center;gap:8px;margin:0 auto 14px}
.deck-tabs button{min-width:60px;min-height:44px;color:#cfdbf8;font-size:12px;border-radius:24px}
.deck-tabs button[aria-pressed="true"]{color:white;background:#ffffff16;font-weight:700}
.deck-tabs button[aria-pressed="true"]::after{content:"";display:block;width:14px;height:2px;background:var(--accent);margin:3px auto 0}
.workspace-body{padding:0 20px}
.workspace-body .section-head{margin-bottom:8px;min-height:40px}
.workspace-body .section-head h2{font-size:16px}
.app .text-button{min-height:48px;font-size:12px;gap:2px;padding:0}
.text-button svg{width:16px}
.explore-lower{padding-top:6px}
.explore-lower .section-head{color:white}
.explore-lower .text-button{color:#d7e3fa}
.recent-section{margin:0 0 16px}
.workspace-body .file-row{padding:8px 4px 8px 12px}
.workspace-body .file-name{font-size:14px}
.workspace-body .file-sub{font-size:11px}
.workspace-body .file-symbol{width:38px;height:40px;border-radius:12px;flex-shrink:0}
.workspace-body .file-open{gap:10px}
.workspace-body .list{background:var(--surface);color:var(--ink);border:0;border-radius:22px}
.workspace-body .home-tools{gap:10px;margin:0}
.workspace-body .quick-tool{flex-direction:row;align-items:center;gap:8px;background:#ffffff12;border:1px solid #ffffff25;color:white;min-height:76px;padding:12px 10px;border-radius:18px}
.quick-symbol{display:grid;place-items:center;width:28px;flex:none}
.workspace-body .quick-tool svg{width:22px;color:var(--accent)}
.workspace-body .quick-tool>svg{width:12px;margin-left:auto;flex-shrink:0}
.quick-tool strong{font-size:13px;display:block;white-space:nowrap}
.quick-tool small{font-size:10px;color:#dae3fb;display:block;margin-top:3px}
.workspace-body .prototype-note{color:#d5def3;font-size:10px;margin:18px 0 0;padding:0;text-align:center}
.app .page-head{padding:12px 24px 20px}
.app .page-head h1{font-size:28px;line-height:1.3;letter-spacing:-.03em}
.app .page-head .eyebrow{font-size:10px;letter-spacing:.14em;margin-bottom:6px}
.app .page-head p{margin-top:8px;font-size:13px}
.app .search,.app .segmented{margin-left:24px;margin-right:24px}
.app .inset{margin-left:24px;margin-right:24px}
.app .segmented button{min-height:48px}
.app .bottom-nav{padding:6px 12px calc(6px + var(--safe-bottom));box-shadow:0 -4px 20px #183b5606}
.app .bottom-nav button{min-height:54px;font-size:11px;border-radius:14px;gap:3px}
.app .bottom-nav svg{width:23px;height:23px}
.home-theme .bottom-nav{background:#282169;border-top:1px solid #ffffff18;box-shadow:none}
.home-theme .bottom-nav button{color:#c6d0f0}
.home-theme .bottom-nav button.active{background:#ffffff12;color:var(--accent)}
.app .screen{padding-bottom:calc(90px + var(--safe-bottom))}
.app .settings-card{margin-left:24px;margin-right:24px}
.source-detail{position:relative;min-height:288px;overflow:hidden;padding:196px 24px 20px;isolation:isolate}
.source-detail img{position:absolute;right:-22px;top:-24px;width:256px;height:256px;object-fit:contain;z-index:-1;filter:drop-shadow(0 14px 12px #183b561b)}
.detail-number{position:absolute;top:42px;left:22px;font-size:122px;line-height:1;font-weight:800;color:#e8e9f0;letter-spacing:-.08em;z-index:-2}
.detail-copy h1{font-size:32px;line-height:1.2;margin:6px 0;color:var(--ink);letter-spacing:-.04em}
.detail-copy p{font-size:13px;color:var(--muted);margin-top:10px}
.detail-copy .explore-label{color:var(--brand-indigo)}
.live-home-preview{margin-top:20px;padding-top:20px;border-radius:24px;overflow:hidden;padding-bottom:20px}
.live-home-preview .source-deck{position:relative;--card-width:64%;padding-left:18%;padding-right:18%}
.live-home-preview .explore-head h1{font-size:29px}
.live-home-preview .explore-search{margin-left:20px;margin-right:20px}
.live-home-preview .home-tools{grid-template-columns:1fr}
@media(max-width:350px){.explore-head h1{font-size:37px}.explore-search{margin-left:26px;margin-right:26px}.explore-card{padding-left:16px;padding-right:16px}.explore-art{width:154px;height:154px;top:-70px}.explore-copy h2{font-size:25px}.source-detail img{width:246px;height:246px}.detail-copy h1{font-size:29px}}
@media(max-height:620px){.explore-head{padding-top:0}.explore-head h1{font-size:29px}.explore-label{font-size:9px}.source-deck{padding-top:68px}.explore-card{height:174px;padding-top:62px}.explore-art{width:154px;height:154px;top:-75px}.explore-copy p{font-size:11px}.explore-copy h2{font-size:25px}.deck-tabs{margin-bottom:4px}}
@media(prefers-reduced-motion:reduce){.explore-card{transition:none}}
/* Live document integration: mobile-only controls share the established tokens. */
.breadcrumbs{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:16px;overflow-wrap:anywhere}
.pagination{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:24px 0}
.live-error{margin:20px;padding:18px;border:1px solid #a34b42;border-radius:20px;background:#fff2ef;color:#752c24;overflow-wrap:anywhere}
.live-loading{padding:12px 20px;background:#fff6c9;color:#29304d;text-align:center}
.tool-tile{text-decoration:none;color:inherit}
.file-name,.page-head h1{overflow-wrap:anywhere}
.field input{max-width:100%;min-width:0}
.avatar{white-space:nowrap;font-size:14px}
/* Official headlines: typography-led, without remote images or extra trackers. */
.news-teaser{margin-top:26px}.news-intro{font-size:12px;color:#d7e3fa;margin:-2px 0 12px}
.news-list{display:grid;gap:12px}.news-card{display:block;background:var(--surface);color:var(--ink);text-decoration:none;border:1px solid #e1e4ed;border-radius:20px;padding:18px;overflow-wrap:anywhere}
.news-card:focus-visible{outline:3px solid var(--brand-indigo);outline-offset:3px}
.news-meta{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:11px;color:var(--muted);line-height:1.6}
.news-card h3{font-size:16px;line-height:1.6;margin:10px 0 14px;letter-spacing:0}
.news-card-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--brand-indigo);font-size:11px}
.news-card-foot>span:last-child{display:flex;align-items:center;gap:4px;flex-shrink:0}.news-card svg{width:15px;height:15px}
.news-teaser .news-card{padding:14px 16px}.news-teaser .news-card h3{font-size:14px;margin:8px 0 10px}
.news-editorial{border-radius:20px;padding:18px;background:var(--brand-indigo);color:white;margin-bottom:18px}.news-editorial p{font-size:12px;line-height:1.8;margin:12px 0 0;color:#e4e8ff}
.news-filters{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.news-filters button{padding:10px 12px;font-size:12px;min-height:44px}.news-filters button.selected{background:var(--brand-indigo);color:white}
.app .news-page .search{margin:0}.news-page .search input{min-width:0;width:100%;font-size:14px}
.news-result-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0}
.news-warning{padding:14px;border-radius:14px;background:#fff3c4;color:#624908;font-size:12px;line-height:1.7;margin:12px 0}
.news-sources{margin:24px 0 0;border-top:1px solid #dce0ec;padding:12px 0;font-size:12px;line-height:1.8;color:var(--muted);overflow-wrap:anywhere}.news-sources summary{min-height:44px;align-content:center;font-weight:700;color:var(--ink);cursor:pointer}.news-sources a{color:var(--brand-indigo)}.news-source{padding:12px 0;border-top:1px solid #e1e4ed}.news-source p{margin:6px 0}.news-source svg{height:14px;width:14px;vertical-align:middle}
/* Embla owns horizontal movement. Slides loop during dragging, without a clone reset. */
.source-deck.is-loop{display:block;overflow:hidden;scroll-snap-type:none;padding-inline:0;touch-action:pan-y pinch-zoom}
.deck-track{display:flex;gap:0;align-items:flex-end;touch-action:pan-y pinch-zoom}
.deck-slide{margin-right:18px;flex:0 0 var(--card-width);min-width:0;position:relative}.deck-slide>.explore-card{display:block;width:100%;min-width:0}
.explore-art{user-select:none;-webkit-user-drag:none}

/* Only the five live carousel surfaces receive compositor hints. Their visual
   state follows the same frame as the track; CSS must not chase that state. */
.source-deck.is-loop .explore-card{transition:none;will-change:transform,opacity}
@media(prefers-reduced-motion:reduce){.source-deck.is-loop .explore-card{will-change:auto}}
