:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --surface: #11151d;
  --surface-2: #171c25;
  --surface-3: #202631;
  --line: #29313d;
  --text: #f6f7f9;
  --muted: #8f98a7;
  --accent: #f2a900;
  --accent-soft: rgba(242, 169, 0, .12);
  --blue: #69aef5;
  --green: #5ed38b;
  --red: #f07b78;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; min-height: 100%; overflow: hidden; background: var(--bg); color: var(--text); }
body { -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button, input { font: inherit; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--accent); }
button { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }

.app-shell { width: 100%; height: 100vh; height: 100dvh; min-height: 0; display: grid; grid-template-rows: auto minmax(0,1fr) auto; overflow: hidden; background: radial-gradient(circle at 70% -10%, rgba(47, 80, 120, .2), transparent 34%), var(--bg); }
.topbar {
  position: sticky; top: 0; z-index: 30; height: calc(56px + var(--safe-top));
  padding: var(--safe-top) 16px 0; display: flex; align-items: center;
  background: rgba(11, 13, 18, .9); border-bottom: 1px solid rgba(41, 49, 61, .75);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.brand { flex: 1 1 auto; display: flex; align-items: center; gap: 9px; min-width: 0; overflow: hidden; }
.brand-mark { width: 29px; height: 29px; border-radius: 8px; object-fit: cover; background: #0d1017; }
.brand div { min-width: 0; display: flex; align-items: baseline; gap: 6px; }
.brand strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .01em; font-size: 13px; }
.brand small { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; background: transparent; color: var(--text); border: 0; padding: 0; margin-left: -9px; margin-right: 5px; }
.icon-button svg { width: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.settings-button { flex: 0 0 36px; margin: 0 -8px 0 6px; color: #aeb6c2; }

.main { width: 100%; max-width: 100vw; min-height: 0; overflow-x: clip; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 18px 16px; }
.main.login-main { display: flex; align-items: center; padding-bottom: 28px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 11px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(28px, 8vw, 38px); line-height: 1.2; letter-spacing: -.035em; }
h2 { margin-bottom: 5px; font-size: 18px; letter-spacing: -.015em; }
.lead { color: #aab2bf; font-size: 14px; line-height: 1.75; }

.login-wrap { width: 100%; max-width: 460px; min-width: 0; margin: auto; overflow-wrap: anywhere; }
.initial-trust { padding-top: clamp(18px,6vh,54px); }
.compact-title { margin: 0 0 12px; font-size: 22px; }
.login-operator { margin: 0 0 6px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.login-purpose { margin: 0; color: #b3bbc6; font-size: 12px; line-height: 1.65; }
.login-safety { margin: 12px 0 0; padding: 12px 13px; border: 1px solid rgba(107,178,247,.3); border-radius: 13px; background: rgba(107,178,247,.07); color: #c7d9ea; font-size: 11px; line-height: 1.6; }
.login-safety strong, .login-safety span { display: block; }
.login-safety strong { margin-bottom: 3px; color: #eef6ff; }
.login-links { display: flex; justify-content: center; gap: 18px; margin-top: 13px; }
.login-links a { color: #9fb9d3; font-size: 11px; text-underline-offset: 3px; }
.hero-orbit { position: relative; width: 92px; height: 92px; margin: 4px 0 24px; border: 1px solid #313947; border-radius: 28px; display: grid; place-items: center; background: linear-gradient(145deg, #1b222e, #10141b); box-shadow: 0 22px 60px rgba(0,0,0,.35); }
.hero-orbit::after { content: ""; position: absolute; right: -8px; top: -8px; width: 25px; height: 25px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 28px rgba(242,169,0,.45); }
.hero-orbit strong { font-size: 42px; letter-spacing: -.08em; }
.form-card, .panel-card { border: 1px solid var(--line); border-radius: 18px; background: rgba(17, 21, 29, .9); box-shadow: 0 18px 50px rgba(0,0,0,.18); }
.form-card { margin-top: 12px; padding: 16px; }
.field { display: block; margin-bottom: 13px; }
.field > span { display: block; color: #b6bdc8; font-size: 12px; margin-bottom: 7px; }
.field input, .search-box input {
  width: 100%; height: 50px; border-radius: 13px; border: 1px solid #303846;
  background: #0d1117; color: var(--text); padding: 0 14px; font-size: 16px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(242,169,0,.1); }
.primary-button, .secondary-button, .amazon-button {
  min-height: 50px; border: 0; border-radius: 13px; font-weight: 750; cursor: pointer;
}
.primary-button { width: 100%; background: var(--accent); color: #17130a; }
.primary-button:disabled { opacity: .55; }
.secondary-button { background: var(--surface-3); color: var(--text); border: 1px solid #343d4a; padding: 0 16px; }
.text-button { border: 0; background: transparent; color: var(--muted); padding: 12px; width: 100%; font-size: 12px; }
.form-error { min-height: 18px; margin: 2px 0 8px; color: var(--red); font-size: 12px; }

.static-body { min-height: 100%; overflow: auto; }
.static-topbar { border-bottom: 1px solid var(--line); }
.static-brand { display: flex; align-items: center; gap: 10px; width: min(720px,calc(100% - 32px)); min-height: 64px; margin: auto; color: var(--text); text-decoration: none; }
.static-brand img { width: 34px; height: 34px; border-radius: 10px; }
.static-brand strong { font-size: 14px; }
.static-page { width: min(720px,calc(100% - 32px)); max-width: 100vw; margin: 0 auto; padding: 44px 0 72px; overflow-wrap: anywhere; }
.static-page h1 { font-size: clamp(28px,8vw,42px); }
.static-section { margin-top: 14px; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.static-section h2 { margin: 0 0 7px; font-size: 16px; }
.static-section p, .static-section li { color: #b3bbc6; font-size: 12px; line-height: 1.75; }
.static-section p, .static-section ul { margin: 0; }
.static-section ul { padding-left: 1.4em; }
.static-section li + li { margin-top: 5px; }
.static-updated { margin: 18px 2px 0; color: var(--muted); font-size: 10px; }
.static-primary-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 18px; padding: 0 16px; border-radius: 11px; background: var(--accent); color: #18130a; font-size: 12px; font-weight: 800; text-decoration: none; }
.static-message { min-height: 100vh; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.static-mark { width: 58px; height: 58px; margin-bottom: 20px; border-radius: 16px; }

.landing-body { background: radial-gradient(circle at 74% -8%, rgba(47,80,120,.24), transparent 33%), var(--bg); }
.landing-page { padding-top: clamp(54px,10vw,92px); }
.landing-hero { max-width: 610px; }
.landing-hero h1 { max-width: 580px; margin-bottom: 18px; font-size: clamp(40px,10vw,72px); line-height: 1.08; }
.landing-hero .lead { max-width: 570px; }
.landing-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.landing-actions .static-primary-link { min-width: 136px; margin-top: 0; }
.landing-secondary-link { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; border: 1px solid #3a4554; border-radius: 11px; color: #d7dce3; font-size: 12px; font-weight: 750; text-decoration: none; }
.landing-feature-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 46px; }
.landing-feature { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: rgba(17,21,29,.85); }
.landing-feature span { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.landing-feature h2 { margin: 10px 0 7px; font-size: 15px; }
.landing-feature p { margin: 0; color: #aeb6c1; font-size: 11px; line-height: 1.7; }
.landing-safety { margin-top: 28px; }
.landing-safety .eyebrow { margin-bottom: 9px; }
.landing-info-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 13px; }
.landing-info-links a { color: #9fc0df; font-size: 11px; text-underline-offset: 3px; }
.landing-footer { display: grid; gap: 5px; margin: 22px 2px 0; color: #7f8997; font-size: 10px; line-height: 1.6; }
@media (max-width: 620px) { .landing-feature-grid { grid-template-columns: 1fr; margin-top: 34px; } }

.home-head { padding: 4px 2px 12px; }
.home-head h1 { margin-bottom: 10px; font-size: 20px; }
.search-box { position: relative; display: flex; gap: 8px; }
.search-box input { padding-right: 48px; }
.search-box button { position: absolute; right: 5px; top: 5px; width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--accent); color: #151109; display: grid; place-items: center; }
.search-box svg, .bottom-nav svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.search-hint { margin: 8px 2px 0; color: var(--muted); font-size: 11px; }
.section-label { display: flex; align-items: center; justify-content: space-between; margin: 16px 2px 8px; color: #c4cad2; font-size: 12px; }
.recent-list { display: grid; gap: 8px; }
.recent-swipe-row { position: relative; overflow: hidden; border-radius: 14px; background: #c94845; }
.recent-item { position: relative; z-index: 1; width: 100%; max-width: 100%; min-width: 0; display: flex; gap: 11px; align-items: center; overflow: hidden; padding: 11px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: left; touch-action: pan-y; transition: transform .18s ease; }
.recent-swipe-row.revealed .recent-item { transform: translateX(-72px); }
.recent-delete { position: absolute; z-index: 0; inset: 0 0 0 auto; width: 72px; border: 0; background: #c94845; color: #fff; font-size: 12px; font-weight: 750; }
.recent-item img, .recent-placeholder { width: 46px; height: 46px; border-radius: 10px; object-fit: contain; background: white; flex: 0 0 auto; }
.recent-placeholder { display: grid; place-items: center; color: #3b4350; font-weight: 800; }
.recent-item div { flex: 1 1 0; width: 0; min-width: 0; overflow: hidden; }
.recent-item strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; font-size: 13px; line-height: 1.4; }
.recent-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.home-tip { margin-top: 20px; padding: 15px; border: 1px solid rgba(105,174,245,.25); border-radius: 15px; background: rgba(105,174,245,.06); color: #b8cce0; font-size: 12px; line-height: 1.65; }

.settings-page { width: 100%; max-width: 480px; margin: 0 auto; }
.settings-title { margin: 0 2px 12px; font-size: 22px; }
.settings-section { margin-bottom: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.settings-section h2 { margin: 0 0 13px; font-size: 14px; }
.settings-note { margin: -5px 0 11px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 11px; }
.account-row strong { color: var(--text); font-size: 12px; }
.settings-logout { width: 100%; margin-top: 12px; padding: 9px; border: 1px solid #333c49; border-radius: 9px; background: transparent; color: #aab3bf; font-size: 11px; }
.settings-logout-all { margin-top: 7px; border-color: #684044; color: #e1a4a9; }
.settings-logout:disabled { opacity: .55; }
.account-note { margin: 8px 2px 0; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 9px; }
.settings-grid > label > span:first-child { display: block; margin: 0 0 5px 2px; color: #aab2be; font-size: 10px; }
.settings-input { position: relative; display: block; }
.settings-input input { width: 100%; height: 42px; border: 1px solid #303846; border-radius: 10px; background: #0d1117; color: var(--text); padding: 0 27px 0 10px; text-align: right; outline: none; }
.settings-input b { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); color: #7c8694; font-size: 11px; font-weight: 600; pointer-events: none; }
.settings-input b:first-child { left: 10px; right: auto; }
.settings-input b:first-child + input { padding-left: 24px; padding-right: 10px; }
.settings-input input:focus { border-color: var(--accent); }
.settings-offer-filters { margin-bottom: 0; }
.settings-save { min-height: 44px; margin-top: 12px; font-size: 12px; }
.profit-band-list { display: grid; gap: 7px; }
.profit-band-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 7px; align-items: end; padding: 9px; border: 1px solid #29313d; border-radius: 11px; background: #0f131a; }
.profit-band-range { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.profit-band-range > span { color: #8f98a7; font-size: 8px; }
.profit-band-range > strong { margin-left: auto; font-size: 11px; }
.profit-band-range label { display: flex; align-items: center; justify-content: flex-end; gap: 5px; min-width: 0; margin-left: auto; color: #aab3c0; font-size: 10px; }
.profit-band-range input { width: 112px; height: 34px; border: 1px solid #303846; border-radius: 8px; background: #171c25; color: var(--text); padding: 0 8px; text-align: right; font-size: 12px; outline: none; }
.profit-band-range input:focus { border-color: var(--accent); }
.profit-band-remove { flex: 0 0 auto; height: 26px; padding: 0 7px; border: 1px solid #563b3e; border-radius: 6px; background: transparent; color: #cf8d92; font-size: 8px; }
.profit-band-add { width: 100%; height: 38px; margin-top: 8px; border: 1px dashed #4b607a; border-radius: 9px; background: transparent; color: #75b7ef; font-size: 10px; font-weight: 700; }
.profit-band-input { position: relative; min-width: 0; }
.profit-band-input > span { display: block; margin: 0 0 4px; color: #8f98a7; font-size: 8px; }
.profit-band-input input { width: 100%; height: 36px; border: 1px solid #303846; border-radius: 8px; background: #171c25; color: var(--text); padding: 0 20px 0 8px; text-align: right; font-size: 12px; outline: none; }
.profit-band-input input:focus { border-color: var(--accent); }
.profit-band-input b { position: absolute; right: 7px; bottom: 10px; color: #7f8997; font-size: 9px; pointer-events: none; }
.profit-band-input b:first-of-type { left: 7px; right: auto; }
.profit-band-input b:first-of-type + input { padding-left: 18px; padding-right: 7px; }
.settings-sellers { margin-top: 22px; margin-bottom: 0; }
.settings-seller-list { display: grid; gap: 1px; }
.settings-seller-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 10px 0; border-top: 1px solid #252c36; }
.settings-seller-row:first-child { border-top: 0; padding-top: 0; }
.settings-seller-row:last-child { padding-bottom: 0; }
.settings-seller-row div { min-width: 0; }
.settings-seller-row strong, .settings-seller-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-seller-row strong { font-size: 11px; }
.settings-seller-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.settings-seller-row button { flex: 0 0 auto; height: 25px; padding: 0 8px; border: 1px solid #3b4654; border-radius: 6px; background: transparent; color: #b4bdc8; font-size: 9px; }
.settings-empty { padding: 4px 0; color: var(--muted); font-size: 11px; }

.loading-view { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.pulse-mark { width: 56px; height: 56px; margin: 0 auto 17px; border-radius: 18px; border: 1px solid var(--accent); display: grid; place-items: center; color: var(--accent); font-weight: 800; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 13px rgba(242,169,0,0); background: rgba(242,169,0,.12); } }
.loading-view p { color: var(--muted); font-size: 13px; }

.choice-list { display: grid; gap: 7px; }
.choice-item { width: 100%; min-height: 66px; display: grid; grid-template-columns: 50px minmax(0,1fr) 12px; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--text); text-align: left; }
.choice-item img, .choice-placeholder { width: 50px; height: 50px; border-radius: 9px; object-fit: contain; background: white; }
.choice-placeholder { display: grid; place-items: center; color: #4b5564; font-weight: 800; }
.choice-copy { min-width: 0; }
.choice-item strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; line-height: 1.4; }
.choice-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.choice-item i { color: var(--muted); font-size: 19px; font-style: normal; }
.choice-amazon-link { min-height: 44px; margin-bottom: 9px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 11px; background: var(--accent); color: #17130a; text-decoration: none; font-size: 12px; font-weight: 750; }
.choice-asin-form { display: grid; grid-template-columns: minmax(0,1fr) 54px; gap: 7px; margin-bottom: 9px; }
.choice-asin-form input { min-width: 0; height: 40px; border: 1px solid #303846; border-radius: 10px; background: #0d1117; color: var(--text); padding: 0 10px; font-size: 12px; outline: none; }
.choice-asin-form input:focus { border-color: #4b91d5; box-shadow: 0 0 0 2px rgba(75,145,213,.12); }
.choice-asin-form button { border: 0; border-radius: 10px; background: var(--accent); color: #17130a; font-size: 11px; font-weight: 750; }

.product-tab-strip { display: flex; align-items: stretch; gap: 6px; margin: -6px -2px 14px; }
.product-tab-scroll { flex: 1 1 auto; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.product-tab-scroll::-webkit-scrollbar { display: none; }
.product-tab { min-width: 128px; max-width: 188px; height: 44px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); overflow: hidden; }
.product-tab.active { border-color: var(--accent); background: var(--accent-soft); }
.product-tab-select { flex: 1 1 auto; min-width: 0; height: 100%; display: flex; align-items: center; gap: 6px; padding: 0 3px 0 7px; border: 0; background: transparent; color: #c9ced6; }
.product-tab-select img { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 5px; object-fit: contain; background: white; }
.product-tab-select span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; font-weight: 700; }
.product-tab-close { width: 40px; height: 100%; flex: 0 0 40px; border: 0; background: transparent; color: #9ca5b2; font-size: 20px; }
.product-tab-add { width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: #aab3bf; font-size: 23px; }

.product-hero { display: grid; grid-template-columns: 68px 1fr; gap: 11px; align-items: start; padding: 0 0 11px; }
.product-image { width: 68px; height: 68px; border-radius: 11px; object-fit: contain; background: #fff; border: 1px solid #2c333e; }
.product-image-placeholder { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 11px; background: var(--surface-2); color: #475160; font-weight: 800; }
.product-copy { min-width: 0; }
.product-title { margin: 0 0 4px; font-size: 14px; line-height: 1.4; font-weight: 750; }
.product-meta { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; color: var(--muted); font-size: 10px; }
.rank { color: #f2ce7e; font-weight: 750; }
.product-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.product-actions.has-variations { grid-template-columns: repeat(3,minmax(0,1fr)); }
.product-actions a, .product-actions button { height: 30px; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 1px solid #4b91d5; border-radius: 16px; background: transparent; color: #70b8ff; text-decoration: none; font-size: 11px; font-weight: 650; white-space: nowrap; }
.variation-link.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.offer-filters { margin-bottom: 9px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); overflow: hidden; }
.filter-select-row { width: 100%; min-height: 41px; display: grid; grid-template-columns: 45px minmax(0,1fr) 12px; gap: 7px; align-items: center; padding: 0 11px; border: 0; border-top: 1px solid #252c36; background: transparent; color: var(--text); text-align: left; }
.filter-select-row:first-child { border-top: 0; }
.filter-select-row > span { color: #9ca5b2; font-size: 11px; }
.filter-select-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; font-size: 12px; font-weight: 650; }
.filter-select-row i { color: #697484; font-size: 18px; font-style: normal; }
.filter-sheet-layer { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; overscroll-behavior: contain; }
.filter-sheet-backdrop { position: absolute; inset: 0; border: 0; background: rgba(0,0,0,.58); }
.filter-sheet { position: relative; width: min(100%,480px); max-height: calc(100dvh - var(--safe-top) - 8px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 8px 15px calc(15px + var(--safe-bottom)); border-radius: 18px 18px 0 0; border: 1px solid #323a46; border-bottom: 0; background: #151922; box-shadow: 0 -18px 50px rgba(0,0,0,.4); }
.filter-sheet-head { min-height: 42px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #2b323d; }
.filter-sheet-head strong { font-size: 14px; }
.filter-sheet-head button { min-height: 34px; border: 0; background: transparent; color: var(--accent); font-size: 12px; font-weight: 700; }
.filter-sheet-option { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 5px; border: 0; border-bottom: 1px solid #252c36; background: transparent; color: #d9dde3; font-size: 13px; text-align: left; }
.filter-sheet-option:last-child { border-bottom: 0; }
.filter-sheet-option.selected { color: #f3bc4c; font-weight: 700; }
.filter-sheet-option i { color: var(--accent); font-style: normal; }
.filter-sheet-option input { width: 18px; height: 18px; accent-color: var(--accent); }
.history-summary { margin: 4px 2px 10px; }
.history-summary span { color: var(--muted); font-size: 10px; }
.offer-list { display: grid; gap: 9px; }
.offer-card { position: relative; display: grid; grid-template-columns: 108px minmax(0,1fr); gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); overflow: hidden; }
.offer-card.expandable { cursor: pointer; }
.offer-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.offer-condition { color: #f0f2f5; font-size: 11px; font-weight: 700; line-height: 1.35; }
.offer-price { margin: 3px 0 6px; font-size: 19px; font-weight: 820; letter-spacing: -.035em; }
.offer-tags { display: flex; gap: 5px; }
.tag { display: inline-flex; align-items: center; min-height: 21px; padding: 0 7px; border-radius: 6px; background: #2a3039; color: #c4c9d0; font-size: 9px; font-weight: 700; }
.tag.fba { color: #bcd9f7; background: #1b3b5a; }
.price-reference { min-height: 28px; display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; color: #d7af50; font-size: 10px; white-space: nowrap; }
.price-reference input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.offer-side { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.seller-line { display: flex; align-items: flex-start; gap: 6px; min-width: 0; color: var(--blue); font-size: 11px; font-weight: 700; }
.seller-line.watched::before { content: ""; width: 8px; height: 8px; flex: 0 0 8px; margin-top: 4px; border-radius: 50%; background: var(--accent); }
.seller-name { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; white-space: normal; color: inherit; text-decoration: none; line-height: 1.45; }
.seller-button { flex: 0 0 auto; min-width: 38px; height: 25px; padding: 0 6px; border-radius: 6px; border: 1px solid #3b4654; background: transparent; color: #b4bdc8; font-size: 9px; }
.seller-button.active { border-color: rgba(242,169,0,.45); color: #e7bd5a; }
.offer-note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 1px; color: #b3bac5; font-size: 12px; line-height: 1.55; }
.offer-note.open { display: block; overflow: visible; }
.note-toggle-hint { display: inline-block; margin: 3px 0 7px; color: #7f8997; font-size: 10px; }
.empty-card { padding: 28px 20px; text-align: center; border: 1px dashed #323b48; border-radius: 17px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.secondary-link-button { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: center; border: 1px solid #343d4a; border-radius: 13px; background: var(--surface-3); color: var(--text); text-decoration: none; font-size: 12px; font-weight: 700; }
.miss-asin-form { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); text-align: left; }
.miss-asin-form label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; }
.miss-asin-form div { display: grid; grid-template-columns: minmax(0,1fr) 58px; gap: 7px; }
.miss-asin-form input { min-width: 0; height: 42px; border: 1px solid #303846; border-radius: 10px; background: #0d1117; color: var(--text); padding: 0 10px; font-size: 12px; outline: none; }
.miss-asin-form button { border: 0; border-radius: 10px; background: var(--accent); color: #17130a; font-size: 11px; font-weight: 750; }
.miss-asin { margin: 4px 0 8px; color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.miss-product-actions { width: 100%; margin-top: 0; }

.variations-panel { padding-top: 2px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.panel-heading strong { font-size: 14px; }
.panel-heading button { border: 0; background: transparent; color: var(--muted); font-size: 11px; }
.variation-list { display: grid; gap: 8px; }
.variation-item { width: 100%; min-height: 66px; display: grid; grid-template-columns: 50px minmax(0,1fr) 12px; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--text); text-align: left; }
.variation-item.current { border-color: rgba(242,169,0,.55); background: var(--accent-soft); }
.variation-item img, .variation-placeholder { width: 50px; height: 50px; border-radius: 9px; object-fit: contain; background: white; }
.variation-placeholder { display: grid; place-items: center; color: #4b5564; font-weight: 800; }
.variation-item strong { display: block; font-size: 12px; line-height: 1.4; }
.variation-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.variation-item i { color: var(--muted); font-size: 19px; font-style: normal; }

.amazon-panel { padding-top: 0; }
.amazon-filter-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 8px; }
.amazon-filter-head strong { font-size: 14px; }
.amazon-filter-head span { color: var(--muted); font-size: 10px; }
.amazon-panel .offer-filters { margin-bottom: 9px; }
.current-offer-list { margin-bottom: 14px; }
.amazon-visual { height: 180px; margin-bottom: 16px; border: 1px solid #293341; border-radius: 24px; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, rgba(242,169,0,.15), transparent 45%), linear-gradient(155deg, #19212c, #10141b); overflow: hidden; }
.amazon-visual div { text-align: center; }
.amazon-visual strong { display: block; font-size: 36px; letter-spacing: -.07em; }
.amazon-visual span { color: var(--accent); font-size: 11px; letter-spacing: .12em; }
.amazon-panel h2 { font-size: 22px; }
.amazon-button { width: 100%; min-height: 52px; margin: 2px 0 7px; display: flex; align-items: center; justify-content: center; gap: 9px; background: var(--accent); color: #17130a; text-decoration: none; }
.amazon-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.amazon-filter-help { margin: 7px 2px 0; color: var(--muted); font-size: 10px; text-align: center; }
.flow-steps { display: grid; gap: 0; margin-top: 22px; }
.flow-step { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 11px; min-height: 52px; color: #aab2be; font-size: 12px; line-height: 1.55; }
.flow-step:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 29px; bottom: 2px; width: 1px; background: #323a46; }
.flow-step i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--accent); font-size: 11px; font-style: normal; font-weight: 800; }

.calc-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; border-radius: 9px; background: #14171c; border: 1px solid var(--line); margin-bottom: 7px; }
.calc-mode button { height: 32px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
.calc-mode button.active { background: #2a2416; border-color: #9c6817; color: #f1b44c; }
.calc-fields { display: grid; gap: 6px; }
.calc-input-row { min-height: 47px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; border: 1px solid #2c333d; border-radius: 10px; background: #1b1e24; color: #e6e8ec; font-size: 13px; }
.calc-input-row.small { min-width: 0; padding-inline: 8px; font-size: 11px; }
.calc-input-wrap { display: inline-flex; align-items: center; gap: 3px; color: #818b99; font-size: 14px; }
.calc-input-wrap input { width: 118px; padding: 2px 0; border: 0; background: transparent; color: #f2f3f5; text-align: right; font-size: 17px; font-weight: 650; outline: none; }
.calc-input-row.small .calc-input-wrap input { width: 54px; font-size: 15px; }
.calc-fee-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.calc-result { margin-top: 6px; }
.calc-profit { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 12px; border: 1px solid; border-radius: 12px; font-weight: 700; }
.calc-profit.positive { background: #16301f; border-color: #2d6a44; }
.calc-profit.negative { background: #301818; border-color: #6a2d2d; }
.calc-profit > span:first-child { font-size: 15px; }
.calc-profit strong { color: #7ed09a; font-size: 23px; font-variant-numeric: tabular-nums; }
.calc-profit.negative strong { color: var(--red); }
.calc-profit small { margin-left: 5px; color: #aeb6c1; font-size: 10px; }
.calc-profit.auction { align-items: flex-start; }
.auction-values { display: grid; gap: 5px; text-align: right; }
.auction-values > span { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 6px; }
.auction-values small { margin: 0; color: #9da6b2; }
.auction-values i { grid-column: 1 / -1; color: #9da6b2; font-size: 9px; font-style: normal; font-weight: 500; }
.calc-auto-fees { margin-top: 6px; padding: 7px 8px; border: 1px solid #2d5139; border-radius: 8px; background: #17211b; color: #9bc9aa; font-size: 10px; }
.calc-profit-rule { margin-top: 6px; color: #9da6b2; font-size: 9px; text-align: right; }
.calc-auto-fees button { margin-left: 6px; padding: 2px 6px; border: 1px solid #477857; border-radius: 5px; background: transparent; color: #9bc9aa; font-size: 9px; }
.calc-caption { margin: 11px 2px 0; color: #757f8d; font-size: 10px; line-height: 1.55; }

.bottom-nav { position: relative; z-index: 40; width: 100%; height: calc(66px + var(--safe-bottom)); padding: 6px 8px var(--safe-bottom); display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-top: 1px solid rgba(45,53,65,.9); background: #0d1016; contain: layout paint; }
.bottom-nav button { position: relative; width: 100%; min-width: 0; border: 0; background: transparent; color: #737d8b; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 9px; line-height: 1; }
.bottom-nav button.active { color: var(--accent); }
.bottom-nav button.active::before { content: ""; position: absolute; top: -6px; left: 50%; width: 30px; height: 2px; background: var(--accent); border-radius: 0 0 2px 2px; box-shadow: 0 4px 14px rgba(242,169,0,.5); transform: translateX(-50%); }
.bottom-nav svg { width: 22px; height: 22px; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(81px + var(--safe-bottom)); transform: translate(-50%, 20px); width: max-content; max-width: calc(100% - 32px); padding: 10px 14px; border: 1px solid #3a4350; border-radius: 12px; background: #202630; color: var(--text); font-size: 11px; box-shadow: 0 10px 30px rgba(0,0,0,.3); opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/*
 * Installed iOS web apps with viewport-fit=cover can report dvh with the
 * safe-area insets already removed. Adding the insets to the header/footer
 * then leaves the footer above the physical bottom. In standalone mode, vh
 * includes the safe area and lets the grid consume the full display.
 * https://bugs.webkit.org/show_bug.cgi?id=254868
 */
@media (display-mode: standalone) {
  html, body { height: 100vh; min-height: 100vh; }
  .app-shell { height: 100vh; }
  .filter-sheet { max-height: calc(100vh - var(--safe-top) - 8px); }
}

@media (min-width: 600px) {
  .app-shell { max-width: 480px; margin: 0 auto; border-left: 1px solid #202631; border-right: 1px solid #202631; }
}

@media (max-width: 359px) {
  .topbar { padding-inline: 12px; }
  .main { padding-inline: 12px; }
  .brand strong { font-size: 12px; }
  .recent-item { gap: 9px; padding: 9px; }
  .recent-item img, .recent-placeholder { width: 42px; height: 42px; }
  .filter-row { gap-inline: 7px; }
}
