*{margin:0;padding:0;box-sizing:border-box}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;background:#f6f8f4;color:#1f2933;line-height:1.5}
a{color:inherit}
#app{max-width:1080px;margin:0 auto;min-height:100vh;background:#fff;box-shadow:0 22px 70px rgba(15,23,42,.08)}

header{background:rgba(255,255,255,.96);padding:14px 20px 10px;border-bottom:1px solid #e5eadf;position:sticky;top:0;z-index:100;backdrop-filter:blur(14px)}
.brand-line{display:flex;align-items:center;gap:10px;margin-bottom:6px}
.brand-mark{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:11px;background:#193d22;color:#d7ff52;font-size:21px;font-weight:900;text-decoration:none;box-shadow:0 10px 22px rgba(25,61,34,.18)}
header h1{font-size:21px;line-height:1.1;margin-bottom:3px;color:#16251a;letter-spacing:0}
.brand-subtitle{font-size:12px;color:#64748b;font-weight:700}
#header-meta{display:flex;align-items:center;gap:10px;font-size:13px;color:#666;flex-wrap:wrap}
#region-input{font-size:12px;padding:4px 8px;border-radius:4px;border:1px solid #ccc;max-width:180px;width:160px}
.cache-info{font-size:11px;color:#0369a1;margin-top:4px}

.tabs{display:flex;background:rgba(255,255,255,.96);border-bottom:1px solid #e5eadf;position:sticky;top:88px;z-index:99;padding:0 12px;gap:4px;backdrop-filter:blur(14px)}
.main-tab{flex:1;min-width:0;padding:12px 6px;background:none;border:none;border-bottom:3px solid transparent;font-size:13px;font-weight:600;color:#999;cursor:pointer;transition:.2s}
.main-tab.active{color:#16a34a;border-bottom-color:#16a34a}
.main-tab:hover{color:#333}
.guide-tab{text-align:center;text-decoration:none;display:flex;align-items:center;justify-content:center}
.fav-count{background:#16a34a;color:#fff;font-size:10px;padding:1px 6px;border-radius:10px;margin-left:2px}
.fav-count:empty{display:none}

.sync-status{text-align:center;padding:8px;font-size:12px;font-weight:600}
.sync-status.ok{background:#ecfdf5;color:#16a34a}
.sync-status.error{background:#fef2f2;color:#dc2626}

.sync-btn{width:100%;padding:12px;background:#2563eb;color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;margin-bottom:12px;font-family:inherit}
.sync-btn:hover{background:#1d4ed8}

#search-section{max-width:960px;margin:0 auto;padding:16px}
.home-intro{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,310px);gap:16px;align-items:stretch;margin-bottom:16px;padding:20px;border:1px solid #dfead8;border-radius:14px;background:linear-gradient(135deg,#f4ffe8 0%,#ffffff 52%,#f4f7ff 100%);box-shadow:0 16px 44px rgba(22,101,52,.08)}
.home-kicker{display:inline-flex;align-items:center;width:max-content;max-width:100%;padding:4px 9px;border-radius:999px;background:#e8f7da;color:#315b11;font-size:11px;font-weight:900;letter-spacing:0;margin-bottom:8px}
.home-intro h2{font-size:25px;line-height:1.24;color:#15251b;letter-spacing:0;margin-bottom:8px}
.home-intro p{font-size:14px;color:#475569;max-width:640px}
.home-proof{display:grid;grid-template-columns:1fr;gap:8px}
.home-proof div{padding:12px 14px;border:1px solid #dde8d5;border-radius:10px;background:rgba(255,255,255,.8)}
.home-proof dt{font-size:11px;color:#64748b;font-weight:800;margin-bottom:2px}
.home-proof dd{font-size:15px;color:#1f3d22;font-weight:900}
.search-box{display:flex;gap:8px;margin-bottom:12px}
.search-box input{flex:1;padding:10px 14px;border:2px solid #ddd;border-radius:8px;font-size:15px;outline:none;transition:border-color .2s}
.search-box input:focus{border-color:#16a34a}
.search-box button{padding:10px 20px;background:#16a34a;color:#fff;border:none;border-radius:8px;font-size:15px;cursor:pointer;white-space:nowrap;font-weight:600}
.search-box button:hover{background:#15803d}

#search-history{margin-bottom:10px}
.history-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px;width:100%}
.history-tags{display:flex;flex-wrap:wrap;gap:6px;flex:1;min-width:0}
.history-clear-btn{
  margin-left:auto;
  flex-shrink:0;
  font-size:11px;
  color:#9ca3af;
  background:none;
  border:none;
  cursor:pointer;
  padding:4px 4px;
  font-family:inherit;
  white-space:nowrap;
}
.history-clear-btn:hover{color:#6b7280}
#popular-keywords{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.history-tag,.keyword-tag{padding:4px 10px;background:#e8e8e8;border:none;border-radius:12px;font-size:12px;cursor:pointer;font-family:inherit}
.history-tag:hover,.keyword-tag:hover{background:#d0d0d0}
.keyword-tag{background:#ecfdf5;color:#16a34a;font-weight:600}

.loading{text-align:center;padding:40px}
.spinner{width:32px;height:32px;border:3px solid #e0e0e0;border-top-color:#16a34a;border-radius:50%;animation:spin .8s linear infinite;margin:0 auto 12px}
@keyframes spin{to{transform:rotate(360deg)}}
.empty-state{text-align:center;padding:40px;color:#999}
.empty-state .sub{font-size:13px;margin-top:8px}

.search-in-progress{text-align:center;padding:32px 16px;color:#666;font-size:14px}
.search-in-progress-spinner{width:28px;height:28px;margin:0 auto 12px;border-width:3px}
.search-in-progress-msg{font-size:16px;color:#374151;margin:0 0 6px}
.search-in-progress-hint{font-size:13px;color:#9ca3af;margin:0}
.search-error-state .retry-search-btn{margin-top:16px;max-width:280px}

.popup-skel-meta{display:flex;gap:12px;align-items:flex-start;margin-bottom:4px}
.popup-skel-meta-text{flex:1;min-width:0}
.popup-skel-thumb{width:72px;height:72px;object-fit:cover;border-radius:8px;flex-shrink:0;background:#f0f0f0}
.popup-skel-thumb-ph{background:#f3f4f6}
.popup-stock-loading{text-align:center;padding:20px 12px 8px;border-top:1px solid #eee;margin-top:8px}
.popup-stock-loading-spinner{width:28px;height:28px;margin:0 auto 10px;border-width:3px}
.popup-stock-loading p{font-size:13px;color:#666}

.sbar{display:flex;justify-content:space-between;align-items:center;padding:8px 0;margin-bottom:8px;font-size:13px;color:#666;flex-wrap:wrap;gap:6px}
.sbar .ok{color:#16a34a;font-weight:600}

.velocity-panel{margin:10px 0 14px;border:1px solid #e5e7eb;border-radius:8px;background:#fff;overflow:hidden}
.velocity-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-bottom:1px solid #f1f5f9;background:#fff7ed}
.velocity-head h2{font-size:15px;line-height:1.2;color:#9a3412}
.velocity-head p{font-size:11px;color:#78716c;margin-top:2px}
.velocity-refresh{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid #fed7aa;border-radius:6px;background:#fff;color:#c2410c;font-size:18px;font-weight:700;cursor:pointer;flex-shrink:0;transition:background .15s,border-color .15s,color .15s,opacity .15s}
.velocity-refresh:hover{background:#ffedd5}
.velocity-refresh:disabled{opacity:.7;cursor:wait}
.refresh-glyph{display:inline-block;line-height:1}
.velocity-refresh.is-refreshing .refresh-glyph{animation:refresh-spin .75s linear infinite}
@keyframes refresh-spin{to{transform:rotate(360deg)}}
.velocity-empty{display:flex;flex-direction:column;gap:2px;padding:14px 12px;font-size:12px;color:#78716c}
.velocity-empty strong{font-size:13px;color:#444}
.velocity-list{display:flex;flex-direction:column}
.velocity-row{display:grid;grid-template-columns:36px 54px minmax(0,1fr) auto;gap:9px;align-items:center;padding:10px 12px;border-bottom:1px solid #f1f5f9;cursor:pointer}
.velocity-row:last-child{border-bottom:none}
.velocity-row:hover{background:#fafafa}
.velocity-rank{font-size:13px;font-weight:800;color:#dc2626;text-align:center}
.velocity-thumb{width:54px;height:54px;border-radius:6px;overflow:hidden;background:#f3f4f6}
.velocity-thumb img{width:100%;height:100%;object-fit:cover}
.velocity-no-img{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:22px;color:#9ca3af}
.velocity-main{min-width:0}
.velocity-name{font-size:13px;font-weight:700;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.velocity-stock{display:flex;align-items:baseline;gap:5px;margin-top:3px;font-size:12px;color:#334155;flex-wrap:wrap}
.velocity-stock b{font-size:14px;color:#111827}
.velocity-stock em{font-style:normal;color:#dc2626;font-weight:800}
.velocity-proof{font-size:11px;color:#64748b;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.velocity-metric{display:flex;flex-direction:column;align-items:flex-end;gap:2px;min-width:78px}
.velocity-metric strong{font-size:12px;color:#dc2626;white-space:nowrap}
.velocity-metric span{font-size:10px;color:#64748b;white-space:nowrap}
.velocity-buy{margin-top:4px;padding:4px 7px;border:1px solid #16a34a;border-radius:5px;background:#ecfdf5;color:#15803d;font-size:10px;font-weight:800;font-family:inherit;cursor:pointer}
.velocity-buy:hover{background:#16a34a;color:#fff}

.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px}

.card{background:#fff;border-radius:10px;overflow:hidden;transition:transform .15s,box-shadow .15s;border:1px solid #eee}
.card:hover{transform:translateY(-2px);box-shadow:0 4px 12px rgba(0,0,0,.08)}
.card-img{position:relative;aspect-ratio:1;overflow:hidden;background:#f9f9f9;cursor:pointer}
.card-img img{width:100%;height:100%;object-fit:cover}
.no-img{display:flex;align-items:center;justify-content:center;height:100%;font-size:40px;background:#f0f0f0}
.badges{position:absolute;top:6px;left:6px;display:flex;flex-wrap:wrap;gap:3px}
.badge{padding:2px 6px;border-radius:4px;font-size:10px;font-weight:700;color:#fff}
.bg-green{background:#16a34a}
.bg-red{background:#dc2626}
.bg-orange{background:#ea580c}
.bg-purple{background:#9333ea}
.bg-blue{background:#2563eb}
.bg-gray{background:#999}
.card-body{padding:10px}
.card-top{display:flex;align-items:flex-start;gap:4px}
.card-name{flex:1;font-size:13px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;cursor:pointer}
.card-price{display:flex;align-items:baseline;gap:4px;flex-wrap:wrap;margin-top:4px}
.disc{color:#dc2626;font-weight:700;font-size:14px}
.price{font-weight:700;font-size:14px}
.orig{text-decoration:line-through;color:#999;font-size:12px}

.fav-btn{background:none;border:none;font-size:18px;cursor:pointer;color:#ccc;padding:0;line-height:1;flex-shrink:0}
.fav-btn.active{color:#f59e0b}
.fav-btn:hover{transform:scale(1.15)}

.card.soldout .card-img{filter:grayscale(.7)}
.card.soldout .card-name{text-decoration:line-through;color:#999}

#hot-section,#fav-section{padding:16px 16px 24px}

.hot-panel{border:1px solid #e5e7eb;border-radius:8px;background:#fff;overflow:hidden}
.hot-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px;border-bottom:1px solid #e5e7eb;background:#f0fdf4}
.hot-head h2{font-size:16px;line-height:1.2;color:#166534}
.hot-head p{font-size:11px;color:#4b5563;margin-top:2px}
.hot-summary{font-weight:700}
.hot-basis-note{color:#15803d!important}
.hot-actions{display:flex;align-items:center;gap:8px;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end}
.hot-sort,.hot-range{display:flex;border:1px solid #bbf7d0;border-radius:6px;overflow:hidden;background:#fff}
.hot-sort button,.hot-range button{height:32px;padding:0 9px;border:none;border-right:1px solid #dcfce7;background:#fff;color:#64748b;font-size:11px;font-weight:800;font-family:inherit;cursor:pointer;white-space:nowrap}
.hot-sort button:last-child,.hot-range button:last-child{border-right:none}
.hot-sort button.active,.hot-range button.active{background:#16a34a;color:#fff}
.hot-categories{display:flex;gap:6px;padding:8px 12px;border-bottom:1px solid #e5e7eb;background:#fff;overflow-x:auto;-webkit-overflow-scrolling:touch}
.hot-categories button{height:30px;padding:0 10px;border:1px solid #e5e7eb;border-radius:999px;background:#fff;color:#475569;font-size:11px;font-weight:800;font-family:inherit;white-space:nowrap;cursor:pointer}
.hot-categories button:hover{border-color:#86efac;background:#f0fdf4;color:#166534}
.hot-categories button.active{border-color:#16a34a;background:#16a34a;color:#fff}
.hot-refresh-status{min-width:70px;text-align:right;font-size:11px;font-weight:800;color:#15803d;white-space:nowrap}
.hot-refresh-status.loading{color:#166534}
.hot-refresh-status.error{color:#dc2626}
.hot-refresh-status.idle{color:transparent}
.hot-refresh{border-color:#bbf7d0;color:#15803d}
.hot-refresh:hover{background:#dcfce7}
.hot-list{display:flex;flex-direction:column}
.hot-row{display:grid;grid-template-columns:72px minmax(0,1fr) auto;grid-template-areas:"trend main buy" "rank main buy" "thumb main buy";gap:4px 12px;align-items:center;padding:10px 12px;border-bottom:1px solid #f1f5f9;cursor:pointer}
.hot-row:last-child{border-bottom:none}
.hot-row:hover{background:#fafafa}
.hot-rank{grid-area:rank;font-size:13px;font-weight:800;color:#16a34a;text-align:center}
.hot-trend-slot{grid-area:trend;display:flex;align-items:center;justify-content:center;min-width:0}
.hot-trend{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:54px;height:34px;padding:2px 5px;border:1px solid #e5e7eb;border-radius:7px;background:#f8fafc;color:#64748b;font-weight:900;line-height:1;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.hot-trend span{font-size:9px;letter-spacing:0;color:currentColor;opacity:.82}
.hot-trend strong{margin-top:3px;font-size:12px;letter-spacing:0;color:currentColor;white-space:nowrap}
.hot-trend.up{border-color:#fecaca;background:#fef2f2;color:#dc2626}
.hot-trend.down{border-color:#bfdbfe;background:#eff6ff;color:#2563eb}
.hot-trend.entry{border-color:#fde68a;background:#fffbeb;color:#b45309}
.hot-trend.flat{border-color:#e5e7eb;background:#f8fafc;color:#64748b}
.hot-trend-empty{opacity:.55}
.hot-trend.big{height:40px;border-width:2px;box-shadow:0 0 0 2px rgba(220,38,38,.08),0 6px 14px rgba(15,23,42,.14);transform:translateY(-1px)}
.hot-trend.big.down{box-shadow:0 0 0 2px rgba(37,99,235,.1),0 6px 14px rgba(15,23,42,.14)}
.hot-trend.big.entry{box-shadow:0 0 0 2px rgba(180,83,9,.12),0 6px 14px rgba(15,23,42,.14)}
.hot-trend.big span{font-size:10px}
.hot-trend.big strong{font-size:14px}
.hot-thumb{grid-area:thumb;justify-self:center;width:58px;height:58px;border-radius:6px;overflow:hidden;background:#f3f4f6}
.hot-thumb img{width:100%;height:100%;object-fit:cover}
.hot-main{grid-area:main;min-width:0}
.hot-name{font-size:13px;font-weight:700;line-height:1.28;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hot-meta{display:flex;flex-wrap:wrap;gap:4px 8px;margin-top:3px;font-size:11px;color:#64748b}
.hot-limit{color:#15803d;font-weight:800}
.hot-limit-on{color:#dc2626}
.hot-limit-pending{color:#94a3b8;font-weight:600}
.hot-sales{display:flex;align-items:baseline;gap:6px;margin-top:3px;font-size:11px;color:#94a3b8;flex-wrap:wrap}
.hot-sales strong{font-size:12px;color:#64748b}
.hot-sales-ok strong{color:#dc2626}
.hot-sales-ok span{color:#334155}
.hot-restock{color:#2563eb!important;font-weight:800}
.hot-confidence-low{color:#ea580c!important;font-weight:800}
.hot-chart{position:relative;width:min(150px,100%);height:38px;margin-top:5px;border:1px solid #e5e7eb;border-radius:6px;background:#f8fafc;overflow:visible}
.hot-chart svg{display:block;width:100%;height:100%}
.hot-chart polyline{fill:none;stroke:#16a34a;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.hot-chart circle{fill:#2563eb;stroke:#fff;stroke-width:1}
.hot-chart.view polyline{stroke:#2563eb}
.hot-chart.sales polyline{stroke:#16a34a}
.hot-chart.revenue polyline{stroke:#ef4444}
.hot-chart.view .hot-chart-dot{border-color:#2563eb}
.hot-chart.sales .hot-chart-dot{border-color:#16a34a}
.hot-chart.revenue .hot-chart-dot{border-color:#ef4444}
.hot-chart-cross{display:none;position:absolute;top:0;bottom:0;width:1px;background:#334155;opacity:.35;pointer-events:none}
.hot-chart-dot{display:none;position:absolute;width:7px;height:7px;border:2px solid #16a34a;border-radius:50%;background:#fff;transform:translate(-50%,-50%);box-shadow:0 1px 4px rgba(15,23,42,.25);pointer-events:none}
.hot-chart-tip{display:none;position:absolute;z-index:5;bottom:calc(100% + 7px);left:0;min-width:118px;padding:6px 8px;border-radius:6px;background:#111827;color:#fff;box-shadow:0 8px 22px rgba(15,23,42,.22);font-size:10px;line-height:1.35;transform:translateX(-10px);pointer-events:none;white-space:nowrap}
.hot-chart-tip.right{transform:translateX(calc(-100% + 10px))}
.hot-chart-tip b,.hot-chart-tip span,.hot-chart-tip em{display:block;font-style:normal}
.hot-chart-tip b{font-size:10px;color:#f8fafc}
.hot-chart-tip span{margin-top:2px;color:#d1d5db}
.hot-chart-tip span.rank{color:#bfdbfe;font-weight:800}
.hot-chart-tip em{margin-top:2px;font-weight:800;color:#e5e7eb}
.hot-chart-tip em.up{color:#93c5fd}
.hot-chart-tip em.down{color:#86efac}
.hot-chart.active .hot-chart-cross,.hot-chart.active .hot-chart-dot,.hot-chart.active .hot-chart-tip{display:block}
.hot-chart-empty{display:flex;align-items:center;justify-content:center;color:#94a3b8;font-size:10px;font-weight:700}
.hot-buy{grid-area:buy;min-width:62px;align-self:center;justify-self:end}

.popup-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:200;display:flex;align-items:flex-end;justify-content:center}
.popup-content{background:#fff;border-radius:16px 16px 0 0;width:100%;max-width:500px;max-height:85vh;overflow-y:auto;padding:20px;animation:slideUp .25s ease-out;position:relative}
.popup-buy-inline{margin-bottom:8px;position:relative;z-index:2;pointer-events:auto}
.btn-buy-popup-inline{
  width:100%;
  box-sizing:border-box;
  padding:8px 10px;
  font-size:13px;
  font-weight:700;
  font-family:inherit;
  border:1px solid #16a34a;
  border-radius:8px;
  background:#fff;
  color:#15803d;
  cursor:pointer;
  pointer-events:auto;
  -webkit-tap-highlight-color:transparent;
}
.btn-buy-popup-inline:hover{background:#ecfdf5}
.btn-buy-popup-inline:active{background:#d1fae5}
.btn-buy-popup-inline:disabled{opacity:.85;cursor:wait}
@keyframes slideUp{from{transform:translateY(100%)}to{transform:translateY(0)}}
.popup-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:12px}
.popup-header h3{font-size:16px;line-height:1.3;flex:1;padding-right:10px}
.popup-header button{background:none;border:none;font-size:20px;cursor:pointer;color:#999;padding:0 4px}
.popup-cache-info{background:#f0f9ff;border:1px solid #bae6fd;border-radius:6px;padding:6px 10px;margin-bottom:10px;font-size:11px;color:#0369a1;text-align:center}
.popup-badge{border-radius:6px;padding:8px 10px;margin-bottom:10px;font-size:12px;font-weight:700;text-align:center}
.bg-red-light{background:#fef2f2;border:1px solid #fecaca;color:#dc2626}
.bg-orange-light{background:#fff7ed;border:1px solid #fed7aa;color:#ea580c}
.popup-price-row{display:flex;align-items:baseline;gap:6px;margin-bottom:12px;flex-wrap:wrap}
.popup-price-row .price{font-size:20px}
.popup-price-row .disc{font-size:18px}
.popup-error{text-align:center;padding:12px 0}
.popup-error p{margin-bottom:8px}
.popup-note{font-size:12px;color:#999}

.popup-fav-btn{width:100%;padding:10px;border:2px solid #e0e0e0;border-radius:8px;background:#fff;font-size:14px;font-weight:600;cursor:pointer;margin-bottom:0;transition:.2s;font-family:inherit}
.popup-fav-btn.active{border-color:#f59e0b;background:#fffbeb;color:#d97706}
.popup-fav-btn:hover{border-color:#f59e0b}
.popup-share-actions{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}
.popup-skel-meta-text .popup-fav-btn{margin-bottom:12px}
.popup-share-btn{width:100%;padding:10px;border:2px solid #7dd3fc;border-radius:8px;background:#f0f9ff;font-size:14px;font-weight:600;color:#0369a1;cursor:pointer;transition:.2s;font-family:inherit}
.popup-share-btn:hover:not(:disabled){background:#e0f2fe;border-color:#38bdf8}
.popup-share-btn:disabled{opacity:.7;cursor:wait}

.opt-tabs{display:flex;overflow-x:auto;gap:4px;margin-bottom:12px;padding-bottom:4px;-webkit-overflow-scrolling:touch}
.opt-tab{padding:6px 12px;background:#f0f0f0;border:none;border-radius:16px;font-size:12px;cursor:pointer;white-space:nowrap;font-family:inherit}
.opt-tab.active{background:#16a34a;color:#fff}
.opt-panel{display:none}
.opt-panel.active{display:block}

.opt-summary{display:flex;gap:12px;padding:12px;background:#f9f9f9;border-radius:8px;margin-bottom:10px}
.opt-img{width:60px;height:60px;border-radius:6px;object-fit:cover;flex-shrink:0;background:#eee}
.opt-info{flex:1;min-width:0}
.opt-name{font-size:13px;font-weight:600;margin-bottom:4px;word-break:break-word}
.opt-stock{font-size:12px}
.stock-ok{color:#16a34a}
.stock-out{color:#dc2626}
.stock-low{color:#ea580c}
.stock-mid{color:#d97706}

.store-list{display:flex;flex-direction:column;gap:6px}
.store-row{display:flex;justify-content:space-between;align-items:center;padding:8px 10px;background:#fff;border:1px solid #f0f0f0;border-radius:6px;gap:8px}
.store-left{display:flex;align-items:baseline;gap:6px;min-width:0;flex:1}
.store-name{font-size:13px;font-weight:600;word-break:break-word}
.store-dist{font-size:11px;color:#999;flex-shrink:0}
.store-right{font-size:12px;flex-shrink:0;text-align:right}
.store-right b{font-size:14px}
.no-store{text-align:center;padding:20px;color:#999;font-size:13px}

.btn-oy{display:inline-block;padding:10px 20px;background:#16a34a;color:#fff;text-decoration:none;border-radius:8px;font-size:14px;font-weight:600;text-align:center}
button.btn-oy{font:inherit;border:none;cursor:pointer;width:100%;max-width:320px}
.btn-oy:hover{background:#15803d}
.btn-oy-cta{
  max-width:100%!important;
  padding:14px 20px!important;
  font-size:16px!important;
  font-weight:700!important;
  border-radius:10px!important;
  box-shadow:0 4px 14px rgba(22,163,74,.35);
}
.btn-oy-cta:hover{box-shadow:0 6px 18px rgba(22,163,74,.45)}
.popup-footer{margin-top:16px;text-align:center}

.card-actions{margin-top:8px}
.btn-buy-compact{
  width:100%;
  padding:6px 8px;
  font-size:11px;
  font-weight:700;
  font-family:inherit;
  border:1px solid #16a34a;
  border-radius:6px;
  background:#ecfdf5;
  color:#15803d;
  cursor:pointer;
}
.btn-buy-compact:hover{background:#16a34a;color:#fff}

.inv-history-scroll{max-height:55vh;overflow-y:auto;-webkit-overflow-scrolling:touch}
.inv-history-row{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 10px;padding:8px 0;border-bottom:1px solid #f0f0f0;font-size:12px}
.inv-type{font-weight:700;color:#16a34a;white-space:nowrap}
.inv-name{flex:1;min-width:0;color:#444;word-break:break-word}
.inv-time{color:#999;font-size:11px;white-space:nowrap}
.inv-extra{color:#ea580c;font-weight:600}

.seo-guide-index,.seo-faq{max-width:960px;margin:0 auto;padding:34px 16px;border-top:1px solid #eef2ea}
.seo-section-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,360px);gap:16px;align-items:end;margin-bottom:18px}
.seo-section-head h2{font-size:24px;line-height:1.25;color:#15251b;letter-spacing:0}
.seo-section-head p{font-size:14px;color:#64748b;font-weight:700}
.guide-link-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.guide-link-grid a{display:flex;align-items:center;min-height:54px;padding:12px;border:1px solid #dfead8;border-radius:10px;background:#fff;color:#1f3d22;text-decoration:none;font-size:13px;font-weight:900;box-shadow:0 8px 20px rgba(15,23,42,.04);transition:transform .15s,box-shadow .15s,border-color .15s}
.guide-link-grid a:hover{transform:translateY(-2px);border-color:#8cc63f;box-shadow:0 14px 26px rgba(47,92,31,.12)}
.faq-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.faq-grid article{padding:16px;border:1px solid #dfead8;border-radius:12px;background:#fbfdf8}
.faq-grid h3{font-size:15px;color:#193d22;margin-bottom:6px}
.faq-grid p{font-size:13px;color:#475569}
.site-footer{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:center;padding:24px 16px;background:#16251a;color:#d9ead3;font-size:13px}
.site-footer strong{color:#d7ff52}
.site-footer a{color:#fff;text-decoration:none;border-bottom:1px solid rgba(255,255,255,.5)}

@media(min-width:600px){
  .grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}
  .popup-content{border-radius:16px;margin-bottom:40px}
  .popup-overlay{align-items:center}
}

@media(max-width:560px){
  #app{box-shadow:none}
  header{padding:12px 14px 8px}
  .brand-mark{width:34px;height:34px;border-radius:10px;font-size:19px}
  header h1{font-size:19px}
  .brand-subtitle{font-size:11px}
  .tabs{top:82px}
  .guide-tab{display:none}
  .home-intro{grid-template-columns:1fr;padding:16px;border-radius:12px}
  .home-intro h2{font-size:20px}
  .home-proof{grid-template-columns:repeat(3,1fr);gap:6px}
  .home-proof div{padding:9px 8px}
  .home-proof dt{font-size:10px}
  .home-proof dd{font-size:12px}
  .seo-guide-index,.seo-faq{padding:26px 10px}
  .seo-section-head{grid-template-columns:1fr}
  .seo-section-head h2{font-size:21px}
  .guide-link-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .guide-link-grid a{min-height:50px;font-size:12px;padding:10px}
  .faq-grid{grid-template-columns:1fr}
  .tabs{padding:0 6px;gap:2px}
  .main-tab{font-size:12px;padding:11px 3px}
  .velocity-row{grid-template-columns:30px 48px minmax(0,1fr);align-items:start}
  .velocity-thumb{width:48px;height:48px}
  .velocity-metric{grid-column:3;align-items:flex-start;flex-direction:row;flex-wrap:wrap;margin-top:4px}
  .velocity-proof{white-space:normal}
  .hot-row{grid-template-columns:60px minmax(0,1fr);grid-template-areas:"trend main" "rank main" "thumb main" ". buy";align-items:start;gap:4px 8px}
  .hot-trend{min-width:48px;height:32px;padding:2px 4px}
  .hot-trend.big{height:36px}
  .hot-trend strong{font-size:11px}
  .hot-trend.big strong{font-size:13px}
  .hot-head{align-items:flex-start}
  .hot-actions{flex-direction:column;align-items:flex-end;gap:6px}
  .hot-range{max-width:210px;overflow-x:auto}
  .hot-categories{padding:7px 10px}
  .hot-categories button{height:28px;padding:0 9px}
  .hot-sort button,.hot-range button{padding:0 7px}
  .hot-thumb{width:50px;height:50px}
  .hot-buy{justify-self:start;margin-top:4px}
  .hot-name{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
}

/* 팝업: backdrop 레이어 + 콘텐츠 z-index */
.popup-backdrop{position:absolute;inset:0;z-index:0}
.popup-content{position:relative;z-index:1}

/* 지역 검색 */
.region-item:hover{background:#f0fdf4}
#region-input:focus{border-color:#16a34a;outline:none}

.badge.bg-blue{background:#dbeafe;color:#1d4ed8;font-size:10px}
.badge.bg-blue-light{background:#eff6ff;color:#2563eb;font-size:9px}
.badge-btn{
  border:none;
  cursor:pointer;
  font-size:12px;
  padding:6px 12px;
  border-radius:6px;
  font-family:inherit;
  margin-top:4px;
  font-weight:700;
  display:inline-block;
}
.badge-btn.bg-purple{
  background:#f3e8ff;
  color:#7c3aed;
  border:1px solid #e9d5ff;
}
.badge-btn.bg-purple:hover{
  background:#e9d5ff;
  border-color:#c4b5fd;
}

.card-options{background:#f8fafc;border-top:1px solid #e2e8f0;padding:8px 10px;font-size:12px}
.card-options.hidden{display:none}
.card-opt-row{display:flex;justify-content:space-between;align-items:center;padding:4px 0;border-bottom:1px solid #f1f5f9}
.card-opt-row:last-child{border-bottom:none}
.card-opt-name{color:#334155;font-weight:500;flex:1;margin-right:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.card-opt-stock{font-size:11px;color:#64748b;white-space:nowrap}
.opt-online-ok{color:#059669;font-weight:600}
.opt-online-out{color:#dc2626}

.btn-all-stock{width:100%;padding:10px;background:#f0f9ff;border:2px solid #bae6fd;border-radius:8px;font-size:13px;font-weight:600;color:#0369a1;cursor:pointer;margin-top:12px;font-family:inherit;transition:.2s}
.btn-all-stock:hover{background:#e0f2fe;border-color:#7dd3fc}
.btn-all-stock.loading{opacity:.6;cursor:wait}

.btn-all-stock-opt{
  width:100%;padding:8px;margin-top:8px;
  background:#f0f9ff;border:1px solid #bae6fd;
  border-radius:6px;font-size:12px;font-weight:600;
  color:#0369a1;cursor:pointer;font-family:inherit;
}
.btn-all-stock-opt:hover{background:#e0f2fe}
.btn-all-stock-opt.loading{opacity:.6;cursor:wait}
