/* The same inks as the phones, so the three tables look like one game. */
:root {
  --table: #221C17;
  --table-top: #2E251C;
  --table-rim: #4A3C2C;
  --lamp: #6B4E28;
  --paper: #EFE7D5;
  --pencil: #3A332B;
  --chalk: #E8DFCC;
  --chalk-dim: #9A9084;
  --eichel: #B08A5E;   /* almost black on a card, so lighter on the table */
  --laub: #2E6B33;
  --herz: #C0272D;
  --schell: #D99A12;
  --alert: #EE6E70;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  background: var(--table);
  color: var(--chalk);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100dvh;
  overscroll-behavior: none;
}

#app {
  max-width: 560px;
  margin: 0 auto;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

h1 { font-size: 30px; margin: 10px 0 2px; text-align: center; }
.sub { text-align: center; color: var(--chalk-dim); font-size: 13px; margin-bottom: 16px; }
.grow { flex: 1 1 auto; }

button {
  font: inherit;
  border: 0;
  border-radius: 10px;
  padding: 11px 14px;
  background: var(--table-top);
  color: var(--chalk);
  cursor: pointer;
}
button:disabled { opacity: 0.4; cursor: default; }
button.primary { background: var(--schell); color: var(--pencil); font-weight: 700; }
button.wide { width: 100%; margin-top: 9px; }
button.chip {
  background: var(--paper);
  color: var(--pencil);
  padding: 7px 12px;
  border-radius: 9px;
  font-size: 15px;
}
button.chip.on { background: var(--schell); }

/* Seats in the Stube */
.seat {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--table-top);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 9px;
}
.seat.free { background: rgba(46, 37, 28, 0.4); color: var(--chalk-dim); }
.seat .badge { margin-left: auto; font-size: 12px; color: var(--chalk-dim); }
.chair {
  width: 34px; height: 40px; border-radius: 5px;
  border: 1px dashed rgba(154, 144, 132, 0.35);
}
.face { width: 34px; height: 40px; border-radius: 5px; object-fit: cover; }

/* The table */
.bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bar .score { margin-left: auto; font-size: 20px; font-weight: 700; }
.trumpmark { font-weight: 700; }

.opponents { display: flex; justify-content: space-evenly; gap: 10px; }
.opponent { text-align: center; font-size: 12px; color: var(--chalk-dim); max-width: 42%; }
.opponent img { width: 44px; height: 52px; border-radius: 6px; object-fit: cover; display: block; margin: 0 auto; }
.opponent .name { color: var(--chalk); font-size: 13px; }
.opponent.turn .name { color: var(--schell); }
.opponent.out { opacity: 0.45; }
.backs { display: flex; justify-content: center; gap: 2px; margin-top: 3px; }
.back { width: 9px; height: 14px; border-radius: 2px; background: var(--table-rim); }

.bubble {
  background: var(--paper); color: var(--pencil);
  border-radius: 9px; padding: 5px 9px; font-size: 13px;
  display: inline-block; margin-bottom: 4px;
}

.felt {
  flex: 1 1 auto;
  display: flex; align-items: center; justify-content: center;
  gap: 6px; min-height: 108px;
  background: radial-gradient(ellipse at center, #3a2e22 0%, var(--table) 70%);
  border-radius: 50%/22%;
  margin: 10px 0;
}

.hand { display: flex; justify-content: center; }
.hand img {
  width: 72px; border-radius: 5px; margin-left: -18px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
  transition: transform 0.12s;
}
.hand img:first-child { margin-left: 0; }
.hand img.picked { transform: translateY(-14px); }
.felt { position: relative; }
.felt img { width: 64px; border-radius: 5px; transition: transform 0.2s; }
.felt img.won { transform: translateY(-8px); box-shadow: 0 0 0 2px var(--schell); }
.tookit {
  position: absolute; bottom: 6px; left: 0; right: 0; text-align: center;
  color: var(--schell); font-size: 12px;
}

.actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.prompt { color: var(--schell); font-size: 14px; margin-top: 8px; min-height: 20px; }

/* The Zettel */
table { width: 100%; border-collapse: collapse; }
.zettel { background: var(--paper); color: var(--pencil); border-radius: 12px; padding: 14px; }
.zettel th, .zettel td { padding: 5px 3px; text-align: center; font-size: 13px; }
.zettel th:first-child, .zettel td:first-child { text-align: left; width: 58px; }
.zettel tr + tr { border-top: 1px solid rgba(58, 51, 43, 0.12); }
.zettel .up { color: var(--herz); font-weight: 700; }
.zettel .after { color: rgba(58, 51, 43, 0.6); font-size: 11px; }
.zettel .void td { background: rgba(58, 51, 43, 0.06); }

.prompt .clock { color: var(--chalk-dim); font-variant-numeric: tabular-nums; }

.note { color: var(--chalk-dim); font-size: 12px; text-align: center; margin-top: 8px; }
.lost { color: var(--alert); }
input {
  font: inherit; width: 100%; padding: 11px 13px; border-radius: 10px;
  border: 1px solid var(--table-rim); background: var(--table-top); color: var(--chalk);
}
