/* Mobile-first discovery and keyword education. Loaded after the legacy skin. */
body { --hd-surface: #fff; --hd-soft: #f4f5fa; --hd-ink: #202337; --hd-muted: #62697d; --hd-line: #e3e6ef; --hd-accent: #4e44ce; --hd-tint: #eeedff; }
body.dark-mode { --hd-surface: #20232f; --hd-soft: #292d3c; --hd-ink: #f1f3fa; --hd-muted: #b5bdd0; --hd-line: #404659; --hd-accent: #b4acff; --hd-tint: #34304f; }
.hd-discovery { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 24px; padding: 28px; margin-bottom: 24px; border: 1px solid var(--hd-line); border-radius: 20px; background: var(--hd-surface); color: var(--hd-ink); }
.hd-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--hd-accent); }
.hd-discovery h1 { font-size: clamp(21px, 2.5vw, 28px); line-height: 1.35; letter-spacing: -.8px; margin: 12px 0 10px; font-weight: 800; color: var(--hd-ink); }
.hd-discovery p { font-size: 13px; line-height: 1.7; margin: 0 0 16px; color: var(--hd-muted); word-break: keep-all; }
.hd-discovery-action { display: inline-flex; justify-content: center; align-items: center; gap: 24px; min-height: 44px; padding: 10px 16px; border: 0; border-radius: 12px; background: #4e44ce; color: #fff; font-weight: 700; font-size: 13px; }
body.dark-mode .hd-discovery-action span { color: #fff !important; }
.hd-discovery-example { padding: 18px; background: var(--hd-soft); border-radius: 16px; }
.hd-example-label { display: block; font-size: 11px; color: var(--hd-muted); margin-bottom: 16px; }
.hd-example-keyword { display: flex; align-items: center; gap: 12px; color: var(--hd-muted); font-size: 12px; }
.hd-example-keyword b { color: var(--hd-accent); background: var(--hd-tint); border-radius: 8px; padding: 5px 12px; }
.hd-example-message { display: flex; align-items: center; gap: 12px; padding: 14px; margin-top: 12px; border: 1px solid var(--hd-line); background: var(--hd-surface); border-radius: 12px; box-shadow: 0 4px 12px #15163408; }
.hd-example-message i { color: var(--hd-accent); font-size: 20px; }
.hd-example-message strong { display: block; font-size: 13px; color: var(--hd-ink); }
.hd-example-message small { display: block; margin-top: 3px; font-size: 11px; color: var(--hd-muted); }
.hd-search-alert { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 14px; margin-bottom: 16px; border-radius: 12px; background: var(--hd-tint); font-size: 13px; }
.hd-search-alert button { background: none; border: 0; color: var(--hd-accent); font-weight: 700; min-height: 44px; }
.bell-btn { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; min-width: 44px; }
.bell-btn.kw-tour-target { animation: none; outline: 2px solid var(--hd-accent); box-shadow: 0 0 0 5px #7b70ed30; }
.hd-bell-label { font-size: 11px; font-weight: 700; }
.hd-keyword-count { position: absolute; right: 0; top: 0; background: #4e44ce; border-radius: 8px; padding: 2px 4px; font-size: 10px; color: #fff; }
body.dark-mode .hd-keyword-count { color: #fff !important; }
.hd-keyword-panel-open { overflow: hidden; }
.kw-panel { width: 400px; max-width: calc(100vw - 24px); max-height: calc(100vh - 90px); overflow-y: auto; overscroll-behavior: contain; background: var(--hd-surface); color: var(--hd-ink); }
.kw-panel > * { flex-shrink: 0; }
.kw-panel .kw-list { flex: none; overflow: visible; }
.kw-panel-header { padding: 12px 16px; }
.kw-panel-close, .kw-del-btn { min-width: 44px; min-height: 44px; }
.hd-keyword-explainer { padding: 16px; background: var(--hd-soft); margin: 12px 14px; border-radius: 12px; }
.hd-keyword-explainer > strong { display: block; font-size: 14px; line-height: 1.5; }
.hd-keyword-explainer p { margin: 8px 0 10px; color: var(--hd-muted); font-size: 12px; line-height: 1.65; word-break: keep-all; }
.hd-keyword-explainer > small { display: block; margin-top: 8px; font-size: 11px; color: var(--hd-muted); }
.hd-keyword-suggestions { display: flex; flex-wrap: wrap; gap: 6px; }
.hd-keyword-suggestions button { min-height: 40px; padding: 8px 12px; background: var(--hd-surface); border: 1px solid var(--hd-line); border-radius: 10px; color: var(--hd-ink); font-size: 12px; font-weight: 600; }
.hd-keyword-suggestions button:hover { border-color: var(--hd-accent); }
.hd-keyword-label { display: block; font-size: 12px; font-weight: 700; padding: 4px 14px 0; }
.kw-panel-add { padding-top: 8px; }
.kw-input { min-width: 0; width: 0; min-height: 46px; font-size: 16px; border-radius: 10px; }
.kw-add-btn { min-height: 46px; border-radius: 10px; background: #4e44ce; }
.kw-add-btn:disabled { opacity: .65; cursor: wait; }
.kw-panel .kw-panel-hint { color: var(--hd-muted); line-height: 1.65; font-size: 12px; }
.hd-keyword-feedback { padding: 0 14px; margin: 0 0 10px; font-size: 12px; line-height: 1.6; color: var(--hd-accent); }
.hd-keyword-feedback:empty { display: none; }
.hd-keyword-feedback.is-error, .hd-keyword-warning { color: #a43c24; }
body.dark-mode .hd-keyword-feedback.is-error, body.dark-mode .hd-keyword-warning { color: #ffb49f !important; }
.hd-keyword-warning { display: block; margin-top: 4px; font-size: 11px; line-height: 1.6; }
.kw-item.is-invalid { border: 1px solid #dba08f; }
.kw-panel-footer .kw-panel-hint { margin: 0 0 8px; }
.hd-discovery :focus-visible, .kw-panel :focus-visible, .hd-search-alert :focus-visible { outline: 3px solid var(--hd-accent); outline-offset: 3px; }
body.dark-mode .hd-discovery .hd-eyebrow, body.dark-mode .hd-discovery .hd-example-keyword { color: var(--hd-accent) !important; }
body.dark-mode .hd-discovery .hd-example-label { color: var(--hd-muted) !important; }
.product-card { border-radius: 16px; border: 1px solid var(--hd-line); box-shadow: 0 2px 6px #15163404; }
.product-info-section { background: none !important; border: 0; box-shadow: none; padding: 12px 0; margin-bottom: 8px; }
body.dark-mode .product-info-section { background: none !important; border: 0 !important; box-shadow: none !important; }
.product-info-title { font-size: 18px; }
.product-info-text { font-size: 12px; }
.product-card .meta-price { color: #be321e !important; }
.product-card .meta-ship { color: #15803d !important; }
.product-card .meta-time { color: var(--hd-muted) !important; }
body.dark-mode .product-card .meta-price { color: #ff9a83 !important; }
body.dark-mode .product-card .meta-ship { color: #72dfaa !important; }
body.dark-mode .product-card .meta-time { color: var(--hd-muted) !important; }
@media (max-width: 768px) {
    .hd-discovery { display: block; padding: 20px; margin-bottom: 16px; border-radius: 16px; }
    .hd-discovery h1 { font-size: 22px; margin-top: 8px; }
    .hd-discovery p { font-size: 12px; margin-bottom: 14px; }
    .hd-discovery-example { display: none; }
    .hd-discovery-action { width: 100%; justify-content: space-between; }
    .mobile-category-chips, .mobile-category-chips.expanded { flex-wrap: nowrap; overflow-x: auto; max-height: none; padding: 4px 0 12px; scrollbar-width: thin; }
    .m-cat-toggle { display: none; }
    .m-cat-chip { min-height: 40px; display: inline-flex; align-items: center; padding: 8px 16px; border-width: 1px; font-size: 12px; }
    .product-info-inner { gap: 10px; }
    .product-info-title { font-size: 16px; margin: 0; }
    .product-info-text { margin: 0; }
    .product-grid { gap: 10px; }
    .product-card { padding: 14px 12px; gap: 12px; border-radius: 14px; }
    .product-image-container { width: 88px; height: 100px; border-radius: 10px; }
    .product-image { object-fit: contain; background: #fff; }
    .product-title { font-size: 14px; line-height: 1.5; margin: 3px 0 8px; letter-spacing: -.25px; }
    .product-tags { flex-wrap: wrap; gap: 4px; }
    .product-meta-row { flex-wrap: wrap; column-gap: 8px; row-gap: 2px; }
    .meta-price { font-size: 16px; letter-spacing: -.5px; }
    .meta-time { margin-left: auto; }
    .product-card .bookmark-btn { width: 32px; height: 32px; font-size: 15px; }
    .product-card .product-badge-right { top: auto; right: auto; bottom: 4px; left: 4px; }
    .product-badge-left { display: none; } /* Shipping already appears beside the price. */
    .kw-panel { top: auto; bottom: 0; left: 0; right: 0; width: 100%; max-width: 100%; max-height: 90vh; max-height: 90dvh; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
    .kw-panel-header { position: sticky; top: 0; z-index: 1; background: var(--hd-surface); }
    .header-inner { gap: 6px; }
    .header-actions { gap: 5px; }
    .header-logo { font-size: 15px; letter-spacing: -.6px; }
    .header-user-link { font-size: 11px; }
}
@media (max-width: 360px) { .hd-bell-label { display: none; } .header-user-menu { gap: 3px; } .product-image-container { width: 72px; height: 88px; } }
