/* ureru 中古相場ページ。style.css の配色・書体を引き継ぐ。 */

.market { padding-top: 1.5rem; padding-bottom: 3rem; }
.market section { margin: 2.5rem 0 0; }
.market h1 { margin-top: 1rem; }
.market h2 { font-size: 1.375rem; margin-bottom: .75rem; }
.market h3 { font-size: 1.0625rem; margin: 1.25rem 0 .5rem; }
.market p, .market li { max-width: 44rem; }
.market table { border-collapse: collapse; width: 100%; font-size: .9375rem; }
.market th, .market td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.market th[scope=col] { font-size: .8125rem; color: var(--ink-2); font-weight: 600; }
.market td.num, .market th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.crumbs { font-size: .8125rem; color: var(--ink-2); margin: 1rem 0 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem .5rem; margin: 0; padding: 0; }
.crumbs li + li::before { content: "›"; margin-right: .5rem; color: var(--rule); }

.preview-banner { margin: 1rem 0 0; padding: .75rem 1rem; border: 2px dashed var(--sell); background: var(--paper-hi); color: var(--sell); font-weight: 600; font-size: .9375rem; }

.product-head { display: grid; grid-template-columns: minmax(0, 1fr) 9rem; gap: 1.5rem; align-items: start; margin-top: 1.25rem; }
.product-head h1 { font-size: clamp(1.5rem, 3.4vw, 2.125rem); }
.product-head img { width: 100%; height: auto; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; margin: 1rem 0 0; font-size: .9375rem; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; }

.price-card { margin-top: 1.5rem; padding: 1.25rem 1.25rem 1rem; background: var(--paper-hi); border: 2px solid var(--ink); }
.price-card .label { margin: 0; font-size: .875rem; color: var(--ink-2); font-weight: 600; }
.price-card .median { margin: .25rem 0 0; font: 600 clamp(2rem, 6vw, 2.75rem)/1.2 var(--serif); }
.price-card .not-this { margin: .25rem 0 1rem; font-size: .875rem; color: var(--sell); font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; margin: 0; }
.stat-grid div { border-top: 1px solid var(--rule); padding-top: .5rem; }
.stat-grid dt { font-size: .8125rem; color: var(--ink-2); }
.stat-grid dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.price-card .meta { margin: 1rem 0 0; font-size: .8125rem; color: var(--ink-2); }

.notice { padding: .875rem 1rem; background: var(--paper-hi); border-left: 4px solid var(--ink-2); font-size: .9375rem; }
.notice.warn { border-left-color: var(--sell); }
.chart { width: 100%; max-width: 44rem; height: auto; display: block; }
.chart text { font: 18px var(--sans); fill: var(--ink-2); }
[data-market-snapshot][hidden] { display: none !important; }
.market-toc { margin-top: 1rem; line-height: 2; }
.guide-lead { font-size: 1.0625rem; }
.guide-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1rem 0; }
.guide-go { display: inline-block; padding: .85rem 1rem; border-radius: 8px; background: var(--ink); color: var(--paper-hi); font-weight: 700; text-decoration: none; }
.guide-go:hover { background: var(--sell); }
.guide-go:focus-visible { outline: 3px solid var(--sell); outline-offset: 3px; }
.market .facts dd { min-width: 0; overflow-wrap: anywhere; }

.score { display: flex; align-items: baseline; gap: .75rem; margin: 0 0 .5rem; }
.score strong { font: 600 2rem/1 var(--serif); }
.grade { display: inline-block; padding: .1rem .55rem; border: 2px solid var(--ink); font-weight: 700; }

.sim { padding: 1.25rem; background: var(--paper-hi); border: 1px solid var(--rule); }
.sim form { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .75rem 1rem; }
.sim label { display: grid; align-content: start; gap: .25rem; font-size: .875rem; font-weight: 600; }
.sim label small { font-weight: 400; color: var(--ink-2); }
.sim input { font: inherit; padding: .5rem .6rem; border: 1px solid var(--ink-2); border-radius: 4px; background: var(--paper-hi); color: var(--ink); width: 100%; }
.sim-out { margin-top: 1rem; }
.sim-net { font-size: 1.25rem; font-weight: 700; margin: 0; }
.sim-detail { font-size: .875rem; color: var(--ink-2); margin: .25rem 0 0; }

.operators { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.operator { padding: 1rem 1.125rem; background: var(--paper-hi); border: 1px solid var(--rule); }
.operator h3 { margin-top: 0; }
.operator ul { padding-left: 1.1rem; margin: .5rem 0; font-size: .9375rem; }
.operator .go { display: inline-block; margin-top: .5rem; font-weight: 700; color: var(--sell); }

.faq details { border-bottom: 1px solid var(--rule); padding: .75rem 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: .5rem 0 0; }

.product-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.product-grid { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.product-card[hidden], [data-search-group][hidden] { display: none !important; }
.product-card a { display: flex; flex-direction: column; gap: .35rem; height: 100%; padding: 1rem 1.1rem; background: var(--paper-hi); border: 1px solid var(--rule); border-radius: 10px; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.product-card a:hover { border-color: var(--ink); box-shadow: 0 4px 14px rgba(29, 45, 66, .08); }
.product-card .card-meta { font-size: .75rem; color: var(--ink-2); letter-spacing: .02em; }
.product-card .nw { white-space: nowrap; }
.product-card .p-title { font-weight: 700; line-height: 1.5; }
.product-card .card-price { font-size: .875rem; font-variant-numeric: tabular-nums; }
.product-card .card-price b { font-size: 1.0625rem; }
.product-card .card-price small { display: block; color: var(--ink-2); font-size: .75rem; }
.product-card .card-link { margin-top: auto; padding-top: .35rem; font-size: .8125rem; font-weight: 700; color: var(--sell); }
.list-note { font-size: .8125rem; color: var(--ink-2); }
.result-count { font-weight: 700; }

.market-search { margin: 1.25rem 0 .75rem; max-width: 44rem; }
.market-search label { display: block; font-size: .875rem; font-weight: 700; margin-bottom: .35rem; }
.market-search-row { display: flex; border: 1px solid var(--ink-2); border-radius: 10px; overflow: hidden; background: var(--paper-hi); }
.market-search input { flex: 1; min-width: 0; border: 0; padding: .8rem 1rem; font: inherit; font-size: 1rem; background: transparent; }
.market-search button { border: 0; padding: .6rem 1.25rem; font: inherit; font-weight: 700; background: var(--ink); color: var(--paper-hi); cursor: pointer; white-space: nowrap; }
.market-search input:focus-visible, .market-search button:focus-visible { outline: 3px solid var(--sell-fill); outline-offset: -3px; }

@media (prefers-reduced-motion: reduce) { .product-card a { transition: none; } }

.method { font-size: .9375rem; }
.credit { margin: 2rem 0 0; font-size: .875rem; }

.home-market { padding: 3rem 0; border-top: 1px solid var(--rule); }
.home-market h2 { font-size: 1.5rem; margin-bottom: .5rem; }
body[data-view="compare"] #home-market { display: none; }

@media (max-width: 40rem) {
  .chart text { font-size: 26px; }
  .product-head { grid-template-columns: minmax(0, 1fr) 5.5rem; gap: 1rem; }
  .market h2 { font-size: 1.25rem; }
  .price-card { padding: 1rem; }
  .product-grid { grid-template-columns: 1fr; }
}
.buyback-reference { background: #f5f0e5; border: 1px solid #d7c9a9; border-radius: 16px; padding: clamp(18px, 4vw, 30px); }
.reference-amount { color: #183b4e; font-size: clamp(2.3rem, 8vw, 3.4rem); font-weight: 800; line-height: 1.2; margin: .35em 0; }
.reference-amount span { font-size: .45em; margin-left: .3em; }
.reference-source { display: inline-block; color: #183b4e; font-weight: 700; padding: .7em 0; overflow-wrap: anywhere; }
[data-reference-value][hidden], [data-reference-status][hidden] { display: none !important; }

/* Product selling flow. Scoped so home, listing cards and the existing wizard stay intact. */
.sell-page { --sell-gap: 1.5rem; }
.selling-market { padding-top: .7rem; }
.sell-page section { margin-top: var(--sell-gap); }
.sell-opening { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; margin-top: 1rem; }
.sell-page .sell-opening section { margin-top: 0; }
.sell-page h1 { font: 700 clamp(1.5rem, 2.5vw, 2.15rem)/1.45 var(--serif); margin: .45rem 0; }
.sell-kicker { font-size: .78rem; font-weight: 700; color: var(--sell); letter-spacing: .06em; margin: 0; }
.sell-platform { font-size: .9rem; color: var(--ink-2); margin: .55rem 0; }
.sell-intro { font-size: .95rem; margin-bottom: 0; }
.sell-page .buyback-reference { padding: 1.25rem 1.5rem; border-radius: 12px; }
.sell-page .buyback-reference h2 { font-size: 1rem; margin: 0 0 .4rem; }
.sell-page .buyback-reference p { margin: .3rem 0; }
.sell-page .reference-amount { font-size: clamp(2.3rem, 5vw, 3rem); margin: .2rem 0; }
.sell-page .price-date, .sell-page .price-caution { font-size: .78rem; line-height: 1.6; color: var(--ink-2); }
.sell-page .price-caution { border-top: 1px solid #d7c9a9; padding-top: .5rem; margin-top: .65rem; }
.sell-page h2 { margin-bottom: .65rem; }
.sell-offers { margin: 0; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: var(--paper-hi); }
.sell-offer { display: grid; grid-template-columns: 8rem 10rem 1fr; gap: .4rem 1rem; padding: .85rem 1rem; align-items: center; }
.sell-offer + .sell-offer { border-top: 1px solid var(--rule); }
.sell-offer dt { font-weight: 700; }
.sell-offer dt small, .offer-price small { display: block; color: var(--ink-2); font-size: .75rem; font-weight: 400; }
.sell-offer dd { margin: 0; }
.offer-price { font-size: .85rem; }
.offer-price strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.offer-terms { font-size: .85rem; line-height: 1.65; }
.price-unknown { color: var(--ink-2); font-size: .85rem; }
.sell-page .sell-footnote { font-size: .75rem; color: var(--ink-2); line-height: 1.65; margin: .5rem 0 0; max-width: none; }
.sell-next > p { font-size: .9rem; margin: .35rem 0; }
.sell-actions { display: grid; grid-template-columns: 1fr 2fr; gap: .75rem; margin-top: .85rem; }
.sell-actions:has(> .guide-actions:only-child) { grid-template-columns: 1fr; }
.sell-actions .guide-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 0; }
.sell-actions a { display: flex; flex-direction: column; justify-content: center; min-height: 52px; padding: .8rem 1rem; border: 1px solid var(--ink); border-radius: 9px; font-size: .9rem; line-height: 1.5; text-decoration: none; font-weight: 700; }
.sell-actions .sell-primary { background: var(--sell); border-color: var(--sell); color: #fff; }
.sell-actions .sell-primary small { font-size: .75rem; font-weight: 400; }
.sell-actions a:hover { background: var(--ink); color: var(--paper-hi); }
.sell-actions a:focus-visible, .sell-page summary:focus-visible { outline: 3px solid var(--sell); outline-offset: 3px; }
.sell-checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; list-style: none; counter-reset: check; padding: 0; margin: 0; }
.sell-checks li { counter-increment: check; background: var(--paper-hi); border: 1px solid var(--rule); border-radius: 10px; padding: 1rem; }
.sell-checks li::before { content: counter(check, decimal-leading-zero); display: block; font-size: .8rem; color: var(--sell); font-weight: 700; margin-bottom: .4rem; }
.sell-checks strong, .sell-checks span { display: block; }
.sell-checks span { font-size: .85rem; margin-top: .4rem; }
.sell-details > details { padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.sell-page summary { cursor: pointer; font-weight: 700; }
.sell-details > details[open] > summary { margin-bottom: 1rem; }
.sell-details p, .sell-details li { font-size: .9rem; }
.sell-details .facts { font-size: .9rem; }
.sell-details :target { scroll-margin-top: 1rem; }
.mobile-sell-nav { display: none; }
@media (max-width: 48rem) {
  .selling-market .crumbs { margin-top: .4rem; }
  .selling-market .crumbs li:last-child { display: none; }
  .sell-opening { grid-template-columns: 1fr; gap: 1rem; margin-top: .7rem; }
  .sell-page { --sell-gap: 1.2rem; }
  .selling-market + .colophon { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }
  .sell-page h1 { font-size: 1.45rem; line-height: 1.4; }
  .sell-intro { display: none; }
  .sell-page .buyback-reference { padding: .9rem 1rem; }
  .sell-page .reference-amount { font-size: 2.35rem; }
  .sell-page h2 { font-size: 1.15rem; }
  .sell-offer { grid-template-columns: 1fr 1fr; padding: .65rem .8rem; gap: .25rem .6rem; }
  .sell-offer dt { display: flex; align-items: baseline; gap: .45rem; line-height: 1.5; }
  .offer-price { line-height: 1.5; }
  .offer-price small { display: inline; margin-left: .3rem; }
  .offer-price { text-align: right; }
  .offer-terms { grid-column: 1 / -1; font-size: .78rem; }
  .sell-actions { grid-template-columns: 1fr; gap: .6rem; }
  .sell-actions .guide-actions { gap: .6rem; }
  .sell-actions a { padding: .7rem .75rem; font-size: .8rem; min-height: 48px; }
  .sell-checks { grid-template-columns: 1fr; gap: .6rem; }
  .sell-checks li { padding: .8rem 1rem; }
  .sell-checks li::before { float: left; margin-right: .6rem; }
  .sell-checks span { clear: both; }
  .sell-details .facts { grid-template-columns: 1fr; gap: .1rem; }
  .sell-details .facts dd { margin-bottom: .65rem; }
  .mobile-sell-nav { display: grid; grid-template-columns: 1fr 1.5fr; gap: .6rem; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--rule); }
  .mobile-sell-nav a { padding: .65rem .5rem; min-height: 44px; border: 1px solid var(--ink); border-radius: 8px; font-size: .8rem; font-weight: 700; text-align: center; text-decoration: none; }
  .mobile-sell-nav a:last-child { background: var(--sell); border-color: var(--sell); color: #fff; }
  .mobile-sell-nav a:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
}
