.tally-app{--tally-bg:#f6f7f9;--tally-card:#fff;--tally-text:#15171a;--tally-muted:#6c727f;--tally-line:#e5e7eb;--tally-accent:#111827;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--tally-text);max-width:980px;margin:24px auto;background:var(--tally-bg);border-radius:24px;padding:18px;box-sizing:border-box}.tally-app *{box-sizing:border-box}.tally-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:8px}.tally-header h2{margin:0;font-size:30px}.tally-kicker{font-size:12px;text-transform:uppercase;letter-spacing:.12em;color:var(--tally-muted);font-weight:700}.tally-tabs{display:flex;gap:6px;overflow:auto;padding:10px 4px 16px}.tally-tabs button{border:0;background:transparent;padding:10px 13px;border-radius:12px;white-space:nowrap;font-weight:700;color:var(--tally-muted);cursor:pointer}.tally-tabs button.is-active{background:var(--tally-card);color:var(--tally-text);box-shadow:0 1px 3px rgba(0,0,0,.08)}.tally-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--tally-line);background:#fff;padding:10px 14px;border-radius:12px;font-weight:700;font:inherit;line-height:1.2;text-decoration:none;white-space:normal;cursor:pointer;appearance:none;-webkit-appearance:none;box-shadow:none;min-height:44px;text-align:center}.tally-btn-primary{background:var(--tally-accent);color:#fff;border-color:var(--tally-accent)}.tally-btn-danger{background:#fff;color:#b42318}.tally-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.tally-card{background:var(--tally-card);border:1px solid var(--tally-line);border-radius:18px;padding:16px}.tally-card h3{margin:0 0 12px}.tally-list{display:grid;gap:10px}.tally-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--tally-line)}.tally-row:last-child{border-bottom:0}.tally-muted{color:var(--tally-muted);font-size:14px}.tally-money-pos{font-weight:800}.tally-money-neg{font-weight:800}.tally-empty{text-align:center;color:var(--tally-muted);padding:28px}.tally-loading{text-align:center;padding:40px;color:var(--tally-muted)}.tally-modal{position:fixed;inset:0;background:rgba(17,24,39,.55);z-index:99999;display:grid;place-items:center;padding:18px}.tally-modal[hidden]{display:none}.tally-modal-card{position:relative;background:#fff;border-radius:22px;width:min(680px,100%);max-height:90vh;overflow:auto;padding:22px}.tally-close{position:absolute;right:14px;top:10px;border:0;background:transparent;font-size:28px;cursor:pointer}.tally-form{display:grid;gap:13px}.tally-form label{display:grid;gap:6px;font-weight:700}.tally-form input,.tally-form select,.tally-form textarea{width:100%;border:1px solid #d0d5dd;border-radius:10px;padding:11px;font:inherit}.tally-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.tally-check{display:flex!important;grid-template-columns:none!important;align-items:center;gap:8px!important;background:#f8fafc;border:1px solid var(--tally-line);border-radius:12px;padding:10px}.tally-check input{width:auto}.tally-score-list{display:grid;gap:10px;margin:16px 0}.tally-score{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;background:#f8fafc;border:1px solid var(--tally-line);border-radius:14px;padding:12px}.tally-score-name{font-weight:800}.tally-score-controls{display:flex;align-items:center;gap:6px}.tally-score-controls button{width:38px;height:38px;border-radius:10px;border:1px solid var(--tally-line);background:white;font-weight:800;cursor:pointer}.tally-score-value{width:68px!important;text-align:center;font-weight:800;padding:8px!important}.tally-badge{display:inline-flex;border-radius:999px;padding:4px 8px;background:#eef2f7;font-size:12px;font-weight:800}.tally-table{width:100%;border-collapse:collapse}.tally-table th,.tally-table td{text-align:left;padding:10px 8px;border-bottom:1px solid var(--tally-line);font-size:14px}.tally-table th{color:var(--tally-muted)}.tally-table td:last-child,.tally-table th:last-child{text-align:right}.tally-actions{display:flex;gap:8px;flex-wrap:wrap}.tally-section-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.tally-section-title h3{margin:0}@media(max-width:700px){.tally-app{margin:0;border-radius:0;padding:12px;min-height:100vh}.tally-grid{grid-template-columns:1fr}.tally-header{align-items:flex-start}.tally-header h2{font-size:26px}.tally-btn{padding:10px 12px}.tally-checks{grid-template-columns:1fr}.tally-table{display:block;overflow:auto}.tally-score{grid-template-columns:1fr}.tally-score-controls{justify-content:space-between}}
.tally-team-config[hidden]{display:none!important}.tally-team-card{padding:12px;border:1px solid var(--tally-border,#ddd);border-radius:12px}.tally-team-preview{margin-top:6px}.tally-team-score{align-items:center}.tally-team-score>div:first-child{min-width:150px}
.tally-form-error{padding:10px 12px;border:1px solid currentColor;border-radius:8px;font-size:14px;margin-top:4px}
.tally-btn[disabled]{opacity:.65;cursor:wait}
.tally-match-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.tally-match-actions .tally-btn-primary{flex:1 1 220px}.tally-btn-danger{border-color:#f0b4ae;background:#fff7f6;color:#b42318}.tally-btn-danger:hover{background:#fee4e2}@media(max-width:700px){.tally-match-actions{display:grid;grid-template-columns:1fr 1fr}.tally-match-actions .tally-btn-primary{grid-column:1/-1;width:100%}.tally-actions{justify-content:flex-end}}
.tally-round-box{background:#f8fafc;border:1px solid var(--tally-line);border-radius:16px;padding:14px;margin-top:12px}.tally-round-inputs{display:grid;gap:10px;margin:10px 0 12px}.tally-round-entry{display:grid;grid-template-columns:minmax(120px,1fr) auto;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid var(--tally-line)}.tally-round-entry:last-child{border-bottom:0}.tally-current-score{margin-top:3px;font-size:14px}.tally-delta-controls{display:flex;align-items:center;gap:6px}.tally-delta-controls button{width:38px;height:38px;border:1px solid var(--tally-line);background:#fff;border-radius:10px;font-weight:800;cursor:pointer}.tally-delta-controls input{width:74px!important;text-align:center;font-weight:800;padding:8px!important}.tally-round-history{margin:8px 0}.tally-round-history h4,.tally-round-box h4{margin:0}.tally-round-table-wrap{overflow:auto;max-height:280px;border:1px solid var(--tally-line);border-radius:12px}.tally-round-table-wrap .tally-table{min-width:520px}.tally-round-table-wrap .tally-table td:last-child,.tally-round-table-wrap .tally-table th:last-child{text-align:left}@media(max-width:700px){.tally-round-entry{grid-template-columns:1fr}.tally-delta-controls{justify-content:space-between}.tally-delta-controls button{flex:0 0 38px}.tally-delta-controls input{flex:1;min-width:60px}.tally-row>.tally-actions{max-width:55%}}

/* v0.5 loading feedback */
.tally-busy{position:fixed;inset:0;z-index:99999;background:rgba(15,23,42,.28);display:flex;align-items:center;justify-content:center;backdrop-filter:blur(1px)}
.tally-busy[hidden]{display:none!important}.tally-busy-box{display:flex;align-items:center;gap:10px;background:#fff;padding:12px 16px;border-radius:12px;box-shadow:0 10px 35px rgba(0,0,0,.18);font-weight:700}
.tally-spinner{width:20px;height:20px;border:3px solid rgba(0,0,0,.14);border-top-color:currentColor;border-radius:50%;display:inline-block;animation:tally-spin .75s linear infinite}
@keyframes tally-spin{to{transform:rotate(360deg)}}
.tally-app.is-busy button,.tally-app.is-busy input,.tally-app.is-busy select{pointer-events:none}
.tally-group-members{max-height:52vh;overflow:auto;padding-right:4px}

/* v0.6.1 mobile round layout fix
 * Keep the resumed/re-rendered score dialog inside the viewport once the
 * round-history table becomes visible. Horizontal scrolling belongs only
 * to the history wrapper, never to the page/modal itself.
 */
.tally-modal-card,
.tally-form,
.tally-round-box,
.tally-round-inputs,
.tally-round-entry,
.tally-round-history{min-width:0;max-width:100%}
.tally-modal-card{overflow-x:hidden}
.tally-round-table-wrap{width:100%;max-width:100%;min-width:0;overflow-x:auto;overflow-y:auto;-webkit-overflow-scrolling:touch}
.tally-round-table-wrap .tally-table{width:max-content;min-width:520px;max-width:none}
.tally-delta-controls{width:100%;min-width:0;max-width:100%}
@media(max-width:700px){
  .tally-modal{padding:8px}
  .tally-modal-card{width:100%;max-width:100%;padding:18px 14px}
  .tally-round-box{padding:12px;overflow:hidden}
  .tally-round-entry{width:100%;min-width:0}
  .tally-delta-controls{display:grid;grid-template-columns:44px 44px minmax(56px,1fr) 44px 44px;gap:6px;justify-content:initial}
  .tally-delta-controls button{width:44px;max-width:44px;min-width:0;flex:none}
  .tally-delta-controls input{width:100%!important;min-width:0!important;max-width:100%;flex:none}
  .tally-round-table-wrap .tally-table{display:table;min-width:520px;overflow:visible}
}
@media(max-width:380px){
  .tally-delta-controls{grid-template-columns:40px 40px minmax(48px,1fr) 40px 40px;gap:4px}
  .tally-delta-controls button{width:40px;max-width:40px;height:40px}
}

/* v0.6.3: Entscheidung beim Schließen einer laufenden Partie */
.tally-close-choice{position:absolute;inset:0;z-index:20;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(15,23,42,.55);border-radius:inherit}
.tally-close-choice-card{width:min(440px,100%);background:#fff;border-radius:16px;padding:20px;box-shadow:0 18px 50px rgba(0,0,0,.22)}
.tally-close-choice-card h3{margin:0 0 8px}.tally-close-choice-card p{margin:0 0 16px}
.tally-close-choice-actions{display:grid;gap:10px;margin-bottom:12px}.tally-close-choice-actions .tally-btn{width:100%;justify-content:center}
@media (prefers-color-scheme:dark){.tally-close-choice-card{background:#111827}}

/* v0.6.6: Admin game-delete action must stay visible, especially on mobile. */
.tally-game-info{min-width:0;flex:1 1 260px}.tally-game-actions{flex:0 0 auto;max-width:none!important}.tally-delete-game{display:inline-flex!important;align-items:center;justify-content:center;white-space:nowrap}
@media(max-width:700px){.tally-game-row{align-items:stretch;flex-direction:column}.tally-game-row>.tally-game-actions{max-width:none!important;width:100%;justify-content:flex-start}.tally-game-actions .tally-btn{flex:1 1 auto}.tally-game-actions .tally-badge{align-self:center}}


/* Match detail view */
.tally-match-details{max-width:100%;min-width:0}
.tally-detail-winner{
  margin:16px 0;
  padding:14px 16px;
  border:1px solid rgba(15,23,42,.12);
  border-radius:14px;
  font-size:1.05rem;
}
.tally-detail-section{margin-top:22px;min-width:0}
.tally-detail-section h4{margin:0 0 10px;font-size:1.05rem}
.tally-detail-meta{
  display:flex;
  justify-content:space-between;
  gap:16px;
  margin-top:14px;
  padding:12px 0;
  border-top:1px solid rgba(15,23,42,.10);
  border-bottom:1px solid rgba(15,23,42,.10);
}
.tally-detail-note{
  padding:12px 14px;
  border:1px solid rgba(15,23,42,.10);
  border-radius:12px;
  white-space:pre-wrap;
}
.tally-detail-actions{margin-top:24px;justify-content:flex-end}
.tally-round-detail-table th,
.tally-round-detail-table td{white-space:nowrap}
@media (max-width:640px){
  .tally-match-details .tally-section-title{align-items:flex-start;gap:10px;flex-wrap:wrap}
  .tally-detail-meta{font-size:.95rem}
}


/* Games and variants */
.tally-game-group{
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid rgba(15,23,42,.10);
}
.tally-game-group:first-of-type{margin-top:10px}
.tally-game-group h4{margin:0;font-size:1.15rem}
.tally-game-description{
  margin-top:5px;
  max-width:720px;
  line-height:1.45;
  color:rgba(15,23,42,.78);
}
.tally-game-description-live{
  margin:0 0 10px;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(15,23,42,.04);
}
[data-game-start-meta]{
  padding:10px 12px;
  border-radius:12px;
  background:rgba(15,23,42,.04);
}
@media (max-width:640px){
  .tally-game-group>.tally-section-title{align-items:flex-start;flex-wrap:wrap}
}


/* Rights management */
.tally-group-members{display:grid;gap:10px}
.tally-group-member-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(130px,180px);
  align-items:center;
  gap:12px;
  padding:10px 0;
  border-bottom:1px solid rgba(15,23,42,.08);
}
.tally-group-member-row:last-child{border-bottom:0}
.tally-group-member-row select{width:100%;min-width:0}
@media (max-width:520px){
  .tally-group-member-row{grid-template-columns:1fr}
}


/* v0.9.0 redesign */

.tally-btn:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(15,23,42,.08)}
.tally-btn-primary:hover{box-shadow:0 14px 32px rgba(20,33,61,.26)}
.tally-home-grid{align-items:start}
.tally-card-spacious{padding:22px}
.tally-hero{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:22px 24px;margin-bottom:18px;background:linear-gradient(135deg,#14213d 0%,#1e3a66 100%);color:#fff;border-radius:24px;box-shadow:0 18px 36px rgba(20,33,61,.22)}
.tally-hero h3{margin:0 0 6px;font-size:32px;line-height:1.05;color:#fff}
.tally-hero p{margin:0;max-width:620px;color:rgba(255,255,255,.82)}
.tally-hero .tally-kicker{color:rgba(255,255,255,.7);margin-bottom:6px}
.tally-hero-actions{display:flex;gap:10px;flex-wrap:wrap}
.tally-hero .tally-btn{background:rgba(255,255,255,.96);border-color:transparent}
.tally-hero .tally-btn-primary{background:#fff;color:#132238}
.tally-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}
.tally-stat-card{background:#fff;border:1px solid rgba(20,33,61,.08);border-radius:20px;padding:18px 18px 16px;box-shadow:0 8px 24px rgba(15,23,42,.04)}
.tally-stat-card.is-primary{background:linear-gradient(180deg,#eaf1ff 0%,#fff 100%);border-color:#d4ddff}
.tally-stat-card.is-soft{background:linear-gradient(180deg,#f7f9fc 0%,#fff 100%)}
.tally-stat-label{font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#5b6b82;margin-bottom:10px}
.tally-stat-value{font-size:28px;font-weight:800;letter-spacing:-.03em;line-height:1.05;word-break:break-word}
.tally-stat-sub{margin-top:8px;color:var(--tally-muted);font-size:13px}
.tally-paused-card{margin-bottom:18px;border-color:#f7d7b5;background:linear-gradient(180deg,#fff9f4 0%,#fff 100%)}
.tally-match-feed{display:grid;gap:12px}
.tally-match-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;padding:16px;border:1px solid rgba(20,33,61,.08);border-radius:18px;background:linear-gradient(180deg,#ffffff 0%,#fbfcfe 100%)}
.tally-match-main{min-width:0}
.tally-match-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:8px}
.tally-match-top h4{margin:0;font-size:18px;line-height:1.15;letter-spacing:-.02em}
.tally-match-meta{color:var(--tally-muted);font-size:13px;line-height:1.45}
.tally-match-participants{display:flex;gap:8px;flex-wrap:wrap}
.tally-match-participants span{display:inline-flex;align-items:center;padding:5px 10px;border-radius:999px;background:#f4f6fa;color:#344054;font-size:12px;font-weight:700}
.tally-match-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.tally-badge{display:inline-flex;align-items:center;border-radius:999px;padding:6px 10px;background:#eef2f7;font-size:12px;font-weight:800;color:#344054}
.tally-badge-success{background:#ecfdf3;color:#027a48}
.tally-badge-warn{background:#fff4ed;color:#c4320a}
.tally-section-title{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:14px}
.tally-table-shell{border:1px solid rgba(20,33,61,.08);border-radius:18px;overflow:hidden;background:#fff}
.tally-table{width:100%;border-collapse:separate;border-spacing:0}
.tally-table tbody tr:hover td{background:#fbfcfe}
.tally-table td:last-child,.tally-table th:last-child{text-align:right}
.tally-row{padding:14px 0}
.tally-modal-card{width:min(760px,100%);border:1px solid rgba(20,33,61,.08);box-shadow:0 24px 60px rgba(15,23,42,.18)}
@media(max-width:950px){.tally-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tally-hero{padding:18px 20px}.tally-hero h3{font-size:28px}}
@media(max-width:700px){.tally-app{margin:0;border-radius:0;padding:12px 12px 24px;min-height:100vh;max-width:none}.tally-header{padding-top:4px}.tally-header h2{font-size:30px}.tally-hero{display:grid;grid-template-columns:1fr;padding:18px;border-radius:20px}.tally-hero h3{font-size:26px}.tally-hero-actions{width:100%}.tally-hero-actions .tally-btn{flex:1 1 auto}.tally-stat-grid{grid-template-columns:1fr 1fr}.tally-match-item{grid-template-columns:1fr}.tally-match-actions{justify-content:stretch}.tally-match-actions .tally-btn{flex:1 1 calc(50% - 4px)}.tally-home-grid{grid-template-columns:1fr}.tally-section-title{flex-direction:column;align-items:flex-start}.tally-table-shell{overflow:auto}}
@media(max-width:420px){.tally-stat-grid{grid-template-columns:1fr}.tally-match-actions .tally-btn{flex:1 1 100%}.tally-tabs{padding-top:10px}}


/* v1.0.0 cash history, payment statistics and achievements */
.tally-stats-grid,.tally-cash-grid{margin-top:18px}
.tally-badge-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.tally-achievement{display:flex;gap:12px;align-items:center;padding:14px;border:1px solid rgba(20,33,61,.08);border-radius:18px;background:linear-gradient(180deg,#fff 0%,#f8faff 100%)}
.tally-achievement-icon{display:grid;place-items:center;width:48px;height:48px;flex:0 0 48px;border-radius:15px;background:#eef4ff;font-size:24px}
.tally-achievement-player{font-weight:750;margin:2px 0}
.tally-inline-badges{display:inline-flex;gap:3px;margin-left:7px;vertical-align:middle}
.tally-inline-badges span{cursor:help}
.tally-history-list{display:grid;gap:8px}
.tally-history-item{display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:11px;align-items:center;padding:12px;border:1px solid rgba(20,33,61,.07);border-radius:15px;background:#fbfcfe}
.tally-history-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#ecfdf3;color:#027a48;font-weight:900}
.tally-history-main{min-width:0}
.tally-history-amount{white-space:nowrap}
.tally-cash-history{min-height:240px}
.tally-cash-mini{display:grid;text-align:right;gap:2px;font-size:13px;font-weight:750}
.tally-cash-mini span:first-child{color:#b42318}
.tally-cash-mini span:last-child{color:#027a48}
@media(max-width:900px){.tally-badge-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.tally-badge-grid{grid-template-columns:1fr}.tally-history-item{grid-template-columns:34px minmax(0,1fr)}.tally-history-amount{grid-column:2}.tally-stats-grid,.tally-cash-grid{grid-template-columns:1fr}}


/* v1.0.1 group-scoped badges */
.tally-badge-scope{display:grid;gap:6px;font-size:12px;font-weight:800;color:#5b6b82;min-width:190px}
.tally-badge-scope select{width:100%;border:1px solid var(--tally-line);border-radius:12px;background:#fff;padding:9px 34px 9px 11px;font:inherit;color:var(--tally-text)}
.tally-badge-context{display:flex;align-items:center;gap:8px;margin:-2px 0 14px}
@media(max-width:700px){.tally-badge-scope{width:100%;min-width:0}.tally-badge-context{margin-top:0}}


/* v1.0.2 Tally brand logo + app icon integration */
.tally-brand{display:flex;flex-direction:column;align-items:flex-start;min-width:0}
.tally-brand-logo{display:block;width:min(330px,45vw);height:auto;max-height:92px;object-fit:contain;object-position:left center}
.tally-brand-subtitle{margin-top:2px;padding-left:4px;color:var(--tally-muted);font-size:13px;font-weight:750;letter-spacing:.08em;text-transform:uppercase}
.tally-header-actions{align-self:center}
@media(max-width:700px){
  .tally-header{display:grid;grid-template-columns:1fr;gap:14px}
  .tally-brand-logo{width:min(280px,82vw);max-height:82px}
  .tally-header-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}
  .tally-header-actions .tally-btn{width:100%}
}
@media(max-width:420px){
  .tally-header-actions{grid-template-columns:1fr}
}

/* v1.1.0 Schnapsen variants */
.tally-game-player-count{display:inline-flex;margin:6px 0 4px}
.tally-delta-positive{flex-wrap:wrap}
.tally-delta-positive button{min-width:46px}
.tally-bummerl-note{padding:10px 12px;border-radius:12px;background:#fff4f3;color:#b42318;font-weight:700}

.tally-game-money-mode{margin-top:8px;font-size:13px;font-weight:800;color:#344054}


/* v1.3.0 Herzeln */
.tally-herzeln-progress{display:flex;gap:7px;margin:14px 0 18px}
.tally-herzeln-progress span{width:30px;height:30px;border-radius:999px;display:grid;place-items:center;background:#eef2f7;color:#667085;font-weight:850;font-size:12px}
.tally-herzeln-progress span.is-current{background:#071b3d;color:#fff;box-shadow:0 0 0 4px rgba(7,27,61,.10)}
.tally-herzeln-progress span.is-done{background:#dff5e8;color:#18794e}
.tally-pot-badge{white-space:nowrap;border-radius:999px;background:#fff3c4;color:#775b00;padding:9px 13px;font-weight:900}
.tally-pot-final{font-size:16px;padding:11px 16px}
.tally-herzeln-rate{max-width:280px}
.tally-herzeln-count{display:grid;gap:5px;min-width:120px;text-align:right;font-size:12px;color:#667085}
.tally-herzeln-count input{width:110px;text-align:center}
.tally-herzeln-winner-list{display:grid;gap:9px;margin:15px 0}
.tally-herzeln-winner{padding:13px 15px;border:1px solid var(--tally-line);border-radius:15px}
.tally-herzeln-winner small{display:block;color:#667085;margin-top:3px}
@media(max-width:620px){.tally-herzeln-stage .tally-section-title,.tally-herzeln-final .tally-section-title{align-items:flex-start}.tally-herzeln-count{text-align:left;min-width:0}.tally-herzeln-count input{width:100%}}


/* v1.4.0 Canasta */
.tally-canasta-meld{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:7px;padding:6px 9px;border-radius:10px;background:#f2f6ff;color:#344054;font-size:12px}
.tally-canasta-meld strong{color:#071b3d}
.tally-canasta-delta button{min-width:54px}
@media(max-width:620px){.tally-canasta-delta{grid-template-columns:1fr 1fr}.tally-canasta-delta input{grid-column:1/-1;order:-1;width:100%}}


/* v1.5.0 per-game statistics */
.tally-stats-filter .tally-section-title{align-items:end}
.tally-stats-game-scope{display:grid;gap:6px;min-width:220px;font-size:12px;font-weight:800;color:#5b6b82}
.tally-stats-game-scope select{width:100%;border:1px solid var(--tally-line);border-radius:12px;background:#fff;padding:10px 34px 10px 12px;font:inherit;color:var(--tally-text)}
.tally-game-stat-hero{margin-top:14px}
.tally-stat-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:12px}
.tally-stat-strip>div{padding:13px;border:1px solid var(--tally-line);border-radius:14px;background:#fafbfc;display:grid;gap:3px}
.tally-stat-strip span{font-size:12px;color:var(--tally-muted);font-weight:750}
.tally-stat-strip strong{font-size:20px;color:var(--tally-text)}
.tally-stat-strip small{font-size:11px;color:var(--tally-muted)}
@media(max-width:760px){.tally-stats-filter .tally-section-title{align-items:stretch}.tally-stats-game-scope{min-width:0;width:100%}.tally-stat-strip{grid-template-columns:1fr 1fr}}
@media(max-width:440px){.tally-stat-strip{grid-template-columns:1fr}}


/* v1.5.1 start dialog + per-match accounting */
.tally-start-money-card{display:grid;gap:12px;padding:14px 16px;border:1px solid var(--tally-line);border-radius:16px;background:#f8fafc}
.tally-start-money-card label{margin:0}
.tally-start-money-card select,.tally-start-money-card input{max-width:100%;box-sizing:border-box}
.tally-form select{width:100%;max-width:100%;min-width:0;text-overflow:ellipsis}
.tally-modal-card{max-width:min(760px,calc(100vw - 24px));box-sizing:border-box}
@media(max-width:600px){
  .tally-modal-card{width:calc(100vw - 20px);padding-left:20px;padding-right:20px}
  .tally-form label,.tally-form select,.tally-form input,.tally-form textarea{min-width:0;max-width:100%;box-sizing:border-box}
}


/* v1.5.2 title cleanup + better game selector */
.tally-game-chooser{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:12px}
.tally-game-chooser label{margin:0}
.tally-game-player-count{display:inline-flex;margin-top:8px}
@media(max-width:640px){.tally-game-chooser{grid-template-columns:1fr}}


/* v1.5.3 select cleanup */
.tally-start-money-card [data-start-money-mode]{-webkit-appearance:none;appearance:none;background-color:#fff;height:58px;min-height:58px;padding:0 46px 0 18px;line-height:58px;font-size:17px;font-weight:800;color:var(--tally-text);border:1px solid var(--tally-line);border-radius:14px;background-image:linear-gradient(45deg,transparent 50%,#667085 50%),linear-gradient(135deg,#667085 50%,transparent 50%);background-position:calc(100% - 24px) 50%,calc(100% - 18px) 50%;background-size:6px 6px,6px 6px;background-repeat:no-repeat;vertical-align:middle}
.tally-start-money-hint{display:block;margin-top:8px;padding-left:2px;line-height:1.4}
@media(max-width:600px){.tally-start-money-card [data-start-money-mode]{height:60px;min-height:60px;line-height:60px;font-size:16px;padding:0 44px 0 18px}}


/* v1.5.5 consistent dropdown height on iOS */
.tally-app select{
  -webkit-appearance:none !important;
  appearance:none !important;
  width:100%;
  height:58px !important;
  min-height:58px !important;
  max-height:none !important;
  box-sizing:border-box;
  padding:0 46px 0 18px !important;
  line-height:normal !important;
  font-size:16px;
  font-weight:750;
  color:var(--tally-text);
  background-color:#fff;
  border:1px solid var(--tally-line);
  border-radius:14px;
  background-image:
    linear-gradient(45deg,transparent 50%,#667085 50%),
    linear-gradient(135deg,#667085 50%,transparent 50%);
  background-position:
    calc(100% - 24px) calc(50% - 3px),
    calc(100% - 18px) calc(50% - 3px);
  background-size:6px 6px,6px 6px;
  background-repeat:no-repeat;
  vertical-align:middle;
}
.tally-app select option{
  font-size:16px;
  line-height:normal;
}
@media(max-width:700px){
  .tally-app select{
    height:62px !important;
    min-height:62px !important;
    padding:0 46px 0 18px !important;
    font-size:16px !important;
  }
}


/* v1.5.7 robust theme header removal */
body.tally-page-active header:not(.tally-header),
body.tally-page-active #masthead,
body.tally-page-active .site-header,
body.tally-page-active .main-header-bar-wrap,
body.tally-page-active .main-header-bar,
body.tally-page-active .ast-mobile-header-wrap,
body.tally-page-active .ast-desktop-header-content,
body.tally-page-active .elementor-location-header,
body.tally-page-active .ct-header,
body.tally-page-active #header,
body.tally-page-active .header{
  display:none !important;
}


/* v1.6.0 non-cash stakes */
.tally-start-money-card [data-noncash-stake-field]{display:grid;gap:7px}
.tally-start-money-card [data-noncash-stake-field][hidden]{display:none}


/* v1.7.0 invitation + self-registration */
.tally-register-card{max-width:620px;margin:24px auto;padding:28px}
.tally-register-card h2{margin:8px 0}
.tally-register-icon{font-size:38px}
.tally-register-card .tally-form{margin-top:20px}
.tally-invite-result{display:grid;gap:14px}
.tally-invite-code{font-size:34px;font-weight:950;letter-spacing:.16em;text-align:center;padding:18px;border-radius:16px;background:#071b3d;color:#fff}
.tally-invite-result input[readonly]{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px}
@media(max-width:600px){.tally-register-card{margin:10px 0;padding:20px}.tally-invite-code{font-size:28px;letter-spacing:.12em}}


/* v1.8.0 integrated login */
.tally-login-card{max-width:560px}
.tally-login-remember{display:flex!important;align-items:center;gap:10px}
.tally-login-remember input{width:auto!important;min-width:18px!important;height:18px!important}
.tally-auth-divider{display:flex;align-items:center;gap:12px;margin:18px 0;color:var(--tally-muted);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.tally-auth-divider:before,.tally-auth-divider:after{content:"";height:1px;background:var(--tally-line);flex:1}
.tally-auth-secondary{width:100%;justify-content:center}


/* v1.8.4 wider match details + real horizontal table scrolling */
.tally-modal-card.tally-modal-card-wide{
  width:min(1080px,calc(100vw - 36px)) !important;
  max-width:min(1080px,calc(100vw - 36px)) !important;
}

.tally-match-details{
  width:100%;
  max-width:100%;
  min-width:0;
}

.tally-match-details .tally-table-scroll{
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  overflow-x:auto !important;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  scrollbar-gutter:stable;
  padding-bottom:8px;
  border:1px solid var(--tally-line);
  border-radius:12px;
}

.tally-match-details .tally-table-scroll .tally-table{
  display:table !important;
  width:max-content !important;
  min-width:100% !important;
  max-width:none !important;
  margin:0;
}

.tally-match-details .tally-round-detail-table th,
.tally-match-details .tally-round-detail-table td{
  min-width:180px;
  white-space:nowrap;
  vertical-align:top;
}

.tally-match-details .tally-round-detail-table th:first-child,
.tally-match-details .tally-round-detail-table td:first-child{
  min-width:120px;
  position:sticky;
  left:0;
  z-index:2;
  background:#fff;
}

.tally-match-details .tally-table-scroll::-webkit-scrollbar{
  height:12px;
}
.tally-match-details .tally-table-scroll::-webkit-scrollbar-track{
  background:#eef2f6;
  border-radius:999px;
}
.tally-match-details .tally-table-scroll::-webkit-scrollbar-thumb{
  background:#98a2b3;
  border-radius:999px;
  border:3px solid #eef2f6;
}

@media(max-width:700px){
  .tally-modal-card.tally-modal-card-wide{
    width:calc(100vw - 12px) !important;
    max-width:calc(100vw - 12px) !important;
    padding-left:14px;
    padding-right:14px;
  }
  .tally-match-details .tally-round-detail-table th,
  .tally-match-details .tally-round-detail-table td{
    min-width:165px;
  }
  .tally-match-details .tally-round-detail-table th:first-child,
  .tally-match-details .tally-round-detail-table td:first-child{
    min-width:110px;
  }
}


/* v1.9.0 Ligretto */
.tally-start-rule-card{display:grid;gap:12px;padding:14px 16px;border:1px solid var(--tally-line);border-radius:16px;background:#f8fafc}
.tally-start-rule-card label{margin:0}
.tally-start-rule-card [hidden]{display:none!important}
.tally-ligretto-live-rule{margin:8px 0 12px;padding:10px 12px;border-radius:12px;background:#eef4ff;color:var(--tally-text)}


/* v1.9.1 player order / dealer rotation */
.tally-order-list{display:grid;gap:8px;margin:18px 0}
.tally-order-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 12px;border:1px solid var(--tally-line);border-radius:14px;background:#f8fafc}
.tally-order-position{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#071b3d;color:#fff;font-weight:900}
.tally-order-player{min-width:0}
.tally-order-actions{display:flex;gap:6px}
.tally-order-btn{width:42px;height:42px;padding:0!important;justify-content:center}
.tally-order-continue{width:100%;justify-content:center}
.tally-dealer-card{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid #c7d7f5;border-radius:14px;background:#eef4ff}
.tally-dealer-card strong{display:block;font-size:18px;margin-top:2px}
.tally-dealer-icon{font-size:28px}
.tally-order-summary strong{text-align:right;line-height:1.45}
@media(max-width:600px){
  .tally-order-row{grid-template-columns:38px minmax(0,1fr) auto;padding:9px}
  .tally-order-btn{width:38px;height:38px}
  .tally-order-summary{display:grid}
  .tally-order-summary strong{text-align:left}
}


/* v1.9.2 Tally confirmation dialog */
body.tally-confirm-open{overflow:hidden}
.tally-confirm-overlay{
  position:fixed;
  inset:0;
  z-index:1000000;
  display:grid;
  place-items:center;
  padding:20px;
  background:rgba(15,23,42,.50);
  backdrop-filter:blur(3px);
  -webkit-backdrop-filter:blur(3px);
}
.tally-confirm-card{
  width:min(460px,100%);
  padding:24px;
  border:1px solid rgba(15,23,42,.10);
  border-radius:22px;
  background:#fff;
  color:#14213d;
  box-shadow:0 24px 70px rgba(15,23,42,.28);
}
.tally-confirm-icon{
  display:grid;
  place-items:center;
  width:48px;
  height:48px;
  margin-bottom:16px;
  border-radius:15px;
  background:#eef4ff;
  font-size:23px;
}
.tally-confirm-icon.is-danger{background:#fff1ef}
.tally-confirm-copy h3{
  margin:0 0 8px;
  font-size:22px;
  line-height:1.2;
  color:#14213d;
}
.tally-confirm-copy p{
  margin:0;
  color:#667085;
  font-size:15px;
  line-height:1.55;
}
.tally-confirm-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:22px;
}
.tally-confirm-actions .tally-btn{
  min-height:48px;
  justify-content:center;
}
.tally-confirm-danger{
  background:#b42318!important;
  border-color:#b42318!important;
  color:#fff!important;
}
.tally-confirm-danger:hover{background:#912018!important}
@media(max-width:520px){
  .tally-confirm-overlay{padding:14px;align-items:end}
  .tally-confirm-card{
    width:100%;
    padding:22px 18px calc(18px + env(safe-area-inset-bottom));
    border-radius:22px 22px 16px 16px;
  }
  .tally-confirm-copy h3{font-size:21px}
  .tally-confirm-actions{grid-template-columns:1fr}
  .tally-confirm-actions .tally-confirm-ok{order:-1}
}


/* v1.9.3 nicer mobile action layout for players/groups */
.tally-row{
  align-items:flex-start;
}
.tally-row > div:first-child{
  min-width:0;
  flex:1 1 auto;
}
.tally-row > .tally-actions{
  flex:0 0 auto;
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:10px;
}
.tally-row > .tally-actions .tally-btn{
  min-height:46px;
}

@media (max-width: 820px){
  .tally-row{
    display:grid !important;
    grid-template-columns:1fr;
    gap:14px;
    align-items:start;
    padding:16px 0;
  }

  .tally-row > .tally-actions{
    width:100%;
    display:grid !important;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:10px;
    justify-content:stretch;
  }

  .tally-row > .tally-actions .tally-btn{
    width:100%;
    min-width:0;
    min-height:48px;
    justify-content:center;
    text-align:center;
    padding:12px 10px;
  }

  .tally-section-title{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:12px;
  }

  .tally-section-title .tally-btn{
    width:auto;
  }
}

@media (max-width: 520px){
  .tally-row > .tally-actions{
    grid-template-columns:1fr 1fr;
  }

  .tally-row > .tally-actions .tally-btn{
    font-size:15px;
    border-radius:14px;
  }
}


/* v1.9.4 mobile action buttons: no wrapped labels */
@media (max-width:820px){
  .tally-row > .tally-actions{
    display:flex !important;
    flex-direction:column;
    align-items:stretch;
    width:100%;
    max-width:none !important;
    gap:9px;
  }
  .tally-row > .tally-actions .tally-btn{
    display:flex;
    width:100%;
    min-width:0;
    min-height:46px;
    white-space:nowrap !important;
    overflow:visible;
    word-break:normal !important;
    overflow-wrap:normal !important;
    hyphens:none !important;
    justify-content:center;
    font-size:15px;
    line-height:1.2;
  }
}
@media (min-width:521px) and (max-width:820px){
  .tally-row > .tally-actions{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(180px,1fr));
  }
}
@media (max-width:520px){
  .tally-row > .tally-actions{
    grid-template-columns:none !important;
  }
}

/* v1.9.4 drag & drop player order */
.tally-order-row{
  grid-template-columns:34px 42px minmax(0,1fr) auto;
  cursor:grab;
  transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease,opacity .15s ease;
}
.tally-order-row:active{cursor:grabbing}
.tally-order-drag{
  display:grid;
  place-items:center;
  width:34px;
  height:42px;
  border-radius:10px;
  color:#667085;
  font-size:22px;
  font-weight:900;
  cursor:grab;
  user-select:none;
  -webkit-user-select:none;
  touch-action:none;
}
.tally-order-drag:active{cursor:grabbing}
.tally-order-row.is-dragging{opacity:.42}
.tally-order-row.is-drag-target{
  border-color:#2e90fa;
  box-shadow:0 0 0 3px rgba(46,144,250,.12);
  transform:scale(1.01);
}
.tally-order-ghost{
  position:fixed !important;
  z-index:1000002;
  pointer-events:none;
  transform:translate(-50%,-50%) scale(.98);
  opacity:.92;
  box-shadow:0 18px 45px rgba(15,23,42,.22);
  background:#fff;
}
@media(max-width:600px){
  .tally-order-row{
    grid-template-columns:30px 36px minmax(0,1fr) auto;
    gap:8px;
  }
  .tally-order-drag{
    width:30px;
    height:38px;
    font-size:20px;
  }
  .tally-order-position{
    width:32px;
    height:32px;
  }
}


/* v1.9.5 player/group administration layout */
.tally-player-admin-grid{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
}

.tally-groups-card{
  min-width:0;
}

.tally-group-row{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:14px;
  padding:16px 0;
  border-bottom:1px solid var(--tally-line);
}

.tally-group-row:last-child{
  border-bottom:0;
}

.tally-group-info{
  min-width:0;
}

.tally-group-info > strong{
  display:block;
  font-size:16px;
  line-height:1.25;
  white-space:normal;
  word-break:normal;
  overflow-wrap:break-word;
}

.tally-group-actions{
  display:flex !important;
  flex-wrap:wrap;
  justify-content:flex-start !important;
  gap:10px;
  width:100%;
  max-width:none !important;
}

.tally-group-actions .tally-btn{
  flex:0 0 auto;
  width:auto !important;
  min-height:46px;
  white-space:nowrap !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
  hyphens:none !important;
  justify-content:center;
}

@media(max-width:1100px){
  .tally-player-admin-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:700px){
  .tally-group-row{
    gap:12px;
  }

  .tally-group-actions{
    display:grid !important;
    grid-template-columns:1fr !important;
  }

  .tally-group-actions .tally-btn{
    width:100% !important;
  }
}


/* v1.9.11 account linking */
.tally-account-status{
  margin-top:5px;
  font-size:13px;
  color:var(--tally-muted);
}
.tally-account-status.is-linked{
  color:#067647;
  font-weight:700;
}
.tally-account-help{
  padding:12px 14px;
  border:1px solid var(--tally-line);
  border-radius:12px;
  background:#f8fafc;
  font-size:14px;
  line-height:1.45;
}
@media(max-width:700px){
  .tally-player-row>.tally-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
  }
}


/* v1.9.12 player archive / restore */
.tally-player-header-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.tally-player-actions{
  flex-wrap:nowrap!important;
  align-items:center;
}
.tally-more-btn{
  min-width:48px!important;
  width:48px!important;
  padding-left:0!important;
  padding-right:0!important;
  font-size:18px;
  letter-spacing:2px;
}
.tally-player-more-menu{
  display:grid;
  gap:10px;
  margin:16px 0 12px;
}
.tally-player-more-menu .tally-btn{
  width:100%;
  justify-content:center;
  min-height:48px;
}
.tally-player-more-note{
  line-height:1.45;
}
.tally-archived-player-list{
  display:grid;
  gap:0;
  margin-top:16px;
}
.tally-archived-player-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:16px;
  padding:14px 0;
  border-bottom:1px solid var(--tally-line);
}
.tally-archived-player-row:last-child{border-bottom:0}
.tally-archived-actions{
  display:flex!important;
  flex-wrap:nowrap!important;
  max-width:none!important;
}
.tally-archived-actions .tally-btn{
  white-space:nowrap!important;
}
@media(max-width:700px){
  .tally-player-header-actions{
    width:100%;
    display:grid;
    grid-template-columns:1fr;
  }
  .tally-player-header-actions .tally-btn{width:100%}
  .tally-player-actions{
    display:flex!important;
    flex-direction:row!important;
    width:auto!important;
  }
  .tally-player-actions .tally-btn{
    width:auto!important;
  }
  .tally-player-actions .tally-more-btn{
    width:48px!important;
  }
  .tally-archived-player-row{
    grid-template-columns:1fr;
    gap:12px;
  }
  .tally-archived-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
    width:100%;
  }
  .tally-archived-actions .tally-btn{width:100%!important}
}


/* v1.9.13 make player action menu unmistakably visible */
.tally-player-actions{
  display:flex!important;
  gap:8px!important;
  justify-content:flex-end!important;
  max-width:none!important;
}
.tally-player-actions .tally-more-btn{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px;
  width:auto!important;
  min-width:108px!important;
  padding:10px 14px!important;
  white-space:nowrap!important;
  visibility:visible!important;
  opacity:1!important;
}
.tally-player-actions .tally-more-btn span:last-child{
  font-size:18px;
  line-height:1;
  letter-spacing:1px;
}
@media(max-width:700px){
  .tally-player-row{
    display:grid!important;
    grid-template-columns:1fr!important;
  }
  .tally-player-actions{
    width:100%!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
  }
  .tally-player-actions .tally-btn,
  .tally-player-actions .tally-more-btn{
    width:100%!important;
    min-width:0!important;
  }
}


/* v1.9.15 archive/delete states */
.tally-player-more-menu .tally-btn[disabled],
.tally-archived-actions .tally-btn[disabled]{
  opacity:.45!important;
  cursor:not-allowed!important;
  background:#f8fafc!important;
  color:#98a2b3!important;
  border-color:var(--tally-line)!important;
}


/* v1.9.16 PWA install help */
.tally-install-help-btn{white-space:nowrap}
.tally-install-intro,.tally-install-done{display:flex;align-items:center;gap:14px;padding:14px;margin:8px 0 18px;border:1px solid var(--tally-line);border-radius:16px;background:#f8fafc}
.tally-install-intro p,.tally-install-done p{margin:4px 0 0;color:var(--tally-muted);line-height:1.45}
.tally-install-appicon,.tally-install-icon{flex:0 0 auto;display:grid;place-items:center;width:52px;height:52px;border-radius:16px;background:#0f172a;color:#fff;font-size:26px;font-weight:900}
.tally-install-icon{background:#067647}
.tally-install-now{width:100%;justify-content:center;min-height:50px;margin-bottom:14px}
.tally-install-steps{display:grid;gap:10px;margin:0;padding:0;list-style:none;counter-reset:tally-install-step}
.tally-install-steps li{
  counter-increment:tally-install-step;
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  column-gap:14px;
  row-gap:6px;
  align-items:start;
  padding:14px;
  border:1px solid var(--tally-line);
  border-radius:14px;
  background:#fff;
}
.tally-install-steps li::before{
  content:counter(tally-install-step);
  grid-column:1;
  grid-row:1 / span 2;
  align-self:start;
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border-radius:50%;
  background:#eef4ff;
  color:#1570ef;
  font-weight:900;
}
.tally-install-steps li strong{
  grid-column:2;
  display:block;
  margin:0;
  line-height:1.25;
}
.tally-install-steps li span{
  grid-column:2;
  display:block;
  margin:0;
  color:var(--tally-muted);
  line-height:1.45;
}
.tally-install-note{margin-top:14px;line-height:1.45}
@media(max-width:700px){
  .tally-header-actions{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%}
  .tally-header-actions .tally-install-help-btn{grid-column:1/-1;width:100%}
  .tally-install-intro,.tally-install-done{align-items:flex-start}
}


/* v1.9.17 install help text fit */
@media(max-width:700px){
  .tally-install-steps li{
    padding:12px;
    column-gap:12px;
  }
  .tally-install-steps li strong{
    font-size:15px;
  }
  .tally-install-steps li span{
    font-size:14px;
  }
}


/* v1.9.18 one-time guest players */
.tally-guest-add{
  display:grid;
  gap:10px;
  padding:14px;
  border:1px dashed #b8c3d4;
  border-radius:14px;
  background:#f8fafc;
}
.tally-guest-add-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
}
.tally-guest-add-row input{
  min-width:0;
}
.tally-guest-badge{
  display:inline-flex;
  align-items:center;
  margin-left:6px;
  padding:2px 7px;
  border-radius:999px;
  background:#fff4e5;
  color:#b54708;
  font-size:11px;
  font-weight:800;
  vertical-align:middle;
}
@media(max-width:520px){
  .tally-guest-add-row{
    grid-template-columns:1fr;
  }
  .tally-guest-add-row .tally-btn{
    width:100%;
    justify-content:center;
  }
}


/* v1.9.21 edit previous round */
.tally-round-primary-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.tally-round-primary-actions .tally-btn{
  min-height:48px;
}
.tally-round-edit-banner{
  display:grid;
  gap:4px;
  margin-bottom:14px;
  padding:12px 14px;
  border:1px solid #b2ccff;
  border-radius:14px;
  background:#eff6ff;
}
.tally-round-edit-banner strong{
  color:#1849a9;
}
.tally-round-edit-banner span{
  color:#475467;
  font-size:14px;
  line-height:1.4;
}
@media(max-width:600px){
  .tally-round-primary-actions{
    display:grid;
    grid-template-columns:1fr;
  }
  .tally-round-primary-actions .tally-btn{
    width:100%;
    justify-content:center;
  }
}


/* v1.9.22 Ligretto minus points */
.tally-ligretto-delta{flex-wrap:wrap}
.tally-ligretto-delta input[data-round-input]{min-width:78px}
@media(max-width:600px){
  .tally-ligretto-delta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
  .tally-ligretto-delta input[data-round-input]{width:100%;min-width:0}
}


/* v1.9.23 live standings + finish loading */
.tally-current-score{
  margin-top:4px;
  color:#475467;
}
.tally-current-score strong{
  color:#1849a9;
}
.tally-live-standings{
  margin-top:12px;
  padding:14px;
  border:1px solid #d8e4ff;
  border-radius:16px;
  background:linear-gradient(180deg,#f8fbff 0%,#eef4ff 100%);
}
.tally-live-standings-list{
  display:grid;
  gap:10px;
}
.tally-live-standing{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:12px 14px;
  border:1px solid #dbe4f0;
  border-radius:14px;
  background:#fff;
}
.tally-live-standing-rank{
  min-width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#eef2f7;
  color:#344054;
  font-weight:800;
}
.tally-live-standing-score{
  font-size:20px;
  font-weight:900;
  color:#111827;
}
.tally-live-standing.is-best{
  border-color:#b7e2c1;
  background:#effaf3;
}
.tally-live-standing.is-best .tally-live-standing-rank{
  background:#d1fadf;
  color:#067647;
}
.tally-live-standing.is-best .tally-live-standing-score{
  color:#067647;
}
.tally-live-standing.is-worst{
  border-color:#f5d7b3;
  background:#fff7ed;
}
.tally-live-standing.is-worst .tally-live-standing-rank{
  background:#ffedd5;
  color:#b54708;
}
.tally-live-standing.is-worst .tally-live-standing-score{
  color:#b54708;
}
@media(max-width:700px){
  .tally-live-standing{
    grid-template-columns:34px minmax(0,1fr);
  }
  .tally-live-standing-score{
    grid-column:2;
    font-size:18px;
  }
}


/* v1.9.24 button style normalization */
button.tally-btn,
input.tally-btn,
a.tally-btn{
  font:inherit;
}
button.tally-btn::-moz-focus-inner{
  border:0;
  padding:0;
}
.tally-match-actions .tally-btn,
.tally-round-primary-actions .tally-btn,
.tally-header-actions .tally-btn,
.tally-close-choice-actions .tally-btn{
  min-height:46px;
}


/* v1.9.25 statistics by group */
.tally-stats-filter-controls{
  display:flex;
  align-items:end;
  gap:10px;
  flex-wrap:wrap;
}
.tally-stats-group-scope,
.tally-stats-game-scope{
  display:grid;
  gap:5px;
  min-width:180px;
  font-weight:700;
}
.tally-stats-group-scope select,
.tally-stats-game-scope select{
  min-height:44px;
}
@media(max-width:700px){
  .tally-stats-filter .tally-section-title{
    display:grid;
    grid-template-columns:1fr;
  }
  .tally-stats-filter-controls{
    display:grid;
    grid-template-columns:1fr;
    width:100%;
  }
  .tally-stats-group-scope,
  .tally-stats-game-scope{
    min-width:0;
    width:100%;
  }
}


/* v1.9.26 finish button normalization */
.tally-btn-primary,
button.tally-btn-primary,
input.tally-btn-primary,
button[data-action="finish-target-match"],
button[data-action="confirm-finish-match"],
button[data-action="add-round"]{
  appearance:none;
  -webkit-appearance:none;
  border:1px solid #0b1a3a;
  background:#0b1a3a;
  color:#fff;
  box-shadow:none;
}
.tally-btn-primary:hover,
button.tally-btn-primary:hover,
input.tally-btn-primary:hover,
button[data-action="finish-target-match"]:hover,
button[data-action="confirm-finish-match"]:hover,
button[data-action="add-round"]:hover{
  background:#12254f;
  border-color:#12254f;
  color:#fff;
}
.tally-btn-primary:focus,
button.tally-btn-primary:focus,
input.tally-btn-primary:focus,
button[data-action="finish-target-match"]:focus,
button[data-action="confirm-finish-match"]:focus,
button[data-action="add-round"]:focus{
  outline:none;
  box-shadow:0 0 0 3px rgba(59,130,246,.18);
}


/* v1.9.27 configurable game creation */
.tally-game-config-section{
  display:grid;
  gap:12px;
  padding:14px;
  border:1px solid var(--tally-line);
  border-radius:16px;
  background:#f8fafc;
}
.tally-game-config-section h4{
  margin:0;
  font-size:17px;
}
.tally-game-config-section .tally-section-title{
  margin-bottom:0;
}

/* v1.9.28 statistics filter alignment */
.tally-stats-filter-controls{align-items:stretch}
.tally-stats-group-scope,.tally-stats-game-scope{display:grid;grid-template-rows:20px 56px;gap:6px;align-content:end}
.tally-stats-group-scope select,.tally-stats-game-scope select{height:56px;min-height:56px;margin:0;padding-top:0;padding-bottom:0;align-self:end}
.tally-stats-group-scope,.tally-stats-game-scope{line-height:20px}
@media(max-width:700px){.tally-stats-group-scope,.tally-stats-game-scope{grid-template-rows:20px 54px}.tally-stats-group-scope select,.tally-stats-game-scope select{height:54px;min-height:54px}}

/* v1.9.28 notification settings */
.tally-notification-card{display:flex;align-items:center;gap:14px;padding:14px;margin-bottom:14px;border:1px solid var(--tally-line);border-radius:16px;background:#f8fafc}
.tally-notification-icon{display:grid;place-items:center;width:46px;height:46px;flex:0 0 46px;border-radius:14px;background:#eef4ff;font-size:24px}
.tally-notification-ok{margin:12px 0;padding:12px 14px;border:1px solid #b7e2c1;border-radius:12px;background:#effaf3;color:#067647;font-weight:800}
@media(max-width:700px){.tally-header-actions{grid-template-columns:1fr 1fr}.tally-header-actions .tally-install-help-btn{grid-column:auto}}


/* v1.9.29 full Web Push */
.tally-notification-hint{
  margin-top:14px;
}
.tally-notification-card + .tally-btn{
  width:100%;
  margin-bottom:12px;
}


/* v1.9.30 stronger stats filter alignment */
.tally-stats-filter .tally-section-title{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:end !important;
  gap:18px !important;
}
.tally-stats-filter-controls{
  display:grid !important;
  grid-template-columns:minmax(250px, 1fr) minmax(180px, 1fr) !important;
  align-items:end !important;
  gap:14px !important;
}
.tally-stats-group-scope,
.tally-stats-game-scope{
  display:flex !important;
  flex-direction:column !important;
  justify-content:flex-end !important;
  gap:8px !important;
  margin:0 !important;
  min-width:0 !important;
}
.tally-stats-group-scope select,
.tally-stats-game-scope select{
  height:50px !important;
  min-height:50px !important;
  margin:0 !important;
  align-self:stretch !important;
}
@media(max-width:780px){
  .tally-stats-filter .tally-section-title{
    grid-template-columns:1fr !important;
  }
  .tally-stats-filter-controls{
    grid-template-columns:1fr !important;
  }
}

/* v1.9.30 header utility icons */
.tally-header-actions{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:12px !important;
}
.tally-header-utility-icons{
  display:flex;
  align-items:center;
  gap:10px;
}
.tally-icon-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:48px;
  height:48px;
  border-radius:14px;
  border:1px solid var(--tally-line);
  background:#fff;
  color:var(--tally-primary);
  box-shadow:0 1px 2px rgba(15,23,42,.04);
  cursor:pointer;
  transition:all .18s ease;
  font-size:22px;
  line-height:1;
}
.tally-icon-btn:hover,
.tally-icon-btn:focus{
  transform:translateY(-1px);
  border-color:#c7d2fe;
  box-shadow:0 8px 20px rgba(15,23,42,.08);
  outline:none;
}
@media(max-width:700px){
  .tally-header-actions{
    display:grid !important;
    grid-template-columns:auto 1fr 1fr !important;
    align-items:center !important;
  }
  .tally-header-utility-icons{
    justify-content:flex-start;
  }
  .tally-header-actions .tally-btn{
    width:100% !important;
  }
}


/* v1.9.33 notification loading UX */
.tally-notification-status-loading{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:46px;
  padding:11px 14px;
  border:1px solid var(--tally-line);
  border-radius:12px;
  background:#f8fafc;
  color:var(--tally-muted);
  font-weight:700;
}
.tally-spinner-small{
  width:18px!important;
  height:18px!important;
  border-width:2px!important;
  flex:0 0 18px;
}
.tally-btn .tally-spinner-small{margin:0}


/* v1.9.34 header button layout cleanup */
.tally-header{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  grid-template-areas:
    "brand icons"
    "actions actions" !important;
  align-items:start !important;
  gap:14px 16px !important;
}
.tally-brand{
  grid-area:brand;
}
.tally-header-utility-icons{
  grid-area:icons;
  display:flex !important;
  align-items:flex-start !important;
  justify-content:flex-end !important;
  gap:10px !important;
  align-self:start !important;
}
.tally-header-actions{
  grid-area:actions;
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:12px !important;
  width:100% !important;
  justify-content:stretch !important;
}
.tally-header-actions .tally-btn{
  width:100% !important;
  white-space:nowrap !important;
  flex-wrap:nowrap !important;
  min-width:0 !important;
  padding:12px 16px !important;
  font-size:15px !important;
}
.tally-header-actions .tally-btn span{
  white-space:nowrap !important;
}
@media(max-width:700px){
  .tally-header{
    grid-template-columns:minmax(0,1fr) auto !important;
    grid-template-areas:
      "brand icons"
      "actions actions" !important;
    gap:14px 12px !important;
  }
  .tally-brand-logo{
    width:min(250px,68vw) !important;
    max-height:78px !important;
  }
  .tally-header-actions{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  .tally-header-actions .tally-btn{
    min-height:56px !important;
    font-size:14px !important;
    line-height:1.15 !important;
  }
}
@media(max-width:380px){
  .tally-header-actions .tally-btn{
    padding:11px 12px !important;
    font-size:13px !important;
  }
}


/* v1.9.35 automatic notification trigger list */
.tally-notification-triggers{
  margin-top:14px;
  padding:13px 14px;
  border:1px solid var(--tally-line);
  border-radius:14px;
  background:#f8fafc;
}
.tally-notification-triggers strong{
  display:block;
  margin-bottom:7px;
}
.tally-notification-triggers ul{
  margin:0;
  padding-left:20px;
  color:var(--tally-muted);
}
.tally-notification-triggers li+li{
  margin-top:5px;
}


/* v1.9.37 winner badge layout */
.tally-winner-badge{
  display:inline-flex;
  align-items:flex-start;
  gap:6px;
  max-width:min(100%, 220px);
  white-space:normal;
  line-height:1.25;
  text-align:left;
}
.tally-winner-badge-icon{
  flex:0 0 auto;
  line-height:1.1;
  margin-top:1px;
}
.tally-winner-badge-text{
  min-width:0;
  overflow-wrap:anywhere;
  word-break:break-word;
}
@media(max-width:700px){
  .tally-winner-badge{
    max-width:100%;
  }
}


/* v1.9.38 sticky round-history headers */
.tally-round-table-wrap,
.tally-match-details .tally-table-scroll{
  position:relative;
}

/* Keep column headings visible while scrolling down. */
.tally-round-table-wrap .tally-table thead th,
.tally-match-details .tally-round-detail-table thead th{
  position:sticky;
  top:0;
  z-index:6;
  background:#fff;
  box-shadow:0 1px 0 var(--tally-line);
}

/* Keep the first column visible while scrolling horizontally. */
.tally-round-table-wrap .tally-table th:first-child,
.tally-round-table-wrap .tally-table td:first-child,
.tally-match-details .tally-round-detail-table th:first-child,
.tally-match-details .tally-round-detail-table td:first-child{
  position:sticky;
  left:0;
  z-index:5;
  background:#fff;
  box-shadow:1px 0 0 var(--tally-line);
}

/* Top-left header cell must stay above both sticky axes. */
.tally-round-table-wrap .tally-table thead th:first-child,
.tally-match-details .tally-round-detail-table thead th:first-child{
  z-index:8;
}

/* Slightly stronger background on alternating/body rows so sticky cells
   do not become visually transparent over scrolled content. */
.tally-round-table-wrap .tally-table tbody td:first-child,
.tally-match-details .tally-round-detail-table tbody td:first-child{
  background:#fff;
}

@media(max-width:700px){
  .tally-round-table-wrap{
    max-height:340px;
  }
}


/* v1.9.39 notifications tabs + feed */
.tally-notification-modal-tabs{display:flex;gap:24px;margin:8px 0 18px;border-bottom:1px solid var(--tally-border,#e5e7eb);overflow-x:auto}
.tally-notification-modal-tabs .tally-btn{min-width:0;min-height:46px;padding:10px 2px 12px;border:0;border-radius:0;background:transparent;color:var(--tally-muted,#6b7280);box-shadow:none;white-space:nowrap;font-weight:700;position:relative}
.tally-notification-modal-tabs .tally-btn.is-active{background:transparent;color:var(--tally-text,#111827);border-color:transparent}
.tally-notification-modal-tabs .tally-btn.is-active::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:3px;border-radius:3px 3px 0 0;background:var(--tally-accent)}
.tally-notification-feed-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}
.tally-notification-feed{display:grid;gap:12px}
.tally-notification-feed-item{display:grid;grid-template-columns:52px 1fr auto;gap:12px;align-items:start;padding:14px;border:1px solid var(--tally-line);border-radius:16px;background:#fff}
.tally-notification-feed-icon{width:52px;height:52px;border-radius:16px;display:flex;align-items:center;justify-content:center;background:#eef2ff;font-size:24px}
.tally-notification-feed-main{display:grid;gap:6px;min-width:0}
.tally-notification-feed-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.tally-notification-feed-date{color:var(--tally-muted);font-size:13px;font-weight:600}
.tally-notification-feed-body{color:var(--tally-text);line-height:1.45}
@media(max-width:700px){
  .tally-notification-feed-item{grid-template-columns:44px 1fr;}
  .tally-notification-feed-item .tally-btn{grid-column:2;justify-self:start}
  .tally-notification-feed-icon{width:44px;height:44px;border-radius:14px;font-size:20px}
  .tally-notification-feed-head{align-items:flex-start;flex-direction:column}
}

/* v1.10.0 tournaments */
.tally-tournament-grid{display:grid;gap:18px}
.tally-tournament-card{padding:20px}
.tally-tournament-progress{height:8px;border-radius:999px;background:var(--tally-line);overflow:hidden;margin:14px 0 18px}
.tally-tournament-progress span{display:block;height:100%;background:var(--tally-accent);border-radius:inherit;transition:width .2s ease}
.tally-tournament-columns{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:20px;align-items:start}
.tally-tournament-columns>div{min-width:0}
.tally-tournament-columns h4{margin:0 0 10px}
.tally-tournament-match-list{display:grid;gap:10px;max-height:560px;overflow:auto;padding-right:2px}
.tally-tournament-match{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 14px;border:1px solid var(--tally-line);border-radius:14px;background:#fff}
.tally-tournament-match.is-done{background:#f8fafc}
.tally-tournament-match-main{min-width:0;display:grid;gap:3px}
.tally-tournament-match-main strong{overflow-wrap:anywhere}
.tally-tournament-footer{justify-content:flex-end;margin-top:18px;padding-top:14px;border-top:1px solid var(--tally-line)}
.tally-tournament-game-checks{max-height:240px;overflow:auto;margin-top:8px}
@media(max-width:850px){
  .tally-tournament-columns{grid-template-columns:1fr}
}
@media(max-width:700px){
  .tally-tournament-card{padding:16px}
  .tally-tournament-match{align-items:flex-start;flex-direction:column}
  .tally-tournament-match .tally-actions{width:100%}
  .tally-tournament-match .tally-btn{width:100%;white-space:nowrap}
  .tally-tournament-footer{flex-direction:column}
  .tally-tournament-footer .tally-btn{width:100%}
}
.tally-team-assign-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}
@media(max-width:700px){.tally-team-assign-grid{grid-template-columns:1fr}}


/* v1.10.2 push preference switches */
.tally-notification-preferences{margin-top:20px;padding-top:18px;border-top:1px solid var(--tally-line)}
.tally-notification-preferences-head{display:grid;gap:4px;margin-bottom:10px}
.tally-push-pref-list{display:grid;border-top:1px solid var(--tally-line)}
.tally-push-pref-row{display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:56px;padding:9px 2px;border-bottom:1px solid var(--tally-line);font-weight:700;cursor:pointer}
.tally-push-pref-toggle{appearance:none;-webkit-appearance:none;width:50px;height:30px;flex:0 0 50px;margin:0;border:0;border-radius:999px;background:#cbd5e1;position:relative;transition:background .18s ease;cursor:pointer}
.tally-push-pref-toggle::after{content:"";position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.24);transition:transform .18s ease}
.tally-push-pref-toggle:checked{background:var(--tally-accent)}
.tally-push-pref-toggle:checked::after{transform:translateX(20px)}
.tally-push-pref-toggle:focus-visible{outline:3px solid color-mix(in srgb,var(--tally-accent) 30%,transparent);outline-offset:2px}
.tally-push-pref-toggle:disabled{opacity:.6;cursor:wait}

/* v1.10.3 load error recovery */
.tally-load-error-actions{margin-top:16px}.tally-load-error-actions .tally-btn{min-width:140px}@media(max-width:700px){.tally-load-error-actions .tally-btn{width:100%}}

/* v1.10.7 recent-match header wrapping fix */
.tally-match-top{
  flex-wrap:wrap;
}
.tally-match-top > div:first-child{
  min-width:140px;
  flex:1 1 220px;
}
.tally-match-top h4,
.tally-match-meta{
  word-break:normal;
  overflow-wrap:normal;
}
.tally-winner-badge{
  flex:0 1 auto;
  width:auto;
  max-width:100%;
}
.tally-winner-badge-text{
  overflow-wrap:break-word;
  word-break:normal;
  white-space:normal;
}
@media(max-width:700px){
  .tally-match-top{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    justify-content:stretch;
  }
  .tally-match-top > div:first-child{
    min-width:0;
  }
  .tally-winner-badge{
    justify-self:start;
    max-width:100%;
  }
}

/* v1.10.8 notification feed performance */
.tally-notification-more{display:flex;justify-content:center;margin-top:14px}
@media(max-width:700px){.tally-notification-more .tally-btn{width:100%}}


/* v1.10.11 Canasta quick scoring + autosave */
.tally-canasta-delta{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;align-items:center}
.tally-canasta-signs{display:flex;gap:6px}
.tally-canasta-signs button{min-width:44px;font-size:20px;font-weight:900}
.tally-canasta-signs button.is-active{background:var(--tally-accent);border-color:var(--tally-accent);color:#fff}
.tally-canasta-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.tally-canasta-values button{min-height:42px;font-weight:800}
.tally-canasta-delta [data-round-input]{grid-column:1/-1;width:100%!important}
@media(max-width:520px){.tally-canasta-delta{grid-template-columns:1fr}.tally-canasta-signs{justify-content:stretch}.tally-canasta-signs button{flex:1}.tally-canasta-values{grid-template-columns:repeat(3,minmax(0,1fr))}.tally-canasta-delta [data-round-input]{grid-column:auto}}

/* v1.10.13 standard share icon + Schnapsen stakes */
.tally-share-icon{display:inline-flex;align-items:center;justify-content:center;line-height:0}
.tally-share-icon svg{display:block;width:24px;height:24px}
.tally-schnapsen-stakes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media(max-width:600px){.tally-schnapsen-stakes{grid-template-columns:1fr}}


/* v1.10.14 2er Schnapsen + Revanche */
.tally-round-entry.is-schnapsen-writer{border-color:color-mix(in srgb,var(--tally-accent) 35%,var(--tally-line));background:color-mix(in srgb,var(--tally-accent) 5%,#fff)}
.tally-target-choice .tally-close-choice-actions .tally-btn{min-width:120px}
@media(max-width:600px){.tally-target-choice .tally-close-choice-actions .tally-btn{width:100%}}

/* v1.10.17 Schneider is Schnapsen-only.
   Author CSS on labels can override the browser's default [hidden] rule,
   so enforce it explicitly for this conditional field. */
.tally-app [data-schneider-stake-field][hidden]{
  display:none !important;
}


/* v1.10.21 personal opponent statistics */
.tally-opponent-section{margin-bottom:14px}
.tally-opponent-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.tally-opponent-card{display:flex;align-items:center;gap:13px;min-width:0;padding:15px;border:1px solid var(--tally-line);border-radius:16px;background:#fff}
.tally-opponent-icon{display:flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;border-radius:14px;background:#f4f6fa;font-size:22px}
.tally-opponent-main{min-width:0;display:grid;gap:3px}
.tally-opponent-name{font-size:18px;line-height:1.2;overflow-wrap:break-word}
.tally-opponent-rate{margin-top:3px;font-weight:800}
@media(max-width:600px){.tally-opponent-grid{grid-template-columns:1fr}}

/* v1.10.22 neutral install header icon */
.tally-header-utility-icons .tally-install-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:auto;
  height:auto;
  flex:0 0 auto;
  border-radius:0;
  background:transparent;
  color:inherit;
  font-size:inherit;
  font-weight:inherit;
}


/* v1.10.24 Hosen owi */
.tally-hosn-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0}.tally-hosn-summary>div{display:grid;gap:4px;padding:12px 14px;border:1px solid var(--tally-line);border-radius:14px;background:#f8fafc}.tally-hosn-summary span{font-size:12px;color:var(--tally-muted);font-weight:700}.tally-hosn-summary strong{font-size:20px}.tally-hosn-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tally-hosn-player{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px;border:1px solid var(--tally-line);border-radius:15px;background:#fff}.tally-hosn-player-main{min-width:0;display:grid;gap:4px}.tally-hosn-lives{font-size:18px;letter-spacing:.06em;white-space:nowrap}.tally-hosn-status{font-size:13px;color:var(--tally-muted);font-weight:700}.tally-hosn-player.is-swimming{background:#f0f9ff;border-color:#bae6fd}.tally-hosn-player.is-swimming .tally-hosn-status{color:#0369a1}.tally-hosn-player.is-out{opacity:.68;background:#f8fafc}.tally-hosn-history{display:grid;border-top:1px solid var(--tally-line)}.tally-hosn-history-row{display:grid;grid-template-columns:90px minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 2px;border-bottom:1px solid var(--tally-line);font-size:14px}.tally-hosn-history-row>span:last-child{text-align:right;color:var(--tally-muted);font-weight:700}@media(max-width:700px){.tally-hosn-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.tally-hosn-summary>div{padding:10px}.tally-hosn-summary strong{font-size:17px}.tally-hosn-grid{grid-template-columns:1fr}.tally-hosn-player{align-items:stretch;flex-direction:column}.tally-hosn-player .tally-btn{width:100%}.tally-hosn-history-row{grid-template-columns:72px minmax(0,1fr);}.tally-hosn-history-row>span:last-child{grid-column:2;text-align:left}}

/* v1.10.28: keep rapid score entry stable on touch devices without disabling pinch zoom. */
.tally-app input,.tally-app textarea,.tally-app select,.tally-app button{touch-action:manipulation}
.tally-app input,.tally-app textarea,.tally-app select{font-size:16px!important}
.tally-wurln-rule-card{display:grid;gap:6px;margin:10px 0 14px;padding:12px 14px;border:1px solid var(--tally-line);border-radius:14px;background:#f8fafc}
.tally-wurln-rule-card strong{margin-bottom:2px}
.tally-wurln-rule-card span{font-size:14px;color:var(--tally-muted)}

/* Wurln: all-pass multiplier */
.tally-wurln-multiplier{font-weight:700}
.tally-btn-wurln-pass{border-style:dashed}
.tally-wurln-pass-row td{opacity:.8}
