:root{--canvas:#fdf9f5;--ink:#1c1c19;--muted:#5a4138;--primary:#f25c19;--soft:#f7f3ef;--line:#efe7e1}
body.stitch-app{background:var(--canvas);color:var(--ink);font-family:Inter,"Microsoft YaHei",system-ui,sans-serif}
.stitch-app button,.stitch-app input,.stitch-app select,.stitch-app a{font-family:inherit}
.stitch-app .catalog{max-width:720px;padding:12px 16px calc(90px + env(safe-area-inset-bottom));color:var(--ink)}
.stitch-header{background:var(--canvas);border:0}
.app-bar{max-width:720px;margin:auto;padding:10px 16px;min-height:56px;display:flex;gap:10px;align-items:center}
.app-bar h1{font-size:22px;line-height:1.3;letter-spacing:0;margin:0 auto 0 0}
.ui-icon{width:20px;height:20px;flex-shrink:0;display:inline-block;vertical-align:middle}
.app-bar .back,.app-bar .profile-link{border:0;background:none;padding:6px;color:var(--ink)}
.app-bar .profile-link{display:grid;place-items:center;border-radius:50%;width:34px;height:34px;background:var(--primary);color:white}
.app-bar .operations,.more-filters,.sort-menu{position:relative}
.operations summary,.sort-menu summary,.more-filters summary{cursor:pointer;color:var(--primary);list-style:none;font-size:13px;font-weight:650}
.operations summary::-webkit-details-marker,.sort-menu summary::-webkit-details-marker,.more-filters summary::-webkit-details-marker{display:none}
.operations div,.sort-menu div,.more-filters form{position:absolute;z-index:4;right:0;top:calc(100% + 5px);display:grid;gap:8px;min-width:110px;padding:12px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 6px 20px #5a413814}
.operations a,.sort-menu a{background:#fff;color:var(--ink);padding:6px;border:0;white-space:nowrap;font-size:13px}
.stitch-app .bottom-tabs{width:min(100%,720px);border:0;border-top:1px solid var(--line);border-radius:0;background:var(--canvas);box-shadow:0 -2px 9px #5a413804}
.stitch-app .bottom-tabs a{background:transparent;color:var(--muted);gap:3px;font-size:11px}
.stitch-app .bottom-tabs a[aria-current]{color:var(--primary)}
.search-band{display:flex;align-items:center;gap:3px;background:var(--soft);border-radius:13px;padding:0 10px}
.search-band button{border:0;background:none;color:#8e7066;padding:8px}
.catalog .search-band input{min-width:0;min-height:42px;border:0;background:none;color:var(--ink);padding-left:0}
.quick-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0 20px}
.quick-actions a,.offer-card,.stitch-card{background:#fff;border:0;border-radius:14px;box-shadow:0 4px 15px #5a413808}
.quick-actions a{display:flex;align-items:center;gap:8px;padding:14px 12px;color:var(--ink);font-size:15px}
.quick-actions .ui-icon:first-child{width:32px;height:32px;padding:7px;border-radius:8px;color:var(--primary);background:#fff1e8}
.quick-actions .ui-icon:last-child{width:14px;color:#8e7066;margin-left:auto}
.catalog-head,.result-tools,.offer-top,.offer-fee,.offer-head,.offer-dock,.storefront #compare{display:flex;align-items:center;justify-content:space-between;gap:8px}
.catalog-head h2{font-size:21px}.more-filters form{width:200px}
.more-filters .ui-icon{width:16px;margin-right:3px}
.category-chips{display:flex;gap:8px;overflow-x:auto;margin:14px 0 20px;padding:2px 0 4px;scrollbar-width:thin}
.category-chips a{white-space:nowrap;background:#fff;border:0;color:var(--muted);border-radius:30px;padding:6px 12px;font-size:13px;line-height:1.5}
.category-chips a[aria-current]{background:var(--primary);color:#fff}
.result-tools{font-size:13px;color:var(--muted);margin-bottom:10px}.sort-menu summary{color:var(--ink)}
.offer-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.offer-grid.single{grid-template-columns:minmax(0,1fr)}
.offer-card{display:flex;flex-direction:column;min-width:0;padding:12px;overflow-wrap:anywhere}
.product-logo{width:60px;height:32px;display:inline-grid;place-items:center;flex-shrink:0;background:white;border:1px solid var(--line);border-radius:5px;color:var(--primary);font-weight:700;font-size:16px;overflow:hidden;padding:2px}
.product-logo img{display:block;width:100%;height:100%;min-height:0;object-fit:contain}
.offer-card h3{margin:10px 0;font-size:17px;line-height:1.4}.offer-card h3 a{padding:0;border:0;color:var(--ink)}
.sample-tag{vertical-align:middle;margin-left:5px;border-radius:4px;background:#fff1e8;color:var(--primary);font-size:11px;padding:2px 5px;font-weight:650;white-space:nowrap}
.bookmark{background:none;border:0;color:#8e7066;display:grid;place-items:center;padding:8px}
.bookmark[aria-pressed=true]{color:var(--primary)}.bookmark[aria-pressed=true] svg{fill:#ffdbcf}
.catalog label.choice{display:flex;align-items:center;color:var(--primary);font-size:12px;gap:3px}
.offer-details{margin:0 0 10px;display:grid;gap:6px;font-size:13px}
.offer-details div{display:grid;grid-template-columns:auto 1fr;gap:5px}
.offer-details dt{color:var(--muted)}.offer-details dd{margin:0;font-weight:600;text-align:right}
.offer-fee{background:#fff5ef;padding:6px;border-radius:8px;color:var(--muted);font-size:11px;line-height:1.2;margin-top:auto}
.offer-fee strong{font-size:17px;color:var(--primary);font-variant-numeric:tabular-nums}
.offer-cta,.compact-action,.offer-dock button{border:0;background:var(--primary);color:#fff;display:flex;justify-content:center;align-items:center;gap:4px}
.offer-cta:hover,.compact-action:hover,.offer-dock button:hover{background:#ce4600;color:#fff}
.offer-cta{margin-top:12px;min-height:38px;padding:8px;font-size:14px;border-radius:11px}.offer-cta .ui-icon{width:16px;height:16px}
.storefront #compare{margin-bottom:12px;color:var(--muted);font-size:13px;background:white;border-radius:10px;padding:8px 12px}.compact-action{padding:7px 12px}
.zero-state{padding:36px 12px;text-align:center;background:#fff;border-radius:12px;grid-column:1/-1}.zero-state a{display:inline-block;color:var(--primary);margin-top:10px}
.compare-wrap a{display:block;border:0;color:var(--primary);padding:0}
.offer-detail{display:grid;gap:14px}.stitch-card{padding:16px}.offer-head{justify-content:flex-start;align-items:center}.offer-head h2{font-size:17px}.offer-head small:not(.sample-tag){display:inline-block;font-size:12px;color:var(--muted);margin-top:3px}
.offer-head .fav-form{margin-left:auto}.offer-stats{margin-top:14px;background:#fff5ef;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:10px 0;border-radius:12px}
.offer-stats div{font-size:12px;color:var(--muted);padding:0 10px;overflow-wrap:anywhere}.offer-stats div+div{border-left:1px solid var(--line)}
.offer-stats strong{display:block;font-size:16px;color:var(--ink);margin-top:3px}.offer-stats div:last-child strong{color:var(--primary)}
.stitch-card .card-heading{font-size:16px;display:flex;gap:8px;align-items:center;border-bottom:1px solid var(--line);padding-bottom:10px}
.card-heading::before{content:"";width:5px;height:15px;background:var(--primary);border-radius:4px}
.detail-rules,.detail-fields{margin:12px 0 0;font-size:14px}.detail-rules dt{font-weight:650;margin-top:10px}.detail-rules dd{margin:4px 0 0;color:var(--muted);line-height:1.65}.detail-rules b{color:var(--primary)}
.detail-fields div{display:grid;grid-template-columns:5em 1fr;gap:8px;padding:8px 0}.detail-fields dt{color:var(--muted)}.detail-fields dd{margin:0;white-space:pre-line;overflow-wrap:anywhere}
.stitch-card details{padding:10px 0;font-size:14px}.stitch-card details summary{cursor:pointer}.stitch-card details p{margin:6px 0;color:var(--muted)}
.offer-dock{position:fixed;z-index:5;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,720px);padding:10px 16px calc(10px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--line)}
.offer-dock a,.offer-dock button{display:flex;gap:5px;align-items:center;justify-content:center;padding:10px 6px;min-height:44px;font-size:15px}
.offer-dock a{flex:1;border:1px solid #efcdbd;color:var(--primary)}.offer-dock button{flex:1.35}
#copy-status:not(:empty){position:absolute;bottom:calc(100% + 6px);left:15%;right:15%;padding:8px 12px;background:#31302e;color:white;border-radius:8px;text-align:center;font-size:13px;overflow-wrap:anywhere}
@media(min-width:700px){.offer-card{padding:18px}.offer-card h3{font-size:19px}.offer-details{font-size:14px}.quick-actions{gap:16px}.offer-fee strong{font-size:19px}}

/* Coral Ledger fills the phone canvas, including short and empty pages. */
html:has(body.stitch-app) {background:var(--canvas)}
body.stitch-app {min-height:100svh}
.stitch-app input,.stitch-app select {accent-color:var(--primary)}
.stitch-app :focus-visible {outline:3px solid #a53700;outline-offset:3px}
.stitch-app .primary,.stitch-app .primary:hover {background:var(--primary);border-color:var(--primary)}
.stitch-app .editor input,.stitch-app .editor textarea,.stitch-app .editor select {border-color:var(--line);color:var(--ink)}
.stitch-app .compare-wrap table {background:#fff}
.stitch-app .compare-wrap td,.stitch-app .compare-wrap th {border-color:var(--line)}

.stitch-app .offer-cta,.stitch-app .offer-dock button {background:linear-gradient(100deg,#ff6b2c,#f25c19);box-shadow:0 4px 12px #f25c191a}
.stitch-app .offer-cta:hover,.stitch-app .offer-dock button:hover {background:#ce4600}

.stitch-app [hidden]{display:none!important}
.stitch-app button:disabled{cursor:default;opacity:.5}
.bookmark{min-width:44px;min-height:44px;border-radius:10px;transition:background .15s,color .15s}
.bookmark:hover{background:#fff1e8}.bookmark[aria-busy=true]{opacity:.5}
.search-band .clear-search{font-size:22px;min-width:36px;min-height:40px;padding:0}
.catalog nav.active-filters{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 16px}
.catalog nav.active-filters a{display:flex;align-items:center;gap:8px;max-width:100%;overflow-wrap:anywhere;border:1px solid #f4d4c5;background:#fff1e8;color:#9d390a;border-radius:8px;padding:6px 10px;font-size:12px}
.catalog nav.active-filters .reset-filters{border:0;background:none;color:var(--muted);padding:6px 0}
.storefront #compare{position:sticky;top:8px;z-index:3;flex-wrap:wrap;border:1px solid var(--line);box-shadow:0 4px 14px #5a41380a}
.storefront #compare>span{flex:1;min-width:140px}.clear-comparison{border:0;background:none;color:var(--muted);font-size:13px;padding:8px}
.compact-action{min-height:40px;border-radius:9px}.category-chips a{min-height:34px;display:flex;align-items:center}
#interaction-status{position:fixed;z-index:60;left:50%;transform:translateX(-50%);bottom:calc(90px + env(safe-area-inset-bottom));width:max-content;max-width:calc(100% - 32px);background:#31302e;color:#fff;border-radius:10px;padding:12px 18px;box-shadow:0 5px 18px #31302e20;font-size:14px;text-align:center}
@media(prefers-reduced-motion:reduce){.bookmark{transition:none}}
