/* Layout for LIVE. Colors and theme preference belong to bidder-theme.css/js. */
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }
button, a, input { touch-action: manipulation; }
button { min-height: 44px; cursor: pointer; border: 1px solid var(--fieldline); border-radius: 10px; padding: .6rem .85rem; background: var(--card); color: var(--ink); font-weight: 700; }
button:disabled { cursor: default; opacity: .65; }
input { min-height: 46px; min-width: 0; border: 1px solid var(--fieldline); border-radius: 10px; padding: .7rem .9rem; background: var(--field); color: var(--ink); }
input::placeholder { color: var(--muted); opacity: 1; }
button:hover:not(:disabled), .live-modes a:hover { text-decoration: underline; text-underline-offset: 4px; }
[hidden] { display: none !important; }
.live-shell { max-width: 1280px; padding: 0 28px 44px; margin: auto; }
.live-topline { display: flex; align-items: center; gap: 18px; padding: 12px 0 8px; }
.eyebrow { font-size: 12px; font-weight: 850; letter-spacing: .14em; margin: 0; white-space: nowrap; }
.eyebrow span { display: inline-block; margin-left: 5px; padding: 4px 7px; border: 1px solid var(--gold); border-radius: 5px; color: var(--gold); }
.live-tabs { display: flex; gap: 20px; margin-left: auto; }
.live-tabs a { min-height: 44px; display: flex; align-items: center; text-decoration: none; font-weight: 700; font-size: 13px; }
.live-tabs a:hover { text-decoration: underline; }
.live-heading { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr); align-items: center; gap: 24px; padding: 4px 0 16px; }
.live-heading h1 { font: 500 clamp(26px, 3vw, 34px)/1.15 Georgia, serif; letter-spacing: -.025em; margin: 0 0 6px; }
.mode-description { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 0; max-width: 540px; }
#live-search { display: flex; gap: 8px; }
.search-field { display: flex; position: relative; flex: 1; min-width: 0; }
#live-search input { padding-right: 46px; }
#live-search input::-webkit-search-cancel-button { display: none; }
#live-search #clear-search { position: absolute; right: 1px; top: 1px; bottom: 1px; width: 44px; padding: 0; min-height: 44px; background: transparent; color: var(--ink); border: 0; font-size: 24px; }
#live-search input { flex: 1; width: 100%; }
#live-search button { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.live-modes { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; border-bottom: 1px solid var(--line); }
.live-modes a { flex-shrink: 0; min-height: 44px; display: flex; align-items: center; padding: .5rem 1rem; border: 1px solid var(--fieldline); border-radius: 24px; background: var(--card); text-decoration: none; font-size: 13px; font-weight: 700; }
.live-modes [aria-current] { background: var(--gold); color: var(--on-gold); border-color: var(--gold); text-decoration: underline; text-underline-offset: 4px; }
.live-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); padding: 0; min-height: 44px; }
.live-toolbar p { margin: 0; }
.live-toolbar button { font-size: 12px; flex-shrink: 0; background: transparent; border-color: transparent; }
.live-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; align-items: start; }
.lot-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; scroll-margin-top: 90px; box-shadow: 0 3px 12px #00000006; }
.lot-media { position: relative; height: 210px; padding: 12px 16px 28px; background: var(--media); display: flex; align-items: center; justify-content: center; }
.lot-media { text-decoration: none; }
.lot-media:focus-visible { outline-offset: -4px; }
.lot-photo { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; display: block; }
.photo-placeholder { color: var(--muted); font-size: 13px; border: 1px dashed var(--fieldline); border-radius: 10px; padding: 24px; }
.photo-kind { position: absolute; left: 16px; bottom: 8px; font-size: 10px; font-weight: 650; margin: 0; padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: var(--card); }
.photo-kind:empty { display: none; }
.lot-content { padding: 14px; }
.lot-identity { font-size: 11px; color: var(--muted); margin: 0; }
.lot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-bottom: 8px; }
.lot-condition { max-width: 100%; font-size: 11px; line-height: 1.45; font-weight: 750; margin: 0; padding: 4px 8px; border-radius: 6px; color: var(--gold); background: var(--mint); overflow-wrap: anywhere; }
.watch-action { font-size: 12px; color: var(--ink); }
.watch-action[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); }
.lot-title { font-size: 16px; line-height: 1.35; margin: 0 0 12px; min-height: 44px; overflow-wrap: anywhere; }
.lot-title a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-decoration: none; }
.lot-title a:hover { text-decoration: underline; }
.lot-updates, #bid-updates { font-size: 13px; line-height: 1.6; white-space: pre-line; border-left: 3px solid var(--warn); background: var(--field); color: var(--ink); padding: 10px 12px; }
.lot-pricing { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.lot-price, .lot-timing { margin: 0; }
.price-label, .lot-time-label { display: block; font-size: 10px; line-height: 1.5; color: var(--muted); text-transform: uppercase; letter-spacing: .075em; font-weight: 750; margin-bottom: 3px; }
.price-amount { font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -.03em; }
.lot-timing { text-align: right; }
.lot-time { font-size: 20px; font-weight: 750; white-space: nowrap; }
.lot-comparison { border-top: 1px solid var(--line); padding-top: 8px; margin-bottom: 12px; }
.lot-comparison:not(:has(p:not(:empty))) { display: none; }
.lot-reference { font-size: 12px; color: var(--muted); margin: 0; }
.lot-ratio { font-size: 13px; font-weight: 750; color: var(--gold); margin: 3px 0 0; }
.lot-qualification { font-size: 12px; font-weight: 700; margin: 6px 0; }
.lot-qualification:empty, .card-status:empty { display: none; }
.lot-actions { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr) minmax(0, 1fr); gap: 6px; }
.lot-actions button { padding: .6rem .5rem; overflow-wrap: anywhere; }
.lot-actions:has(.max-action[hidden]) { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.bid-action { font-size: 15px; }
.bid-action, #confirm-bid { min-height: 48px; background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.max-action { min-height: 48px; font-size: 12px; border-color: var(--gold); color: var(--gold); }
.lot-fees { font-size: 11px; color: var(--muted); line-height: 1.5; margin: 9px 0 0; }
.card-status { font-size: 13px; margin: 8px 0; }
.lot-inspect { border-top: 1px solid var(--line); margin-top: 10px; }
.lot-inspect summary { min-height: 44px; padding: 12px 0 0; cursor: pointer; font-size: 12px; font-weight: 700; }
.lot-inspect p { font-size: 14px; white-space: pre-line; }
.lot-inspect a { display: inline-block; min-height: 44px; padding: 10px 0; color: var(--gold); }
.lot-inspect .lot-fulfillment { color: var(--muted); }
.load-more { display: block; margin: 28px auto; }
.live-empty { padding: 36px 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); text-align: center; }
.live-empty h2 { margin: 0 0 8px; font-size: 22px; overflow-wrap: anywhere; }
.live-empty p { color: var(--muted); margin: 0 0 20px; }
.live-empty button { border-color: var(--gold); color: var(--gold); }
.live-footer { font-size: 12px; color: var(--muted); line-height: 1.7; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
dialog { width: min(540px, calc(100vw - 24px)); border: 1px solid var(--fieldline); border-radius: 18px; padding: 24px; background: var(--card); color: var(--ink); max-height: 90dvh; overflow: auto; box-shadow: 0 24px 80px #0004; }
dialog::backdrop { background: #111a1788; }
.dialog-close { float: right; }
dialog h2 { clear: both; padding-top: 12px; font: 500 28px/1.2 Georgia, serif; }
dialog h3 { font-size: 14px; }
#bid-description { white-space: pre-line; font-size: 14px; line-height: 1.6; }
#bid-form label { display: block; font-size: 14px; font-weight: 700; margin: 16px 0 8px; }
#bid-max { width: 100%; }
.small { font-size: 12px; color: var(--muted); line-height: 1.6; }
.next-bid { font-size: 24px; font-weight: 800; }
#confirm-bid { width: 100%; }
#bid-help { display: inline-block; min-height: 44px; padding: 10px 0; margin-right: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.skip-link { position: absolute; left: 10px; top: -100px; z-index: 200; background: var(--card); padding: 12px; }
.skip-link:focus { top: 10px; }
@media (max-width: 700px) {
  .live-shell { padding: 0 16px 32px; }
  .live-topline { flex-wrap: wrap; gap: 8px; padding: 8px 0; }
  .eyebrow { font-size: 10px; letter-spacing: .1em; }
  .eyebrow span { margin-left: 3px; padding: 3px 5px; }
  .live-tabs { gap: 12px; }
  .live-tabs a { font-size: 12px; }
  html.calm .live-topline [data-theme-toggle] { min-width: 44px; width: 44px; padding: .5rem; justify-content: center; }
  .live-topline [data-theme-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .live-heading { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 4px 0 12px; }
  .live-heading h1 { font-size: 25px; }
  .mode-description { font-size: 13px; }
  #live-search { margin: 0; }
  #live-search input { font-size: 14px; }
  .live-modes { margin: 0 -2px; }
  .live-modes a { padding: .5rem .8rem; }
  .live-grid { gap: 18px; }
  .lot-media { height: 180px; }
  .lot-title { min-height: 0; }
}
@media (max-width: 370px) {
  .live-topline { gap: 4px; }
  .live-tabs { gap: 8px; }
  .eyebrow { font-size: 9px; letter-spacing: .06em; }
  .eyebrow span { margin-left: 2px; padding: 3px 4px; }
  .lot-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .lot-actions .bid-action { grid-column: 1 / -1; }
  .lot-actions:has(.max-action[hidden]) { grid-template-columns: minmax(0, 1fr); }
}

.lot-reserve, .lot-standing { margin: 6px 0; font-size: 13px; line-height: 1.45; color: var(--ink); }
.lot-reserve:empty, .lot-standing:empty, #bid-reserve:empty, #bid-standing:empty { display: none; }

.lot-departure { align-self: start; }
.departure-heading { font-size: 20px; margin: 8px 0; color: var(--ink); }
.departure-description { font-size: 14px; line-height: 1.6; color: var(--muted); }
.departure-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.departure-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
