:root{--bg:#F5F6F8;--green:#3B7061;--dark:#275246;--sage:#D8E8E3;--white:#fff;--text:#1F2937;--muted:#6B7280;--line:#E2E8F0}*{box-sizing:border-box}body{margin:0;background:var(--bg);font:16px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text)}button,input{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible{outline:3px solid #a6c9bf;outline-offset:2px}.home{max-width:940px;margin:auto;padding:36px 20px 75px}.hero{text-align:center}.brand-icon{width:130px;height:130px;display:block;margin:0 auto 2px}.hero h1{font-size:clamp(46px,8vw,72px);line-height:1.1;color:var(--dark);letter-spacing:-2px;margin:4px 0 10px}.hero p{font-size:clamp(19px,3vw,29px);color:var(--muted);margin:0 0 36px}.card{background:#fff;border:1px solid var(--line);border-radius:20px}.auth{padding:30px 36px;margin-bottom:28px}.auth-head{display:flex;align-items:center;gap:20px;margin-bottom:18px}.auth-avatar{width:76px;height:76px;border-radius:18px;background:var(--sage);color:var(--dark);display:grid;place-items:center;flex:none}.auth h2{margin:0;font-size:clamp(22px,3vw,29px);line-height:1.2}.auth p{margin:4px 0 0;color:var(--muted)}.benefits{margin:0 0 24px 96px;padding:0;list-style:none;display:grid;gap:11px}.benefits li{display:flex;align-items:center;gap:16px}.benefits svg{color:var(--green);flex:none}.actions{display:grid;grid-template-columns:1fr 1fr;gap:16px}.btn{border:1.5px solid var(--green);border-radius:12px;padding:12px 18px;background:var(--green);color:#fff;font-weight:650;transition:background .15s}.btn:hover{background:var(--dark)}.btn.secondary{background:white;color:var(--dark)}.btn.secondary:hover{background:var(--sage)}.games{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.game{min-height:218px;padding:24px 12px 20px;display:flex;align-items:center;flex-direction:column;justify-content:center;gap:13px;color:var(--text);transition:border-color .15s,transform .15s}.game:hover{border-color:var(--green);transform:translateY(-2px)}.game svg{width:105px;height:105px;color:var(--dark)}.game strong{font-size:25px}.underline{width:52px;height:4px;border-radius:10px;background:var(--green)}.top{max-width:1050px;margin:auto;padding:22px 20px 0;display:flex;justify-content:space-between;align-items:center;gap:15px}.back{background:none;border:0;color:var(--dark);font-weight:650;padding:8px 0}.top .smallbrand{display:flex;align-items:center;gap:8px;font-weight:800;color:var(--dark);font-size:21px}.top svg{width:32px;height:32px}.page{max-width:1050px;margin:auto;padding:20px 20px 70px}.page h1{margin:0 0 6px;font-size:34px}.hint{color:var(--muted);margin:0 0 22px}.panel{padding:24px;margin-bottom:20px}.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.field{display:flex;flex-direction:column;gap:5px;font-weight:600}.field input{border:1px solid #cbd5df;border-radius:9px;padding:10px 12px;background:white;min-width:0;width:100%}.playerform{display:flex;gap:10px;align-items:end}.playerform .field{flex:1}.chips{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.chip{background:var(--sage);border:1px solid #bdd5cc;border-radius:30px;padding:6px 10px;color:var(--dark);font-size:14px}.chip button{border:0;background:none;color:inherit;margin-left:5px;font-weight:700}.tablewrap{overflow-x:auto}.score{border-collapse:collapse;width:100%;min-width:360px}.score th,.score td{padding:11px 9px;text-align:center;border-bottom:1px solid var(--line)}.score th:first-child,.score td:first-child{text-align:left;white-space:nowrap}.score th{color:var(--dark)}.score small{display:block;color:var(--muted);font-weight:500}.score input{width:75px;max-width:100%;border:1px solid #cbd5df;border-radius:7px;padding:8px;text-align:center}.score .total{font-weight:800;background:#f2f8f5}.status{color:var(--muted);font-size:14px;margin-top:12px}.footer{text-align:center;color:var(--muted);font-size:13px;margin-top:28px}.modalback{position:fixed;inset:0;background:#152a2388;display:grid;place-items:center;padding:18px;z-index:5}.modal{width:min(100%,440px);padding:26px}.modal h2{margin:0 0 8px}.modal p{color:var(--muted)}.modal .btn{width:100%}@media(max-width:650px){.home{padding:24px 16px 50px}.brand-icon{width:110px;height:110px}.hero p{margin-bottom:26px}.auth{padding:22px}.auth-head{gap:13px}.auth-avatar{width:54px;height:54px;border-radius:13px}.auth-avatar svg{width:32px}.benefits{margin-left:0}.actions{gap:9px}.actions .btn{padding:11px 6px}.games{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.game{min-height:170px;padding:16px 8px}.game svg{width:76px;height:76px}.game strong{font-size:19px}.panel{padding:16px}.playerform{flex-wrap:wrap}.playerform .btn{width:100%}}

/* Gast-Startseite V3: symmetrischer, kompakter Anmeldebereich */
.auth{padding:22px 30px 24px}
.auth-head{display:flex;flex-direction:column;align-items:center;gap:5px;text-align:center;margin-bottom:19px}
.auth-avatar{width:48px;height:48px;border-radius:12px;margin-bottom:3px}
.auth-avatar svg{width:29px;height:29px}
.auth h2{font-size:clamp(21px,2.6vw,27px);margin:0}
.auth p{margin:0;color:var(--muted)}
.benefits{margin:0 auto 22px;max-width:690px;grid-template-columns:1fr 1fr;column-gap:26px;row-gap:12px}
.benefits li{gap:10px;font-size:15px;line-height:1.35}
.benefits svg{width:24px;height:24px;flex:none}
.actions{max-width:690px;margin:auto}
.game img{width:115px;height:105px;object-fit:contain;display:block}
@media(max-width:650px){.auth{padding:18px 15px 20px}.auth-head{margin-bottom:17px}.auth p{font-size:14px}.benefits{grid-template-columns:1fr 1fr;column-gap:9px;row-gap:14px}.benefits li{font-size:12px;gap:6px;align-items:flex-start}.benefits svg{width:20px;height:20px}.game img{width:88px;height:82px}}

/* Version 4: kompakter und ohne Avatar */
.auth{padding:19px 28px 21px}.auth-head{margin-bottom:14px;gap:2px}.benefits{margin-bottom:18px;row-gap:9px}.game img{width:130px;height:130px;object-fit:contain}.game{min-height:235px;overflow:visible}
@media(max-width:650px){.auth{padding:17px 14px 18px}.auth-head{margin-bottom:13px}.benefits{row-gap:11px;margin-bottom:16px}.game img{width:100px;height:100px}.game{min-height:185px}}

/* Logos: contained inside their boxes; never crop the right edge. */
.brand-icon{display:flex;align-items:center;justify-content:center;overflow:visible}
.brand-icon .site-logo{display:block;width:100%;height:100%;object-fit:contain;object-position:center}
.top .smallbrand{min-width:0;flex-shrink:0;white-space:nowrap}
.top .smallbrand .site-logo{width:38px;height:38px;max-width:38px;object-fit:contain;display:block;flex:none}
@media(max-width:400px){.top .smallbrand{font-size:17px}.top .smallbrand .site-logo{width:30px;height:30px}.top{gap:8px}}

/* Logo size adjustment: retain the original 3:2 aspect ratio. */
.hero .brand-icon{width:210px;height:145px;max-width:100%;margin:0 auto 2px}
.hero .brand-icon .site-logo{width:100%;height:100%;object-fit:contain}
.top .smallbrand .site-logo{width:65px;height:46px;max-width:none;object-fit:contain}
@media(max-width:650px){.hero .brand-icon{width:170px;height:118px}.top .smallbrand .site-logo{width:54px;height:38px}}
@media(max-width:400px){.top .smallbrand .site-logo{width:48px;height:34px}}

/* Desktop: Logo der Startseite doppelt so gross; iPhone unveraendert. */
@media (min-width:651px){.hero .brand-icon{width:420px;height:290px;max-width:100%}}

/* Desktop: logo closer to top edge and Spielstand heading; mobile unchanged. */
@media (min-width:651px){
  .home{padding-top:18px}
  .hero .brand-icon{margin-bottom:-28px}
  .hero h1{margin-top:0}
}

/* Anmeldung nur als Dialog, nicht als feste Startseiten-Kachel. */
.guest-modal{position:relative;width:min(100%,590px);max-height:min(90dvh,760px);overflow-y:auto;padding:28px 30px 24px}
.guest-modal .auth-head{padding-right:18px}.guest-modal .benefits{margin:18px auto 22px;max-width:480px}.guest-modal .actions{max-width:480px}
.guest-modal .actions .btn{width:auto}.modal-close{position:absolute;top:10px;right:14px;background:none;border:0;font-size:28px;color:var(--muted);line-height:1;padding:5px 9px}
.guest-continue{display:block;margin:18px auto 0;border:0;background:none;color:var(--dark);font-weight:650;text-decoration:underline;padding:8px}
.auth-link{border:0;background:none;color:var(--dark);font-weight:650;text-decoration:underline;padding:4px}
@media(max-width:650px){.guest-modal{padding:25px 17px 18px}.guest-modal .benefits{grid-template-columns:1fr 1fr}.guest-modal .actions{grid-template-columns:1fr 1fr}}

/* Nur neue Gast-Spielereingabe und Router-Platzhalter; Startseite unverändert */
.guest-top{display:flex;align-items:center;gap:12px;background:#fff;border-bottom:1px solid var(--line);padding:13px max(18px,calc((100vw - 1050px)/2));min-height:76px}
.guest-back,.guest-login{border:0;background:transparent;color:var(--text);padding:8px;font-size:27px;line-height:1}
.guest-brand{display:flex;align-items:center;gap:7px;font-size:22px;color:var(--text);white-space:nowrap}
.guest-brand img{width:56px;height:44px;object-fit:contain}
.guest-top-right{margin-left:auto;display:flex;align-items:center;gap:10px}
.guest-pill{background:#f1f3f5;border:1px solid var(--line);color:var(--muted);font-size:12px;font-weight:650;border-radius:18px;padding:5px 10px}
.guest-entry{max-width:690px;margin:0 auto;padding:28px 18px 65px}
.guest-entry h1{font-size:clamp(26px,4vw,34px);margin:4px 0 5px}
.guest-subtitle{font-size:13px;color:var(--muted)}
.guest-player-card{padding:22px;margin-top:22px}
.guest-card-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
.guest-card-heading h2{margin:0;font-size:19px}
.guest-counter{font-size:12px;color:var(--muted);background:#f1f3f5;padding:5px 10px;border-radius:18px}
.guest-player-list{display:grid;gap:8px}
.guest-player{display:flex;align-items:center;gap:12px;padding:8px 10px;border-radius:10px;background:var(--bg)}
.guest-player-index{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--sage);color:var(--dark);font-weight:700}
.guest-player button{margin-left:auto;border:0;background:transparent;font-size:23px;color:var(--muted)}
.guest-add-form{display:grid;gap:10px;margin-top:15px}
.guest-add-form label{font-weight:650;font-size:14px}
.guest-add-form input{width:100%;border:1px solid #cbd5df;border-radius:10px;padding:12px;background:white}
.guest-add-form .btn,.guest-start{width:100%}
.guest-help{color:var(--muted);font-size:13px;margin:16px 0 0}
.guest-start{margin-top:18px}
.guest-start:disabled{opacity:.45;cursor:not-allowed}
.guest-placeholder{padding:26px}
@media(max-width:420px){.guest-top{gap:5px;padding:10px}.guest-brand{font-size:19px;gap:2px}.guest-brand img{width:43px}.guest-top-right{gap:3px}.guest-pill{padding:4px 7px;font-size:11px}}

.guest-home-link{appearance:none;border:0;background:transparent;cursor:pointer;font:inherit;color:inherit;text-align:left;padding:0}
.guest-home-link:focus-visible{outline:2px solid #3B7061;outline-offset:4px;border-radius:6px}

.guest-tool{border:0;background:transparent;color:#1F2937;display:grid;place-items:center;padding:5px;min-width:29px;min-height:34px;border-radius:8px}
.guest-tool svg{width:21px;height:21px}.guest-tool.active{background:#D8E8E3;color:#275246}
.skull-score{width:100%;min-width:0;table-layout:fixed}.skull-score th,.skull-score td{min-width:0;padding:9px 2px;overflow:hidden}
.skull-score th:first-child,.skull-score td:first-child{width:25px;max-width:25px;text-align:center;font-size:12px;padding:6px 1px}
.skull-score th:not(:first-child){font-size:clamp(10px,2.7vw,15px);overflow-wrap:anywhere;line-height:1.2}.skull-score small{font-size:clamp(10px,2.5vw,13px)}
.skull-score input{width:100%;min-width:0;max-width:100%;padding:7px 1px;font-size:clamp(11px,3vw,16px);appearance:textfield;-moz-appearance:textfield}
.skull-score input::-webkit-inner-spin-button,.skull-score input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
@media(max-width:650px){.page{padding:15px 7px 60px}.page .panel{padding:12px 5px}.guest-top{gap:5px}.guest-top-right{gap:1px}.guest-tool{min-width:26px;padding:3px}.guest-tool svg{width:19px;height:19px}.guest-login{padding:3px}.guest-brand{font-size:17px}.guest-brand img{width:39px}}

/* Skull King: jede Spielerspalte bleibt auch auf kleinen Displays sichtbar */
.skull-round-heading{justify-content:space-between;align-items:center;margin-bottom:15px}
.skull-round-heading h2{margin:0;font-size:19px}
.skull-scroll{width:100%;overflow:visible}
.skull-grid{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:2px 5px}
.skull-grid th:first-child,.skull-grid tbody th{width:22px;text-align:center;font-size:12px;padding:0;color:#6B7280;font-weight:600}
.skull-grid th:not(:first-child),.skull-grid td{width:auto;min-width:0;overflow:hidden;padding:0}
.skull-grid thead th{vertical-align:bottom;padding-bottom:7px}
.skull-name{font-weight:750;font-size:clamp(10px,2.8vw,15px);overflow-wrap:anywhere;line-height:1.1;color:#1F2937}
.skull-sum{font-size:clamp(10px,2.6vw,13px);color:#6B7280;margin-top:5px}
.skull-tile{display:flex;flex-direction:column;border:1px solid #E2E8F0;border-radius:8px;overflow:hidden;min-width:0;background:#fff}
.skull-bid{height:31px;display:flex;align-items:center;gap:2px;padding:2px 3px;border-bottom:1px solid #E2E8F0}
.skull-mini-label{font-size:clamp(6px,1.6vw,10px);color:#6B7280;white-space:nowrap}
.skull-bid input{font-size:clamp(10px,2.7vw,15px);font-weight:750;text-align:center;width:100%;min-width:0}
.skull-point{height:48px;display:grid;place-items:center}
.skull-point input{font-size:clamp(13px,3.6vw,20px);font-weight:750;text-align:center;width:100%;min-width:0;height:100%}
.skull-tile input{border:0;outline:0;background:transparent;color:#1F2937;padding:0;appearance:textfield;-moz-appearance:textfield}
.skull-tile input::-webkit-inner-spin-button,.skull-tile input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.skull-tile input:disabled{opacity:1;-webkit-text-fill-color:#1F2937}
.skull-tile input:focus{outline:2px solid #3B7061;outline-offset:-2px;border-radius:4px}
.skull-tile.bid-phase .skull-bid,.skull-tile.point-phase .skull-point{background:#D8E8E3}
.skull-tile.locked-phase{background:#F5F6F8}
.skull-tile.locked-phase .skull-point{height:42px}
.skull-controls{margin-top:20px}
.skull-controls .btn{width:100%}
.skull-controls .status{margin:10px 0 0}
.skull-bottom-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.skull-results{margin-top:24px}
.skull-podium{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.skull-medal{border:3px solid;border-radius:13px;min-width:0;padding:17px 7px;display:flex;align-items:center;flex-direction:column;text-align:center;gap:8px}
.skull-medal span{font-size:12px;color:#6B7280}.skull-medal strong{overflow-wrap:anywhere;font-size:clamp(13px,3vw,19px)}
.skull-medal b{font-size:clamp(11px,2.7vw,16px)}
.medal-1{border-color:#D4AF37}.medal-2{border-color:#A8B0B9}.medal-3{border-color:#B87333}
.skull-ranking{margin-top:18px}.skull-ranking>div{display:flex;justify-content:space-between;gap:10px;padding:11px 8px;border-bottom:1px solid #E2E8F0}
@media(max-width:650px){.page .panel{padding:12px 4px}.skull-grid{border-spacing:1px 4px}.skull-bid{padding:2px 1px;gap:0}.skull-mini-label{font-size:7px}.skull-point{height:44px}.skull-bid{height:28px}.skull-tile{border-radius:5px}}

/* Karten nach Vorlage: kleine Ansage-Ecke oben links, große Punktefläche */
.guest-tool img{width:21px;height:21px;display:block}
.skull-tile{position:relative;display:block;aspect-ratio:1.38/1;min-height:65px;border-radius:9px;background:#fff;overflow:hidden}
.skull-bid{position:absolute;z-index:2;top:0;left:0;width:39%;height:42%;padding:0;border:0;border-right:1px solid #E2E8F0;border-bottom:1px solid #E2E8F0;border-bottom-right-radius:8px;display:grid;place-items:center}
.skull-bid input{font-size:clamp(11px,2.7vw,17px);font-weight:700;width:100%;height:100%;text-align:center}
.skull-point{position:absolute;inset:0;display:grid;place-items:center;height:100%;padding:14% 2% 0 26%}
.skull-point input{width:100%;height:100%;font-size:clamp(14px,4vw,24px);font-weight:750;text-align:center}
.skull-tile.bid-phase .skull-bid{background:#D8E8E3}
.skull-tile.point-phase .skull-point{background:#D8E8E3}
.skull-tile.point-phase .skull-bid{background:#fff}
.skull-tile.locked-phase .skull-point{height:100%;background:#F5F6F8}
.skull-tile.locked-phase .skull-bid{background:#F5F6F8}
@media(max-width:650px){.skull-tile{min-height:55px;border-radius:6px}.skull-bid{border-bottom-right-radius:5px}.skull-point{height:100%;padding:14% 0 0 23%}.guest-tool img{width:19px;height:19px}}

/* Kompakte Skull-King-Kacheln: ca. ein Drittel der bisherigen Höhe */
.skull-tile{aspect-ratio:auto!important;height:24px!important;min-height:24px!important;border-radius:5px!important;cursor:text}
.skull-bid{width:27%!important;height:56%!important;border-bottom-right-radius:3px!important}
.skull-bid input{font-size:clamp(8px,2vw,11px)!important;font-weight:600!important}
.skull-point{height:100%!important;padding:0 1px 0 23%!important}
.skull-point input{font-size:clamp(13px,3.5vw,21px)!important;font-weight:800!important}
.skull-controls .skull-warning[hidden]{display:none!important}
.skull-warning{color:#9a3412!important;font-size:13px;margin:10px 0 0}
@media(max-width:650px){.skull-tile{height:22px!important;min-height:22px!important}.skull-point input{font-size:clamp(12px,3.2vw,18px)!important}}

/* Lesbare flache Kacheln mit Luft ober- und unterhalb der Punktzahl */
.skull-tile{height:48px!important;min-height:48px!important;aspect-ratio:auto!important;border-radius:7px!important}
.skull-bid{width:29%!important;height:43%!important}
.skull-bid input{font-size:clamp(9px,2.2vw,12px)!important}
.skull-point{height:100%!important;padding:5px 3px 5px 23%!important}
.skull-point input{font-size:clamp(16px,4vw,24px)!important;line-height:1.1}
.skull-tile input:disabled{pointer-events:none!important}
@media(max-width:650px){
 .skull-tile{height:43px!important;min-height:43px!important}
 .skull-point{padding:4px 1px 4px 21%!important}
 .skull-point input{font-size:clamp(15px,3.7vw,20px)!important}
}

/* Punktzahl horizontal und vertikal über die gesamte Kachel zentrieren */
.skull-point{padding:0!important;inset:0!important;display:flex!important;align-items:center!important;justify-content:center!important}
.skull-point input{width:100%!important;height:100%!important;text-align:center!important;padding:0!important}
.skull-bid{z-index:3!important}
.skull-tile.point-phase .skull-point{background:#D8E8E3}

/* Bearbeitungsmodus: alle alten und aktuellen Eingaben rot kennzeichnen */
.skull-grid.edit-mode .skull-tile,.edit-mode .skull-tile{border-color:#E7A0A0}
.edit-mode .skull-tile .skull-bid,.edit-mode .skull-tile .skull-point{background:#FDE8E8!important}
.edit-mode .skull-tile input:disabled{background:transparent}
.skull-player-head{display:flex;align-items:center;justify-content:center;gap:3px;min-width:0}
.skull-player-head .skull-name{min-width:0}
.skull-move{display:grid;place-items:center;flex:0 0 17px;width:17px;height:27px;padding:0;border:0;background:transparent;cursor:grab;touch-action:none}
.skull-move img{display:block;width:14px;height:20px;pointer-events:none}
.skull-move.dragging{cursor:grabbing;background:#D8E8E3;border-radius:5px}
.skull-grid thead th.drop-target{background:#D8E8E3;outline:2px solid #3B7061;outline-offset:-2px;border-radius:5px}

/* Maximalbreite pro Spieler, aber bei vielen Spielern alle nebeneinander */
.skull-grid{width:min(100%, calc(22px + var(--skull-players)*116px));max-width:100%;margin-left:0;margin-right:auto}
/* Namen einzeilig, Schrift wird per JS passend verkleinert */
.skull-player-head{width:100%;min-width:0;white-space:nowrap;overflow:hidden}
.skull-player-head .skull-name{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis;overflow-wrap:normal!important;word-break:normal!important;flex:0 1 auto;font-size:15px;line-height:1.25}
/* Geber und Anspieler pro Runde; unabhängig von der Eingabephase */
.skull-tile.skull-dealer{border:2px solid #1F2937!important}
.skull-tile.skull-starter{border:2px solid #9DCEBE!important}
.skull-turn-label{position:absolute;right:2px;top:1px;z-index:5;display:grid;place-items:center;min-width:13px;height:13px;padding:0 2px;font-size:9px;font-weight:800;line-height:1;border-radius:3px;background:#FFFFFF;color:#1F2937;pointer-events:none}
.skull-starter .skull-turn-label{color:#275246;background:#D8E8E3}
.edit-mode .skull-tile.skull-dealer{border-color:#1F2937!important}
.edit-mode .skull-tile.skull-starter{border-color:#9DCEBE!important}

/* Zentrierte, in der Breite begrenzte Skull-King-Tabelle */
.skull-grid{margin-left:auto!important;margin-right:auto!important}
/* Die Kopfzeile bleibt bei vertikalem Scrollen sichtbar. */
.guest-top{position:sticky;top:0;z-index:20}
.modalback{z-index:50}
/* Spieleinstellungen */
.game-settings-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}
.game-settings-title h2{font-size:21px;line-height:1.3;margin:0}
.game-settings-close{border:0;background:transparent;color:#6B7280;font-size:28px;line-height:1;padding:0 4px}
.game-setting-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 0;border-top:1px solid #E2E8F0}
.game-setting-row strong{font-size:15px}
.game-setting-row p{margin:3px 0 0;font-size:13px;color:#6B7280}
.game-switch{display:inline-block;position:relative;width:48px;height:28px;flex:none;cursor:pointer}
.game-switch input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}
.game-switch-track{display:block;width:48px;height:28px;border-radius:20px;background:#CBD5E1;transition:background .2s;pointer-events:none}
.game-switch-track:before{content:"";display:block;position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:white;box-shadow:0 1px 3px #0002;transition:transform .2s}
.game-switch input:checked+.game-switch-track{background:#3B7061}
.game-switch input:checked+.game-switch-track:before{transform:translateX(20px)}
.game-switch input:focus-visible+.game-switch-track{outline:3px solid #9DCEBE;outline-offset:3px}
.game-settings-done{margin-top:16px}

/* Spielbereich und Aktionsleiste wachsen nur mit der Spielerzahl.
   Die Kachelbreite selbst und der PNG-Export bleiben unverändert. */
#scores.skull-width-panel{
 width:min(100%, calc(22px + var(--skull-players)*116px + 52px));
 margin-left:auto;
 margin-right:auto;
}
.skull-bottom-actions.skull-width-actions{
 width:min(100%, calc(22px + var(--skull-players)*116px + 52px));
 margin-left:auto;
 margin-right:auto;
}
.skull-width-actions .btn{flex:1 1 auto;}

/* Breiterer, gemeinsamer zentrierter Bereich für Titel, Karte und Buttons.
   Die einzelnen Spielerkacheln behalten ihre bisherige Maximalbreite. */
#game-page-title.skull-width-title,
#scores.skull-width-panel,
.skull-bottom-actions.skull-width-actions{
 width:min(100%, calc(120px + var(--skull-players)*116px));
 margin-left:auto;
 margin-right:auto;
}
#game-page-title.skull-width-title{text-align:left;}
#scores.skull-width-panel .skull-grid{margin-left:auto;margin-right:auto;}

/* iPhone: gleichmäßiger Innenabstand der weißen Skull-King-Karte.
   Desktop-Abstände und die exportierte PNG-Grafik bleiben unverändert. */
@media (max-width:650px){
  #scores.skull-width-panel{padding:16px!important;}
  #scores.skull-width-panel .skull-round-heading{padding:0;margin-bottom:15px;}
  #scores.skull-width-panel .skull-controls{margin-top:16px;margin-bottom:0;}
  #scores.skull-width-panel .skull-controls .btn{display:block;width:100%;margin:0;}
}

/* iPhone: Überschrift und Rundenstatus exakt auf einer Grundlinie */
@media(max-width:650px){
 #scores.skull-width-panel .skull-round-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:8px;min-height:28px}
 #scores.skull-width-panel .skull-round-heading h2,
 #scores.skull-width-panel .skull-round-heading .status{margin:0!important;line-height:1.25!important;align-self:center;white-space:nowrap}
 #scores.skull-width-panel .skull-round-heading h2{font-size:clamp(14px,4vw,19px)}
 #scores.skull-width-panel .skull-round-heading .status{font-size:clamp(10px,3vw,13px)}
}
/* iOS Safari zoomt bei Schriftgrößen unter 16px in fokussierte Inputs. */
@media(max-width:650px){
 .skull-tile .skull-bid input,.skull-tile .skull-point input{font-size:16px!important}
}
/* Minus-Schaltfläche zusätzlich zum unveränderten iOS-Ziffernblock */
.skull-point{position:relative}
.skull-minus{position:absolute;left:2px;bottom:2px;z-index:4;width:18px;height:18px;display:grid;place-items:center;border:0;border-radius:4px;background:#ffffffcc;color:#275246;font-size:16px;font-weight:700;line-height:1;cursor:pointer;padding:0;touch-action:manipulation}
.skull-minus:focus-visible{outline:2px solid #3B7061}

/* Safari: 16px tatsächliche Schriftgröße gegen Fokus-Zoom; optisch kleiner. */
@media(max-width:650px){
 .skull-tile .skull-bid input{font-size:16px!important;transform:scale(.65);transform-origin:center center;width:150%!important;height:150%!important;flex-shrink:0;}
 .skull-tile .skull-bid{overflow:hidden;}
 .skull-tile .skull-point input{font-size:16px!important;transform:scale(.88);transform-origin:center center;width:113.6%!important;height:113.6%!important;flex-shrink:0;}
}

/* Nur iPhone/Touch: feststehender, kompakter Nummernblock am unteren Bildschirmrand. */
@media(max-width:650px) and (pointer:coarse){
 body.skull-keypad-open{padding-bottom:310px}
 .skull-mobile-keypad{position:fixed;left:0;right:0;bottom:0;z-index:100;background:#F5F6F8;border-top:1px solid #E2E8F0;box-shadow:0 -8px 25px #1F29371A;padding:8px max(12px,env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));box-sizing:border-box}
 .skull-keypad-head{max-width:420px;margin:0 auto 7px;display:flex;justify-content:space-between;align-items:center;color:#6B7280;font-size:13px;font-weight:600}
 .skull-keypad-done{border:0;border-radius:8px;background:#3B7061;color:white;font-weight:700;padding:7px 16px;font-size:14px}
 .skull-keypad-grid{max-width:420px;margin:auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .skull-keypad-key{min-height:43px;border:1px solid #E2E8F0;border-radius:9px;background:#FFFFFF;color:#1F2937;font-size:23px;font-weight:550;touch-action:manipulation;box-shadow:0 1px 1px #0000000D}
 .skull-keypad-key:active{background:#D8E8E3}
 .skull-tile input[readonly]{cursor:pointer}
}
@media(min-width:651px), (pointer:fine){.skull-mobile-keypad{display:none!important}}

/* Canasta: gleiche Kacheln wie Skull King, ohne Ansage-Ecke */
.canasta-tile .skull-point{inset:0!important;width:100%!important;height:100%!important}
.canasta-panel .skull-tile{cursor:pointer}
.canasta-panel .skull-tile.canasta-edit{border-color:#E7A0A0!important}
.canasta-panel .skull-tile.canasta-edit .skull-point{background:#FDE8E8!important}

.canasta-panel .skull-round-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
.canasta-panel .skull-round-heading h2,.canasta-panel .skull-round-heading .status{margin:0;line-height:1.3}
#game-content-layout{display:flex;align-items:flex-start;justify-content:center;gap:18px;max-width:100%;margin:0 auto}
#game-content-layout #scores{flex:0 1 auto;min-width:0}
#canasta-aside{display:flex;flex-direction:column;gap:14px;flex:0 0 270px}
#canasta-aside:empty{display:none}
.canasta-info-card{padding:18px!important;width:100%}
.canasta-info-card h2{font-size:17px;margin:0 0 12px}
.canasta-info-line{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:9px 0;border-bottom:1px solid #E2E8F0;font-size:13px}
.canasta-info-line:last-child{border-bottom:0}
.canasta-info-line strong{white-space:nowrap;color:#275246}
.canasta-entry-teams{margin-top:18px;padding-top:15px;border-top:1px solid #E2E8F0}
.canasta-team-toggle{display:flex;gap:10px;align-items:center;font-weight:650}
.canasta-team-toggle input{accent-color:#3B7061;width:19px;height:19px}
.canasta-team-preview{font-size:13px;color:#6B7280;margin-top:10px;display:grid;gap:6px}
.canasta-tile{position:relative}
.canasta-tile.dealer{border:2px solid #1F2937!important}
.canasta-tile.starter{border:2px solid #9DCEBE!important}
.canasta-role-badge{position:absolute;right:2px;top:1px;z-index:4;font-size:9px;line-height:1;font-weight:800;pointer-events:none;color:#1F2937}
.canasta-tile.starter .canasta-role-badge{color:#275246}
@media(max-width:850px){#game-content-layout{flex-direction:column;align-items:center;gap:14px}#game-content-layout #scores{width:100%;max-width:100%}#canasta-aside{flex:initial;width:100%;max-width:560px}}

/* Canasta player selection: clear active Solo/Teams choice */
.canasta-mode-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}
.canasta-mode-option{min-height:42px;border:1px solid #E2E8F0;border-radius:10px;background:#FFFFFF;color:#1F2937;font-weight:700;cursor:pointer}
.canasta-mode-option.selected{background:#D8E8E3;border:2px solid #3B7061;color:#275246}
.canasta-mode-option:disabled{background:#F5F6F8;color:#9CA3AF;cursor:not-allowed}
.canasta-team-hint{font-size:12px;color:#6B7280;margin:8px 0 0}
.canasta-team-preview{margin-top:12px;padding:12px;background:#F5F6F8;border-radius:9px}
.guest-add-form[hidden]{display:none!important}
/* Selected score tile: visible on touch keypad and hardware keyboard */
@keyframes scoreInputPulse{0%,100%{box-shadow:0 0 0 2px #275246,0 0 0 4px rgba(39,82,70,.10)}50%{box-shadow:0 0 0 3px #275246,0 0 0 7px rgba(59,112,97,.27)}}
.skull-tile.score-input-active{position:relative;z-index:8;outline:2px solid #275246!important;outline-offset:0;animation:scoreInputPulse 1.25s ease-in-out infinite;border-color:#275246!important}
@media(prefers-reduced-motion:reduce){.skull-tile.score-input-active{animation:none;box-shadow:0 0 0 3px rgba(39,82,70,.25)}}

/* Active entry changes the fill, not the tile border. All game score tiles. */
.skull-tile.score-input-active{outline:none!important;box-shadow:none!important;animation:none!important;border-color:#E2E8F0!important;z-index:8}
.skull-tile.score-input-active .skull-bid,.skull-tile.score-input-active .skull-point{transition:background-color .16s ease}
.skull-tile.score-input-active:has(.skull-bid input:focus) .skull-bid,.skull-tile.score-input-active:has(.skull-bid input:not(:disabled):read-only) .skull-bid:has(input:focus){background:#3B7061!important}
.skull-tile.score-input-active:has(.skull-point input:focus) .skull-point{background:#3B7061!important}
.skull-tile.score-input-active .skull-bid input:focus,.skull-tile.score-input-active .skull-point input:focus{outline:none!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
/* Touch keypad may open without DOM focus: mark the active half explicitly. */
.skull-tile.score-input-active.score-bid-active .skull-bid,.skull-tile.score-input-active.score-point-active .skull-point{background:#3B7061!important}
.skull-tile.score-input-active.score-bid-active .skull-bid input,.skull-tile.score-input-active.score-point-active .skull-point input{color:#fff!important;-webkit-text-fill-color:#fff!important}

/* Equal spacing between Canasta table and information cards */
#game-content-layout{gap:14px}
#canasta-aside{gap:14px}

/* Canasta: The score card must not retain its standalone auto margins
   inside the two-column flex layout. Those margins looked like extra gap. */
@media (min-width:851px){
  #game-content-layout{display:flex;justify-content:center;align-items:flex-start;column-gap:14px;}
  #game-content-layout > #scores.skull-width-panel{margin-left:0!important;margin-right:0!important;flex:0 1 auto;}
  #game-content-layout > #canasta-aside{margin:0;flex:0 0 270px;row-gap:14px;}
}

/* 7 Wonders: dedicated score sheet, scoped to this module */
.wonders-panel{width:100%;max-width:100%;box-sizing:border-box}
.wonders-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}
.wonders-heading h2{margin:0}
.wonders-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.wonders-table{width:100%;min-width:calc(120px + 80px * 3);table-layout:fixed}
.wonders-table thead th:first-child,.wonders-table tbody th{width:120px}
.wonders-table th,.wonders-table td{padding:8px 4px;text-align:center}
.wonders-table tbody th{text-align:left}
.wonders-table thead th strong{display:block;overflow-wrap:anywhere}
.wonders-table thead th small{display:block;color:#3B7061}
.wonders-category{display:block;border-left:7px solid var(--wonders-color);padding:9px 4px 9px 8px;font-size:13px;font-weight:650;overflow-wrap:anywhere}
.wonders-table input{width:100%;min-width:0;box-sizing:border-box;text-align:center;padding:10px 2px;font-size:15px}
.wonders-table .wonders-total{background:#D8E8E3;color:#275246;font-weight:750}
@media(max-width:650px){.wonders-table{min-width:calc(96px + 72px * var(--wonders-players, 3))}.wonders-table thead th:first-child,.wonders-table tbody th{width:96px}.wonders-table th,.wonders-table td{padding:5px 2px}.wonders-category{font-size:11px;border-left-width:5px;padding:8px 3px}.wonders-table input{font-size:14px}}

/* 7 Wonders: full-row category backgrounds and Canasta-style scoring tiles. */
.wonders-table tbody tr.wonders-colored-row,
.wonders-table tbody tr.wonders-colored-row > th,
.wonders-table tbody tr.wonders-colored-row > td{
 background:color-mix(in srgb,var(--wonders-color) 38%,white)!important;
}
.wonders-table .wonders-category{border-left:0!important;padding:9px 4px 9px 8px}
.wonders-table .wonders-tile{position:relative;display:block;width:100%;aspect-ratio:1/1;min-height:42px;max-height:80px;margin:auto;overflow:hidden;border-radius:10px;border:1px solid color-mix(in srgb,var(--wonders-color) 40%,white);background:color-mix(in srgb,var(--wonders-color) 17%,white)!important;box-sizing:border-box;cursor:text}
.wonders-table .wonders-tile .skull-point{position:absolute;inset:0!important;width:100%!important;height:100%!important;background:transparent!important;display:flex;align-items:center;justify-content:center}
.wonders-table .wonders-tile input{width:100%!important;height:100%!important;min-width:0;box-sizing:border-box;border:0!important;border-radius:9px!important;background:transparent!important;box-shadow:none!important;outline:none;text-align:center;font-size:16px!important;transform:none!important;padding:2px!important;color:#1F2937}
.wonders-table .wonders-tile:focus-within{background:color-mix(in srgb,var(--wonders-color) 48%,white)!important;border-color:color-mix(in srgb,var(--wonders-color) 75%,#275246)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--wonders-color) 40%,transparent)}
.wonders-table .wonders-tile input:disabled{opacity:.75;cursor:default}
@media(max-width:650px){.wonders-table .wonders-tile{min-height:39px;border-radius:8px}.wonders-table .wonders-category{padding:7px 3px}}

/* Prevent iOS Safari automatic zoom on score entry, all games. */
@media (max-width: 767px){
  #scores input[type="number"],#scores input[type="text"],
  .skull-point input,.skull-bid input,.canasta-tile input,
  .wonders-table .wonders-tile input{
    font-size:16px!important;
  }
  #scores table thead th{overflow:hidden}
  #scores table thead th strong{white-space:nowrap!important;overflow:hidden;display:block}
}
/* 7 Wonders remains horizontally scrollable when seven players cannot fit. */
.wonders-table{min-width:max(360px,calc(120px + 78px * var(--wonders-players, 3)))}

/* 7 Wonders: category-colored active fields, never the global green focus. */
.wonders-table .wonders-tile:focus-within,
.wonders-table .wonders-tile:focus-within .skull-point,
.wonders-table .wonders-tile:focus-within input {
  background:color-mix(in srgb,var(--wonders-color) 65%,white)!important;
  border-color:var(--wonders-color)!important;
  outline-color:var(--wonders-color)!important;
}
.wonders-table .wonders-tile:focus-within {
  box-shadow:0 0 0 2px color-mix(in srgb,var(--wonders-color) 70%,transparent)!important;
}
/* All 3–7 players fit within the phone viewport. */
@media(max-width:767px){
  #scores.wonders-panel{width:100%!important;max-width:100%!important;min-width:0!important;padding-left:0!important;padding-right:0!important}
  .wonders-panel .wonders-wrap{width:100%;max-width:100%;overflow-x:hidden!important}
  .wonders-panel .wonders-table{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important;border-spacing:0!important}
  .wonders-panel .wonders-table thead th:first-child,
  .wonders-panel .wonders-table tbody th{width:clamp(68px,23%,95px)!important;max-width:95px!important}
  .wonders-panel .wonders-table thead th:not(:first-child),
  .wonders-panel .wonders-table td{width:auto!important;min-width:0!important;max-width:none!important}
  .wonders-panel .wonders-table th,.wonders-panel .wonders-table td{padding:3px 1px!important;min-width:0!important;overflow:hidden}
  .wonders-panel .wonders-table .wonders-category{font-size:clamp(9px,2.4vw,12px)!important;padding:6px 1px!important;overflow-wrap:anywhere}
  .wonders-panel .wonders-table .wonders-tile{width:100%!important;min-width:0!important;max-width:100%!important;min-height:32px!important;aspect-ratio:auto!important;height:38px!important;border-radius:6px!important}
  .wonders-panel .wonders-table .wonders-tile input{font-size:16px!important;padding:0!important;border-radius:6px!important}
  .wonders-panel .wonders-table thead th strong{font-size:inherit;white-space:nowrap!important;overflow:hidden!important}
  .wonders-panel .wonders-table thead th small{font-size:10px!important;white-space:nowrap}
}

.wonders-panel .wonders-tile .skull-point,
.wonders-panel .wonders-tile input,
.wonders-panel .wonders-tile:focus-within .skull-point,
.wonders-panel .wonders-tile:focus-within input{background:transparent!important;box-shadow:none!important}
.wonders-panel .wonders-tile{background:color-mix(in srgb,var(--wonders-color) 17%,white)!important}
.wonders-panel .wonders-tile:focus-within{background:color-mix(in srgb,var(--wonders-color) 65%,white)!important}
.wonders-panel .wonders-table .wonders-category{white-space:nowrap!important;overflow:visible!important;overflow-wrap:normal!important}

/* 7 Wonders: single, uniform color on the complete active tile.
   Override inherited Canasta/Skull King focus and input backgrounds. */
#scores.wonders-panel .wonders-table .wonders-tile,
#scores.wonders-panel .wonders-table .wonders-tile .skull-point,
#scores.wonders-panel .wonders-table .wonders-tile input{
  background:color-mix(in srgb,var(--wonders-color) 17%,white)!important;
  border-color:transparent!important;
  outline:0!important;
  box-shadow:none!important;
}
#scores.wonders-panel .wonders-table .wonders-tile{
  border:0!important;
  border-radius:9px!important;
  overflow:hidden!important;
}
#scores.wonders-panel .wonders-table .wonders-tile .skull-point,
#scores.wonders-panel .wonders-table .wonders-tile input{
  border-radius:inherit!important;
}
#scores.wonders-panel .wonders-table .wonders-tile:focus-within,
#scores.wonders-panel .wonders-table .wonders-tile:focus-within .skull-point,
#scores.wonders-panel .wonders-table .wonders-tile:focus-within input{
  background:color-mix(in srgb,var(--wonders-color) 64%,white)!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
}

/* Freies Spiel */
.free-config{display:flex;flex-direction:column;gap:12px}
.free-config h2{margin:12px 0 2px}
.free-choice{display:flex;align-items:flex-start;gap:12px;padding:13px;border:1px solid #E2E8F0;border-radius:11px;background:#fff;cursor:pointer}
.free-choice input{flex:0 0 auto;width:19px;height:19px;accent-color:#3B7061;margin:3px 0 0}
.free-choice span{display:flex;flex-direction:column;gap:3px}
.free-choice small{font-size:13px;color:#6B7280}
.free-config textarea,.free-config #free-limit{width:100%;box-sizing:border-box;border:1px solid #E2E8F0;border-radius:9px;padding:12px;font:inherit;background:#fff;color:#1F2937}
.free-config [hidden]{display:none!important}
.free-panel{width:100%;max-width:100%;box-sizing:border-box}
.free-scroll{width:100%;overflow-x:auto}
.free-table{width:100%;table-layout:fixed}
.free-table thead th:first-child,.free-table tbody th{width:105px}
.free-table th,.free-table td{padding:6px 3px;text-align:center}
.free-table tbody th{text-align:left;font-size:12px;overflow-wrap:anywhere}
.free-table thead strong{display:block;white-space:nowrap;overflow:hidden;font-size:clamp(9px,2vw,16px)}
.free-table thead small{display:block;color:#3B7061}
.free-tile{position:relative;width:100%;height:68px;box-sizing:border-box;background:#D8E8E3;border-radius:9px;overflow:hidden;border:1px solid #C6D9D2}
.free-tile:focus-within{background:#B7D5CA;border-color:#3B7061}
.free-tile .skull-point{position:static!important;inset:auto!important;width:100%!important;height:100%!important;background:transparent!important}
.free-tile .skull-point input{width:100%!important;height:100%!important;background:transparent!important;border:0!important;box-shadow:none!important;outline:0!important;text-align:center;font-size:16px!important;color:#1F2937!important}
.free-tile:has(.free-bid) .skull-point{height:100%!important}
.free-tile .free-bid{position:absolute;z-index:2;top:0;left:0;width:34%;height:32%;background:#FFFFFF;border-radius:0 0 7px 0;border-right:1px solid #C6D9D2;border-bottom:1px solid #C6D9D2}
.free-tile .free-bid input{width:100%;height:100%;box-sizing:border-box;background:transparent;border:0;outline:0;text-align:center;font-size:16px;color:#1F2937}
.free-controls{margin-top:16px;flex-wrap:wrap}
@media(max-width:650px){
.free-table{min-width:0!important}
.free-table thead th:first-child,.free-table tbody th{width:66px}
.free-table th,.free-table td{padding:4px 1px}
.free-table tbody th{font-size:10px}
.free-tile{height:60px}
}

/* Free game configuration: comfortable inset spacing and grouped mode controls */
.free-options{max-width:720px;margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px;box-sizing:border-box}
.free-options .free-config{padding:24px!important;gap:0!important;overflow:hidden}
.free-config-section{padding:18px 0 22px;display:flex;flex-direction:column;gap:12px}
.free-config-section:first-child{padding-top:0}
.free-config-section:last-child{padding-bottom:0}
.free-config-section+.free-config-section{border-top:1px solid #E2E8F0}
.free-config-section h2,.free-section-title{font-size:17px;font-weight:700;color:#1F2937;margin:0}
.free-options .free-text-input{width:100%;box-sizing:border-box;padding:13px 14px;font-size:16px;border:1px solid #E2E8F0;border-radius:10px;background:#fff;color:#1F2937}
.free-mode-options{margin-top:2px!important}
.free-mode-options .canasta-mode-option{min-height:55px;padding:12px 9px;line-height:1.3}
.free-conditional[hidden]{display:none!important}
.free-description{font-size:13px;color:#6B7280;margin:0;line-height:1.5}
.free-category-list{display:flex;flex-direction:column;gap:8px}
.free-category-item{margin:0!important;padding:10px 12px;border:1px solid #E2E8F0;border-radius:10px;min-height:42px;box-sizing:border-box}
.free-category-item strong{overflow-wrap:anywhere}
.free-options .guest-add-form{padding:14px 0 0;margin:0;border:0}
.free-options .guest-add-form input{font-size:16px}
.free-end-heading{margin-top:16px!important}
.free-end-list{display:flex;flex-direction:column;gap:9px}
.free-end-option{display:flex;align-items:center;gap:10px;padding:13px 14px;background:#fff;border:1px solid #E2E8F0;border-radius:11px;cursor:pointer;min-height:58px;box-sizing:border-box}
.free-end-option.selected{background:#D8E8E3;border-color:#3B7061}
.free-end-option>input[type=radio]{accent-color:#3B7061;width:18px;height:18px;flex-shrink:0}
.free-end-option span{flex:1;font-size:14px;font-weight:600}
.free-end-option>input[type=number]{width:95px;max-width:30%;padding:9px;border:1px solid #CBD5E1;border-radius:8px;text-align:center;font-size:16px;box-sizing:border-box}
.free-end-option>input[type=number]:disabled{opacity:.4;background:#F5F6F8}
.free-dialog-options{display:flex;flex-direction:column;gap:10px;margin-top:16px}
.free-dialog-options button{width:100%}
@media(max-width:650px){.free-options .free-config{padding:17px!important}.free-config-section{padding:17px 0 19px}.free-end-option{padding:11px 9px}.free-end-option span{font-size:13px}.free-end-option>input[type=number]{width:76px}}

/* Freies Spiel V3: use the same score tile geometry as the source games. */
.free-config-actions{display:flex;align-items:stretch;gap:12px;margin-top:20px;flex-wrap:wrap}
.free-config-actions .btn{flex:1 1 210px;min-height:46px}
.free-panel .free-grid tbody th{overflow-wrap:anywhere;font-size:clamp(10px,1.7vw,14px)}
.free-panel .skull-tile.canasta-tile .skull-point{inset:0!important;width:100%!important;height:100%!important}
.free-panel .skull-tile .skull-point input,.free-panel .skull-tile .skull-bid input{font-size:16px!important}
.free-panel .skull-tile .skull-point input:focus,.free-panel .skull-tile .skull-bid input:focus{outline:none!important}
@media(max-width:650px){.free-config-actions{flex-direction:column}.free-config-actions .btn{flex:auto}}

/* Free-game V4: equal-height action buttons and sage category score tiles. */
.free-config-actions{align-items:stretch}
.free-config-actions .btn,
.free-config-actions .guest-start{height:52px!important;min-height:52px!important;max-height:52px!important;box-sizing:border-box!important;margin:0!important;padding:0 18px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;line-height:1.2!important}
.free-panel .free-category-tile,
.free-panel .free-category-tile .skull-point,
.free-panel .free-category-tile .skull-point input{background:#D8E8E3!important}
.free-panel .free-category-tile:focus-within,
.free-panel .free-category-tile:focus-within .skull-point,
.free-panel .free-category-tile:focus-within .skull-point input{background:#B7D5CA!important}
.free-panel .free-category-tile{overflow:hidden;border-radius:9px}
.auth-template-notice{padding:12px 14px;border-radius:9px;background:#F5F6F8;color:#1F2937;font-size:14px;line-height:1.45;margin:10px 0}

/* Schweinerei: desktop-only reset control within score tiles */
.schwein-zero{position:absolute;right:3px;bottom:3px;border:1px solid #3B7061;border-radius:6px;background:#fff;color:#275246;font-weight:700;font-size:11px;padding:3px 5px;cursor:pointer;z-index:3;line-height:1.2}
.schwein-zero:hover{background:#D8E8E3}
.skull-point:has(.schwein-zero){position:relative}
@media (pointer:coarse){.schwein-zero{display:none!important}}

/* Startseite: dezente Profilkachel oben rechts */
.home{position:relative}
.home-account-card{position:absolute;top:20px;right:20px;display:flex;align-items:center;gap:11px;text-align:left;max-width:min(270px,calc(100% - 32px));padding:10px 14px;border:1px solid #C6DBD4;border-radius:14px;background:#FFFFFF;box-shadow:0 4px 16px rgba(39,82,70,.09);color:#1F2937;transition:background .15s,border-color .15s,box-shadow .15s;z-index:2}
.home-account-card:hover{background:#F0F7F4;border-color:#3B7061;box-shadow:0 5px 20px rgba(39,82,70,.14)}
.home-account-avatar{width:39px;height:39px;flex:none;display:grid;place-items:center;border-radius:11px;background:#D8E8E3;color:#275246}
.home-account-avatar svg{width:24px;height:24px}
.home-account-copy{min-width:0;display:flex;flex-direction:column;gap:1px}
.home-account-copy strong{font-size:15px;line-height:1.25;font-weight:750;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.home-account-copy>span{font-size:12px;line-height:1.35;color:#3B7061;font-weight:650;white-space:nowrap}
@media(max-width:650px){
 .home{padding-top:100px}
 .home-account-card{top:14px;right:16px;padding:8px 11px;gap:9px}
 .home-account-avatar{width:34px;height:34px}
 .home-account-avatar svg{width:21px;height:21px}
}
/* Kontoverwaltung: ausschließlich ergänzende Darstellung */
.account-modal{max-width:520px;max-height:90vh;overflow-y:auto;text-align:left}
.account-modal form{display:grid;gap:12px;margin:14px 0}
.account-modal form label{display:grid;gap:5px;color:#1F2937;font-size:14px;font-weight:600}
.account-modal input:not([type=checkbox]){width:100%;box-sizing:border-box;padding:11px 12px;border:1px solid #E2E8F0;border-radius:9px;background:#fff;color:#1F2937;font:inherit}
.account-modal hr{border:0;border-top:1px solid #E2E8F0;margin:20px 0}
.account-modal h3{margin:0;font-size:17px}
.account-modal .auth-feedback{min-height:18px;color:#8b2d2d;font-size:13px}
.account-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:12px;flex-wrap:wrap}
.danger-text{background:transparent;border:0;color:#a33232;cursor:pointer;font-size:13px;text-decoration:underline}
.admin-modal{max-width:840px;width:95vw}.admin-user{display:grid;grid-template-columns:minmax(120px,1fr) 100px 75px auto;gap:9px;align-items:center;border-bottom:1px solid #E2E8F0;padding:10px 0}.admin-user small{display:block;overflow-wrap:anywhere;color:#6B7280}.admin-user select{padding:8px;border:1px solid #E2E8F0;border-radius:8px}.admin-user .btn{font-size:12px;padding:8px}.admin-active{font-size:12px}
@media(max-width:530px){.admin-user{grid-template-columns:1fr 1fr}.admin-user>div{grid-column:1/-1}}

/* Non-intrusive offline/sync indicator; no changes to existing game layout. */
#spielstand-sync-status{position:fixed;bottom:calc(10px + env(safe-area-inset-bottom));right:12px;z-index:4;border:1px solid #B8D3C9;border-radius:999px;background:#FFFFFF;color:#275246;box-shadow:0 2px 10px #1F29371b;font-size:11px;font-weight:600;line-height:1.3;padding:7px 11px;max-width:75vw;white-space:normal}
#spielstand-sync-status[data-kind="warning"]{color:#92400e;border-color:#f59e0b}
#spielstand-sync-status[data-kind="pending"],#spielstand-sync-status[data-kind="busy"]{color:#6B7280;border-color:#E2E8F0}
@media(max-width:650px){#spielstand-sync-status{bottom:calc(7px + env(safe-area-inset-bottom));right:8px;font-size:10px;padding:6px 9px}}
