/* Breadwinner on the phone and the shared card look. The TV reuses the card styles at its own size. */

/* ---------- cards: glossy, with the card's color as --face ---------- */
.bw-card {
  position: relative; display: flex; flex-direction: column; align-items: stretch; text-align: left; gap: 4px;
  border: 1px solid rgba(0,0,0,.1); border-radius: 14px; padding: 8px 8px 9px; min-width: 0;
  background: var(--face); color: var(--food-ink); font: inherit;
  box-shadow: 0 0 0 3px rgba(255,255,255,.35) inset, 0 1px 0 rgba(255,255,255,.7) inset, 0 4px 12px rgba(16,20,28,.14);
}
.bw-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(165deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.12) 28%, rgba(255,255,255,0) 29%);
}
.bw-card .bw-art { width: 100%; height: auto; aspect-ratio: 120 / 84; stroke: none; fill: none; display: block; }
.bw-card .bw-art.icon { aspect-ratio: auto; height: 46px; }
.bw-card b { font: 700 12px/1.15 var(--display); letter-spacing: -.01em; overflow-wrap: anywhere; }
.bw-card small { font: 400 11px/1.3 var(--body); opacity: .78; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bw-card .bw-v {
  position: absolute; top: 6px; left: 6px; z-index: 1; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px;
  display: grid; place-items: center; background: #fff; color: var(--food-ink); font: 400 11px/1 var(--pixel); box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.bw-card .bw-as { font: 400 9px/1.2 var(--pixel); text-transform: uppercase; opacity: .7; }
.bw-card.k-dough b { font-size: 15px; }
.bw-card[aria-pressed="true"] { outline: 3px solid var(--accent); outline-offset: 2px; transform: translateY(-3px); }
.bw-card.mini { width: 64px; flex: none; padding: 5px 5px 6px; border-radius: 10px; gap: 2px; box-shadow: 0 0 0 2px rgba(255,255,255,.35) inset, 0 2px 6px rgba(16,20,28,.12); }
.bw-card.mini b { font-size: 8.5px; line-height: 1.1; }
.bw-card.mini .bw-v { top: 3px; left: 3px; min-width: 16px; height: 16px; font-size: 8px; padding: 0 4px; }
.bw-card.mini .bw-art.icon { height: 28px; }
.bw-card.mini .bw-as { font-size: 7px; }
.bw-emblem { width: 22px; height: 22px; stroke: none; fill: none; flex: none; }

/* ---------- the phone ---------- */
.breadwinner { gap: 14px; padding-bottom: 24px; }
.breadwinner h3 { margin: 0 0 8px; font: 400 12px/1 var(--pixel); text-transform: uppercase; letter-spacing: .06em; color: var(--soft); }
.bw-strip { justify-content: space-between; margin: 0; }
.bw-strip span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bw-strip span:last-child { white-space: nowrap; flex: none; }
.bw-oops:empty { display: none; }
.bw-oops { margin: 0; }

.bw-alert { padding: 16px; border-radius: 18px; background: var(--panel); border: 2px solid var(--accent); box-shadow: var(--shadow); display: grid; gap: 10px; }
.bw-alert h2 { font-size: 22px !important; margin: 0 !important; }
.bw-alert p { margin: 0; color: var(--soft); font-size: 15px; }
.bw-alert p:empty { display: none; }
.bw-alert.win { border-color: var(--lcd-ink); background: var(--lcd); color: #DDF7E5; }
.bw-alert.win h2 { color: var(--lcd-ink); }
.bw-row { display: flex; flex-wrap: wrap; gap: 8px; }
.bw-row .btn { flex: 1 1 140px; }

.bw-hand { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bw-end { width: 100%; margin-top: 10px; }

.bw-sets { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bw-sets li { padding: 8px 10px 10px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.bw-sets li.full { border-color: var(--deep); box-shadow: 0 0 0 2px var(--tint) inset; }
.bw-set-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.bw-set-head b { font: 600 14px/1.2 var(--body); flex: 1; min-width: 0; }
.bw-set-head span { font: 400 10px/1 var(--pixel); text-transform: uppercase; color: var(--soft); white-space: nowrap; }
.bw-minis { display: flex; flex-wrap: wrap; gap: 6px; }
.bw-minis.bank { margin-top: 6px; }
.bw-bank-line { display: flex; justify-content: space-between; align-items: baseline; margin: 10px 0 0; }
.bw-bank-line b { font: 700 15px/1 var(--display); }
.bw-bank-line span { font: 400 10px/1 var(--pixel); text-transform: uppercase; color: var(--soft); }
.meta.left { text-align: left; margin: 0; }

.bw-others { display: grid; gap: 8px; }
.bw-seat { border-radius: 16px; background: var(--panel); border: 1px solid var(--line); padding: 0 12px; }
.bw-seat[open] { padding-bottom: 12px; }
.bw-seat.turn { border-color: var(--accent); }
.bw-seat summary { display: flex; align-items: center; gap: 10px; padding: 12px 0; cursor: pointer; list-style: none; }
.bw-seat summary::-webkit-details-marker { display: none; }
.bw-seat summary i { width: 22px; height: 22px; border-radius: 50%; background: var(--tint); flex: none; }
.bw-seat summary b { font-weight: 600; }
.bw-seat summary span { margin-left: auto; font: 400 10px/1.2 var(--pixel); text-transform: uppercase; color: var(--soft); text-align: right; }

.bw-log { list-style: none; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--lcd); color: #BFEFCF; font: 500 13px/1.4 var(--body); display: grid; gap: 2px; }
.bw-log li:first-child { color: var(--lcd-ink); }
.bw-log li + li { opacity: .65; }

/* the sheet that slides up when you pick a card */
.bw-sheet { position: fixed; inset: 0; z-index: 20; background: rgba(10,12,16,.45); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.bw-sheet-in {
  width: 100%; max-width: 560px; max-height: 82dvh; overflow-y: auto; padding: 16px 16px max(18px, env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0; background: var(--bg-2); box-shadow: 0 -10px 30px rgba(0,0,0,.25); display: grid; gap: 12px;
  animation: up .25s cubic-bezier(.2,.8,.2,1);
}
@keyframes up { from { transform: translateY(40px); } }
.bw-sheet.still, .bw-sheet.still .bw-sheet-in { animation: none; }
.bw-sheet-top { display: flex; gap: 12px; align-items: flex-start; }
.bw-sheet-top > div:nth-child(2) { flex: 1; min-width: 0; }
.bw-sheet-top b { font: 700 18px/1.15 var(--display); }
.bw-sheet-top p { margin: 4px 0 0; color: var(--soft); font-size: 15px; }
.bw-x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--chrome); display: grid; place-items: center; flex: none; }
.bw-x svg { width: 18px; height: 18px; }
.bw-opts { display: grid; gap: 8px; }
.bw-opts > p { margin: 4px 0 0; color: var(--soft); font-size: 15px; }
.bw-opts .bw-who { margin: 6px 0 0; font-weight: 600; color: var(--ink); }
.bw-opts .btn { width: 100%; height: auto; min-height: 52px; padding: 12px 18px; text-align: center; line-height: 1.25; }
.bw-pickwrap { padding: 0; border: 0; background: none; border-radius: 10px; }
.bw-pickwrap .bw-card { pointer-events: none; }
.bw-check { display: flex; align-items: center; gap: 10px; font-weight: 600; padding: 6px 0; }
.bw-check input { width: 22px; height: 22px; accent-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .bw-sheet, .bw-sheet-in { animation: none; }
}
