/* The Bieterunde screens: members' phones (/bieten, designed for the phone first, only centred on
   wider screens) and the projector (/projektor). */
body.bidding { background: #f6f8f5; color: #1f2a22; min-height: 100vh; }
.bidding__frame { width: 100%; max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: #fff;
  padding-bottom: env(safe-area-inset-bottom); }
/* 16px inputs keep iOS from zooming into the field; 48px is a comfortable thumb target. */
body.bidding--bidding input.form-control, body.bidding--bidding .btn { font-size: 16px; min-height: 48px; }
body.bidding--bidding .btn-sm { min-height: 36px; font-size: 13px; }
.bidding__header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: #2f6b3a; color: #fff; font-weight: 600; font-size: 14px; }
.bidding__header form { margin: 0; }
.bidding__badge { background: #fff; color: #2f6b3a; border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.bidding__body { padding: 24px 20px; }
.bidding__center { text-align: center; padding: 48px 20px; }
.bidding__emoji { font-size: 4rem; line-height: 1; }
.bidding__error { color: #b42318; margin-bottom: 12px; }
.bidding__shares { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.bidding__share { margin: 0; cursor: pointer; }
.bidding__share input { position: absolute; opacity: 0; pointer-events: none; }
.bidding__share span { display: flex; align-items: center; justify-content: center; min-height: 72px; padding: 0 4px; border: 2px solid #dfe5dc;
  border-radius: 12px; background: #fff; font-size: 18px; font-weight: 600; text-align: center; }
.bidding__share input:checked + span { background: #2f6b3a; border-color: #2f6b3a; color: #fff; }
.bidding__share input:focus-visible + span { outline: 3px solid #93c5a0; outline-offset: 2px; }
.bidding__recommendation { background: #eef6ef; border: 1px solid #c3dcc7; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; }
.bidding__amount-display { white-space: pre-line; line-height: 1.2; font-size: 2.5rem; font-weight: 700; color: #2f6b3a; }
.bidding__pop { display: inline-block; animation: bidding-pop .6s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes bidding-pop { 0% { transform: scale(0) rotate(-20deg); opacity: 0; } 50% { transform: scale(1.3) rotate(10deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); } }
@media (max-width: 360px) { .bidding__share span { font-size: 15px; } .bidding__body { padding: 20px 14px; } }
@media (prefers-reduced-motion: reduce) { .bidding__pop { animation: none; } }

.bidding__keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.bidding__keypad button { min-height: 64px; font-size: 24px; font-weight: 600; color: #2f6b3a; border: 1px solid #dfe5dc; border-radius: 12px; background: #fff; }
.bidding__keypad button:active { background: #eef6ef; }
.bidding__code { text-align: center; letter-spacing: .2em; font-size: 32px; font-weight: 700; color: #2f6b3a; min-height: 1.6em; border-bottom: 2px solid #dfe5dc; }
.bidding__title { font-size: 3rem; font-weight: 700; }

/* Projector: everything in vw so it scales to any screen. */
body.bidding--projector { background: #101a14; color: #fff; overflow: hidden; }
.projector { min-height: 100vh; display: grid; grid-template-columns: 1fr 1.3fr; grid-template-rows: auto 1fr auto; gap: 2vw 3vw; padding: 3vw; align-items: stretch; }
.projector__fullscreen { position: fixed; top: .6vw; right: 1vw; z-index: 5; background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3);
  border-radius: .6vw; padding: .5vw 1vw; font-size: max(14px, 1.3vw); opacity: .5; cursor: pointer; }
.projector__fullscreen:hover, .projector__fullscreen:focus-visible { opacity: 1; }
.projector__fullscreen[hidden] { display: none; }
.projector__header { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; font-size: 3.4vw; font-weight: 700;
  border-bottom: .2vw solid rgba(255, 255, 255, .2); padding-bottom: 1.2vw; }
.projector__main, .projector__side { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2vw; }
.projector__side { padding: 1vw 0; }
.projector__footer { grid-column: 1 / -1; text-align: center; font-size: 3vw; font-weight: 700; word-break: break-all;
  border-top: .2vw solid rgba(255, 255, 255, .2); padding-top: 1.2vw; }
@media (max-width: 800px) { .projector { grid-template-columns: 1fr; } }
.projector__title { font-size: 3vw; opacity: .7; }
.projector__big { font-size: 12vw; font-weight: 800; line-height: 1; }
.projector__mid { font-size: 5vw; font-weight: 700; }
.projector__small { font-size: 2.2vw; opacity: .8; }
.projector__countdown { font-size: 9vw; font-weight: 800; font-variant-numeric: tabular-nums; color: #facc15; }
.projector__qr { background: #fff; padding: 1.2vw; border-radius: 1vw; display: inline-block; }
.projector__qr img, .projector__qr canvas { width: 20vw !important; height: 20vw !important; }
.projector__failed { color: #f87171; }
.projector__success { color: #4ade80; }
.projector__steps { text-align: left; font-size: 1.8vw; line-height: 1.6; margin: 0; }

/* Printable code cards (admin) */
.bidding-codes { display: grid; grid-template-columns: repeat(2, 9.4cm); gap: 0; }
.bidding-card { width: 9.4cm; height: 9cm; border: 1px dashed #999; padding: 1.9cm .6cm .6cm; display: flex; flex-direction: column; justify-content: center;
  align-items: center; text-align: center; break-inside: avoid; position: relative; overflow: hidden; }
.bidding-card__header { position: absolute; top: .5cm; left: .6cm; display: flex; align-items: center; gap: .3cm; font-size: 13pt; font-weight: 600; color: #333; }
.bidding-card__logo { height: 1cm; width: auto; }
.bidding-card__number { font-size: 36pt; font-weight: 700; }
.bidding-card__name { font-size: 13pt; color: #555; }
.bidding-card__code { font-size: 26pt; font-family: monospace; margin-top: .5cm; letter-spacing: .05em; }
.member-list { width: 100%; border-collapse: collapse; font-size: 11pt; }
.member-list th, .member-list td { border: 1px solid #999; padding: 3mm 2mm; text-align: left; }
.member-list th { background: #eee; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.member-list td:first-child { width: 20mm; white-space: nowrap; }
.member-list td:last-child { width: 70mm; }
.member-list thead { display: table-header-group; }
.member-list .member-list__title th { border: 0; background: none; padding: 0 0 4mm; font-size: 15pt; }
.member-list .member-list__title span { margin-left: .3cm; vertical-align: middle; }
.member-list tr { break-inside: avoid; }
.member-list--blank { break-before: page; }
.member-list--blank td:nth-child(4) { width: 36mm; }
.member-list--blank td { height: 11mm; padding-top: 0; padding-bottom: 0; }
@media print { .bidding-codes__toolbar { display: none; } @page { size: A4; margin: 1cm; } }

/* Both figures on one screen: smaller numbers so they fit above each other. */
.projector__averages--both .projector__big { font-size: 8vw; }
.projector__averages--both .projector__small { margin-top: 1.5vh; }

/* Full-width action buttons below a card, lined up with it and in the app's green. */
.bidding__action { display: block; width: 100%; box-sizing: border-box; margin-top: 12px; padding: 14px 16px; text-align: center; text-decoration: none;
  font-size: 17px; font-weight: 600; color: #2f6b3a; background: #fff; border: 2px solid #2f6b3a; border-radius: 12px; }
.bidding__action:active { background: #eef6ef; }
.bidding__action--small { padding: 8px 12px; font-size: 14px; }
.projector__averages--small .projector__big { font-size: 5vw; }
.projector__averages--small .projector__small { font-size: 1.6vw; margin-top: 1vh; }

/* Earlier bids of the member, one row per round. */
.bidding__previous { margin-top: 28px; text-align: left; }
.bidding__previous-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #dfe5dc; }
.bidding__previous-row .bidding__action { width: auto; margin: 0; flex-shrink: 0; }
.bidding__previous-value { white-space: pre-line; font-size: 1.3rem; font-weight: 700; color: #2f6b3a; }

/* Result statistics on the projector, instead of the QR code: stacked bars of bids in person and by Vollmacht. */
.projector__stats { width: 100%; display: flex; flex-direction: column; gap: 2.4vw; }
.projector__stat-title { font-size: 2.2vw; font-weight: 700; text-align: left; margin-bottom: .6vw; }
.projector__bar { display: flex; height: 4vw; min-width: 4vw; border-radius: .6vw; overflow: hidden; }
.projector__bar span { display: flex; align-items: center; justify-content: center; font-size: 2.4vw; font-weight: 800; min-width: 0; }
.projector__bar-present { background: #4ade80; color: #10301c; }
.projector__bar-proxy { background: #facc15; color: #3a2e00; }
.projector__stat-line { display: flex; justify-content: space-between; gap: 2vw; font-size: 1.8vw; margin-top: .6vw; }
.projector__stat-hours { border-top: 1px solid rgba(255,255,255,.3); padding-top: 1.2vw; font-size: 2vw; font-weight: 700; }
.projector__legend { display: flex; align-items: center; gap: .8vw; font-size: 1.5vw; opacity: .8; }
.projector__legend span { display: inline-block; width: 1.4vw; height: 1.4vw; border-radius: .3vw; margin-left: 1vw; }
.projector__legend span:first-child { margin-left: 0; }
