:root{
  --bg:#0b1020;
  --panel: rgba(255,255,255,.08);
  --stroke: rgba(255,255,255,.14);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.65);
  --danger: #ff6b6b;
}

*{box-sizing:border-box}

html, body{ height:100%; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: var(--text);

  background-color: var(--bg);
  background-image:
    radial-gradient(900px 600px at 20% 10%, rgba(110,231,255,.16), transparent 60%),
    radial-gradient(900px 600px at 80% 20%, rgba(99,102,241,.14), transparent 60%);
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

.top{
  max-width:1100px;
  margin:0 auto;
  padding:16px 18px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.brand{font-weight:900; letter-spacing:.2px;}

.pill{
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.08);
}

.wrap{max-width:1100px;margin:0 auto;padding:0 18px 30px}

.panel{
  border:1px solid var(--stroke);
  background: var(--panel);
  border-radius:18px;
  padding:16px;
  margin-top:14px;
  backdrop-filter: blur(14px);
}

.grid{display:grid; grid-template-columns: 1fr 1fr; gap:12px;}
@media (max-width: 900px){ .grid{grid-template-columns: 1fr;} }

.box{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  border-radius:16px;
  padding:12px;
}

label{display:block; margin-top:10px; margin-bottom:6px; color:var(--muted); font-size:12px;}

input{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.18);
  color: var(--text);
  outline:none;
}

/* ===== Buttons ===== */
button{
  margin-top:12px;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.20);
  background: rgba(255,255,255,.10);
  color: var(--text);
  font-weight:900;
  cursor:pointer;
}

button:disabled{opacity:.5; cursor:not-allowed;}

button.danger{
  border-color: rgba(255,107,107,.35);
  background: rgba(255,107,107,.16);
}

.smallBtn{
  margin-top:0;
  padding:10px 10px;
  border-radius:12px;
  font-weight:800;
  font-size:12px;
}

.packToolbar{
  display:flex;
  gap:8px;
  margin-top:6px;
  margin-bottom:10px;
  flex-wrap: wrap;
}

/* ===== Pack List + Preview ===== */
.packList{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.12);
  border-radius:14px;
  padding:10px;
  max-height: 280px;
  overflow:auto;
}

.packItemWrap{ margin-bottom:10px; }
.packItemWrap:last-child{ margin-bottom:0; }

.packItem{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  cursor:pointer;
  user-select:none;
  transition: transform .08s ease, border-color .12s ease, background .12s ease;
}

.packItem:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
}

.packItem input[type="checkbox"]{
  width: 18px;
  height: 18px;
  accent-color: rgba(110,231,255,.9);
}

.packMeta{ flex:1; min-width:0; }

.packTitle{
  font-weight: 900;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.packSub{
  margin-top: 2px;
  font-size: 12px;
  color: rgba(255,255,255,.70);
}

.packRight{
  display:flex;
  align-items:center;
  gap:8px;
}

.packBadge{
  font-size: 11px;
  color: rgba(255,255,255,.75);
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  white-space: nowrap;
}

.previewBtn{
  margin-top:0;
  padding:8px 10px;
  font-size:12px;
  border-radius:12px;
}

.packPreview{
  margin-top:8px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.14);
}

.packSummary{
  margin-top:10px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
}

.packSummaryLine{
  display:flex;
  gap:8px;
  align-items:baseline;
  flex-wrap:wrap;
}

/* Host bar */
.hostBar{
  margin-top:10px;
  padding:10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.14);
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap: wrap;
}

.hostTag{
  font-size:12px;
  font-weight:900;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(110,231,255,.35);
  background: rgba(110,231,255,.12);
}

/* ===== Layout ===== */
.muted{color:var(--muted)}
.small{font-size:12px}
.big{font-size:18px;font-weight:900}

.row{display:flex;justify-content:space-between;align-items:center;gap:10px}
.right{display:flex;align-items:center;gap:10px}

.playerRow{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:8px 0;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.playerRow:last-child{ border-bottom:0; }

/* ===== Tischlayout ===== */
.table{
  display:grid;
  grid-template-columns: 1.3fr 1fr;
  gap:12px;
  margin-top:12px;
}
@media (max-width: 900px){
  .table{grid-template-columns: 1fr;}
}

.stack{display:flex; flex-direction:column; gap:10px;}
.side{display:flex; flex-direction:column; gap:12px;}
.label{color:var(--muted); font-size:12px;}

/* ===== Kartenoptik ===== */
.card{
  border-radius:18px;
  padding:16px;
  box-shadow:
    0 10px 30px rgba(0,0,0,.25),
    inset 0 1px 0 rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.12);
  position:relative;
  user-select:none;
}

.blackCard{
  background: #0a0a0c;
  color: rgba(255,255,255,.95);
  border-color: rgba(255,255,255,.10);
  min-height: 170px;
}

.whiteCard{
  background: #ffffff;
  color: #0b0b0c;
  border-color: rgba(0,0,0,.14);
  box-shadow:
    0 10px 30px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.65);
}

.cardText{
  font-size:18px;
  font-weight:900;
  line-height:1.15;
  white-space:pre-wrap;
}

.cardMeta{
  margin-top:10px;
  font-size:12px;
  opacity:.75;
}

/* Hand desktop */
.hand{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
  margin-top:10px;
}

/* ✅ Mobile: horizontal scroll carousel */
@media (max-width: 900px){
  .hand{
    display:flex;
    gap:10px;
    overflow-x:auto;
    padding-bottom:6px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .hand .card{
    min-width: 78%;
    scroll-snap-align: center;
  }
}

.pickable{
  cursor:pointer;
  transform: translateY(0);
  transition: transform .08s ease, box-shadow .12s ease, outline-color .12s ease;
}
.pickable:hover{ transform: translateY(-2px); }

.selected{
  outline: 3px solid rgba(110,231,255,.55);
  box-shadow:
    0 16px 38px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.65);
}

.reveals{
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
  margin-top:10px;
}

.toast{
  position:fixed;
  left:50%;
  bottom:16px;
  transform:translateX(-50%);
  background: rgba(0,0,0,.45);
  border:1px solid rgba(255,255,255,.16);
  border-radius:12px;
  padding:10px 12px;
}