:root{color-scheme:light;--bg:#f7f4ef;--paper:#fffdf9;--ink:#302b33;--muted:#7b7078;--accent:#87475f;--line:#e8dfe1}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.65 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif}main{max-width:780px;margin:auto;padding:24px 18px calc(30px + env(safe-area-inset-bottom))}header,.brand,.section-title,.actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.brand img{border-radius:12px}.brand{justify-content:flex-start}header{margin-bottom:25px}h1{font-size:23px;margin:0;font-weight:700}header p{font-size:12px;color:var(--muted);margin:0}h2{font-size:18px;margin:0 0 6px}h3{font-size:19px;margin:0;overflow-wrap:anywhere}.panel,.rule{background:var(--paper);border:1px solid var(--line);border-radius:18px;padding:20px;margin-bottom:18px}p{margin:8px 0}.muted{color:var(--muted)}.small,footer{font-size:13px}.section-title{margin:20px 0 13px}.panel>.section-title{margin-top:0}button,input,select{font:inherit}button{min-height:44px;padding:9px 15px;border:1px solid var(--line);background:var(--paper);color:var(--accent);border-radius:10px;cursor:pointer}button.primary{background:var(--accent);color:#fff;border-color:var(--accent)}button.text{border:0;background:transparent;padding:5px 3px}button:disabled{opacity:.5;cursor:wait}label{display:block;font-size:14px;margin:13px 0}input:not([type=checkbox]),select{display:block;border:1px solid #d9cbd0;background:#fff;color:var(--ink);border-radius:9px;padding:11px;width:100%;font-size:16px;margin-top:7px}input[type=checkbox]{accent-color:var(--accent);width:18px;height:18px}fieldset{border:0;padding:0;margin:16px 0}legend{font-size:14px}#platform-choices{display:grid;grid-template-columns:1fr 1fr}#platform-choices label,.inline{display:flex;align-items:center;gap:8px}form>.primary{width:100%;margin-top:13px}.actions{flex-wrap:wrap;justify-content:flex-start;margin-top:13px;gap:8px}.actions button{font-size:14px}.banner{padding:12px 15px;background:#e8eee9;border-radius:12px;margin-bottom:18px;color:#416049;font-size:14px}.banner.warning,#message.error{background:#f7e7da;color:#8b552c}#message{padding:12px 15px;background:#e6eee7;color:#45604a;border-radius:12px;margin:14px 0;font-size:14px;overflow-wrap:anywhere}details{margin-top:13px;color:var(--muted);font-size:14px}summary{cursor:pointer}ol{padding-left:21px}li{margin:8px 0}.rule-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.tag{font-size:12px;background:#f0e5e8;color:var(--accent);padding:4px 9px;border-radius:30px;white-space:nowrap}.site{padding:12px 0;border-bottom:1px solid var(--line);font-size:14px}.site:last-child{border:0}.site-top{display:flex;align-items:center;justify-content:space-between;gap:9px}.site p{font-size:12px;margin:2px 0;color:var(--muted)}.site p.error{color:#9c5937}.site a{color:var(--accent);font-size:12px;text-decoration:none}.rule-actions{display:flex;gap:16px;margin-top:8px;flex-wrap:wrap}.rule-actions button{font-size:14px}.entry{display:block;padding:16px 0;border-bottom:1px solid var(--line);text-decoration:none;color:var(--ink)}.entry .meta{display:flex;justify-content:space-between;gap:12px;font-size:12px;color:var(--muted)}.entry .title{font-size:15px;margin:5px 0;overflow-wrap:anywhere}.entry .price{color:var(--accent);font-weight:650}.entry.unread .title:before{content:'●';font-size:8px;vertical-align:middle;color:var(--accent);margin-right:6px}.empty{padding:35px 8px;color:var(--muted);text-align:center;font-size:14px}#unread{font-size:13px;background:#f0e5e8;border-radius:6px;padding:2px 6px}footer{color:var(--muted);margin-top:22px}dialog{width:min(500px,calc(100vw - 28px));max-height:88dvh;border:1px solid var(--line);border-radius:20px;padding:22px;background:var(--paper);color:var(--ink)}dialog::backdrop{background:#30232f66}dialog .section-title{margin-top:0}button:focus-visible,a:focus-visible{outline:3px solid #c589a2;outline-offset:3px}[hidden]{display:none!important}@media(max-width:400px){main{padding:18px 12px}.panel,.rule{padding:16px}h1{font-size:21px}header p{font-size:11px}}

.entry-body{display:flex;gap:14px;align-items:flex-start;margin-top:10px}.thumbnail{flex:0 0 84px;width:84px;height:84px;border-radius:10px;background:#eee8e4;overflow:hidden;display:flex;align-items:center;justify-content:center;font-size:11px;color:var(--muted);text-align:center}.thumbnail img{width:100%;height:100%;object-fit:contain;background:#fff}.entry-details{min-width:0;flex:1}.entry .meta{flex-wrap:wrap}.entry-details .title{margin-top:0}@media(max-width:400px){.thumbnail{flex-basis:68px;width:68px;height:68px}.entry-body{gap:10px}}

.priced-entry{border-bottom:1px solid var(--line);padding-bottom:14px}.priced-entry>.entry{border:0;padding-bottom:8px}.price-comparison{font-size:13px;overflow-wrap:anywhere}.range{font-weight:600}.price-drop{color:#387149;font-weight:600}.comparison-source{display:block;color:var(--accent);margin:8px 0}.compare-list{max-height:48dvh;overflow:auto}.compare-option{display:grid;grid-template-columns:22px 1fr;gap:8px;border-bottom:1px solid var(--line);padding:10px 0}.compare-option a{grid-column:2;color:var(--accent);font-size:12px}.price-comparison p{margin:4px 0}

.history-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}.history-actions button{font-size:13px;white-space:nowrap}

.translate-title{display:inline-flex;align-items:center;min-height:40px;color:var(--accent);font-size:13px;text-decoration:none;border:1px solid var(--line);border-radius:8px;padding:4px 10px;margin:0 0 10px}.translate-title:hover{background:#f0e5e8}
.sold-badge{display:inline-block;background:#d51f35;color:#fff;font-size:14px;font-weight:800;letter-spacing:1px;line-height:1.25;padding:6px 11px;border-radius:5px;margin-bottom:7px;box-shadow:0 2px 5px #d51f3526}
.price-rise{color:#a63712;background:#fff0e5;border-left:4px solid #df5a25;border-radius:5px;padding:7px 10px;font-weight:700;line-height:1.6}
.availability-note{font-size:11px;color:var(--muted);margin-top:5px;overflow-wrap:anywhere}

.history-group+.history-group{margin-top:26px;padding-top:20px;border-top:2px solid var(--line)}.history-group-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#f0e5e8;border-radius:10px;padding:10px 12px;margin:12px 0 4px}.history-group-heading h3{font-size:17px;color:var(--accent)}.history-group-heading .tag{flex-shrink:0;font-size:11px}.history-group>.priced-entry:last-child{border-bottom:0}.history-group .empty{padding:20px 4px}

.history-group{color:var(--ink);font-size:inherit}.history-group-heading{list-style:none;cursor:pointer;user-select:none}.history-group-heading::-webkit-details-marker{display:none}.history-group-heading::before{content:'▶';font-size:11px;color:var(--accent);flex-shrink:0}.history-group[open]>.history-group-heading::before{content:'▼'}.history-group-heading h3{flex:1}.history-group-heading:focus-visible{outline:3px solid #c589a2;outline-offset:3px}

main{padding-bottom:calc(110px + env(safe-area-inset-bottom))}.bottom-nav{position:fixed;z-index:20;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:780px;display:grid;grid-template-columns:repeat(3,1fr);padding:7px 12px calc(7px + env(safe-area-inset-bottom));background:#fffdf9f5;border-top:1px solid var(--line);box-shadow:0 -4px 22px #302b3308;backdrop-filter:blur(14px)}.bottom-nav button{border:0;background:transparent;border-radius:12px;display:flex;align-items:center;flex-direction:column;gap:2px;color:var(--muted);font-size:12px;padding:5px 10px;min-height:58px}.bottom-nav button[aria-current=page]{color:var(--accent);background:#f0e5e8;font-weight:650}.nav-icon{position:relative;font-size:25px;line-height:28px;height:28px}.nav-badge{position:absolute;top:-4px;left:19px;min-width:17px;padding:0 4px;border-radius:12px;background:#b33e56;color:#fff;font-size:10px;line-height:17px;font-weight:700}#page-discoveries>.section-title{margin-bottom:14px}@media(max-width:400px){main{padding-bottom:calc(110px + env(safe-area-inset-bottom))}}

details.rule{color:var(--ink);font-size:inherit}.rule-head{list-style:none;cursor:pointer;user-select:none}.rule-head::-webkit-details-marker{display:none}.rule-head::before{content:'▶';font-size:11px;color:var(--accent);flex-shrink:0}.rule[open]>.rule-head::before{content:'▼'}.rule-head h3{flex:1}.rule-head:focus-visible{outline:3px solid #c589a2;outline-offset:3px}
