.item-heading { display: flex; align-items: center; gap: 14px; margin: 18px 0 24px; }
.item-heading .item-icon-frame { width: 80px; height: 80px; flex-basis: 80px; }
.item-heading .item-icon { width: 64px; height: 64px; max-width: 64px; max-height: 64px; object-fit: contain; }
.item-heading h1 { margin: 0; }
.item-heading > div { min-width: 0; overflow-wrap: anywhere; }
.item-id { margin: 5px 0 0; font-size: 14px; }
.item-configurations { margin: -8px 0 20px; min-width: 0; }
.configuration-links { display: flex; flex-wrap: wrap; gap: 6px; max-height: 160px; overflow: auto; }
.configuration-links a { padding: 6px 10px; border: 1px solid #b7c8d1; border-radius: 3px; background: #f7fafb; font-size: 13px; text-decoration: none; overflow-wrap: anywhere; }
.configuration-links a[aria-current="page"] { background: #245b7a; border-color: #245b7a; color: #fff; }
.configuration-builder { margin-top: 12px; padding: 12px; border: 1px solid #b7c8d1; background: #fff; }
.configuration-builder summary { cursor: pointer; font-size: 14px; }
.configuration-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); align-items: end; gap: 10px; margin-top: 14px; }
.configuration-form > div { min-width: 0; }
.configuration-form label { font-size: 13px; margin-bottom: 5px; }
.configuration-form select { width: 100%; min-width: 0; }
.configuration-form input[type="submit"] { justify-self: start; }
.configuration-note { margin: 10px 0 0; color: #536977; font-size: 13px; line-height: 1.45; }
.item-overview { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: 20px; margin: 20px 0; }
.item-overview > section { min-width: 0; margin: 0; }
.item-detail-sheet { display: block; }
.item-detail-sheet section { border-color: #d8e2e8; border-radius: 8px; padding: 22px; }
.item-detail-sheet section h2 { font-size: 18px; font-weight: 600; }
.item-property-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px 24px; margin: 20px 0 0; }
.item-property-grid > div { min-width: 0; }
.item-property-grid dt { color: #657681; font-size: 12px; margin-bottom: 4px; }
.item-property-grid dd { margin: 0; color: #203846; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.item-properties h2, .item-effects h2 { margin-top: 0; }
.item-effects ul { margin: 0; padding-left: 20px; line-height: 1.7; }
.item-description summary { cursor: pointer; font-weight: 600; color: #34566c; }
.item-description details[open] summary { margin-bottom: 18px; }
@media (max-width: 650px) {
  .item-overview { grid-template-columns: minmax(0, 1fr); }
  .item-property-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
section { margin: 20px 0; padding: 18px; border: 1px solid #adbec8; background: #fff; }
.description { max-width: 860px; margin: 0; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.item-description .catalog-note { margin: 14px 0 0; }
.manual-ad { width: 100%; min-width: 0; margin: 24px 0; }
.manual-ad-label { display: block; margin-bottom: 8px; color: #536977; font-size: 11px; text-align: center; }
.manual-ad--catalog { min-height: 121px; margin-top: 0; margin-bottom: 28px; }
.manual-ad--detail { min-height: 271px; margin-top: 24px; margin-bottom: 0; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.section-heading h2 { margin: 0; }
.market-server, .price-data-count { color: #536977; font-size: 14px; overflow-wrap: anywhere; }
.price-data-count { font-variant-numeric: tabular-nums; }
.item-market .hint, .market-history .hint, .price-data .hint { margin: 12px 0; font-size: 14px; line-height: 1.5; }
.price-tracking { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 12px; }
.price-tracking form { margin: 0; }
.price-tracking small { flex: 1 1 160px; color: #536977; font-size: 13px; line-height: 1.4; }
.tracking-button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid #9ab3c2; border-radius: 3px; background: #f7fafb; font-size: 14px; white-space: nowrap; }
.tracking-button.is-tracking { color: #205b47; background: #eef7f2; border-color: #94baa6; }
.tracking-button:disabled { cursor: not-allowed; opacity: .65; }
.market-context-form { display: flex; align-items: end; flex-wrap: wrap; gap: 9px; padding: 10px; background: #f4f8fa; }
.market-context-form label { margin-right: -3px; font-size: 14px; }
.market-context-form select { min-width: 150px; }
.market-windows { display: grid; gap: 8px; margin: 16px 0; }
.market-window { display: grid; grid-template-columns: minmax(72px, .65fr) minmax(0, 1fr); align-items: center; gap: 5px 12px; min-width: 0; padding: 10px 12px; border: 1px solid #b7c8d1; background: #f7fafb; }
.market-windows h3 { margin: 0; font-size: 14px; }
.market-windows .price { margin: 0; font-size: 21px; text-align: right; }
.market-windows .price-unknown { font-size: 18px; }
.market-window-context { grid-column: 1 / -1; line-height: 1.45; overflow-wrap: anywhere; }
.price-evidence-details { grid-column: 1 / -1; min-width: 0; }
.price-evidence-details summary { width: fit-content; max-width: 100%; color: #526977; font-size: 12px; cursor: pointer; }
.price-evidence-details summary .price-evidence { vertical-align: middle; }
.price-evidence-details p { margin: 8px 0 0; padding: 8px 10px; border-left: 2px solid #b7c8d1; color: #526977; background: #fff; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.market-window-fallback .market-window-context { color: #536977; }
.price-fallback-context { line-height: 1.45; overflow-wrap: anywhere; }
.market-history h2 { margin: 0; }
 .history-figure { margin: 22px 0 0; padding: 0; border: 0; background: #fff; }
.chart-period, .chart-summary span, .chart-readout { color: #70818d; font-size: 12px; }
.chart-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 24px; }
.chart-summary strong { color: #234f6b; font-size: 28px; font-weight: 650; line-height: 1.15; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.chart-summary span { padding-left: 16px; border-left: 1px solid #e2e9ed; line-height: 1.65; }
.chart-summary time { color: #425f71; }
.chart-readout { min-height: 32px; margin: 18px 0 0; padding-top: 12px; border-top: 1px solid #edf1f4; line-height: 1.5; font-variant-numeric: tabular-nums; }
.chart-layout { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; }
.chart-y-axis { display: flex; flex-direction: column; justify-content: space-between; height: 220px; padding: 2px 0; font-size: 11px; color: #7a8b97; font-variant-numeric: tabular-nums; }
.chart-plot { position: relative; min-width: 0; }
.price-chart { display: block; width: 100%; height: 220px; overflow: visible; touch-action: pan-y; }
.chart-grid { stroke: #edf1f4; stroke-width: 1; }
.chart-line { stroke: #367ca8; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chart-point { fill: #fff; stroke: #367ca8; stroke-width: 2; cursor: crosshair; }
.chart-point:hover, .chart-point:focus, .chart-point.is-selected { fill: #367ca8; stroke: #fff; stroke-width: 2; outline: none; filter: drop-shadow(0 0 2px #367ca8); }
.chart-crosshair { stroke: #a9becb; stroke-width: 1; stroke-dasharray: 3 4; pointer-events: none; }
.chart-crosshair[hidden], .chart-tooltip[hidden] { display: none; }
.chart-tooltip { position: absolute; z-index: 2; display: grid; gap: 4px; width: max-content; max-width: min(210px, 100%); padding: 10px 13px; border: 1px solid #dce5eb; border-radius: 7px; background: #fff; box-shadow: 0 5px 18px rgb(30 61 81 / 12%); pointer-events: none; }
.chart-tooltip span, .chart-tooltip small { color: #70818d; font-size: 11px; }
.chart-tooltip strong { color: #234f6b; font-size: 16px; font-variant-numeric: tabular-nums; }
.chart-x-axis { display: flex; justify-content: space-between; margin-top: 12px; font-size: 11px; color: #7a8b97; }
@media (max-width: 650px) {
  .chart-layout { grid-template-columns: 45px minmax(0, 1fr); gap: 6px; }
  .chart-summary { gap: 10px 14px; }
  .chart-summary strong { font-size: 24px; }
  .chart-summary span { padding-left: 12px; font-size: 11px; }
  .chart-tooltip { padding: 8px 10px; }
  .chart-readout { font-size: 11px; min-height: 46px; }
}
.price-data-table-wrap { min-width: 0; max-width: 100%; overflow-x: auto; }
.price-data-table { table-layout: fixed; }
.price-data-table th, .price-data-table td { line-height: 1.45; overflow-wrap: anywhere; white-space: normal; }
.price-data-table th:first-child { width: 38%; }
.price-data-table th:nth-child(2) { width: 28%; }
.price-data-table th:last-child { width: 34%; }
.price-data-table tbody th { color: #536977; background: transparent; font-size: 14px; font-weight: normal; }
.price-data-value { text-align: right; font-variant-numeric: tabular-nums; }
.price-data-date { font-variant-numeric: tabular-nums; }
.price-data-pagination { margin-bottom: 0; }
.discord-sign-in-action { display: inline-block; padding: 10px 13px; border: 1px solid #7c9aae; border-radius: 3px; background: #f7fafb; text-decoration: none; }
.item-overlay { width: min(1180px, calc(100% - 32px)); max-width: calc(100% - 32px); max-height: calc(100dvh - 32px); padding: 0; overflow: clip; border: 1px solid #7c9aae; background: #eef4f7; color: #1b3444; }
.item-overlay[open] { display: flex; flex-direction: column; }
.item-overlay::backdrop { background: rgb(20 43 59 / 45%); }
.item-overlay-header { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; gap: 12px; padding: 14px 20px; border-bottom: 1px solid #adbec8; background: #f7fafb; }
.item-overlay-header h2 { min-width: 0; margin: 0; font-size: 20px; overflow-wrap: anywhere; }
.item-overlay-actions { display: flex; align-items: center; flex-shrink: 0; gap: 14px; }
.item-overlay-body { min-height: 0; padding: 0 20px 20px; overflow: auto; overscroll-behavior: contain; }
.item-overlay turbo-frame { display: block; }
.item-overlay [hidden] { display: none; }
.item-overlay .flash { width: 100%; margin: 0; }
.item-overlay-loading, .item-overlay-error { margin: 20px 0 0; }
.item-overlay-error p { margin-top: 0; }
@media (max-width: 980px) {
  .item-overview { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 650px) {
  .item-overlay { width: calc(100% - 16px); max-width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .item-overlay-header { align-items: start; flex-wrap: wrap; padding: 12px; }
  .item-overlay-actions { margin-left: auto; }
  .item-overlay-body { padding: 0 12px 12px; }
  section { padding: 14px; }
  .item-overview { gap: 16px; }
  .market-context-form { align-items: stretch; flex-direction: column; }
  .market-context-form input[type="submit"] { align-self: flex-start; }
  .price-data-table th, .price-data-table td { padding: 10px 6px; }
  .price-data-table th:first-child { width: 32%; }
  .price-data-table th:nth-child(2) { width: 40%; }
  .price-data-table th:last-child { width: 28%; }
}

/* Detail navigation and compact heading controls. */
.item-detail-sheet { display: block; }
.item-detail-sheet .item-heading { position: static; }
.item-back { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border: 1px solid #b7c8d1; border-radius: 50%; background: #f7fafb; color: #294a60; text-decoration: none; }
.item-detail-sheet .item-back { position: absolute; left: 16px; top: 14px; }
.item-back:hover { background: #e5eff5; }
.item-back svg { width: 26px; height: 26px; }
body:has(main > .item-detail-sheet) .site-header { min-height: 80px; padding-left: max(0px, calc(84px - (100vw - min(100vw - 32px, 1180px)) / 2)); }
.item-title-row { display: flex; align-items: center; gap: 6px; }
.item-title-row h1 { min-width: 0; margin: 0; }
.item-heading .item-id { margin-top: 2px; line-height: 18px; }
.tracking-star { display: inline-flex; flex-shrink: 0; }
.tracking-star form { display: flex; margin: 0; }
.tracking-star .tracking-star-action, .tracking-star .discord-sign-in-action { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 36px; min-height: 36px; padding: 0 1px; border: 0; border-radius: 50%; background: transparent; color: #647a89; cursor: pointer; }
.tracking-star svg { display: block; width: 36px; height: 36px; }
.tracking-star .is-tracking { color: #b98216; }
.tracking-star button:hover, .tracking-star a:hover { background: #e4edf3; color: #a66f0a; }
.tracking-star button:disabled { opacity: .45; cursor: not-allowed; }

/* Recorded offers retain individual quantities in a compact column. */
.price-data-table th, .price-data-table td { padding: 6px 10px; line-height: 1.3; }
.price-data-table .hint { display: inline; margin: 0; font-size: 12px; line-height: 1.3; white-space: nowrap; }
.price-data-table th:first-child { width: 30%; }
.price-data-table th:nth-child(2) { width: 25%; }
.price-data-table th:last-child { width: auto; }
.price-data-quantity { width: 12%; text-align: center; font-variant-numeric: tabular-nums; }
.market-history { border-radius: 8px; }
.history-figure { margin-top: 20px; }
.chart-grid { stroke: #e8eef2; stroke-dasharray: 3 5; }
.chart-line { stroke: #337fae; stroke-width: 2.5; }
.chart-gap { stroke: #7c9caf; stroke-width: 1.7; stroke-dasharray: 5 6; fill: none; }
.chart-point { r: 3px; stroke-width: 1.6; }
.chart-y-axis, .chart-x-axis { color: #738694; font-variant-numeric: tabular-nums; }
.chart-readout { color: #687f8e; }
@media (max-width: 650px) {
 .price-data-table { min-width: 560px; table-layout: auto; }
 .price-data-table th, .price-data-table td { padding: 6px; font-size: 13px; }
 .price-data-table th:first-child { width: 29%; }
 .price-data-table th:nth-child(2) { width: 27%; }
 .price-data-table th.price-data-quantity { width: 14%; }
}

.item-overlay:has(.item-back) .item-overlay-header { padding-left: 84px; min-height: 80px; }
.shop-merchant { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; }
.shop-merchant button { padding: 0 .2rem; border: 0; background: transparent; color: inherit; font-size: .85em; cursor: pointer; }
.shop-expiry { display: block; margin-top: .25rem; font-size: .85em; }

.price-data-author .shop-merchant { gap: 8px; font-size: 14px; line-height: 1.5; }
.price-data-author .shop-navigation-button { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; padding: 6px; border: 1px solid #dce4e9; border-radius: 7px; background: #f7fafc; color: #42697f; }
.price-data-author .shop-navigation-button:hover { background: #eaf2f7; border-color: #afc5d3; }
.price-data-author .shop-navigation-button:focus-visible { outline: 2px solid #205777; outline-offset: 3px; }
.price-data-author [data-shop-navigation-status]:empty { display: none; }
.price-data-table .shop-expiry.hint { display: block; margin-top: 6px; white-space: normal; color: #607380; font-size: 12px; line-height: 1.5; font-variant-numeric: tabular-nums; }

.price-data-author .shop-merchant { flex-wrap: nowrap; gap: 10px; white-space: nowrap; }
.shop-merchant-name { font-weight: 600; color: #203846; }
.price-data-table .shop-expiry { display: inline-flex; align-items: center; margin: 0; padding: 5px 8px; border-radius: 5px; background: #edf5fa; color: #205777; font-size: 13px; font-weight: 600; line-height: 1.4; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-data-table .shop-expiry.is-expired { background: #f0f2f4; color: #687783; font-weight: 400; }

/* Preserve the live phone price headings. */
@media (max-width: 600px) {
  .price-data-table th.price-data-quantity { width: 62px; white-space: nowrap; }
  .price-data-table thead th.price-data-value { overflow-wrap: normal; word-break: normal; }
}
/* Keep complete merchant lines inside the price ledger on narrow screens. */
.item-detail-sheet .price-data-table-wrap { max-width: 100%; overflow-x: auto; }
.item-detail-sheet .price-data-table { table-layout: auto; min-width: 760px; }
