body { min-height: 100vh; min-height: 100dvh; overscroll-behavior: none; user-select: none; -webkit-user-select: none; }
input { user-select: text; -webkit-user-select: text; }
.screen { max-width: 560px; margin: 0 auto; padding: 14px 14px calc(30px + env(safe-area-inset-bottom)); }

/* Beitreten */
#join { text-align: center; padding-top: calc(14px + env(safe-area-inset-top)); }
.j-top { display: flex; justify-content: flex-end; }
.j-logo { font-size: 64px; margin-top: 10px; animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px); } }
.j-title { font-family: var(--display); font-size: 38px; line-height: 1; margin: 6px 0; background: linear-gradient(180deg, #fff, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.j-sub { color: var(--gold); font-weight: 800; letter-spacing: .3em; text-transform: uppercase; font-size: 12px; margin-bottom: 22px; }
.j-form { display: grid; gap: 14px; text-align: left; }
.j-form label span, .j-colors-l { display: block; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.j-form input { width: 100%; padding: 16px; border-radius: 16px; border: 2px solid var(--line); background: rgba(0, 0, 0, .3); color: #fff; font-size: 20px; font-weight: 700; font-family: inherit; outline: none; }
.j-form input:focus { border-color: var(--gold); }
#jCode { text-transform: uppercase; letter-spacing: .4em; font-family: var(--display); text-align: center; font-size: 30px; }
.j-colors { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.j-colors button { aspect-ratio: 1; border-radius: 14px; border: 3px solid transparent; background: var(--c); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25); transition: transform .15s; }
.j-colors button.on { border-color: #fff; transform: scale(1.12); box-shadow: 0 0 0 3px var(--gold), inset 0 -4px 0 rgba(0, 0, 0, .25); }
.j-btn { font-size: 22px; padding: 18px; margin-top: 8px; }

/* Kopfzeile */
#hdr { position: sticky; top: 0; z-index: 20; margin: -14px -14px 12px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, rgba(10, 14, 44, .96), rgba(10, 14, 44, .82)); backdrop-filter: blur(10px); border-bottom: 2px solid var(--pc, var(--line)); }
#hdr .hn { flex: 1; min-width: 0; }
#hdr .hn b { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hdr .hn small { color: var(--gold); font-weight: 700; font-size: 12px; }
.hstat { text-align: center; min-width: 46px; }
.hstat b { display: block; font-family: var(--display); font-size: 22px; line-height: 1; }
.hstat span { font-size: 10px; color: var(--muted); font-weight: 800; text-transform: uppercase; }
.hstat.vp b { color: var(--gold); }
.hbtn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .08); color: #fff; font-size: 14px; font-weight: 800; flex: none; }
.hbtn.off { opacity: .4; }

/* Karten-Bereich */
.card { background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .04)); border: 1px solid var(--line); border-radius: 22px; padding: 16px; margin-bottom: 14px; animation: cardIn .35s ease-out both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } }
.h2 { font-family: var(--display); font-size: 24px; line-height: 1.1; margin: 0 0 6px; }
.hint { color: var(--muted); font-size: 15px; line-height: 1.4; }
.center { text-align: center; }
.big-ico { font-size: 64px; text-align: center; animation: bob 3s ease-in-out infinite; }
.myturn { background: linear-gradient(160deg, rgba(247, 201, 72, .25), rgba(247, 201, 72, .06)); border-color: rgba(247, 201, 72, .6); box-shadow: 0 0 40px rgba(247, 201, 72, .15); }
.myturn .h2 { color: var(--gold); }
.row { display: flex; gap: 10px; align-items: center; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.gap { height: 12px; }

/* Kandidatenwahl */
.cands { display: grid; gap: 14px; }
.cand-opt { display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; }
.cand-opt .ccard { width: 200px; }

/* Würfeln */
.rollbtn { width: 100%; font-size: 34px; padding: 26px; border-radius: 26px; font-family: var(--display); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.03); box-shadow: 0 6px 0 #b48a1c, 0 0 50px rgba(247, 201, 72, .6); } }
.dicebox { display: flex; justify-content: center; gap: 18px; margin: 16px 0; min-height: 90px; }
.shake { text-align: center; color: var(--muted); font-size: 13px; margin-top: 8px; }

/* Aktionen */
.actgroup { margin-top: 12px; }
.actgroup h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.abtn { text-align: left; border: 1px solid var(--line); background: rgba(255, 255, 255, .07); color: #fff; border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 4px; min-height: 88px; transition: transform .1s, background .2s; }
.abtn:active { transform: scale(.97); background: rgba(247, 201, 72, .2); }
.abtn .ai { font-size: 26px; }
.abtn b { font-size: 15px; line-height: 1.15; }
.abtn small { color: var(--muted); font-size: 12px; font-weight: 600; }
.abtn .ch { color: var(--gold); font-weight: 800; }
.abtn:disabled { opacity: .35; }
.pick { display: grid; gap: 10px; }
.pickbtn { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 2px solid var(--line); background: rgba(255, 255, 255, .06); color: #fff; border-radius: 16px; padding: 12px; font-size: 16px; font-weight: 700; }
.pickbtn.on { border-color: var(--gold); background: rgba(247, 201, 72, .18); }
.pickbtn:disabled { opacity: .35; }
.pickbtn .sub { margin-left: auto; color: var(--muted); font-size: 13px; }
.themes { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.themes button { border: 2px solid var(--line); background: rgba(255, 255, 255, .06); color: #fff; border-radius: 14px; padding: 12px 6px; font-weight: 800; font-size: 13px; }
.themes button .ti { font-size: 26px; display: block; }
.themes button.on { border-color: var(--gold); background: rgba(247, 201, 72, .2); }
.themes button:disabled { opacity: .3; }
.cardpick { display: grid; gap: 10px; }
.cardpick > div { cursor: pointer; transition: transform .12s, box-shadow .2s; border-radius: 14px; }
.cardpick > div.on { box-shadow: 0 0 0 3px var(--gold), 0 0 24px rgba(247, 201, 72, .4); transform: scale(1.02); }
.sbacks { display: flex; gap: 12px; }
.sbacks .scard { cursor: pointer; }
.sbacks .on .scard, .sbacks .scard.on { box-shadow: 0 0 0 3px var(--gold); }
.actions-bottom { display: flex; gap: 10px; margin: 14px -6px -6px; position: sticky; bottom: calc(8px + env(safe-area-inset-bottom)); padding: 8px; border-radius: 18px; background: rgba(10, 14, 44, .92); backdrop-filter: blur(8px); z-index: 5; }
.actions-bottom .btn { flex: 1; }

/* Abstimmung */
.votebtns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.votebtns .btn { font-size: 24px; padding: 22px 10px; font-family: var(--display); }
.bar { position: relative; height: 26px; border-radius: 10px; background: rgba(255, 255, 255, .1); overflow: hidden; margin: 10px 0; }
.bar .y { position: absolute; left: 0; top: 0; bottom: 0; background: var(--green); transition: width .5s; }
.bar .n { position: absolute; right: 0; top: 0; bottom: 0; background: var(--red); transition: width .5s; }
.bar .m { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--gold); }
.bonushint { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(46, 229, 157, .14); border: 1px solid rgba(46, 229, 157, .4); font-weight: 700; font-size: 14px; }

/* Regierungsbildung */
.assign { display: grid; gap: 12px; }
.arow { padding: 10px; border-radius: 16px; background: rgba(0, 0, 0, .25); }
.arow .al { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-bottom: 8px; }
.arow .al .v { margin-left: auto; color: var(--gold); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 6px; border-radius: 12px; border: 2px solid transparent; background: rgba(255, 255, 255, .07); color: #fff; font-weight: 700; font-size: 14px; }
.pchip.on { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 35%, transparent); }
.pchip .plogo { width: 24px; height: 24px; font-size: 12px; border-radius: 7px; }
.meter2 { position: relative; height: 14px; border-radius: 99px; background: rgba(255, 255, 255, .1); margin: 10px 0 4px; }
.meter2 i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--red); transition: width .4s; }
.meter2 i.ok { background: var(--green); }
.meter2 em { position: absolute; top: -4px; bottom: -4px; width: 3px; background: var(--gold); }
.sum { font-weight: 800; }

/* Hand */
#hand details { background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-radius: 22px; padding: 4px 14px 14px; margin-bottom: 14px; }
#hand summary { list-style: none; padding: 12px 0; font-family: var(--display); font-size: 18px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
#hand summary::-webkit-details-marker { display: none; }
#hand summary::after { content: '▾'; transition: transform .2s; }
#hand details[open] summary::after { transform: rotate(180deg); }
.hsec { margin-top: 12px; }
.hsec h5 { margin: 0 0 8px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.hgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mycand { display: flex; justify-content: center; }
.scrow { display: flex; gap: 10px; flex-wrap: wrap; }
.scrow .scard { width: calc(50% - 5px); }

#host details { background: rgba(255, 77, 94, .08); border: 1px solid rgba(255, 77, 94, .3); border-radius: 18px; padding: 4px 14px 14px; }
#host summary { padding: 10px 0; font-weight: 800; cursor: pointer; }
#host .btn { width: 100%; margin-top: 8px; }

.conn { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 99; background: var(--red); color: #fff; padding: 10px 18px; border-radius: 12px; font-weight: 800; font-size: 14px; white-space: nowrap; }
.stamp2 { display: inline-block; font-family: var(--display); font-size: 30px; padding: 4px 16px; border: 4px solid currentColor; border-radius: 12px; transform: rotate(-6deg); animation: st .4s cubic-bezier(.2, 1.8, .4, 1) both; }
.stamp2.ok { color: var(--green); } .stamp2.bad { color: var(--red); }
@keyframes st { from { transform: rotate(-6deg) scale(2.4); opacity: 0; } }
.rank { display: grid; gap: 8px; }
.rank .r { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .06); font-weight: 700; }
.rank .r.me { background: rgba(247, 201, 72, .2); border: 1px solid var(--gold); }
.rank .r b { margin-left: auto; color: var(--gold); }
.lobby-me { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lobby-me .av { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 5px var(--pc), 0 14px 30px rgba(0, 0, 0, .4); animation: bob 3s ease-in-out infinite; }
.stepper2 { display: flex; align-items: center; gap: 10px; }
.stepper2 button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); color: #fff; font-size: 22px; font-weight: 800; }
.stepper2 b { font-family: var(--display); font-size: 26px; min-width: 36px; text-align: center; color: var(--gold); }
.setrow { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-weight: 700; }
.tgl { width: 60px; height: 34px; border-radius: 99px; border: 0; background: rgba(255, 255, 255, .15); position: relative; }
.tgl::after { content: ''; position: absolute; left: 4px; top: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: left .2s; }
.tgl.on { background: var(--green); }
.tgl.on::after { left: 30px; }
.mini2 { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px; background: rgba(255, 255, 255, .1); font-size: 13px; font-weight: 700; }
