:root{--canvas:#f4f0e7;--surface:#fbf9f4;--ink:#17231f;--muted:#66716c;--forest:#1f5b49;--copper:#a65a32;--blue:#426b76;--line:#d8d0c0;--shadow:0 24px 70px rgba(23,35,31,.12);--max:1180px;color-scheme:light}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--canvas);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Noto Sans TC","PingFang TC",sans-serif;line-height:1.65}
a{color:inherit;text-underline-offset:4px}button,select,input{font:inherit}.shell{width:min(var(--max),calc(100% - 48px));margin:auto}
.skip-link{position:fixed;left:16px;top:-60px;background:var(--ink);color:white;padding:10px 16px;z-index:20}.skip-link:focus{top:16px}
.site-header{height:72px;padding:0 max(24px,calc((100vw - var(--max))/2));display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:rgba(244,240,231,.94);position:sticky;top:0;z-index:10;backdrop-filter:blur(16px)}
.brand{font-size:15px;font-weight:900;letter-spacing:.02em;text-decoration:none}
.site-header nav{display:flex;align-items:center;gap:24px;font-size:13px;font-weight:700}.site-header nav a{text-decoration:none}.site-header .back{padding:8px 13px;border:1px solid var(--ink);border-radius:999px}
.eyebrow{margin:0 0 8px;color:var(--copper);font-size:12px;font-weight:900;letter-spacing:.08em}.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--ink);border-radius:9px;padding:12px 18px;background:var(--ink);color:white;text-decoration:none;font-weight:800;cursor:pointer;transition:.18s}.button:hover{background:var(--forest)}
.page-intro{padding:42px 0 34px}.page-intro .shell{display:flex;align-items:end;justify-content:space-between;gap:30px}.page-intro h1{margin:0;font-family:Georgia,"Noto Serif TC",serif;font-size:clamp(38px,5vw,60px);line-height:1.1}.page-intro p:last-child{margin:10px 0 0;color:var(--muted)}.sync-pill{display:flex;align-items:center;gap:10px;padding:10px 14px;border:1px solid #b7c9c0;border-radius:999px;background:#e7eee9;color:var(--forest);font-size:12px;font-weight:800;white-space:nowrap}.live-dot{width:9px;height:9px;border-radius:50%;background:#1a8f63;box-shadow:0 0 0 5px rgba(26,143,99,.12);flex:none}
.market{padding:34px 0 70px;background:var(--surface);border-block:1px solid var(--line)}.section-heading{display:flex;align-items:end;justify-content:space-between;gap:30px;margin-bottom:22px}.section-heading h2{margin:0;font-family:Georgia,"Noto Serif TC",serif;font-size:clamp(28px,3vw,40px);line-height:1.15}.section-heading>p{margin:0;max-width:440px;color:var(--muted)}
.tabs{display:flex;align-items:center;gap:4px;border-bottom:1px solid var(--line);overflow-x:auto}.tabs button,.tabs span{border:0;background:transparent;padding:13px 18px;white-space:nowrap;font-weight:800;color:var(--muted)}.tabs button{cursor:pointer}.tabs button.active{color:white;background:var(--forest);border-radius:9px 9px 0 0}.tabs span{margin-left:auto;font-size:13px}
.filters{display:grid;grid-template-columns:170px 210px 1fr auto;gap:16px;align-items:end;padding:24px 0}.filters>label>span,.filters legend{display:block;margin-bottom:7px;color:var(--muted);font-size:12px;font-weight:800;letter-spacing:.04em}.filters select{width:100%;height:44px;padding:0 12px;border:1px solid var(--line);border-radius:8px;background:white;color:var(--ink)}.filters select:disabled{opacity:.45}.filters fieldset{border:0;padding:0;margin:0}.cc-options{display:flex;gap:8px;flex-wrap:wrap}.cc-options label{display:flex;align-items:center;gap:5px;padding:8px 10px;border:1px solid var(--line);border-radius:999px;background:white;font-size:12px;cursor:pointer}.cc-options label:has(input:checked){border-color:var(--forest);background:#e7eee9;color:var(--forest);font-weight:800}.filter-button{height:44px;box-shadow:none}.filter-button:hover{box-shadow:4px 4px 0 var(--copper)}
.current-view{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:16px 18px;background:var(--ink);color:white;border-radius:12px}.current-view div{display:flex;align-items:baseline;gap:14px}.current-view span{color:#aeb9b4;font:700 11px ui-monospace,monospace;letter-spacing:.1em}.current-view button{border:0;background:transparent;color:white;text-decoration:underline;cursor:pointer}.chips{min-height:28px;display:flex;gap:7px;flex-wrap:wrap;margin:12px 0 20px}.chip{border:1px solid var(--line);border-radius:999px;background:var(--canvas);padding:5px 10px;color:var(--muted);font-size:12px}
.card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.card{display:flex;flex-direction:column;min-width:0;background:white;border:1px solid var(--line);border-radius:16px;overflow:hidden;box-shadow:0 9px 26px rgba(23,35,31,.07)}.card-visual{height:190px;padding:18px;display:flex;flex-direction:column;justify-content:space-between;color:white}.card-visual.green{background:linear-gradient(135deg,#173f34,#397b65)}.card-visual.copper{background:linear-gradient(135deg,#754027,#bb7049)}.card-visual.blue{background:linear-gradient(135deg,#284c56,#5d8791)}.card-visual strong{font-family:Georgia,serif;font-size:24px}.card-visual span{font:700 11px ui-monospace,monospace;letter-spacing:.08em;opacity:.8}.card-body{display:flex;flex-direction:column;gap:14px;padding:20px;height:100%}.source{display:flex;gap:8px;align-items:center;color:var(--muted);font-size:12px}.source i{width:7px;height:7px;border-radius:50%;background:var(--forest)}.source span{margin-left:auto}.card h3{margin:0;font-size:23px;line-height:1.25}.gates{display:grid;grid-template-columns:1fr 1fr;gap:9px}.gate{padding:11px;background:var(--canvas);border-radius:8px}.gate span,dt{display:block;color:var(--muted);font-size:11px}.gate strong{font-size:13px}.facts{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0}.facts div{min-width:0}.facts dd{margin:2px 0 0;font-weight:800;font-size:14px}.condition{margin:auto 0 0;padding-top:13px;border-top:1px solid var(--line);font-size:13px}.card-note{font-size:10px;color:var(--copper);font-weight:800;letter-spacing:.04em}.empty{text-align:center;padding:60px 20px;border:1px dashed var(--line);border-radius:16px}.empty h3{margin:0}.empty p{color:var(--muted)}
.source-summary{padding:30px 0;background:var(--canvas);border-bottom:1px solid var(--line)}.source-summary .shell{display:grid;grid-template-columns:1fr 1.3fr auto;align-items:center;gap:28px}.source-summary h2{margin:0 0 2px;font-size:20px}.source-summary p{margin:0;color:var(--muted);font-size:13px}.source-summary a{font-size:13px;font-weight:900;white-space:nowrap}.notice{padding:16px 0;background:#fff5dc;border-bottom:1px solid #dbc89c}.notice .shell{display:flex;gap:10px;align-items:center;font-size:13px}.notice span{color:#5c5546}
footer{background:var(--ink);color:white}.footer-inner{display:flex;justify-content:space-between;gap:30px;padding:46px 0}.footer-inner strong{font-family:Georgia,serif;font-size:22px}.footer-inner p{margin:5px 0 0;color:#aeb9b4}.footer-inner nav{display:flex;gap:18px;align-items:center;flex-wrap:wrap;font-size:12px}
@media(max-width:900px){.site-header nav a:not(.back){display:none}.filters{grid-template-columns:1fr 1fr}.card-grid{grid-template-columns:repeat(2,1fr)}.section-heading{align-items:start;flex-direction:column}.source-summary .shell{grid-template-columns:1fr}.footer-inner{flex-direction:column}}
@media(max-width:620px){.shell{width:min(var(--max),calc(100% - 32px))}.site-header{height:62px;padding:0 16px}.brand{font-size:13px}.site-header .back{font-size:11px}.page-intro{padding:28px 0 24px}.page-intro .shell{align-items:flex-start;flex-direction:column;gap:18px}.page-intro h1{font-size:40px}.market{padding:28px 0 54px}.tabs span{display:none}.filters{grid-template-columns:1fr}.filter-button{width:100%}.current-view{align-items:flex-start}.current-view div{display:block}.current-view strong{display:block;margin-top:4px;font-size:13px}.card-grid{grid-template-columns:1fr}.card-visual{height:160px}.notice .shell{align-items:flex-start;flex-direction:column;gap:2px}.footer-inner{padding:34px 0}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important}}

/* Live-data marketplace */
.filters{grid-template-columns:minmax(240px,1.4fr) 190px 170px auto auto}.filters>label>span{display:block;margin-bottom:7px;color:var(--muted);font-size:12px;font-weight:800}.filters input[type=search]{width:100%;height:44px;padding:0 12px;border:1px solid var(--line);border-radius:8px;background:white;color:var(--ink)}.filters .check{height:44px;display:flex;align-items:center;gap:7px;white-space:nowrap;font-size:12px;font-weight:800}
.photo-carousel,.no-photo{position:relative;height:220px;background:#e9e4d9;overflow:hidden}.photo-carousel img{width:100%;height:100%;object-fit:cover;display:block}.photo-carousel img[hidden]{display:none}.no-photo{display:grid;place-items:center;padding:20px;text-align:center;color:var(--muted);font-weight:800;background:linear-gradient(135deg,#e7e1d5,#f5f1e9)}.photo-prev,.photo-next{position:absolute;top:50%;transform:translateY(-50%);width:38px;height:38px;border:0;border-radius:50%;background:rgba(23,35,31,.78);color:white;font-size:28px;line-height:1;cursor:pointer}.photo-prev{left:10px}.photo-next{right:10px}.photo-count,.official-photo{position:absolute;bottom:10px;padding:4px 8px;border-radius:999px;background:rgba(23,35,31,.78);color:white;font-size:10px;font-weight:800}.photo-count{right:10px}.official-photo{left:10px}
.official-title{margin:-7px 0 0;color:var(--muted);font-size:12px}.source .status{margin-left:auto;padding:3px 7px;border-radius:999px}.source .active-status{color:#0e6b49;background:#ddf2e8}.source .ended{color:#785b35;background:#f2e9dc}.facts dd{overflow-wrap:anywhere}.card-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:auto;padding-top:14px;border-top:1px solid var(--line)}.official-link{font-weight:900;color:var(--forest);font-size:13px}.card-actions span{color:var(--muted);font-size:10px;white-space:nowrap}
.loading,.error{margin-top:10px;text-align:center;padding:60px 20px;border:1px dashed var(--line);border-radius:16px}.loading span{display:inline-block;width:14px;height:14px;margin-right:8px;border:2px solid var(--line);border-top-color:var(--forest);border-radius:50%;animation:spin .8s linear infinite}.error{background:#fff4ea;border-color:#d9a987}.error h3{margin:0}.error p{color:var(--muted)}@keyframes spin{to{transform:rotate(360deg)}}
@media(max-width:900px){.filters{grid-template-columns:1fr 1fr}.search-field{grid-column:1/-1}}
@media(max-width:620px){.filters{grid-template-columns:1fr}.search-field{grid-column:auto}.photo-carousel,.no-photo{height:210px}}

/* Marketplace interaction improvements */
.card{position:relative}.no-photo-note{margin:18px 56px -4px 20px;color:var(--muted);font-size:12px;font-weight:800}.card-without-photo{border-top:5px solid var(--forest)}
.photo-failed{height:100%;display:grid;place-items:center;color:var(--muted);font-weight:800}.photo-failed[hidden]{display:none}.image-error .official-photo,.image-error .photo-count,.image-error button{display:none}
.favorite-button{position:absolute;z-index:4;right:12px;top:12px;width:40px;height:40px;border:1px solid rgba(23,35,31,.16);border-radius:50%;background:rgba(255,255,255,.92);color:#7c8581;font-size:20px;cursor:pointer;box-shadow:0 4px 16px rgba(23,35,31,.1)}.favorite-button.selected{color:#b13d3d;background:#fff1f1}
.card-actions{justify-content:flex-start;flex-wrap:wrap}.detail-link{font-weight:900;color:var(--forest);font-size:13px}.compare-button{border:1px solid var(--line);border-radius:7px;background:white;padding:6px 9px;color:var(--ink);font-size:11px;font-weight:800;cursor:pointer}.compare-button.selected{border-color:var(--forest);background:#e7eee9;color:var(--forest)}.card-actions span{margin-left:auto}
.alert-bar{border-block:1px solid #d9bb7f;background:#fff5dc;color:#5c4824}.alert-bar .shell{padding-block:12px;font-size:13px;font-weight:800}
.compare-tray{position:fixed;z-index:12;left:50%;bottom:18px;transform:translateX(-50%);display:flex;align-items:center;gap:14px;padding:10px 14px;border-radius:999px;background:var(--ink);color:white;box-shadow:var(--shadow)}.compare-tray[hidden]{display:none}.compare-tray button{border:1px solid rgba(255,255,255,.4);border-radius:999px;background:white;color:var(--ink);padding:7px 12px;font-weight:800;cursor:pointer}.compare-tray button:last-child{background:transparent;color:white}.compare-tray button:disabled{opacity:.45;cursor:not-allowed}
dialog{width:min(920px,calc(100% - 30px));max-height:85vh;border:1px solid var(--line);border-radius:16px;padding:0;background:var(--surface);color:var(--ink);box-shadow:var(--shadow)}dialog::backdrop{background:rgba(23,35,31,.58)}.dialog-head{position:sticky;top:0;display:flex;justify-content:space-between;align-items:center;padding:16px 20px;background:var(--surface);border-bottom:1px solid var(--line)}.dialog-head h2{margin:0}.dialog-head button{border:0;background:transparent;font-size:28px;cursor:pointer}.compare-table-wrap{overflow:auto;padding:20px}.compare-table{width:100%;border-collapse:collapse}.compare-table th,.compare-table td{min-width:180px;padding:12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}.compare-table th{min-width:110px;color:var(--muted);font-size:12px}
@media(max-width:620px){.no-photo-note{margin-top:14px}.compare-tray{width:calc(100% - 24px);justify-content:center}.card-actions span{width:100%;margin-left:0}}

/* Public case detail */
.detail-main{min-height:70vh;padding:34px 0 72px}.detail-back{display:inline-block;margin-bottom:26px;color:var(--muted);font-weight:800}.detail-hero{display:flex;justify-content:space-between;align-items:flex-start;gap:28px;padding-bottom:26px;border-bottom:1px solid var(--line)}.detail-hero h1{margin:0;font-family:Georgia,"Noto Serif TC",serif;font-size:clamp(36px,5vw,62px);line-height:1.08}.detail-hero p:last-child{max-width:760px;color:var(--muted)}.detail-favorite{border:1px solid var(--line);border-radius:999px;background:white;padding:10px 16px;color:var(--ink);font-weight:900;white-space:nowrap;cursor:pointer}.detail-favorite.selected{border-color:#b13d3d;background:#fff1f1;color:#b13d3d}.detail-gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:28px 0}.detail-gallery a:first-child{grid-column:span 2;grid-row:span 2}.detail-gallery img{width:100%;height:220px;display:block;object-fit:cover;border-radius:12px;border:1px solid var(--line)}.detail-gallery a:first-child img{height:452px}.detail-no-photo{margin:28px 0;padding:14px 16px;border-left:4px solid var(--forest);background:#e7eee9;color:var(--muted);font-weight:800}.detail-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:18px;margin-top:28px}.detail-section{padding:22px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}.detail-section h2{margin:0 0 16px;font-family:Georgia,"Noto Serif TC",serif;font-size:24px}.detail-facts{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;margin:0}.detail-facts dd{margin:3px 0 0;font-weight:800;overflow-wrap:anywhere}.detail-section ul{margin-bottom:0}.official-callout{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:20px;padding:22px;border-radius:14px;background:var(--ink);color:white}.official-callout p{margin:4px 0 0;color:#aeb9b4}
@media(max-width:720px){.detail-hero{flex-direction:column}.detail-gallery{grid-template-columns:1fr 1fr}.detail-gallery a:first-child{grid-column:span 2}.detail-gallery img,.detail-gallery a:first-child img{height:220px}.detail-grid{grid-template-columns:1fr}.detail-facts{grid-template-columns:1fr 1fr}.official-callout{align-items:flex-start;flex-direction:column}}
