:root {
  color-scheme: light;
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #17212b;
  background: #f7f8fa;
  --accent: #285c4d;
  --accent-light: #eaf2ef;
  --muted: #4a5562;
  --border: #e1e5ea;
  --input: #cfd5dc;
  --danger: #b42318;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 90px; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: 3px; }
p { margin: 8px 0 12px; }
h1,h2,h3,h4 { color: inherit; }
h1 { font-size: 26px; line-height: 1.4; margin: 0; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 22px; line-height: 1.5; margin: 0 0 14px; }
h3 { font-size: 16px; margin: 0 0 12px; }
button,input,select,textarea { font: inherit; }
button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 9px 16px; min-height: 42px; max-width: 100%; border: 1px solid var(--input); border-radius: 8px; color: #17212b; background: #fff; font-weight: 500; cursor: pointer; transition: background .15s, border-color .15s; }
button:hover { background: #f1f3f5; }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button.primary:hover { background: #1f4a3e; }
button.quiet { background: #fff; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
label { display: block; margin: 10px 0; font-size: 15px; font-weight: 500; }
input,select,textarea { display: block; width: 100%; min-width: 0; margin-top: 6px; border: 1px solid var(--input); border-radius: 8px; background: #fff; color: #17212b; padding: 11px 13px; font-size: 17px; line-height: 1.5; }
input,select { min-height: 48px; }
input[type=number] { font-variant-numeric: tabular-nums; font-size: 18px; }
input::placeholder,textarea::placeholder { color: #6b7480; opacity: 1; }
input:hover,select:hover,textarea:hover { border-color: #b5bdc6; }
input[type=checkbox] { display: inline-block; width: 18px; min-height: 18px; height: 18px; margin: 3px 8px 0 0; accent-color: var(--accent); flex-shrink: 0; }
textarea { resize: vertical; }
summary { cursor: pointer; font-size: 15px; font-weight: 500; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.check { display: flex; align-items: flex-start; font-weight: 400; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.muted,.input-help { color: var(--muted); font-size: 14px; font-weight: 400; line-height: 1.7; }
.input-help { display: block; margin-top: 4px; }
.status { color: var(--muted); font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.status:empty { display: none; }
.status.error { color: var(--danger); background: #fdf3f2; border: 1px solid #f1c4bf; padding: 12px; border-radius: 8px; }
.workspace-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; width: 220px; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--border); }
.brand { display: block; padding: 26px 24px; color: inherit; text-decoration: none; }
.brand strong { display: block; font-size: 17px; line-height: 1.4; }
.brand small { display: block; margin-top: 7px; font-size: 14px; color: var(--muted); line-height: 1.6; }
.brand small span { display: block; }
nav { display: flex; flex-direction: column; gap: 3px; padding: 0 12px; }
nav button { width: 100%; justify-content: flex-start; border: 0; border-radius: 6px; font-size: 15px; padding: 9px 12px; }
nav button[aria-current] { background: var(--accent-light); color: var(--accent); }
.sidebar-settings { margin-top: auto; padding: 12px; border-top: 1px solid var(--border); }
.sidebar-settings button { display: block; text-align: left; width: 100%; border: 0; padding: 9px 12px; font-size: 15px; }
.settings-hint { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.application { margin-left: 220px; min-width: 0; }
main { width: 100%; max-width: 1160px; margin: 0 auto; padding: 36px 40px 24px; }
.intro { margin-bottom: 20px; }
.search-toolbar { display: flex; align-items: flex-end; gap: 12px; }
.search-toolbar label { flex: 1; min-width: 0; margin: 0; }
.search-actions { display: flex; gap: 8px; flex-shrink: 0; }
.search-actions button { min-height: 48px; white-space: nowrap; }
.search-actions .primary { padding-inline: 24px; }
.search-conditions { margin-top: 14px; padding: 20px; border: 1px solid var(--border); background: #fff; border-radius: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.search-conditions > p { grid-column: 1 / -1; margin: 0; }
#sites label { display: flex; align-items: flex-start; font-weight: 400; }
.fallback { margin: 12px 0; }
.fallback summary { font-size: 14px; color: var(--muted); }
.fallback[open] { padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.notice { margin: 14px 0 0; padding: 12px 14px; background: #f1f3f5; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; color: var(--muted); line-height: 1.7; }
.research-list { margin-top: 28px; }
.research-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.research-list-heading h2 { font-size: 18px; margin: 0; display: flex; align-items: center; gap: 8px; }
.count-badge { font-size: 14px; font-weight: 500; color: var(--muted); }
.session-note { color: var(--muted); font-size: 13px; }
.research-rows { display: flex; flex-direction: column; gap: 24px; }
.research-workbench { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 16px; align-items: start; }
.workbench-reference { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.workbench-reference h3 { font-size: 16px; margin: 8px 0; line-height: 1.65; overflow-wrap: anywhere; }
.source-label { display: block; color: var(--muted); font-size: 13px; font-weight: 500; }
.workbench-reference > .quiet { width: 100%; font-size: 14px; padding: 9px; }
.source-details { margin: 12px 0; }
.candidate-detail { margin: 0 0 10px; }
.candidate-detail dt { color: var(--muted); font-size: 13px; font-weight: 500; }
.candidate-detail dd { margin: 3px 0 0; font-size: 14px; overflow-wrap: anywhere; line-height: 1.7; }
.source-link { display: inline-block; margin: 5px 0; font-size: 14px; overflow-wrap: anywhere; }
.price-unconfirmed { font-size: 13px; color: var(--muted); }
.workbench-sources { min-width: 0; }
.workbench-sources > .source-link { margin: 0 0 12px; }
.source-rail { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; align-items: stretch; border-radius: 10px; }
.source-candidate { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: #fff; display: flex; flex-direction: column; box-shadow: 0 1px 2px #17212b0a; }
.source-candidate.is-selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.source-candidate.is-selected::before { content: '選択中'; position: absolute; top: 10px; left: 10px; z-index: 1; background: var(--accent); color: #fff; padding: 2px 8px; border-radius: 5px; font-size: 13px; }
.candidate-image { position: relative; overflow: hidden; aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; background: #eef0f3; border-bottom: 1px solid var(--border); color: #687481; font-size: 14px; }
.candidate-image img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.candidate-body { padding: 16px; display: flex; flex-direction: column; flex: 1; min-width: 0; }
.source-candidate h4 { font-size: 16px; font-weight: 500; line-height: 1.6; min-height: 3.2em; margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.candidate-price { display: flex; flex-direction: column; gap: 3px; margin: 0 0 12px; }
.candidate-price-value { font-size: 30px; font-weight: 750; line-height: 1.3; color: #17212b; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.candidate-price-label,.candidate-price-note { color: var(--muted); font-size: 12px; }
.candidate-body > .source-label { font-size: 14px; }
.candidate-more { margin: 0 0 14px; }
.candidate-more summary { font-size: 13px; color: var(--muted); }
.candidate-body > .source-details { margin: 8px 0; }
.candidate-body > .source-details dd { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.candidate-actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }
.candidate-actions .source-link { margin: 0; min-height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--input); border-radius: 8px; text-decoration: none; font-size: 14px; color: #17212b; }
.candidate-actions .source-link:hover { background: #f1f3f5; }
.candidate-actions .primary { width: 100%; font-size: 14px; padding: 10px 6px; }
.empty-source,.research-empty { grid-column: 1 / -1; border: 1px dashed var(--input); border-radius: 12px; background: #fff; text-align: center; padding: 36px 24px; }
.empty-source strong,.research-empty strong { font-size: 17px; }
.empty-source p,.research-empty p { font-size: 15px; color: var(--muted); margin: 8px 0 0; }
.source-rail[aria-busy=true] { opacity: .5; }
.search-link-list { margin-top: 16px; font-size: 14px; }
.search-link-list ul { padding-left: 20px; }
#calculatorPane { margin-top: 36px; scroll-margin-top: 90px; }
.calculator-card { overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: 0 1px 2px #17212b0a; }
.selected-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px; border-bottom: 1px solid var(--border); }
.selected-product { min-width: 0; display: flex; align-items: center; gap: 14px; }
.selected-image { width: 64px; height: 64px; flex-shrink: 0; background: #eef0f3; border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #687481; overflow: hidden; }
.selected-image img { width: 100%; height: 100%; object-fit: contain; }
.selected-copy { min-width: 0; }
.selected-copy h3 { margin: 0; font-size: 13px; color: var(--muted); font-weight: 500; }
#selectedCandidate { margin: 2px 0; font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.selected-price { margin: 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.selected-copy .source-link { font-size: 13px; margin: 2px 0 0; }
#prepareListing { flex-shrink: 0; font-size: 15px; }
.calculation-layout { display: grid; grid-template-columns: minmax(0,1fr) 360px; }
.calculation-inputs { padding: 20px; min-width: 0; }
.calc-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.calc-grid label { margin: 0; }
.category-field { grid-column: 1 / -1; }
#categoryFeeStatus,#feeSummary,#fxStatus { font-size: 13px; margin: 12px 0; }
#feeBreakdown { margin: 12px 0; }
#feeBreakdown summary { font-size: 14px; }
#feeDetails { padding: 8px 0; }
#costDetails { margin-top: 20px; border: 1px solid var(--border); border-radius: 8px; }
#costDetails > summary { padding: 12px 16px; }
#costDetails[open] > summary { border-bottom: 1px solid var(--border); }
#costDetails .calc-grid { padding: 16px; }
#costDetails .muted,#costDetails > a { display: block; margin: 0 16px 16px; font-size: 13px; }
#costDetails input,#costDetails select { font-size: 16px; min-height: 44px; }
.calculation-assumptions { margin: 16px 0; }
.calculation-assumptions summary,.calculation-assumptions p { font-size: 13px; }
#clear { margin-top: 8px; font-size: 14px; }
.result-column { padding: 20px; border-left: 1px solid var(--border); background: #fbfcfd; min-width: 0; }
.result-column > h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.result-placeholder { text-align: center; border: 1px dashed var(--input); border-radius: 8px; padding: 24px 12px; margin-top: 16px; }
.result-placeholder strong { display: block; color: #747f8a; font-size: 38px; line-height: 1.3; }
.result-placeholder p { font-size: 15px; }
.result-column:has(#result:not([hidden])) .result-placeholder { display: none; }
#profitValue { display: block; font-size: 40px; font-weight: 750; line-height: 1.3; letter-spacing: -.02em; color: var(--accent); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.result.loss #profitValue { color: var(--danger); }
#marginValue { font-size: 16px; margin: 6px 0 20px; font-variant-numeric: tabular-nums; }
#breakdown { border-block: 1px solid var(--border); margin: 0; font-size: 14px; }
.breakdown-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.breakdown-row:last-child { border: 0; }
.breakdown-row dd { margin: 0; white-space: nowrap; font-weight: 500; font-variant-numeric: tabular-nums; }
#purchaseLimit { font-size: 14px; margin-top: 16px; }
.result-note,#calcStatus { font-size: 13px; color: var(--muted); margin-top: 16px; }
footer { font-size: 13px; color: var(--muted); margin-top: 24px; }
footer > p { margin: 0 0 14px; }
footer details { border-top: 1px solid var(--border); padding-top: 14px; }
footer summary { font-size: 13px; }
footer details p { line-height: 1.8; }
dialog { width: min(530px,calc(100% - 28px)); max-height: 90dvh; overflow: auto; border: 1px solid var(--border); border-radius: 12px; padding: 25px; color: #17212b; background: #fff; box-shadow: 0 16px 60px #17212b22; }
dialog::backdrop { background: #17212b55; }
dialog p,dialog label,dialog summary { font-size: 13px; }
dialog h2 { clear: both; padding-top: 10px; font-size: 20px; }
dialog input,dialog textarea { font-size: 14px; }
dialog button { font-size: 14px; margin-bottom: 8px; }
dialog .check { align-items: flex-start; }
dialog .muted { font-size: 13px; }
.close { float: right; }
hr { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }
#listingPreparation { width: min(660px,calc(100% - 28px)); }
#listingPreview { white-space: pre-wrap; overflow-wrap: anywhere; background: #f1f3f5; padding: 16px; font: inherit; font-size: 14px; border-radius: 8px; }
@media (max-width: 1300px) {
  main { padding: 28px 24px; }
  .source-rail { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .calculation-layout { grid-template-columns: minmax(0,1fr) 320px; }
}
@media (max-width: 1050px) {
  .workspace-sidebar { position: sticky; top: 0; width: 100%; height: auto; flex-direction: row; align-items: center; gap: 12px; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--border); }
  .brand { padding: 0; margin-right: auto; }
  .brand small { margin: 0; font-size: 11px; }
  .brand small span { display: none; }
  nav { flex-direction: row; padding: 0; gap: 2px; }
  nav button { width: auto; white-space: nowrap; padding: 8px 10px; font-size: 14px; min-height: 36px; }
  .sidebar-settings { margin: 0; padding: 0; border: 0; }
  .sidebar-settings button { width: auto; padding: 8px; min-height: 36px; font-size: 14px; }
  .settings-hint { display: none; }
  .application { margin-left: 0; }
  .source-rail { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .research-workbench { grid-template-columns: 160px minmax(0,1fr); }
}
@media (max-width: 850px) {
  .source-rail { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .calculation-layout { grid-template-columns: minmax(0,1fr); }
  .result-column { border-left: 0; border-top: 1px solid var(--border); }
}
@media (max-width: 600px) {
  .workspace-sidebar { gap: 4px; padding: 10px 12px; }
  .brand strong { font-size: 15px; }
  nav button { padding-inline: 8px; font-size: 13px; }
  .sidebar-settings button { font-size: 13px; }
  main { padding: 24px 16px; }
  h1 { font-size: 24px; }
  .intro { margin-bottom: 20px; }
  .search-toolbar { display: block; }
  .search-actions { margin-top: 10px; }
  .search-actions .primary { flex: 1; }
  .search-conditions { grid-template-columns: minmax(0,1fr); padding: 16px; }
  .research-list-heading { align-items: baseline; }
  .session-note { display: none; }
  .research-workbench { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .workbench-reference { padding: 14px; }
  .workbench-reference .source-details { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
  .workbench-reference .candidate-detail { margin: 0; }
  .source-rail { grid-template-columns: minmax(0,1fr); }
  .candidate-image { position: relative; overflow: hidden; aspect-ratio: 2 / 1; }
  .candidate-actions { flex-direction: row; }
  .candidate-actions > * { flex: 1; min-width: 0; }
  .selected-header { flex-direction: column; align-items: stretch; padding: 16px; gap: 14px; }
  .selected-image { width: 56px; height: 56px; }
  #prepareListing { align-self: flex-start; }
  .calculation-inputs,.result-column { padding: 16px; }
  .calc-grid { gap: 16px 12px; }
  .calc-grid input,.calc-grid select { font-size: 16px; }
  #calculatorTitle { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* Standalone data/usage notices. */
body.policy-page{display:block;min-height:100vh;margin:0;padding:24px;background:var(--bg,#f7f8fa)}
.policy-page main{max-width:800px;margin:0 auto;padding:28px;background:#fff;border-radius:12px;line-height:1.85}
.policy-page h1{font-size:1.5rem}.policy-page h2{margin-top:1.7em;font-size:1.1rem}.policy-page li{margin-bottom:.6em}.policy-page a{overflow-wrap:anywhere}
@media(max-width:480px){body.policy-page{padding:12px}.policy-page main{padding:18px}}
