/* 押金 — a street deposit counter: clay ground, paper envelopes, one gold accent (the seat). */
:root {
  --clay: #B0503A; --clay-d: #8E3D2B; --clay-l: #C2654E;
  --paper: #F6EAD3; --paper-2: #EBD9B8; --char: #2B1A12; --cream: #FFF4E2;
  --gold: #FFD23F;
  --serif: 'Noto Serif SC', 'Songti SC', serif;
  --sans: 'Noto Sans SC', 'PingFang SC', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html { background: var(--clay); }
body { margin: 0; background: var(--clay); color: var(--cream); font: 400 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }

/* ---------- the CA strip: sticky, full address, one-tap copy ---------- */
#cabar, .yj-strip { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 14px; background: var(--char); color: var(--cream); border-bottom: 3px solid var(--gold); }
.yj-strip-mark { width: 26px; height: 26px; border-radius: 6px; flex: none; }
.yj-strip-k { font: 700 12px/1 var(--sans); letter-spacing: .06em; color: var(--gold); flex: none; }
.yj-strip-ca { font: 600 12px/1.3 var(--mono); word-break: break-all; user-select: all; flex: 1 1 200px; min-width: 0; }
.yj-strip-ca[data-live="0"] { color: #cdb9a0; user-select: text; }
.yj-strip-copy { flex: none; border: 0; border-radius: 999px; padding: 6px 14px; background: var(--gold); color: var(--char); font: 700 13px/1 var(--sans); }
.yj-strip-copy:disabled { background: #5a4636; color: #b9a58d; }
.yj-strip-copy[data-done="1"] { background: var(--cream); }
.yj-strip-gm { flex: none; font: 500 11px/1 var(--mono); color: #cdb9a0; text-decoration: none; }

/* ---------- headline ---------- */
.yj-head { margin: 0; padding: 22px 16px 6px; font: 900 30px/1.22 var(--serif); letter-spacing: -.01em; color: var(--cream); max-width: 1180px; margin-inline: auto; }
.yj-head em { font-style: normal; color: var(--gold); }

/* ---------- shell ---------- */
.yj-shell { max-width: 1180px; margin: 0 auto; padding: 0 16px 28px; display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
.yj-desk, .yj-col { min-width: 0; }
.yj-meta { display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; font: 500 13px/1 var(--sans); }
.yj-meta-name { font: 900 15px/1 var(--serif); }
.yj-meta-no { opacity: .8; }
.yj-meta-ph { margin-left: auto; padding: 5px 10px; border-radius: 4px; background: var(--clay-d); font: 600 13px/1 var(--mono); }
.yj-meta-ph[data-st="seal"] { background: var(--gold); color: var(--char); }
.yj-meta-ph[data-st="show"] { background: var(--cream); color: var(--char); }

/* the outbid moment */
.yj-moment { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 14px; background: var(--clay-d); border-left: 5px solid var(--gold); border-radius: 0 8px 8px 0; }
.yj-moment.flash { animation: yjFlash 1.4s ease-out; }
.yj-moment-k { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: var(--char); font: 900 14px/1 var(--serif); }
.yj-moment-line { margin: 0; font: 500 14px/1.45 var(--sans); }
.yj-moment-line b { color: var(--gold); font-family: var(--mono); }
@keyframes yjFlash { 0% { background: var(--gold); color: var(--char); } 100% { background: var(--clay-d); } }

/* ---------- the grid of cells: the seat in the middle, envelopes around it ---------- */
.yj-board { background: var(--clay-l); border-radius: 14px; padding: 10px; box-shadow: inset 0 0 0 2px rgba(0,0,0,.08); }
.yj-cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 84px; grid-auto-flow: row dense; gap: 8px; }
.yj-seat { grid-column: 2 / span 2; grid-row: 1 / span 2; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; text-align: center;
  background: var(--char); color: var(--cream); border-radius: 10px; border: 3px solid var(--gold); padding: 8px; position: relative; }
.yj-seat-k { font: 700 11px/1 var(--sans); letter-spacing: .14em; color: var(--gold); }
.yj-seat-pool { font: 600 26px/1.1 var(--mono); color: var(--gold); }
.yj-seat-who { font: 500 12px/1.3 var(--sans); }
.yj-seat-owe { font: 500 11px/1.3 var(--mono); color: #d8c4a8; }
.yj-seat.flip { animation: yjSeat .9s ease-out; }
@keyframes yjSeat { 0% { transform: scale(.94); box-shadow: 0 0 0 0 var(--gold); } 60% { box-shadow: 0 0 0 10px rgba(255,210,63,0); } 100% { transform: none; } }

.yj-env { position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: 8px 8px 7px; border-radius: 8px; overflow: hidden;
  background: var(--paper); color: var(--char); font: 500 11px/1.25 var(--sans); }
.yj-env::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 46%; background: var(--paper-2);
  clip-path: polygon(0 0, 100% 0, 50% 100%); }
.yj-env .wax { position: absolute; left: 50%; top: 24%; transform: translate(-50%, -50%); width: 22px; height: 22px; border-radius: 50%; background: var(--clay); color: var(--cream);
  display: grid; place-items: center; font: 900 11px/1 var(--serif); }
.yj-env .who { position: relative; font: 500 10px/1 var(--mono); opacity: .7; }
.yj-env .amt { position: relative; font: 600 13px/1.2 var(--mono); }
.yj-env .tag { position: relative; font: 500 10px/1.2 var(--sans); opacity: .75; }
.yj-env.open::before { clip-path: polygon(0 0, 100% 0, 50% 30%); opacity: .55; }
.yj-env.open .wax { display: none; }
.yj-env.open .amt { font-size: 16px; }
.yj-env.lead { box-shadow: inset 0 0 0 3px var(--gold); }
.yj-env.lead .tag { color: var(--char); opacity: 1; font-weight: 700; }
.yj-env.lost { background: #e4d3b3; }
.yj-env.lost .stamp { position: absolute; right: 6px; top: 6px; padding: 2px 5px; border: 2px solid var(--clay); color: var(--clay); border-radius: 4px; transform: rotate(-8deg);
  font: 700 10px/1 var(--sans); background: rgba(246,234,211,.8); }
.yj-env.won { background: var(--gold); }
.yj-env.won::before { background: #f0c22a; }
.yj-env.me .who { opacity: 1; font-weight: 700; }
.yj-env.slot { background: transparent; border: 2px dashed rgba(255,244,226,.35); color: rgba(255,244,226,.6); justify-content: center; align-items: center; text-align: center; font: 500 12px/1.3 var(--sans); }
.yj-env.slot::before { display: none; }
.yj-env.slot.next { border-color: var(--gold); color: var(--gold); border-style: solid; animation: yjPulse 1.8s ease-in-out infinite; font-weight: 700; }
.yj-env.more { background: var(--clay-d); color: var(--cream); justify-content: center; align-items: center; font: 600 15px/1 var(--mono); }
.yj-env.more::before { display: none; }
.yj-env.fresh { animation: yjDrop .5s ease-out; }
@keyframes yjPulse { 50% { box-shadow: 0 0 0 4px rgba(255,210,63,.25); } }
@keyframes yjDrop { from { transform: translateY(-10px); opacity: 0; } }

.yj-live { margin: 10px 2px 2px; font: 400 14px/1.55 var(--sans); color: var(--cream); }
.yj-live b { color: var(--gold); font-weight: 700; }

/* ---------- the action ---------- */
.yj-act { margin-top: 16px; padding: 14px; border-radius: 12px; background: var(--paper); color: var(--char); }
.yj-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.yj-f { display: flex; flex-direction: column; gap: 4px; font: 500 12px/1.2 var(--sans); }
.yj-f input { width: 100%; padding: 10px; border-radius: 8px; border: 2px solid var(--paper-2); background: #fffaf0; color: var(--char); font: 600 18px/1 var(--mono); }
.yj-f input:focus { outline: none; border-color: var(--clay); }
.yj-f i { font-style: normal; font-size: 11px; opacity: .6; }
.yj-act-note { margin: 10px 0; font: 400 13px/1.5 var(--sans); }
.yj-go { width: 100%; padding: 14px; border: 0; border-radius: 10px; background: var(--char); color: var(--gold); font: 700 16px/1 var(--sans); }
.yj-go:disabled { background: #6b594a; color: #d9c7ae; }
.yj-act-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.yj-who { border: 2px solid var(--char); background: none; color: var(--char); border-radius: 999px; padding: 6px 12px; font: 600 13px/1 var(--sans); }
.yj-mine { font: 500 12px/1.3 var(--mono); }
.yj-claim { margin-left: auto; border: 0; border-radius: 999px; padding: 7px 14px; background: var(--clay); color: var(--cream); font: 700 13px/1 var(--sans); }

/* ---------- side column ---------- */
.yj-h { margin: 0 0 10px; font: 900 17px/1.2 var(--serif); }
.yj-dim { font: 400 12px var(--sans); opacity: .7; }
.yj-feed, .yj-past, .yj-how, .yj-slip { padding: 14px; border-radius: 12px; background: var(--clay-d); margin-bottom: 14px; }
.yj-feed-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow: auto; }
.yj-feed-list li { display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px dashed rgba(255,244,226,.18); font: 400 13px/1.45 var(--sans); }
.yj-feed-list li .t { font: 500 11px/1.6 var(--mono); opacity: .7; }
.yj-feed-list li .w { font-family: var(--mono); font-size: 12px; }
.yj-feed-list li.won { color: var(--gold); }
.yj-feed-list li.new { animation: yjDrop .5s ease-out; }
.yj-feed-list li.empty { opacity: .75; }
.yj-past-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.yj-past-card { padding: 10px; border-radius: 8px; background: var(--clay); font: 400 12px/1.45 var(--sans); }
.yj-past-card b { display: block; font: 600 15px/1.2 var(--mono); color: var(--gold); }
.yj-past-card.empty { grid-column: 1 / -1; }
.yj-rules { margin: 0; padding-left: 18px; font: 400 13.5px/1.6 var(--sans); }
.yj-rules li { margin-bottom: 6px; }
.yj-rules b { margin-right: 6px; color: var(--gold); }
.yj-eg { margin-top: 12px; padding: 12px; border-radius: 8px; background: var(--paper); color: var(--char); font: 400 13px/1.55 var(--sans); }
.yj-eg p { margin: 4px 0; }
.yj-eg b { color: var(--clay); font-family: var(--mono); }
.yj-eg-k { font: 900 13px/1 var(--serif); color: var(--clay); }
.yj-mono { font: 500 12px/1.4 var(--mono); word-break: break-all; }

/* ---------- footer ---------- */
.yj-end { max-width: 1180px; margin: 0 auto; padding: 18px 16px 40px; border-top: 1px solid rgba(255,244,226,.2); font: 400 12px/1.5 var(--sans); }
.yj-end-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.yj-end-row > span { opacity: .7; min-width: 64px; }
.yj-end-links a { margin-right: 14px; }
.yj-end-note { opacity: .7; margin: 10px 0 0; }

.yj-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; max-width: 90vw; padding: 10px 16px; border-radius: 10px; background: var(--char); color: var(--cream); font: 500 13px/1.4 var(--sans); box-shadow: 0 6px 24px rgba(0,0,0,.3); }
.yj-veil { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.5); display: grid; place-items: center; }
.yj-veil-card { background: var(--paper); color: var(--char); border-radius: 12px; padding: 16px; display: grid; gap: 8px; min-width: 240px; }
.yj-veil-card button { padding: 10px; border-radius: 8px; border: 1px solid var(--paper-2); background: #fffaf0; }

/* ---------- 720–1000: one column, wider measure, bigger cells ---------- */
@media (min-width: 720px) {
  .yj-head { font-size: 40px; padding: 30px 24px 8px; }
  .yj-shell { padding: 0 24px 32px; }
  .yj-cells { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 96px; }
  .yj-seat { grid-column: 3 / span 2; }
  .yj-seat-pool { font-size: 32px; }
  .yj-strip { padding: 9px 24px; }
  .yj-strip-ca { font-size: 13px; }
}
/* ---------- ≥1000: board + action left, the counter's feed and rules as a second column ---------- */
@media (min-width: 1000px) {
  .yj-head { font-size: 52px; max-width: 1180px; padding: 34px 24px 10px; }
  .yj-shell { grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
  .yj-cells { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 108px; gap: 10px; }
  .yj-seat-pool { font-size: 38px; }
  .yj-env .amt { font-size: 15px; }
  .yj-env.open .amt { font-size: 19px; }
  .yj-act { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; align-items: end; }
  .yj-act .yj-fields { grid-column: 1 / -1; }
  .yj-act-note { grid-column: 1 / -1; }
  .yj-feed-list { max-height: 260px; }
}
