:root {
    color-scheme: light;
    --ink: #1a1a1a;
    --muted: #66615d;
    --line: #e8ded5;
    --paper: #f5f0eb;
    --card: #fff;
    --green: #a40000;
    --green-dark: #8b0000;
    --gold: #d8a74a;
    --red: #a40000;
    --shadow: 0 12px 34px rgba(38, 22, 15, .08);
    --amber-bg: #fff4dc;
    --amber-border: #e0b45a;
    --amber-ink: #6f4a00;
    --header-h: 72px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Plus Jakarta Sans", "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 { color: var(--ink); font-family: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
    align-items: center;
    background: rgba(245, 240, 235, .97);
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    padding: 12px max(20px, calc((100vw - 1200px) / 2));
    position: sticky;
    top: 0;
    z-index: 5;
}

.brand { align-items: center; color: inherit; display: flex; gap: 12px; text-decoration: none; }
.brand { min-width: 0; }
.brand-logo { display: block; height: 42px; object-fit: contain; width: auto; }
.brand-context small { color: var(--muted); display: block; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.page-shell { margin: 0 auto; max-width: 1240px; padding: 34px 20px 56px; }
.committee-viewer-notice { align-items: center; background: #fff7e7; border: 1px solid #f0dba9; border-radius: 12px; color: #6f541d; display: flex; gap: 18px; justify-content: space-between; margin: 0 0 20px; padding: 14px 18px; }
.committee-viewer-notice strong { color: var(--ink); display: block; font-size: 14px; }
.committee-viewer-notice p { font-size: 13px; margin: 2px 0 0; }
.committee-viewer-notice .button { flex: 0 0 auto; }
.intro {
    background: #30261f url("../asset-bidding.png") center 54% / cover;
    border-radius: 12px;
    color: #fff;
    isolation: isolate;
    margin: 8px 0 30px;
    max-width: none;
    min-height: 310px;
    overflow: hidden;
    padding: clamp(30px, 6vw, 64px);
    position: relative;
}
.intro::before { background: linear-gradient(90deg, rgba(20, 16, 13, .78), rgba(20, 16, 13, .25)); content: ""; inset: 0; position: absolute; z-index: -1; }
.intro .eyebrow { background: rgba(0, 0, 0, .58); border-radius: 999px; color: #fff; display: inline-block; font-size: 11px; letter-spacing: .1em; margin: 0 0 18px; padding: 8px 14px; }
.intro h1 { color: #fff; font-size: clamp(34px, 6vw, 56px); letter-spacing: -.045em; line-height: 1.12; margin: 0 0 14px; max-width: 720px; }
.intro > p:last-child { color: rgba(255, 255, 255, .88); font-size: clamp(14px, 2vw, 17px); margin: 0; max-width: 610px; }
.eyebrow { color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .12em; margin: 0 0 6px; }

.panel, .lot-card, .rules-note { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.auth-panel, .account-panel { margin-bottom: 22px; padding: 22px; }
.panel-heading, .account-summary, .section-heading { align-items: flex-start; display: flex; gap: 20px; justify-content: space-between; }
h2 { font-size: 21px; letter-spacing: -.025em; line-height: 1.2; margin: 0; }
.muted { color: var(--muted); font-size: 13px; margin: 6px 0 0; }

.auth-tabs { border-bottom: 1px solid var(--line); display: flex; gap: 18px; margin: 18px 0; }
.auth-tab { background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); cursor: pointer; font-weight: 700; min-height: 42px; padding: 7px 2px; }
.auth-tab.active { border-bottom-color: var(--green); color: var(--green); }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid label { color: var(--ink); display: grid; font-size: 12px; font-weight: 700; gap: 6px; }
.form-grid input, .bid-form input { background: #fff; border: 1px solid #ccd8d0; border-radius: 10px; color: var(--ink); min-height: 46px; padding: 10px 12px; width: 100%; }
.form-grid input:focus, .bid-form input:focus { border-color: var(--green); outline: 3px solid rgba(32, 92, 70, .13); }
.password-input-wrap { display: block; position: relative; }
.password-input-wrap input { padding-right: 50px; }
.password-visibility { align-items: center; background: transparent; border: 0; border-radius: 8px; color: var(--muted); cursor: pointer; display: inline-flex; height: 38px; justify-content: center; position: absolute; right: 4px; top: 4px; width: 38px; }
.password-visibility:hover { background: var(--paper); color: var(--ink); }
.password-visibility:focus-visible { outline: 3px solid rgba(164, 0, 0, .2); }
.password-visibility svg { fill: none; height: 19px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; width: 19px; }
.password-match-error { color: var(--red); font-size: 11px; }
.form-submit { align-self: end; }
.form-message { align-self: center; color: var(--muted); font-size: 13px; grid-column: 1 / -1; margin: 0; min-height: 20px; }
.form-message.error { color: var(--red); }
.form-message.success { color: var(--green); }

.button { align-items: center; border: 1px solid transparent; border-radius: 999px; cursor: pointer; display: inline-flex; font-size: 13px; font-weight: 800; justify-content: center; min-height: 44px; padding: 10px 20px; text-decoration: none; transition: transform .12s ease, background .12s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.button-primary { background: var(--green); color: #fff; }
.button-primary:hover { background: var(--green-dark); }
.button-secondary { background: #edf4ef; border-color: #cbdccf; color: var(--green-dark); }
.button-quiet { background: transparent; border-color: var(--line); color: var(--ink); }
.account-summary { align-items: center; }
.status-callout { background: #f1f5f1; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: 13px; margin-top: 16px; padding: 12px 14px; }
.status-callout strong { color: var(--ink); }
.status-callout.is-warning { background: #fff7e7; border-color: #f0dba9; color: #6f541d; }
.status-callout.is-danger { background: #fff0ee; border-color: #f0c9c4; color: var(--red); }
.account-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.notification-list { display: grid; gap: 7px; margin-top: 16px; }
.notification-item { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; padding: 10px 0 0; }

.lot-section { margin-top: 34px; }
.auction-overview { align-items: start; display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 22px; }
.overview-card { --card-accent: #8b0000; background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--card-accent); border-radius: 14px; box-shadow: var(--shadow); min-width: 0; overflow: hidden; padding: 16px; }
.overview-card-all { --card-accent: #9a6b18; background: linear-gradient(160deg, #fffefa 0%, #fff 48%); }
.overview-card-followed { --card-accent: #28705a; background: linear-gradient(160deg, #f7fcf9 0%, #fff 48%); }
.overview-card-won { --card-accent: #a44335; background: linear-gradient(160deg, #fff8f5 0%, #fff 48%); }
.overview-card-heading { align-items: center; display: flex; gap: 11px; margin-bottom: 12px; }
.overview-card-icon { align-items: center; background: color-mix(in srgb, var(--card-accent) 11%, white); border: 1px solid color-mix(in srgb, var(--card-accent) 25%, white); border-radius: 12px; color: var(--card-accent); display: inline-flex; flex: 0 0 40px; font-size: 23px; height: 40px; justify-content: center; }
.overview-card-kicker { color: var(--card-accent); font-size: 9px; font-weight: 800; letter-spacing: .12em; line-height: 1.3; margin: 0 0 3px; }
.overview-card-heading h2 { font-size: 16px; margin: 0; }
.overview-card-content { display: grid; gap: 10px; min-width: 0; }
.overview-lot { border-top: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; padding-top: 10px; }
.overview-lot:first-child { border-top: 0; padding-top: 0; }
.overview-lot-summary { background: rgba(255, 255, 255, .78); border: 1px solid color-mix(in srgb, var(--card-accent, #8b0000) 15%, white); border-left: 3px solid var(--card-accent, #8b0000); border-radius: 10px; padding: 10px; }
.overview-lot-summary + .overview-lot-summary { margin-top: 8px; }
.overview-lot-summary h3 { align-items: start; display: flex; flex-wrap: wrap; font-size: 12px; gap: 7px; justify-content: space-between; margin: 0 0 7px; }
.overview-lot-code { color: var(--muted); display: block; font-size: 10px; font-weight: 700; letter-spacing: .03em; margin-top: 2px; }
.overview-lot-summary p { color: var(--muted); font-size: 10px; margin: 3px 0; }
.overview-lot-summary p strong { color: var(--ink); }
.overview-lot-meta { align-items: center; display: flex; flex-wrap: wrap; gap: 6px; justify-content: space-between; }
.lot-status-badge { align-items: center; background: #f0eeeb; border: 1px solid #e0dad3; border-radius: 999px; color: #514b45; display: inline-flex; font-size: 9px; font-weight: 800; gap: 4px; line-height: 1.3; padding: 4px 8px; }
.lot-status-badge.is-live { background: #e4f5e9; border-color: #acd6b7; color: #205b35; }
.lot-status-badge.is-upcoming { background: #eef4ff; border-color: #cad8f0; color: #34547f; }
.lot-status-badge.is-paused { background: #fff4dc; border-color: #e6cd8c; color: #735600; }
.lot-status-badge.is-payment { background: #fff0dc; border-color: #ebc489; color: #79500c; }
.lot-status-badge.is-sold { background: #fff0ec; border-color: #e9b5a7; color: #923b2d; }
.lot-status-badge.is-unsold { background: #f1f1f1; border-color: #d9d9d9; color: #606060; }
.overview-pagination { align-items: center; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; margin-top: 4px; padding-top: 10px; }
.overview-pagination-label { color: var(--muted); font-size: 10px; font-weight: 700; }
.overview-pagination-actions { display: flex; gap: 6px; }
.overview-pagination button { background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--card-accent, var(--ink)); cursor: pointer; font-size: 10px; font-weight: 800; min-height: 34px; padding: 6px 9px; }
.overview-pagination button:disabled { cursor: not-allowed; opacity: .45; }
.overview-card-followed .overview-lot, .overview-card-won .overview-lot { border-left: 2px solid color-mix(in srgb, var(--card-accent) 50%, white); padding: 9px 0 0 10px; }
.overview-card-followed .overview-lot:first-child, .overview-card-won .overview-lot:first-child { padding-top: 0; }
.overview-lot h3 { align-items: flex-start; display: flex; flex-wrap: wrap; font-size: 12px; gap: 5px 8px; justify-content: space-between; margin: 0 0 6px; min-width: 0; }
.overview-lot h3 > span { color: var(--muted); font-size: 10px; font-weight: 700; }
.overview-lot p, .overview-login-prompt, .overview-empty { color: var(--muted); font-size: 11px; margin: 4px 0; overflow-wrap: anywhere; }
.overview-lot p strong { color: var(--ink); }
.overview-bid-list { display: grid; gap: 5px; list-style: none; margin: 0; min-width: 0; padding: 0; }
.overview-bid-row { align-items: start; background: #fafbf9; border: 1px solid #edf0ec; border-radius: 8px; display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr) auto; min-width: 0; padding: 7px 8px; }
.overview-bid-row span { font-size: 10px; min-width: 0; overflow-wrap: anywhere; }
.overview-bid-row strong { font-size: 10px; overflow-wrap: anywhere; text-align: right; }
.overview-card .button { font-size: 11px; min-height: 40px; padding: 8px 12px; white-space: normal; }
.section-heading { align-items: end; margin-bottom: 14px; }
.connection-state { color: var(--muted); font-size: 11px; }
.connection-state.is-live { color: var(--green); font-weight: 800; }
.lot-list { display: grid; gap: 16px; }
.completed-lot { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.completed-lot > summary { align-items: center; cursor: pointer; display: grid; gap: 4px 16px; grid-template-columns: minmax(0, 1fr) auto; list-style: none; padding: 15px 18px; }
.completed-lot > summary::-webkit-details-marker { display: none; }
.completed-lot > summary:hover { background: #fcfaf8; }
.completed-lot > summary:focus-visible { outline: 3px solid rgba(164, 0, 0, .22); outline-offset: -3px; }
.completed-lot:not([open]) > .completed-lot-content { display: none; }
.completed-lot[open] > .completed-lot-content { display: block; }
.completed-lot-main { align-items: center; display: flex; flex-wrap: wrap; gap: 9px; min-width: 0; }
.completed-lot-main strong { font-size: 15px; overflow-wrap: anywhere; }
.completed-lot-meta { color: var(--muted); font-size: 12px; grid-column: 1; overflow-wrap: anywhere; }
.completed-lot-toggle { align-items: center; color: var(--green); display: flex; font-size: 11px; font-weight: 800; gap: 8px; grid-column: 2; grid-row: 1 / span 2; white-space: nowrap; }
.completed-lot-toggle > span { font-size: 17px; transition: transform .18s ease; }
.completed-lot[open] .completed-lot-toggle > span { transform: rotate(180deg); }
.completed-lot-content { border-top: 1px solid var(--line); padding: 12px; }
.completed-lot-content .lot-card { border: 0; border-radius: 8px; box-shadow: none; }
.completed-lot-content .lot-card-inner { padding: 8px; }
.lot-card { overflow: visible; }
.lot-card-inner { display: grid; gap: 20px; grid-template-areas: "intro panel" "details panel"; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); padding: 20px; }
.lot-intro { grid-area: intro; min-width: 0; }
.lot-bidpanel { align-self: start; grid-area: panel; position: sticky; top: calc(var(--header-h) + 12px); }
.lot-details { grid-area: details; min-width: 0; }
.lot-title-row { align-items: flex-start; display: flex; gap: 14px; justify-content: space-between; }
.lot-title-row h3 { font-size: 21px; letter-spacing: -.025em; margin: 0; }
.lot-photo { border-radius: 12px; display: block; max-height: 310px; object-fit: cover; width: 100%; }
.lot-description { color: var(--muted); font-size: 13px; margin: 8px 0 16px; white-space: pre-line; }
.lot-coffee-profile { --coffee-accent: #466b50; background: linear-gradient(135deg, #eaf2e9 0%, #f5f8f1 58%, #fbf8ed 100%); border: 1px solid #c7d8c5; border-left: 5px solid var(--coffee-accent); border-radius: 14px; box-shadow: 0 8px 22px rgba(45, 83, 55, .08); margin: 14px 0; padding: 15px; }
.lot-coffee-profile > .eyebrow { color: var(--coffee-accent); margin-bottom: 10px; }
.coffee-detail-grid { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.coffee-detail { background: rgba(255, 255, 255, .78); border: 1px solid #d6e2d3; border-radius: 10px; min-width: 0; padding: 9px 11px; }
.coffee-detail dt { color: var(--muted); font-size: 10px; font-weight: 700; }
.coffee-detail dd { color: var(--ink); font-size: 12px; font-weight: 800; margin: 2px 0 0; overflow-wrap: anywhere; }
.coffee-flavor-notes { background: #fff9e9; border: 1px solid #ead9aa; border-left: 3px solid #c3983e; border-radius: 3px 10px 10px 3px; margin-top: 9px; padding: 10px 12px; }
.coffee-flavor-notes strong { color: #765518; font-size: 11px; }
.coffee-flavor-notes p { color: var(--ink); font-size: 12px; line-height: 1.6; margin: 3px 0 0; white-space: pre-line; }
.badge { align-items: center; background: #eef4ef; border-radius: 999px; color: var(--green); display: inline-flex; font-size: 10px; font-weight: 800; min-height: 26px; padding: 4px 10px; white-space: nowrap; }
.badge.is-live { background: #e3f4e9; color: #256440; }
.badge.is-closed { background: #eef0ef; color: #59645e; }
.lot-price-box { background: #fff; border: 1px solid var(--line); border-radius: 12px; border-top: 4px solid var(--red); box-shadow: var(--shadow); padding: 15px; }
.price-label { color: var(--muted); font-size: 11px; font-weight: 700; }
.price-value { display: block; font-size: clamp(36px, 8vw, 48px); font-weight: 900; letter-spacing: -.04em; line-height: 1.05; margin-top: 4px; }
.price-unit { color: var(--muted); font-size: 12px; }
.price-leader { color: var(--muted); font-size: 13px; margin: 8px 0; }
.status-chip { border-radius: 999px; display: inline-flex; font-size: 12px; font-weight: 700; margin-top: 8px; padding: 5px 10px; }
.status-chip.is-lead { background: #e3f4e9; color: #256440; }
.status-chip.is-outbid { background: #fff0ee; color: var(--red); }
.lot-metrics { display: grid; gap: 10px; grid-template-columns: 1fr; margin-top: 14px; }
.metric { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 10px; }
.metric span, .metric strong { display: block; }
.metric span { color: var(--muted); font-size: 10px; }
.metric strong { font-size: 15px; margin-top: 3px; }
.countdown { font-variant-numeric: tabular-nums; }
.countdown-strip { align-items: start; background: #f5f0eb; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); display: grid; gap: 2px 12px; grid-template-columns: 1fr auto; margin-bottom: 12px; padding: 12px 16px; }
.countdown-label { align-self: end; font-size: 12px; font-weight: 800; }
.countdown-strip .countdown { align-self: center; font-size: clamp(32px, 7vw, 44px); font-variant-numeric: tabular-nums; font-weight: 900; grid-column: 2; grid-row: 1 / span 2; line-height: 1.05; }
.countdown-hint { font-size: 12px; font-weight: 700; grid-column: 1; min-height: 1.2em; }
.countdown-strip[data-state="critical"] { background: var(--red); border-color: var(--red); color: #fff; }
.countdown-strip[data-state="ended"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.price-flash { animation: auction-price-flash .9s ease-out 1; }
.leader-change-banner { align-items: center; animation: leader-change-arrive .55s cubic-bezier(.2,.8,.2,1) both; background: linear-gradient(110deg, #fff1dc, #fff9ed 52%, #ffe6c4); border: 1px solid #e8a34f; border-radius: 12px; box-shadow: 0 8px 22px rgba(155, 75, 14, .13); color: #6d3512; display: flex; flex-wrap: wrap; gap: 5px 10px; margin-bottom: 14px; overflow: hidden; padding: 12px 14px; position: relative; }
.leader-change-banner strong { font-size: 14px; }
.leader-change-banner > span:last-child { flex-basis: 100%; font-size: 11px; font-weight: 700; padding-left: 34px; }
.leader-change-flame { animation: leader-flame-dance .7s ease-in-out infinite alternate; font-size: 26px; line-height: 1; }
.winner-announcement-open { overflow: hidden; }
.winner-announcement-backdrop { align-items: center; animation: winner-backdrop-in .25s ease-out both; background: rgba(25, 19, 14, .72); display: flex; inset: 0; justify-content: center; overflow-y: auto; padding: 22px; position: fixed; z-index: 3000; }
.winner-announcement { animation: winner-card-in .45s cubic-bezier(.18,.85,.25,1.2) both; background: linear-gradient(145deg, #fff 0%, #fffaf2 100%); border: 1px solid rgba(255, 255, 255, .75); border-radius: 22px; box-shadow: 0 28px 90px rgba(0, 0, 0, .32); max-height: calc(100vh - 44px); max-width: 620px; overflow-y: auto; padding: 30px; position: relative; text-align: center; width: 100%; }
.winner-announcement-close { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); cursor: pointer; display: flex; font-size: 24px; height: 38px; justify-content: center; line-height: 1; position: absolute; right: 14px; top: 14px; width: 38px; }
.winner-announcement-flames { display: flex; gap: 10px; justify-content: center; margin: 0 auto 10px; }
.winner-announcement-flames span { animation: winner-flame-pop .9s ease-in-out infinite alternate; font-size: 36px; }
.winner-announcement-flames span:nth-child(2) { animation-delay: .18s; font-size: 48px; }
.winner-announcement-flames span:nth-child(3) { animation-delay: .36s; }
.winner-announcement-eyebrow { color: #a45a1a; font-size: 10px; font-weight: 900; letter-spacing: .18em; margin: 0 0 7px; }
.winner-announcement h2 { color: var(--green-dark); font-size: clamp(22px, 5vw, 32px); line-height: 1.15; margin: 0; }
.winner-announcement-bidder { color: #91500f; font-size: clamp(20px, 4vw, 27px); font-weight: 900; margin: 12px 0 4px; overflow-wrap: anywhere; }
.winner-announcement h3 { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.winner-announcement-prices { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 auto 12px; text-align: left; }
.winner-announcement-prices > div { background: #fff; border: 1px solid #eee0d2; border-radius: 12px; min-width: 0; padding: 12px; }
.winner-announcement-prices span, .winner-announcement-prices strong { display: block; }
.winner-announcement-prices span { color: var(--muted); font-size: 10px; font-weight: 700; }
.winner-announcement-prices strong { color: var(--green-dark); font-size: clamp(14px, 3vw, 18px); margin-top: 4px; overflow-wrap: anywhere; }
.winner-announcement .lot-coffee-profile { text-align: left; }
.winner-announcement-countdown { color: var(--muted); font-size: 11px; margin: 16px 0 0; }
.winner-announcement-countdown strong { color: var(--green-dark); font-size: 16px; font-variant-numeric: tabular-nums; }
@keyframes leader-change-arrive { 0% { opacity: 0; transform: translateY(-14px) scale(.98); } 70% { opacity: 1; transform: translateY(2px) scale(1.01); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes leader-flame-dance { from { transform: rotate(-8deg) scale(.92); } to { transform: rotate(8deg) scale(1.12); } }
@keyframes winner-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes winner-card-in { from { opacity: 0; transform: translateY(22px) scale(.94); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes winner-flame-pop { from { filter: saturate(.85); transform: translateY(2px) scale(.88); } to { filter: saturate(1.25); transform: translateY(-5px) scale(1.12); } }
@keyframes auction-fade-slide { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes auction-price-flash { 0% { background: #fff4dc; } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) {
    .leader-change-banner,
    .leader-change-flame,
    .winner-announcement-backdrop,
    .winner-announcement,
    .winner-announcement-flames span { animation: none; }
}
.sr-only { clip: rect(0, 0, 0, 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
.bid-form { display: grid; gap: 8px; margin-top: 15px; }
.bid-form label { font-size: 11px; font-weight: 800; }
.bid-form small { color: var(--muted); }
.bid-quick-actions, .bid-confirmation-actions { display: flex; gap: 8px; }
.bid-quick-actions .button, .bid-confirmation-actions .button { flex: 1; }
.commitment { background: #eef4ef; border-radius: 9px; color: var(--green-dark); font-size: 12px; font-weight: 700; padding: 10px; }
.bid-form .button { width: 100%; }
.bid-confirmation { margin-top: 15px; }
.bid-confirmation p { font-size: 13px; font-weight: 800; margin: 0 0 10px; }
.bid-blocked { color: #815f1b; font-size: 12px; margin: 10px 0 0; }
.leaderboard { margin-top: 18px; }
.leaderboard h4, .history h4 { font-size: 12px; margin: 0 0 8px; }
.rank-list, .history-list { display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; }
.rank-row, .history-row { align-items: center; background: #fafbf9; border: 1px solid #edf0ec; border-radius: 9px; display: flex; font-size: 11px; gap: 8px; justify-content: space-between; padding: 8px 10px; }
.rank-name, .history-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-value, .history-value { font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }
.history { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.history-more { margin-top: 8px; }
.history-more summary { color: var(--red); cursor: pointer; font-size: 12px; font-weight: 800; padding: 6px 0; }
.history-more .history-list { margin-top: 6px; }
.history-time { color: var(--muted); display: block; font-size: 10px; }
.winner-preview { background: #edf5ef; border: 1px solid #cee1d2; border-radius: 12px; margin-top: 14px; padding: 13px; }
.winner-preview strong { display: block; font-size: 13px; }
.winner-preview p { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.offer-card { background: #fff7e7; border: 1px solid #f0dba9; border-radius: 12px; margin-top: 14px; padding: 14px; }
.offer-actions { display: flex; gap: 8px; margin-top: 10px; }
.offer-actions .button { flex: 1; }
.invoice-card { border: 1px solid var(--line); border-radius: 12px; margin-top: 14px; padding: 15px; }
.invoice-title { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; }
.invoice-title h4 { margin: 0; }
.invoice-lines { display: grid; gap: 7px; margin: 12px 0; }
.invoice-line { color: var(--muted); display: flex; font-size: 12px; gap: 12px; justify-content: space-between; }
.invoice-line strong { color: var(--ink); overflow-wrap: anywhere; text-align: right; }
.invoice-total { border-top: 1px solid var(--line); color: var(--ink); font-size: 14px; font-weight: 900; padding-top: 10px; }
.invoice-note { color: var(--muted); font-size: 11px; margin: 10px 0; }
.empty-state { background: #fff; border: 1px dashed #ccd8d0; border-radius: 14px; color: var(--muted); padding: 24px; text-align: center; }
.rules-note { margin-top: 28px; padding: 0; }
.rules-disclosure > summary { align-items: center; color: var(--ink); cursor: pointer; display: flex; font-size: 14px; font-weight: 800; gap: 10px; justify-content: space-between; list-style: none; min-height: 52px; padding: 14px 18px; }
.rules-disclosure > summary::-webkit-details-marker { display: none; }
.rules-disclosure > summary::after { color: var(--green); content: "+"; font-size: 21px; line-height: 1; }
.rules-disclosure[open] > summary::after { content: "−"; }
.rules-toggle-label { color: var(--muted); font-size: 10px; font-weight: 700; margin-left: auto; }
.rules-note ul { color: var(--muted); display: grid; font-size: 12px; gap: 6px; margin: 12px 0 0; padding-left: 18px; }
.rules-disclosure ul { padding: 0 20px 18px 38px; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; padding: 18px; text-align: center; }

@media (max-width: 700px) {
    :root { --header-h: 60px; }
    .site-header { padding: 10px 14px; }
    .brand { gap: 8px; }
    .brand-logo { height: 38px; max-width: 150px; }
    .brand-context { display: none; }
    .site-header > .button { flex-shrink: 0; min-height: 40px; padding: 8px 13px; white-space: nowrap; }
    .page-shell { padding: 20px 14px 34px; }
    .intro { margin: 4px 0 24px; min-height: 300px; padding: 30px 22px; }
    .intro::before { background: linear-gradient(90deg, rgba(20, 16, 13, .78), rgba(20, 16, 13, .38)); }
    .auth-panel, .account-panel { padding: 17px; }
    .panel-heading, .account-summary { align-items: flex-start; flex-direction: column; gap: 8px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-submit, .form-message { grid-column: auto; }
    .lot-card-inner { grid-template-areas: "intro" "panel" "details"; grid-template-columns: minmax(0, 1fr); padding: 15px; }
    .lot-bidpanel { position: static; }
    .lot-photo { max-height: 180px; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
    .auction-overview { grid-template-columns: minmax(0, 1fr); }
    .lot-title-row h3 { font-size: 19px; }
    .lot-coffee-profile { padding: 12px; }
    .coffee-detail-grid { gap: 6px; }
    .coffee-detail { padding: 8px; }
    .coffee-detail dd { font-size: 11px; }
    .completed-lot > summary { gap: 4px 8px; padding: 13px; }
    .completed-lot-main strong { font-size: 14px; }
    .completed-lot-toggle { font-size: 10px; }
    .completed-lot-content { padding: 8px; }
    .completed-lot-content .lot-card-inner { padding: 8px; }
    .winner-announcement-backdrop { align-items: flex-start; padding: 12px; }
    .winner-announcement { border-radius: 16px; margin: auto 0; max-height: calc(100dvh - 24px); padding: 24px 16px 18px; }
    .winner-announcement-prices { gap: 7px; }
    .winner-announcement-prices > div { padding: 9px; }
}

@media (prefers-reduced-motion: reduce) {
    .price-flash, .loading-spinner { animation: none; }
}

@media print {
    body.printing-invoice * { visibility: hidden !important; }
    body.printing-invoice .invoice-card.printing,
    body.printing-invoice .invoice-card.printing * { visibility: visible !important; }
    body.printing-invoice .invoice-card.printing {
        background: #fff;
        border: 1px solid #888;
        left: 12mm;
        margin: 0;
        position: absolute;
        right: 12mm;
        top: 12mm;
    }
    .invoice-card.printing::before { content: "WE Kopi Kolaborasi · Invoice Lelang Season 7"; display: block; font-size: 18px; font-weight: 800; margin-bottom: 14px; }
}

/* ==========================================================
   TAHAP 1: header, nav, modal login/profil (auction-core.js)
   ========================================================== */


/* Header & nav */
.site-nav { align-items: center; background: rgba(255, 255, 255, .72); border: 1px solid var(--line); border-radius: 999px; display: flex; gap: 3px; justify-self: center; min-width: 0; padding: 5px; }
.site-nav a { border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 700; padding: 8px 12px; text-decoration: none; transition: background .18s ease, color .18s ease; white-space: nowrap; }
.site-nav a:hover { background: var(--paper); color: var(--ink); }
.site-nav a.active, .site-nav a[aria-current="page"] { background: var(--green); color: #fff; }
.site-nav a.external-link { border-left: 1px solid var(--line); border-radius: 0 999px 999px 0; color: var(--green); margin-left: 4px; padding-left: 15px; }
.site-nav a.external-link::after { content: " ↗"; font-size: 10px; }
.site-nav a.external-link:hover { background: var(--paper); color: var(--green-dark); }
.site-nav a:focus-visible, .nav-menu-toggle:focus-visible, .header-account .button:focus-visible { outline: 3px solid rgba(164, 0, 0, .25); outline-offset: 2px; }
.nav-menu-toggle { display: none; }
.header-account { align-items: center; display: flex; flex-shrink: 0; justify-self: end; }
.header-account .button { background: #fff; border: 1px solid var(--line); border-radius: 999px; gap: 8px; min-height: 42px; padding: 8px 16px; white-space: nowrap; }
.header-account .button:hover { background: var(--paper); }
.header-badges { align-items: center; display: inline-flex; gap: 4px; }
.header-badges:empty { display: none; }
.number-badge, .profile-warning { align-items: center; border-radius: 999px; display: inline-flex; font-size: 10px; font-weight: 800; height: 20px; justify-content: center; min-width: 20px; padding: 0 6px; }
.number-badge { background: var(--red); color: #fff; }
.profile-warning { background: var(--amber-border); color: var(--amber-ink); }

/* Modal */
body.modal-open { overflow: hidden; }
.modal-backdrop { align-items: center; background: rgba(20, 16, 13, .55); display: flex; inset: 0; justify-content: center; overflow-y: auto; padding: 24px 16px; position: fixed; z-index: 50; }
.auction-dialog { background: var(--card); border-radius: 16px; box-shadow: 0 24px 60px rgba(20, 16, 13, .3); max-height: calc(100vh - 48px); max-width: 640px; overflow-y: auto; padding: 26px; position: relative; width: 100%; }
.auction-dialog.is-profile-dialog { display: flex; flex-direction: column; height: min(720px, calc(100vh - 48px)); max-width: 720px; overflow: hidden; }
.modal-close { background: transparent; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); cursor: pointer; font-size: 20px; height: 36px; line-height: 1; padding: 0; position: absolute; right: 14px; top: 14px; width: 36px; }
.modal-close:hover { background: var(--paper); }
.modal-heading { padding-right: 44px; }

/* Form di dalam modal: satu kolom */
.auction-dialog .form-grid { grid-template-columns: 1fr; }
.auction-dialog .form-grid > .signup-only { display: grid; gap: 14px; }
.form-submit.is-loading { align-items: center; display: inline-flex; gap: 10px; justify-content: center; }
.loading-spinner { animation: auction-spinner .8s linear infinite; border: 2px solid rgba(255, 255, 255, .45); border-radius: 50%; border-top-color: #fff; flex: none; height: 17px; width: 17px; }
.verification-email { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow-wrap: anywhere; padding: 12px 14px; }
.verification-steps { color: var(--ink); display: grid; gap: 12px; line-height: 1.6; margin: 20px 0; padding-left: 22px; }
.verification-steps li { padding-left: 3px; }
.verification-note { background: #fff7e7; border: 1px solid #f0dba9; border-radius: 10px; color: var(--muted); font-size: 13px; line-height: 1.5; padding: 12px 14px; }
.auction-dialog > .form-submit { margin-top: 8px; width: 100%; }
@keyframes auction-spinner { to { transform: rotate(360deg); } }
.form-grid textarea { background: #fff; border: 1px solid #ccd8d0; border-radius: 10px; color: var(--ink); font: inherit; min-height: 84px; padding: 10px 12px; resize: vertical; width: 100%; }
.form-grid input:focus, .form-grid textarea:focus, .bid-form input:focus { border-color: var(--green); outline: 3px solid rgba(164, 0, 0, .13); }
.form-grid input:disabled, .form-grid textarea:disabled { background: var(--paper); color: var(--muted); cursor: not-allowed; }
.form-grid input[type="radio"], .form-grid input[type="checkbox"] { accent-color: var(--green); flex: none; height: 18px; margin: 0; min-height: 0; padding: 0; width: 18px; }
.form-grid .radio-field { border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 10px; margin: 0; min-width: 0; padding: 12px 14px; }
.radio-field legend { color: var(--ink); font-size: 12px; font-weight: 700; padding: 0 6px; }
.form-grid .radio-field label, .form-grid .terms-check { align-items: center; display: flex; font-weight: 600; gap: 10px; }
.form-grid .terms-check { font-size: 12px; line-height: 1.4; }
.field-help { color: var(--muted); display: block; font-size: 11px; line-height: 1.5; margin-top: -8px; }
.radio-field .field-help { margin-top: 0; }
.rules-details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; font-size: 12px; padding: 10px 14px; }
.rules-details summary { color: var(--green); cursor: pointer; font-weight: 800; }
.rules-details ol { color: var(--muted); display: grid; gap: 6px; margin: 10px 0 2px; padding-left: 18px; }

/* Tab profil */
.profile-tabs { border-bottom: 1px solid var(--line); display: flex; gap: 4px; margin: 18px 0; overflow-x: auto; }
.is-profile-dialog .profile-tabs { flex: none; margin: 14px 0; }
.profile-tabs button { background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 700; min-height: 42px; padding: 7px 12px; white-space: nowrap; }
.profile-tabs button.active { border-bottom-color: var(--green); color: var(--green); }
.profile-content { display: grid; gap: 14px; }
.is-profile-dialog #coreProfileContent { align-content: start; flex: 1; min-height: 0; overflow-y: auto; padding: 2px 4px 4px 0; }
.profile-identity { align-items: center; background: linear-gradient(135deg, #fff 0%, var(--paper) 100%); border: 1px solid var(--line); border-radius: 16px; display: flex; flex: none; gap: 16px; min-width: 0; padding: 16px; }
.profile-avatar { align-items: center; background: var(--green); border: 4px solid rgba(164, 0, 0, .1); border-radius: 50%; color: #fff; display: flex; flex: none; font-size: 21px; font-weight: 800; height: 68px; justify-content: center; letter-spacing: .03em; width: 68px; }
.profile-identity-main { min-width: 0; }
.profile-identity-main h3 { font-size: 18px; margin: 0; overflow-wrap: anywhere; }
.profile-handle, .profile-email { color: var(--muted); font-size: 12px; margin: 3px 0 0; overflow-wrap: anywhere; }
.profile-handle { color: var(--ink); font-weight: 700; }
.profile-status-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.profile-status-chip { background: #fff3df; border: 1px solid #f0dba9; border-radius: 999px; color: #74500c; font-size: 10px; font-weight: 800; padding: 5px 9px; }
.profile-status-chip.is-positive { background: #eaf4ec; border-color: #cee1d2; color: var(--green); }
.profile-status-chip.is-pending { background: #fff3df; }
.is-profile-dialog > #coreAccountMessage { flex: none; }
.profile-details { display: grid; gap: 10px; }
.profile-detail { background: #fff; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 5px; min-width: 0; padding: 12px 14px; }
.profile-detail > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.profile-detail > strong { color: var(--ink); font-size: 13px; font-weight: 700; overflow-wrap: anywhere; white-space: pre-wrap; }
.profile-readonly-note { background: var(--paper); border-radius: 10px; color: var(--muted); font-size: 12px; line-height: 1.5; margin: 0; padding: 12px 14px; }

/* Riwayat lelang di modal */
.history-filters { display: flex; gap: 8px; }
.filter-chip { background: transparent; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 700; padding: 6px 14px; }
.filter-chip.active { background: var(--green); border-color: var(--green); color: #fff; }
.auction-history-list { display: grid; gap: 10px; }
.auction-history-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.auction-history-item h3 { font-size: 15px; margin: 0 0 4px; }
.auction-history-item p { color: var(--muted); font-size: 12px; margin: 2px 0; }
.history-status { background: #eef4ef; border-radius: 999px; color: var(--green); display: inline-flex; font-size: 11px; font-weight: 800; margin-top: 8px; padding: 4px 10px; }

@media (max-width: 1024px) {
    .brand-context { display: none; }
    .site-header { gap: 14px; }
    .site-nav { gap: 1px; }
    .site-nav a { font-size: 11px; padding: 8px 9px; }
    .site-nav a.external-link { margin-left: 2px; padding-left: 11px; }
}

@media (max-width: 860px) {
    .site-header { display: flex; gap: 10px; justify-content: space-between; position: sticky; }
    .brand { flex: 1; }
    .nav-menu-toggle { display: inline-flex; flex: none; order: 2; }
    .header-account { flex: none; order: 3; }
    .site-nav { align-items: stretch; background: var(--card); border: 1px solid var(--line); border-radius: 0 0 16px 16px; box-shadow: var(--shadow); display: none; flex-direction: column; gap: 3px; justify-content: flex-start; left: 0; padding: 10px 14px 14px; position: absolute; right: 0; top: 100%; }
    .site-nav.is-open { display: flex; }
    .site-nav a { border-radius: 10px; font-size: 13px; padding: 11px 13px; }
    .site-nav a.external-link { border-left: 0; border-top: 1px solid var(--line); border-radius: 10px; margin: 5px 0 0; padding: 12px 13px 8px; }
}

@media (max-width: 700px) {
    .committee-viewer-notice { align-items: stretch; flex-direction: column; gap: 10px; }
    .committee-viewer-notice .button { width: 100%; }
    .header-account .button { padding: 8px 13px; }
    .modal-backdrop { align-items: stretch; padding: 0; }
    .auction-dialog { border-radius: 0; max-height: none; min-height: 100%; padding: 22px 16px 28px; }
    .auction-dialog.is-profile-dialog { height: 100dvh; max-height: 100dvh; min-height: 100dvh; padding: 18px 16px; }
    .profile-identity { gap: 12px; padding: 13px; }
    .profile-avatar { font-size: 18px; height: 58px; width: 58px; }
    .profile-identity-main h3 { font-size: 16px; }
    .profile-status-chip { font-size: 9px; }
}
