/* Shared components: header, footer, buttons, facts, lot cards, states, unveil room. */

/* header */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: var(--bg); }
.site-head .bar { display: flex; align-items: center; gap: 28px; padding-block: 20px; }
.mark { font: 500 21px/1 var(--display); letter-spacing: .06em; margin-right: auto; }
.nav { display: flex; gap: 28px; }
.nav a { font-size: 13px; color: var(--muted); white-space: nowrap; }
@media (max-width: 1100px) { .site-head .bar { gap: 20px; } .nav { gap: 18px; } }
.nav a[aria-current="page"] { color: var(--fg); }
.lang-switch { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 2px; font: 400 13px/1 var(--display); letter-spacing: .08em; color: var(--muted); transition: color .15s; }
.lang-btn:hover, .lang-switch.open .lang-btn { color: var(--fg); }
.lang-btn:focus-visible, .lang-item:focus-visible { outline: 1px solid var(--gilt); outline-offset: 2px; }
.lang-code:lang(zh) { font-family: var(--sans); font-size: 12px; letter-spacing: .04em; }
.ico { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.chev { width: 11px; height: 11px; stroke-width: 1.4; opacity: .7; transition: transform .15s; }
.lang-switch.open .ico.chev { transform: rotate(180deg); }
.lang-menu { position: absolute; top: calc(100% + 10px); right: -10px; z-index: 20; min-width: 208px; max-height: min(72vh, 560px); overflow-y: auto; overscroll-behavior: contain; padding: 6px; display: flex; flex-direction: column; background: var(--plinth); border: 1px solid var(--line); box-shadow: 0 18px 40px -18px rgba(0,0,0,.45); animation: lang-in .14s ease-out; }
.lang-menu[hidden] { display: none; }
@keyframes lang-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.lang-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 38px; padding: 7px 12px; text-align: left; font: 400 14px/1.2 var(--sans); color: var(--muted); }
.lang-item:hover, .lang-item:focus-visible { color: var(--fg); background: color-mix(in srgb, var(--fg) 5%, transparent); }
.lang-item[aria-checked="true"] { color: var(--fg); }
.lang-item:nth-child(3) { border-bottom: 1px solid var(--line); margin-bottom: 4px; padding-bottom: 10px; min-height: 41px; }
.lang-item[lang="en"], .lang-item[lang="vi"], .lang-item[lang="id"], .lang-item[lang="tr"], .lang-item[lang="ru"], .lang-item[lang="es"], .lang-item[lang="pt-BR"] { font-family: var(--display); font-weight: 500; font-size: 16px; letter-spacing: .02em; }
.lang-short { font: 400 11px/1 var(--display); letter-spacing: .12em; color: var(--faint); }
.ico.check { width: 14px; height: 14px; stroke: var(--gilt); stroke-width: 1.6; }
.wallet-btn { font-size: 13px; border-bottom: 1px solid var(--line); padding-bottom: 2px; white-space: nowrap; }
.wallet-btn:hover { border-color: var(--gilt); }
.tabbar { display: none; }
@media (max-width: 760px) {
  .site-head .bar { padding-block: 16px; gap: 18px; }
  .nav { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; inset: auto 0 0; z-index: 9; background: var(--bg); border-top: 1px solid var(--line);
    padding: 10px var(--gutter-r) calc(10px + env(safe-area-inset-bottom, 0px)) var(--gutter); }
  .tabbar a { text-align: center; font-size: 12px; color: var(--muted); padding-block: 4px; }
  .tabbar a[aria-current="page"] { color: var(--fg); }
  body { padding-bottom: 64px; }
}
.notice { border-bottom: 1px solid var(--line); }
.notice .wrap { padding-block: 10px; font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; }
.notice.bad .wrap { color: var(--danger); }
.notice button { text-decoration: underline; text-underline-offset: 3px; }

/* footer */
.site-foot { margin-top: clamp(96px, 12vw, 160px); border-top: 1px solid var(--line); }
.site-foot .wrap { padding-block: 28px 48px; display: flex; flex-wrap: wrap; gap: 12px 32px; font-size: 12.5px; color: var(--muted); }
.site-foot .end { margin-left: auto; font-family: var(--display); letter-spacing: .06em; }
.site-foot a:hover { color: var(--fg); }

/* buttons */
.act { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); width: 100%; text-align: left; }
.act b { font: 400 16px/1 var(--serif); letter-spacing: .06em; }
.act span { font: 400 16px/1 var(--display); color: var(--muted); }
.act:hover:not(:disabled) { border-color: var(--gilt); }
.act.main { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.act.main span { color: var(--bg); opacity: .7; }
.act:disabled { opacity: .4; }
.link { font-size: 13px; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.link:hover { border-color: var(--gilt); }

/* facts */
.facts { display: grid; grid-template-columns: auto 1fr; gap: 12px 24px; margin: 0; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 0; font: 400 20px/1.2 var(--display); letter-spacing: .03em; }
.facts dd small { font: 300 13px var(--sans); color: var(--muted); letter-spacing: 0; }

/* lot cards */
.lots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 48px 28px; }
@media (max-width: 960px) { .lots { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .lots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 16px; } }
.item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.item .pic { aspect-ratio: 1; background: var(--plinth); margin-bottom: 10px; overflow: hidden; }
.item .pic img { width: 100%; height: 100%; object-fit: cover; transition: filter .4s; }
.item.gone .pic img { filter: grayscale(1) brightness(.35); }
.item.veiled .pic img { filter: brightness(.08); }
.item .name { font: 400 15px/1.4 var(--serif); }
.item .med { font-size: 12.5px; color: var(--muted); min-height: 1.7em; }
.item .row { display: flex; justify-content: space-between; gap: 8px; font: 400 14px/1 var(--display); color: var(--muted); letter-spacing: .04em; }
a.item:hover .name { color: var(--gilt); }

/* lists (hammer log, listings) */
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) auto; gap: 20px; padding-block: 16px; border-top: 1px solid var(--line); align-items: baseline; }
.ledger li:last-child { border-bottom: 1px solid var(--line); }
.ledger .w { min-width: 0; overflow-wrap: anywhere; font: 400 15px var(--serif); }
.ledger .a { font: 400 14px var(--display); color: var(--muted); }
@media (max-width: 600px) { .ledger li { grid-template-columns: minmax(0, 1fr) auto; } .ledger .lotno { grid-column: 1 / -1; } }

/* states */
.state { padding-block: 48px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.state h3 { font: 400 18px/1.3 var(--serif); letter-spacing: .04em; }
.state p { color: var(--muted); font-size: 13.5px; max-width: 46ch; }
.skeleton { background: linear-gradient(90deg, var(--plinth), var(--line), var(--plinth)); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* unveil room */
.room-scrim { position: fixed; inset: 0; z-index: 30; background: var(--bg); overflow: auto; }
.room { min-height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 32px; max-width: 980px; margin: 0 auto;
  padding: calc(40px + env(safe-area-inset-top, 0px)) var(--gutter-r) calc(40px + env(safe-area-inset-bottom, 0px)) var(--gutter); }
.room h3 { font: 400 26px/1.3 var(--serif); letter-spacing: .06em; }
.meter { height: 1px; background: var(--line); }
.meter i { display: block; height: 100%; width: 0; background: var(--gilt); transition: width .4s linear; }
.cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.cards.one { grid-template-columns: minmax(0, 320px); justify-content: center; }
@media (max-width: 600px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { display: flex; flex-direction: column; gap: 8px; text-align: left; min-width: 0; perspective: 1000px; }
.card .in { position: relative; aspect-ratio: 1; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.2, .7, .15, 1); }
.card.open .in { transform: rotateY(180deg); }
.card .f, .card .b { position: absolute; inset: 0; backface-visibility: hidden; overflow: hidden; background: var(--plinth); }
.card .b { transform: rotateY(180deg); }
.card img { width: 100%; height: 100%; object-fit: cover; }
.card .t { font-size: 12.5px; line-height: 1.4; min-height: 2.8em; color: var(--muted); }
.card .t b { display: block; font: 400 14px/1.35 var(--serif); color: var(--fg); }
.room .acts { display: flex; flex-wrap: wrap; gap: 12px; }
.room .acts .act { flex: 1 1 220px; }
.unveil-item { min-width: 0; }
.unveil-item > .card, .unveil-item > .card .in { width: 100%; }
.unveil-trade { margin-top: 12px; display: grid; gap: 10px; }
.sell-bid { display: grid; gap: 6px; margin-block: 12px; overflow-wrap: anywhere; }
.sell-bid small { color: var(--muted); }
.bid-form { max-width: 640px; display: grid; gap: 18px; margin-block: 24px; }
.bid-form select { width: 100%; min-width: 0; }
.bid-depth, .bid-mine { margin-block: 32px; }
.bid-table { width: 100%; border-collapse: collapse; margin-top: 16px; text-align: left; }
.bid-table th, .bid-table td { border-bottom: 1px solid var(--line); padding: 12px 8px; overflow-wrap: anywhere; }
.bid-mine .mine li { flex-wrap: wrap; overflow-wrap: anywhere; }
.bid-total { overflow-wrap: anywhere; }

/* sale hero */
.hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(28px, 6vw, 96px); align-items: end; padding-block: clamp(24px, 5vw, 64px) 8px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
.hero figure { margin: 0; }
.hero figure img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--plinth); }
@media (max-width: 860px) { .hero figure img { aspect-ratio: 5 / 4; object-position: 50% 35%; } }
.hero figcaption { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; font-size: 13px; }
.side { display: flex; flex-direction: column; gap: 40px; padding-bottom: 6px; min-width: 0; }
.title { display: flex; flex-direction: column; gap: 10px; }
.title h1 { font: 400 clamp(30px, 4.4vw, 46px)/1.15 var(--serif); letter-spacing: .04em; }
.title .en { font: italic 400 17px/1 var(--display); color: var(--muted); }
.closing { display: flex; gap: 16px; align-items: center; border-top: 1px solid var(--line); padding-top: 20px; }
.closing img { width: 72px; height: 72px; object-fit: cover; flex: none; }
.serif { font: 400 15px/1.4 var(--serif); }

/* season list */
.season { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; }
@media (max-width: 760px) { .season { grid-template-columns: 1fr; } }
.season li { display: flex; gap: 18px; align-items: baseline; padding-block: 18px; border-top: 1px solid var(--line); }
.season .r { font: 400 18px/1 var(--display); color: var(--muted); width: 2.2rem; flex: none; }
.season b { font: 400 16px/1.3 var(--serif); flex: 1; }
.season em { font: italic 400 13px var(--display); color: var(--muted); }
.season li.now b { color: var(--gilt); }
/* 預展：沿用拍賣圖錄的留白、細線與字級。 */
.preview-time { display:flex; flex-direction:column; gap:12px; padding:20px 0; border-top:1px solid var(--line); }
.preview-time > .num { font-size:clamp(22px,4vw,36px); }
.preview-events .lots { grid-template-columns:repeat(3,minmax(0,1fr)); }
.preopening .state h1 { font:400 clamp(24px,4vw,36px)/1.5 var(--serif); }
.preview .side, .preview .title, .preview-events .item { min-width:0; }
.preview .act { gap:16px; flex-wrap:wrap; }
.ai-prompt { border-top:1px solid var(--line); margin-top:16px; padding:14px 0; min-width:0; }
.ai-prompt summary { cursor:pointer; font:400 13px/1.6 var(--sans); color:var(--muted); overflow-wrap:anywhere; }
.ai-prompt summary:focus-visible { outline:1px solid var(--gilt); outline-offset:4px; }
.ai-prompt-body { display:flex; flex-direction:column; gap:14px; padding-top:16px; min-width:0; }
.ai-prompt .inp { width:100%; min-width:0; box-sizing:border-box; background:transparent; color:var(--fg); border:0; border-bottom:1px solid var(--line); border-radius:0; padding:8px 0; font:400 16px/1.6 var(--sans); }
.ai-prompt .inp:focus-visible { outline:1px solid var(--gilt); outline-offset:3px; }
.ai-prompt .ai-prompt-text { resize:vertical; font:400 13px/1.7 var(--sans); white-space:pre-wrap; overflow-wrap:anywhere; }
.ai-prompt-actions { display:flex; gap:20px; flex-wrap:wrap; align-items:center; }
.ai-prompt, .ai-prompt textarea, .agent-mint, .agent-mint pre { -webkit-user-select:text; user-select:text; -webkit-touch-callout:default; }
.ai-prompt .ai-copy, .agent-mint .ai-copy { width:auto; min-height:44px; justify-content:center; }
.agent-mint { display:flex; flex-direction:column; gap:12px; margin:0 0 32px; min-width:0; }
.agent-mint pre { margin:0; padding:14px; border:1px solid var(--line); white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-word; font:400 13px/1.7 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; color:var(--fg); max-height:18em; overflow:auto; -webkit-overflow-scrolling:touch; }
.ai-availability { display:block; margin-top:6px; font-size:12px; }
.ai-copy:disabled { cursor:not-allowed; opacity:.5; }
.ai-asset-prompts { min-width:0; width:100%; }
.holdings .ai-asset-prompts { grid-column:1 / -1; }
@media(max-width:600px) { .preview-events .lots { grid-template-columns:1fr; } .preview .season li em { overflow-wrap:anywhere; } }

/* 創始 Pass：Agent ID 名稱輸入（10/29） */
.agent-name { display: grid; gap: 6px; margin-block: 12px; }
.agent-name input { font: inherit; padding: 10px 12px; border: 1px solid var(--line, currentColor); background: transparent; color: inherit; width: 100%; max-width: 100%; }
.agent-name [role="status"]:empty { display: none; }
