:root{
  --bg:#eef3f8;
  --panel:#ffffff;
  --panel-soft:#f7fafc;
  --text:#1f2937;
  --muted:#5b6472;
  --line:#d7e0ea;
  --primary:#2f6fa3;
  --primary-soft:#dbeaf7;
  --accent:#f59e0b;
  --accent-soft:#fff4d6;
  --success:#dff5e8;
  --danger:#fde4e4;
  --shadow:0 8px 24px rgba(20, 35, 60, 0.08);
  --radius:14px;
  --radius-sm:10px;
}
html,body{margin:0;padding:0}
body{
  font-family: Arial, Helvetica, sans-serif;
  font-size:14px;
  line-height:1.35;
  color:var(--text);
  background:linear-gradient(180deg,#f6f9fc 0%,#eef3f8 100%);
  padding:18px;
}
a{color:#1f5d90;text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%;height:auto}

.app-shell{max-width:1280px;margin:0 auto}
.app-header{
  max-width:1280px;
  margin:0 auto 18px auto;
  background:rgba(255,255,255,.88);
  backdrop-filter: blur(6px);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:var(--shadow);
  padding:12px 18px 14px;
}
.app-header__top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.app-title{font-size:22px;font-weight:700;letter-spacing:.2px;color:#1c3552;margin:0}
.app-subtitle{font-size:12px;color:var(--muted);margin:0}
.app-nav{display:flex;flex-wrap:wrap;gap:8px}
.app-nav a{
  display:inline-flex;align-items:center;justify-content:center;
  padding:7px 12px;border-radius:999px;border:1px solid #cddaea;
  background:#f8fbfe;color:#254e76;font-weight:600;font-size:13px;
}
.app-nav a:hover{background:#eef5fb;text-decoration:none}

center{display:block}
body > center:first-of-type{margin-bottom:14px}

hr{border:0;border-top:1px solid var(--line);margin:16px 0}

/* generic legacy tables */
table{
  border-collapse:separate !important;
  border-spacing:0;
  margin:10px auto;
}
table[bgcolor="#000000"],
table[bgcolor="#000"],
table[bgcolor="black"],
table[bgcolor="Black"],
table[bgcolor="BLACK"]{
  background:var(--panel) !important;
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
}
table tr:first-child td:first-child{border-top-left-radius:var(--radius)}
table tr:first-child td:last-child{border-top-right-radius:var(--radius)}
table tr:last-child td:first-child{border-bottom-left-radius:var(--radius)}
table tr:last-child td:last-child{border-bottom-right-radius:var(--radius)}

td,th{
  padding:8px 10px;
  border-bottom:1px solid #e8eef5;
  vertical-align:middle;
}
tr:last-child > td{border-bottom:none}

td[bgcolor="#6699CC"], tr[bgcolor="#6699CC"] > td,
th{
  background:
    linear-gradient(180deg, rgba(7,14,32,.52) 0%, rgba(7,14,32,.36) 100%),
    url('images/header_bubble_bg.png') center center / cover no-repeat !important;
  color:#f8fbff !important;
  font-weight:800;
  letter-spacing:.2px;
  text-shadow:0 1px 8px rgba(0,0,0,.55);
  border-bottom:1px solid rgba(255,255,255,.10);
}
td[bgcolor="#99CCFF"], tr[bgcolor="#99CCFF"] > td{
  background:
    linear-gradient(180deg, rgba(10,20,42,.40) 0%, rgba(10,20,42,.26) 100%),
    url('images/header_bubble_bg.png') center center / cover no-repeat !important;
  color:#f5f9ff !important;
  font-weight:800;
  letter-spacing:.15px;
  text-shadow:0 1px 7px rgba(0,0,0,.45);
}
tr[bgcolor="#FF9900"] > td,
td[bgcolor="#FF9900"],
td[bgcolor="orange"], tr[bgcolor="orange"] > td{
  background:var(--accent-soft) !important;
}
tr[bgcolor="white"] > td, td[bgcolor="white"],
tr[bgcolor="#FFFFFF"] > td, td[bgcolor="#FFFFFF"]{
  background:#fff !important;
}
td[bgcolor="gray"], td[bgcolor="lightgray"], td[bgcolor="#AAAAAA"], td[bgcolor="#CCCCCC"]{
  background:#eef2f6 !important;
}
td[bgcolor="green"]{background:#dff3e4 !important}
td[bgcolor="black"]{background:transparent !important;border-bottom:none;padding:4px 0}

h1,h2,h3{margin:0;font-weight:700;line-height:1.2}
h2{font-size:18px}

input[type="text"], input[type="number"], select, textarea{
  font:inherit;
  color:var(--text);
  border:1px solid #cfd8e3;
  background:#fff;
  border-radius:10px;
  padding:7px 9px;
  box-sizing:border-box;
}
input[type="text"]:focus, input[type="number"]:focus, select:focus, textarea:focus{
  outline:none;border-color:#6aa3d7;box-shadow:0 0 0 3px rgba(106,163,215,.18)
}
input[disabled], input[readonly]{background:#f3f6f9}
input[type="submit"], input[type="button"], button{
  font:inherit;
  font-weight:700;
  color:#fff;
  background:linear-gradient(180deg,#2f7e45 0%,#26683a 100%);
  border:1px solid #215a31;
  border-radius:999px;
  padding:8px 14px;
  cursor:pointer;
  box-shadow:0 4px 10px rgba(38,104,58,.18);
}
input[type="submit"]:hover, input[type="button"]:hover, button:hover{filter:brightness(1.04)}
input[value="Poista"], input[name="poista"]{background:linear-gradient(180deg,#c95555 0%,#aa3f3f 100%);border-color:#933838}
input[value="Peru"], input[name="peru"]{background:linear-gradient(180deg,#738195 0%,#5f6c7f 100%);border-color:#566273}
textarea{min-height:84px;width:100%}

/* tighter tables used as lists */
table[width="300"], table[width="200"], table[width="600"]{width:min(100%, attr(width px))}

/* special layout helpers for old pages */
.notice, .error-note{max-width:520px;margin:0 auto 14px}
.small-muted{color:var(--muted);font-size:12px}




/* broader legacy table header coverage */
table > thead > tr:first-child > td,
table > tr:first-child > td{
  background:
    linear-gradient(180deg, rgba(7,14,32,.30) 0%, rgba(7,14,32,.12) 100%),
    url('images/header_bubble_bg.png') center center / cover no-repeat !important;
  color:#f8fbff !important;
  font-weight:800;
  letter-spacing:.2px;
  text-shadow:0 1px 8px rgba(0,0,0,.55);
}

/* table heading readability over banner artwork */
table tr:first-child > td,
table thead th,
table thead td{
  box-shadow:inset 0 -1px 0 rgba(255,255,255,.08), inset 0 1px 0 rgba(255,255,255,.08);
}
.ranking-header h2,
.dashboard-filter-card h2,
.players-wrap h2,
.game-list-header h2{
  color:#eff6ff;
  text-shadow:0 2px 10px rgba(0,0,0,.42);
}

/* responsive */
@media (max-width: 900px){
  body{padding:12px}
  .app-header{padding:12px}
  .app-header__top{align-items:flex-start;flex-direction:column}
  td,th{padding:7px 8px}
  input[type="text"], input[type="number"], select{max-width:100%}
}

/* auth + responsive dashboard overrides */
body{background:linear-gradient(180deg,#d8e1ea 0%,#c8d4e2 100%)}
.app-shell{max-width:1120px;margin:0 auto;width:100%}
.app-header{max-width:1120px;width:100%;margin:0 auto 18px auto;padding:14px 18px 16px;background:rgba(255,255,255,.94)}
.app-header__top--centered{position:relative;justify-content:center;align-items:center;min-height:36px}
.app-brand--full{display:flex;justify-content:center;width:100%}
.app-title{text-align:center;width:100%;font-size:26px}
.app-nav--centered{justify-content:center;width:100%}
.app-userbar{position:absolute;right:0;top:0;display:flex;gap:10px;align-items:center;font-size:12px}
.app-userbar__name{color:var(--muted)}
.app-userbar__link{display:inline-flex;align-items:center;justify-content:center;padding:6px 10px;border-radius:999px;background:#e7f0fa;border:1px solid #c7d7ea;color:#244c74;font-weight:700;text-decoration:none}
.app-userbar__link:hover{text-decoration:none;background:#d9e8f7}
.hero-panel{max-width:1120px;margin:0 auto 18px auto;display:flex;align-items:stretch;background:rgba(255,255,255,.96);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);overflow:hidden}
.hero-panel__image{flex:0 0 260px;max-width:260px;min-height:132px;overflow:hidden}
.hero-panel__image img{display:block;width:100%;height:100%;object-fit:cover}
.hero-panel__content{flex:1;padding:16px 18px;display:flex;flex-direction:column;justify-content:center}
.hero-panel__content h2{margin:0 0 6px 0}
.hero-panel__content p{margin:0;color:var(--muted)}
.dashboard-grid{max-width:1120px;margin:0 auto;display:grid;grid-template-columns:280px minmax(0,1fr);gap:18px;align-items:start}
.dashboard-grid__left,.dashboard-grid__right{min-width:0}
.dashboard-filter-card{position:relative;overflow:hidden;margin:0 0 12px 0;padding:12px 14px;background:rgba(255,255,255,.95);border:1px solid rgba(167,205,255,.42);border-radius:16px;box-shadow:var(--shadow)}
.dashboard-filter-card::before{content:"";position:absolute;inset:0;background:linear-gradient(180deg, rgba(7,14,32,.28) 0%, rgba(7,14,32,.14) 100%), url('images/header_bubble_bg.png') center center / cover no-repeat;opacity:.92;z-index:0}
.dashboard-filter-card > *{position:relative;z-index:1}

.dashboard-filter-card--plain{background:#003192;border-color:#04245f;color:#eff6ff}
.dashboard-filter-card--plain::before{display:none}
.players-table tr.players-column-header > td{
  background:#d7e4f0 !important;
  color:#243b53 !important;
  font-weight:800;
  letter-spacing:.15px;
  text-shadow:none !important;
  border-bottom:1px solid #c4d3e2;
}
.players-table tr.players-column-header > td a{color:inherit !important}
.dashboard-filter-card h2{font-size:17px;margin:0 0 10px 0}
.game-filter-bar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:center}
.game-filter-bar select{min-width:170px;max-width:100%;background:rgba(10,19,42,.46);border:1px solid rgba(255,214,129,.38);color:#f8fbff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.04)}
.game-filter-bar select option{color:#111827;background:#ffffff}
.game-filter-bar input[type="submit"],
.game-filter-bar .admin-delete-games-button{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 16px;color:#fff7dc !important;border:1px solid rgba(255,214,129,.55) !important;background:linear-gradient(180deg, rgba(17,27,56,.72) 0%, rgba(108,49,8,.58) 100%) !important;box-shadow:0 6px 16px rgba(0,0,0,.20), inset 0 0 0 1px rgba(255,255,255,.08);text-shadow:0 1px 3px rgba(0,0,0,.45);text-decoration:none}
.game-filter-bar input[type="submit"]:hover,
.game-filter-bar .admin-delete-games-button:hover{background:linear-gradient(180deg, rgba(25,40,78,.84) 0%, rgba(144,64,12,.72) 100%) !important;text-decoration:none;transform:none;box-shadow:0 6px 16px rgba(0,0,0,.20), inset 0 0 0 1px rgba(255,255,255,.08)}
.ranking-table,.game-list-table{width:100%;margin:0}
.ranking-header{display:flex;align-items:center;justify-content:center;gap:8px;
  margin:-8px -10px;
  padding:10px 12px;
  background:#003192 !important;
  border-radius:inherit;
}
.ranking-table > thead > tr:first-child > td{padding:0 !important;}
.game-list-table > tbody > tr:first-child > td.game-list-title-cell{padding:0 !important;}
.game-list-header{
  display:flex;align-items:center;justify-content:center;gap:8px;
  margin:-8px -10px;
  padding:10px 12px;
  background:#003192 !important;
  border-radius:inherit;
}
.game-list-header h2{
  color:#eff6ff;
  text-shadow:0 2px 10px rgba(0,0,0,.42);
}

.rank-name-cell{width:auto;white-space:nowrap}
.rank-score-cell{width:64px;white-space:nowrap;padding-left:6px;padding-right:6px}
.datetime-compact{display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:11px;line-height:1.05;gap:2px;white-space:nowrap}
.datetime-compact .date{font-weight:700}
.datetime-compact .time{font-size:10px;color:var(--muted)}
.game-datetime-cell{width:92px;padding-left:6px;padding-right:6px;white-space:nowrap}
.game-players-cell{width:190px;padding-left:8px;padding-right:8px}
.game-note-cell{width:auto}
.game-player-row{display:grid;grid-template-columns:24px 1fr 34px;gap:4px;align-items:baseline;font-size:13px;line-height:1.2;margin:0 0 2px 0}
.game-pos{text-align:right}
.game-player-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.game-player-points{text-align:right;white-space:nowrap}
.players-wrap{max-width:980px;margin:0 auto}
.auth-card{max-width:560px;margin:0 auto 20px auto;padding:18px;background:rgba(255,255,255,.96);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow)}
.auth-card--wide{max-width:860px}
.auth-form .form-row{display:flex;flex-direction:column;gap:6px;margin:0 0 12px 0}
.auth-form .form-actions{display:flex;gap:8px;align-items:center;justify-content:flex-start;margin-top:10px}
.small-muted{color:var(--muted);font-size:12px}
@media (max-width: 900px){
  .app-userbar{position:absolute;right:0;top:0;display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:nowrap;margin-top:0;max-width:46%}
  .app-header__top--centered{flex-direction:column;padding-right:150px}
  .app-userbar__name{display:none}
  .hero-panel{flex-direction:column}
  .hero-panel__image{max-width:none;min-height:140px;flex:0 0 auto}
  .dashboard-grid{grid-template-columns:1fr}
}

input[type="password"]{font:inherit;color:var(--text);border:1px solid #cfd8e3;background:#fff;border-radius:10px;padding:7px 9px;box-sizing:border-box;}
input[type="password"]:focus{outline:none;border-color:#6aa3d7;box-shadow:0 0 0 3px rgba(106,163,215,.18)}

.button-link{display:inline-flex;align-items:center;justify-content:center;padding:8px 12px;border-radius:999px;border:1px solid #cddaea;background:#f8fbfe;color:#254e76;font-weight:600;text-decoration:none}
.button-link:hover{background:#eef5fb;text-decoration:none}



.app-shell,
.app-header,
.hero-panel,
.dashboard-grid{
  width:100%;
  max-width:1120px;
  box-sizing:border-box;
}

.app-header{
  max-width:1120px;
}

.players-actions{
  max-width:980px;
  margin:0 auto 12px auto;
  display:flex;
  justify-content:flex-start;
  align-items:center;
  gap:10px;
}

.players-table,
.ranking-table,
.game-list-table{
  width:100%;
}

.players-table tr.data-row:nth-child(even) > td{
  background:#eef5fb !important;
}
.players-table tr.data-row:nth-child(odd) > td{
  background:#fff8e7 !important;
}

.players-table > tr:nth-child(2) > td{
  background:linear-gradient(rgba(0,0,0,.10), rgba(0,0,0,.10)), #eef5fb !important;
  color:#1f2937 !important;
  text-shadow:0 1px 3px rgba(255,255,255,.38) !important;
  font-weight:800;
}

.ranking-table tbody tr:nth-child(even) > td{
  background:#eef5fb !important;
}
.ranking-table tbody tr:nth-child(odd) > td{
  background:#fff8e7 !important;
}

.game-list-table tbody tr:nth-child(even) > td{
  background:#eef5fb !important;
}
.game-list-table tbody tr:nth-child(odd) > td{
  background:#fff8e7 !important;
}

.ranking-table tbody tr > td,
.game-list-table tbody tr > td,
.players-table tr.data-row > td{
  border-bottom:1px solid #dde7f1;
}

@media (max-width: 900px){
  .players-actions{
    justify-content:center;
  }
}



.app-header{
  position:relative;
  overflow:hidden;
  padding-top:12px;
}

.app-header__top--centered{
  min-height:84px;
  padding-right:150px;
}

.app-brand--full{
  display:flex;
  justify-content:center;
  align-items:center;
  width:100%;
  padding:2px 0 10px 0;
}

.app-logo-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  max-width:min(100%, 760px);
  text-decoration:none;
}

.app-logo-wordmark{
  display:block;
  width:min(100%, 760px);
  max-height:74px;
  object-fit:contain;
  object-position:center center;
}

.app-nav--centered{
  justify-content:center;
  width:100%;
  padding-top:2px;
}

.app-userbar{
  position:absolute;
  right:0;
  top:0;
  z-index:2;
}

@media (max-width: 900px){
  .app-header{
    padding-top:12px;
  }
  .app-header__top--centered{
    min-height:72px;
    padding-right:132px;
  }
  .app-logo-link{
    max-width:calc(100% - 12px);
  }
  .app-logo-wordmark{
    width:min(100%, 560px);
    max-height:56px;
  }
  .app-userbar{
    position:absolute;
    right:0;
    top:0;
    max-width:42%;
  }
}


.app-logo-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  max-width:min(100%, 760px);
}
.app-logo-wordmark{
  display:block;
  width:min(100%, 760px);
  max-height:96px;
  object-fit:contain;
  object-position:center center;
}
.app-header__top--centered{
  min-height:104px;
  padding-right:160px;
}
@media (max-width: 900px){
  .app-logo-wordmark{
    width:min(100%, 540px);
    max-height:72px;
  }
  .app-header__top--centered{
    min-height:82px;
    padding-right:140px;
  }
}


/* compact header */
.app-header{
  padding:8px 16px 10px !important;
  border-radius:16px !important;
}
.app-header__top--centered{
  min-height:64px !important;
  padding-right:148px !important;
  margin-bottom:4px !important;
}
.app-brand--full{
  padding:0 0 4px 0 !important;
}
.app-logo-link{
  max-width:min(100%, 520px) !important;
}
.app-logo-wordmark{
  width:min(100%, 520px) !important;
  max-height:58px !important;
  object-fit:contain !important;
}
.app-nav{
  gap:7px !important;
}
.app-nav a{
  padding:6px 11px !important;
}
.app-userbar{
  top:2px !important;
}
@media (max-width: 900px){
  .app-header{
    padding:8px 12px 10px !important;
  }
  .app-header__top--centered{
    min-height:52px !important;
    padding-right:118px !important;
    margin-bottom:4px !important;
  }
  .app-logo-link{
    max-width:min(100%, 360px) !important;
  }
  .app-logo-wordmark{
    width:min(100%, 360px) !important;
    max-height:42px !important;
  }
}




/* single full-width electric/fire bubble behind the whole top banner */
.app-header{
  position:relative;
  overflow:hidden;
  padding:10px 16px 12px !important;
  border-radius:22px !important;
  border:1px solid rgba(167,205,255,.55) !important;
  background:linear-gradient(180deg, rgba(8,18,42,.52) 0%, rgba(17,24,39,.36) 100%) !important;
  box-shadow:0 14px 34px rgba(13,24,45,.22), inset 0 0 0 1px rgba(255,255,255,.06) !important;
}
.app-header::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 18% 35%, rgba(255,176,58,.34) 0%, rgba(255,176,58,0) 26%),
    radial-gradient(circle at 80% 28%, rgba(74,182,255,.38) 0%, rgba(74,182,255,0) 24%),
    linear-gradient(90deg, rgba(255,123,0,.32) 0%, rgba(255,190,60,.22) 24%, rgba(80,190,255,.16) 56%, rgba(24,97,255,.30) 100%),
    url('images/header_bubble_bg.png') center center / cover no-repeat;
  filter:saturate(1.15) contrast(1.08);
  opacity:.82;
  z-index:0;
}
.app-header::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(115deg, rgba(255,199,87,.10) 0%, rgba(255,199,87,0) 34%),
    linear-gradient(245deg, rgba(71,187,255,.14) 0%, rgba(71,187,255,0) 36%),
    repeating-linear-gradient(118deg,
      rgba(255,255,255,.18) 0px,
      rgba(255,255,255,.18) 2px,
      rgba(255,255,255,0) 4px,
      rgba(255,255,255,0) 74px);
  mix-blend-mode:screen;
  opacity:.28;
  pointer-events:none;
  z-index:1;
}
.app-header > *{
  position:relative;
  z-index:2;
}
.app-header__top--centered{
  min-height:72px !important;
  box-sizing:border-box;
  width:calc(100% - 8px);
  margin:0 4px 4px 4px !important;
  padding:6px 148px 6px 10px !important;
  border-radius:18px;
  background:linear-gradient(180deg, rgba(6,14,34,.24) 0%, rgba(6,14,34,.10) 100%);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.07);
}
.app-brand--full{
  padding:0 !important;
}
.app-logo-link{
  max-width:min(100%, 980px) !important;
}
.app-logo-wordmark{
  width:min(100%, 980px) !important;
  max-height:68px !important;
  object-fit:contain !important;
  object-position:center center !important;
  transform:scaleX(1.9) scaleY(1.5);
  transform-origin:center center;
  filter:drop-shadow(0 3px 10px rgba(0,0,0,.45));
}
.app-brand--full{overflow:visible !important;}
.app-userbar{
  top:10px !important;
  right:12px !important;
  z-index:3;
}
.app-userbar__name{
  color:#eef6ff !important;
  text-shadow:0 1px 6px rgba(0,0,0,.45);
}
.app-userbar__link,
.app-nav a{
  color:#fff7dc !important;
  border:1px solid rgba(255,214,129,.55) !important;
  background:linear-gradient(180deg, rgba(17,27,56,.72) 0%, rgba(108,49,8,.58) 100%) !important;
  box-shadow:0 6px 16px rgba(0,0,0,.20), inset 0 0 0 1px rgba(255,255,255,.08);
  text-shadow:0 1px 3px rgba(0,0,0,.45);
}
.app-userbar__link:hover,
.app-nav a:hover{
  background:linear-gradient(180deg, rgba(25,40,78,.84) 0%, rgba(144,64,12,.72) 100%) !important;
  text-decoration:none;
}
.app-nav--centered{
  justify-content:center;
  box-sizing:border-box;
  width:calc(100% - 8px);
  margin:0 4px;
  gap:8px !important;
  padding:4px 8px 2px 8px;
  border-radius:18px;
  background:linear-gradient(180deg, rgba(9,19,43,.24) 0%, rgba(9,19,43,.10) 100%);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);
}
@media (max-width: 900px){
  .app-header{
    padding:8px 10px 10px !important;
    border-radius:18px !important;
  }
  .app-header__top--centered{
    min-height:58px !important;
    box-sizing:border-box;
    width:calc(100% - 8px);
    margin:0 4px 4px 4px !important;
    padding:8px 118px 8px 8px !important;
  }
  .app-logo-link{
    max-width:min(100%, 520px) !important;
  }
  .app-logo-wordmark{
    width:min(100%, 520px) !important;
    max-height:46px !important;
  }
  .app-userbar{
    top:8px !important;
    right:8px !important;
    max-width:44%;
  }
  .app-nav--centered{
    width:calc(100% - 8px);
    margin:0 4px;
    gap:7px !important;
    padding:4px 6px 2px 6px;
  }
}


/* Uusimmat pelit: päivämäärä mustaksi, vain varjostus */
.game-list-table .datetime-compact .date,
.game-list-table .datetime-compact .time{
  color:#111111 !important;
  text-shadow:0 1px 4px rgba(255,255,255,.35), 0 1px 2px rgba(0,0,0,.18) !important;
}

/* Uusimmat pelit: ensimmäinen sarake hieman tummemmaksi kuin muut */
.game-list-table tbody tr:nth-child(even) > td:first-child{
  background:#d7e4f0 !important;
}
.game-list-table tbody tr:nth-child(odd) > td:first-child{
  background:#efe2c6 !important;
}


.rank-last-play-cell{width:96px;white-space:nowrap;padding-left:8px;padding-right:8px}
.rank-last-play-link{color:#1f2937;text-decoration:none;font-weight:700;text-shadow:0 1px 3px rgba(255,255,255,.45)}
.rank-last-play-link:hover{text-decoration:underline}
.rank-last-play-meta{display:flex;align-items:center;justify-content:center;min-height:18px;margin-bottom:4px}
.rank-recent-balls{display:flex;align-items:center;justify-content:center;gap:5px;min-height:14px}
.rank-recent-ball{display:inline-block;width:10px;height:10px;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(255,255,255,.32), 0 1px 2px rgba(0,0,0,.24)}
.rank-recent-ball--deep-red{background:#8b1e1e}
.rank-recent-ball--orange{background:#d97706}
.rank-recent-ball--yellow{background:#d4b106}
.rank-recent-ball--light-green{background:#7ccf5b}
.rank-recent-ball--deep-green{background:#1f7a1f}
.rank-recent-ball--empty{background:#d7dee6;opacity:.45}
.online-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-left:8px;
  padding:2px 7px;
  border-radius:999px;
  font-size:10px;
  line-height:1.2;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#ffffff;
  vertical-align:middle;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.16), 0 1px 2px rgba(0,0,0,.18);
}
.online-badge--green{background:#2f9e44;}
.online-badge--yellow{background:#c99700;color:#1f2937;}
.online-badge--red{background:#c92a2a;}
.ranking-table tbody tr:nth-child(even) > td.rank-name-cell{
  background:linear-gradient(rgba(0,0,0,.10), rgba(0,0,0,.10)), #eef5fb !important;
}
.ranking-table tbody tr:nth-child(odd) > td.rank-name-cell{
  background:linear-gradient(rgba(0,0,0,.10), rgba(0,0,0,.10)), #fff8e7 !important;
}
@media (max-width: 900px){
  .ranking-table{table-layout:fixed;}
  .rank-name-cell{
    width:auto;
    white-space:normal;
    font-size:13px;
    line-height:1.15;
    padding:6px 7px;
    vertical-align:top;
  }
  .rank-name-cell > a{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .rank-name-cell .online-badge{
    display:inline-flex;
    margin-left:0;
    margin-top:4px;
    padding:1px 6px;
    font-size:9px;
  }
  .rank-last-play-cell{
    display:table-cell;
    width:72px;
    padding:5px 4px;
  }
  .rank-last-play-meta{
    min-height:0;
    margin-bottom:2px;
  }
  .rank-last-play-link{
    font-weight:400;
    font-size:11px;
    line-height:1.05;
  }
  .rank-recent-balls{
    gap:3px;
    min-height:10px;
  }
  .rank-recent-ball{
    width:8px;
    height:8px;
  }
  .rank-score-cell{
    width:58px;
    padding-left:4px;
    padding-right:4px;
    font-size:12px;
  }
}

@media (max-width: 560px){
  .rank-name-cell{font-size:12px;padding:5px 6px;}
  .rank-last-play-cell{width:64px;padding-left:3px;padding-right:3px;}
  .rank-last-play-link{font-size:10px;}
  .rank-recent-balls{gap:2px;}
  .rank-recent-ball{width:7px;height:7px;}
  .rank-score-cell{width:54px;font-size:11px;}
}


/* Jatka peliä / Näytä peli: vain taulukon otsikkorivi käyttää banneritaustaa */
.game-score-table{
  border-collapse:separate;
  border-spacing:0;
}
.game-score-table tr:first-child > td{
  background:#003192 !important;
  background-image:none !important;
  color:#f8fbff !important;
  text-shadow:0 2px 8px rgba(0,0,0,.45);
}
.game-score-table tr:first-child h2{
  color:#ffffff !important;
  text-shadow:0 2px 10px rgba(0,0,0,.50);
}
.game-score-table tr:nth-child(2n+2) > td{
  background:#eef5fb !important;
}
.game-score-table tr:nth-child(2n+3) > td{
  background:#fff8e7 !important;
}
.game-score-table tr:nth-child(2n+2) > td:first-child{
  background:linear-gradient(rgba(0,0,0,.10), rgba(0,0,0,.10)), #eef5fb !important;
}
.game-score-table tr:nth-child(2n+3) > td:first-child{
  background:linear-gradient(rgba(0,0,0,.10), rgba(0,0,0,.10)), #fff8e7 !important;
}
.game-score-table tr > td{
  border-bottom:1px solid #dde7f1;
}
.game-score-table tr:not(:first-child) > td:first-child{
  color:#1f2937 !important;
  font-weight:700;
  text-shadow:0 1px 3px rgba(255,255,255,.38);
}
.game-score-table input[type="text"],
.game-score-table textarea{
  max-width:100%;
}


/* Jatka peliä / Näytä peli: toimintanapit samaan tyyliin kuin päänäytön napit */
.game-score-table input[value="Välitallenna"],
.game-score-table input[value="OK"],
.game-score-table input#final{
  color:#fff7dc !important;
  border:1px solid rgba(255,214,129,.55) !important;
  background:linear-gradient(180deg, rgba(17,27,56,.72) 0%, rgba(108,49,8,.58) 100%) !important;
  box-shadow:0 6px 16px rgba(0,0,0,.20), inset 0 0 0 1px rgba(255,255,255,.08);
  text-shadow:0 1px 3px rgba(0,0,0,.45);
  border-radius:999px;
  padding:8px 16px;
  min-width:140px;
  font-weight:700;
}
.game-score-table input[value="Välitallenna"]:hover,
.game-score-table input[value="OK"]:hover,
.game-score-table input#final:hover{
  background:linear-gradient(180deg, rgba(25,40,78,.84) 0%, rgba(144,64,12,.72) 100%) !important;
}
.game-score-table input[value="OK"]:disabled,
.game-score-table input#final:disabled{
  color:#d9d9d9 !important;
  border:1px solid rgba(255,255,255,.18) !important;
  background:linear-gradient(180deg, rgba(70,70,70,.70) 0%, rgba(38,38,38,.78) 100%) !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.03);
  text-shadow:none;
  opacity:.72;
  cursor:not-allowed;
  filter:grayscale(.35);
}
.game-score-table input[value="OK"]:disabled:hover,
.game-score-table input#final:disabled:hover{
  background:linear-gradient(180deg, rgba(70,70,70,.70) 0%, rgba(38,38,38,.78) 100%) !important;
}




.main-menu-like-button{
  font:inherit !important;
  font-weight:700 !important;
  color:#fff !important;
  background:linear-gradient(180deg,#2f7e45 0%,#26683a 100%) !important;
  border:1px solid #215a31 !important;
  border-radius:999px !important;
  padding:8px 14px !important;
  cursor:pointer !important;
  box-shadow:0 4px 10px rgba(38,104,58,.18) !important;
}
.main-menu-like-button:hover{filter:brightness(1.04);}

/* Syötä uuden pelin alkutiedot: sama sininen otsikkotausta kuin hakupaneeleissa */
.new-game-setup-table tr:first-child > td{
  background:#003192 !important;
  color:#f8fbff !important;
  text-shadow:none !important;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.new-game-setup-table tr:not(:first-child) > td[bgcolor="#6699CC"],
.new-game-setup-table tr:not(:first-child)[bgcolor="#6699CC"] > td{
  background:linear-gradient(rgba(0,0,0,.10), rgba(0,0,0,.10)), #eef5fb !important;
  color:#1f2937 !important;
  text-shadow:0 1px 3px rgba(255,255,255,.38) !important;
}
.new-game-setup-table tr:not(:first-child) > td[bgcolor="#99CCFF"],
.new-game-setup-table tr:not(:first-child)[bgcolor="#99CCFF"] > td,
.new-game-setup-table tr:not(:first-child) > td[align="right"][bgcolor="#99CCFF"]{
  background:linear-gradient(rgba(0,0,0,.10), rgba(0,0,0,.10)), #fff8e7 !important;
  color:#1f2937 !important;
  text-shadow:0 1px 3px rgba(255,255,255,.38) !important;
}
.new-game-setup-table tr > td[bgcolor="#FF9900"],
.new-game-setup-table tr[bgcolor="#FF9900"] > td,
.new-game-setup-table tr > td[bgcolor="white"],
.new-game-setup-table tr[bgcolor="white"] > td,
.new-game-setup-table tr > td[bgcolor="#FFFFFF"],
.new-game-setup-table tr[bgcolor="#FFFFFF"] > td{
  color:#1f2937 !important;
  text-shadow:none !important;
}


.game-filter-actions{margin-top:10px;display:flex;justify-content:center}
.admin-delete-games-button,.delete-game-action-link{display:inline-flex;align-items:center;justify-content:center;padding:8px 14px;border-radius:999px;text-decoration:none;font-weight:700;background:linear-gradient(180deg,#ffe28a 0%,#ff9d2f 52%,#db5d15 100%);color:#2b1400;border:1px solid rgba(88,33,0,.35);box-shadow:0 6px 18px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.45)}
.admin-delete-games-button:hover,.delete-game-action-link:hover{text-decoration:none;transform:translateY(-1px);box-shadow:0 8px 22px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.45)}
.delete-game-action-cell{padding:8px 10px;white-space:nowrap}

.stats-tabs-screen{
  max-width:1520px;
  margin:0 auto;
}
.stats-tab-bar{
  display:flex;
  gap:10px;
  justify-content:center;
  margin:8px auto 18px;
  flex-wrap:wrap;
}
.stats-tab-button{
  border:1px solid #d7e3ee;
  background:linear-gradient(180deg, rgba(16,45,74,.92), rgba(9,29,48,.92));
  color:#fff;
  padding:8px 16px;
  font-weight:700;
  cursor:pointer;
}
.stats-tab-button.is-active{
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.28);
  filter:brightness(1.08);
}
.stats-tab-panel{display:none;}
.stats-tab-panel.is-active{display:block;}
.stats-player-detail-layout{
  display:grid;
  grid-template-columns:minmax(220px,270px) minmax(0,1fr);
  gap:24px;
  align-items:start;
}
.stats-player-detail-layout__sidebar{display:flex;flex-direction:column;gap:18px;}
.stats-player-detail-layout__sidebar > .stats-filter-card,
.stats-player-detail-layout__sidebar > .stats-player-card{
  width:100%;
  max-width:270px;
  box-sizing:border-box;
  margin-left:0;
  margin-right:0;
}
.stats-player-detail-layout__main{min-width:0;}
.section-title-box{
  display:inline-block;
  padding:6px 14px;
  border:1px solid rgba(242,248,255,.9);
  background:linear-gradient(180deg, rgba(17,43,69,.88), rgba(9,26,42,.9));
}
.section-title-box h2{margin:0;}
.section-title-box--stats{
  padding:7px 16px;
  background:linear-gradient(180deg, rgba(13,34,55,.94), rgba(8,21,36,.94));
  border:1px solid rgba(241,247,255,.9);
  box-shadow:0 10px 22px rgba(0,0,0,.16);
}
.stats-players-panel{
  display:flex;
  flex-direction:column;
  gap:18px;
  align-items:center;
}
.stats-filter-card{
  width:min(100%, 620px);
  margin:0 auto;
  text-align:center;
  color:#eef6ff;
  background:#003192;
  border-color:#04245f;
}
.stats-filter-card::before{display:none}
.stats-filter-card h2{
  margin:0 0 12px 0;
  color:#ffffff;
  text-shadow:0 1px 3px rgba(0,0,0,.35);
}
.stats-player-search-form{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
}
.stats-player-search-form select,
.stats-player-search-form input[type="submit"]{
  min-height:38px;
}
.stats-player-search-form select{
  min-width:220px;
  max-width:100%;
  padding:8px 12px;
  background:rgba(13,27,48,.52);
  color:#f8fbff;
  border:1px solid rgba(255,214,129,.42);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);
}
.stats-player-search-form select option{color:#111827;background:#fff;}
.stats-player-search-form input[type="submit"]{
  padding:8px 16px;
  color:#fff7dc !important;
  border:1px solid rgba(255,214,129,.55) !important;
  background:linear-gradient(180deg, rgba(17,27,56,.72) 0%, rgba(108,49,8,.58) 100%) !important;
  box-shadow:0 6px 16px rgba(0,0,0,.20), inset 0 0 0 1px rgba(255,255,255,.08);
  text-shadow:0 1px 3px rgba(0,0,0,.45);
}
.stats-player-detail-layout{
  grid-template-columns:minmax(285px,352px) minmax(0,1fr);
  gap:24px;
}
.stats-overview-card,
.stats-player-card{
  width:min(100%, 1180px);
  background:rgba(248,252,255,.96);
  border:1px solid rgba(152,175,201,.55);
  box-shadow:0 16px 30px rgba(15,23,42,.12);
  padding:18px 20px 20px;
}
.stats-player-card{width:100%;}
.stats-score-column--player-card .stats-score-column__title{
  background:#cedbea;
}
.stats-score-column--player-card .stats-score-row{
  grid-template-columns:78px minmax(0,1fr);
  padding:8px 12px;
}
.stats-score-column--player-card .stats-score-player{
  font-size:14px;
}
.stats-score-column--player-card .stats-score-date{
  font-size:11px;
}
.stats-overview-card__header,
.stats-player-card__header{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  margin-bottom:18px;
  text-align:center;
}
.stats-overview-card__summary,
.stats-player-card__facts{
  color:#3d5268;
  font-size:15px;
}
.stats-player-card__name{
  font-size:28px;
  font-weight:700;
  color:#112b45;
}
.stats-player-card__facts{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px 18px;
}
.stats-player-summary{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  margin-bottom:18px;
}
.stats-player-summary__item{
  background:linear-gradient(180deg, rgba(245,249,253,.98), rgba(233,241,249,.98));
  border:1px solid #d5e1ec;
  padding:10px 12px;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.stats-player-summary__label{
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#61758a;
}
.stats-player-summary__value{
  font-size:22px;
  line-height:1.1;
  color:#122f4b;
  font-variant-numeric:tabular-nums;
}
.stats-player-card__sections{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.stats-player-card__section{
  min-width:0;
}
.stats-score-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:18px;
}
.stats-score-grid--compact{gap:14px;}
.stats-score-column{
  background:#ffffff;
  border:1px solid #d5e0eb;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
}
.stats-score-column__title{
  padding:10px 14px;
  text-align:center;
  font-weight:700;
  color:#20364a;
  background:#d5e2ef;
  border-bottom:1px solid #c2d2e1;
}
.stats-score-list{display:flex;flex-direction:column;}
.stats-score-row{
  display:grid;
  grid-template-columns:92px minmax(0,1fr);
  gap:12px;
  align-items:center;
  padding:9px 14px;
  border-bottom:1px solid #d7e2ec;
}
.stats-score-row:nth-child(odd){background:#f6faff;}
.stats-score-row:nth-child(even){background:#eaf2f9;}
.stats-score-row:last-child{border-bottom:none;}
.stats-score-row--empty{grid-template-columns:minmax(0,1fr);}
.stats-score-points{
  display:block;
  text-align:right;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  color:#173b5f;
  text-decoration:none;
  white-space:nowrap;
}
.stats-score-points:hover{text-decoration:underline;}
.stats-score-meta{
  display:flex;
  align-items:baseline;
  gap:8px;
  min-width:0;
  flex-wrap:wrap;
}
.stats-score-player{
  color:#0f2740;
  font-weight:600;
  text-decoration:none;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width:100%;
}
.stats-score-player:hover{text-decoration:underline;}
.stats-score-date{
  color:#61758a;
  font-size:12px;
  white-space:nowrap;
}
.stats-score-empty{
  color:#6b7f93;
  text-align:center;
}
.stats-placement-card{
  margin-top:18px;
  background:#fff;
  border:1px solid #d5e0eb;
  padding:14px;
}
.stats-placement-card__title{
  text-align:center;
  font-weight:700;
  color:#20364a;
  margin-bottom:12px;
}
.stats-placement-card--player-card{
  margin-top:0;
}
.stats-placement-row{
  display:grid;
  grid-template-columns:72px minmax(0,1fr) 56px;
  gap:10px;
  align-items:center;
  padding:6px 0;
}
.stats-placement-row__label{font-weight:600;color:#28435f;}
.stats-placement-row__label span{color:#6b7f93;font-weight:500;}
.stats-placement-row__bar{
  height:14px;
  background:#e6eef6;
  border:1px solid #d3deea;
  overflow:hidden;
}
.stats-placement-row__bar span{
  display:block;
  height:100%;
  background:linear-gradient(180deg, #73a2d2 0%, #406d9a 100%);
}
.stats-placement-row__value{
  text-align:right;
  font-variant-numeric:tabular-nums;
  color:#22384f;
  font-weight:600;
}
.rank-analyzer-panel{
  background:rgba(255,255,255,.76);
  border:1px solid rgba(129,152,176,.5);
  padding:14px;
  backdrop-filter:blur(4px);
}
.rank-analyzer-panel.is-fullscreen{
  padding:20px;
  background:rgba(243,248,252,.98);
  box-sizing:border-box;
  height:100%;
  overflow:hidden;
}
.rank-analyzer-layout{
  display:grid;
  grid-template-columns:minmax(250px,290px) minmax(0,1fr);
  gap:18px;
  align-items:start;
}
.rank-analyzer-panel.is-fullscreen .rank-analyzer-layout{
  height:100%;
  align-items:stretch;
}
.rank-analyzer-sidebar{
  background:rgba(12,32,51,.86);
  color:#fff;
  border:1px solid rgba(225,236,246,.6);
  padding:10px;
  display:flex;
  flex-direction:column;
  min-height:0;
}
.rank-analyzer-sidebar__title{
  font-weight:700;
  margin-bottom:10px;
  text-align:center;
}
.rank-player-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  flex:1 1 auto;
  min-height:0;
}
.rank-player-list__head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  padding:0 8px 6px;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#dbe8f4;
}
.rank-player-list__body{
  max-height:560px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:3px;
  padding-right:3px;
  flex:1 1 auto;
  min-height:0;
}
.rank-analyzer-panel.is-fullscreen .rank-player-list__body{
  max-height:none;
}
.rank-player-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  width:100%;
  border:1px solid rgba(190,212,231,.18);
  background:rgba(255,255,255,.08);
  color:#fff;
  padding:5px 8px;
  text-align:left;
  cursor:pointer;
  min-height:30px;
}
.rank-player-row:hover{background:rgba(255,255,255,.14);}
.rank-player-row.is-selected{
  background:rgba(255,255,255,.2);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.22);
}
.rank-player-row__lead{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.rank-player-row__swatch{
  width:11px;
  height:11px;
  flex:0 0 11px;
  background:var(--player-color, #9db7cf);
  border:1px solid rgba(255,255,255,.65);
}
.rank-player-row__name{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px;
  line-height:1.2;
}
.rank-player-row__score{
  font-size:12px;
  color:#cfe0f0;
  white-space:nowrap;
}
.rank-analyzer-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  min-height:0;
}
.rank-analyzer-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin-bottom:10px;
  flex-wrap:wrap;
}
.rank-analyzer-header h2{
  margin:0;
}
.rank-analyzer-actions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.rank-analyzer-btn{
  border:1px solid rgba(24,60,95,.35);
  background:#f2f7fb;
  color:#163650;
  padding:8px 12px;
  font-weight:700;
  cursor:pointer;
}
.rank-graph-stage{
  position:relative;
  min-height:620px;
  background:#eef4f8;
  border:1px solid rgba(139,164,186,.72);
  overflow:hidden;
  padding:16px 18px 96px 112px;
  box-sizing:border-box;
  flex:1 1 auto;
}
.rank-analyzer-panel.is-fullscreen .rank-graph-stage{
  min-height:0;
}
.rank-graph-svg{
  width:100%;
  height:100%;
  display:block;
  cursor:crosshair;
}
.rank-graph-tooltip{
  position:absolute;
  z-index:20;
  max-width:min(380px, calc(100% - 24px));
  background:rgba(8,26,42,.94);
  color:#fff;
  border:1px solid rgba(225,236,246,.55);
  padding:8px 10px;
  pointer-events:none;
  box-shadow:0 8px 22px rgba(0,0,0,.24);
}
.rank-graph-tooltip__line{font-weight:700; margin-bottom:2px;}
.rank-graph-tooltip__subline{font-size:12px; line-height:1.3; color:#dce8f3;}
.rank-graph-empty{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#27435b;
  font-weight:700;
  background:rgba(238,244,248,.82);
}
.rank-graph-time-filter{
  position:absolute;
  left:112px;
  right:18px;
  bottom:14px;
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:10px 12px;
  border:1px solid rgba(24,60,95,.18);
  background:rgba(255,255,255,.92);
  box-shadow:0 4px 10px rgba(12,32,51,.08);
}
.rank-graph-time-filter__row{
  display:grid;
  grid-template-columns:44px minmax(0,1fr) 82px;
  gap:10px;
  align-items:center;
}
.rank-graph-time-filter__title,
.rank-graph-time-filter__value,
.rank-graph-y-filter__title,
.rank-graph-y-filter__value{
  font-size:12px;
  font-weight:700;
  color:#27435b;
  white-space:nowrap;
}
.rank-graph-time-filter__value{text-align:right;}
.rank-graph-time-filter__input,
.rank-graph-y-filter__input{
  -webkit-appearance:none;
  appearance:none;
  background:transparent;
  width:100%;
  margin:0;
}
.rank-graph-time-filter__input::-webkit-slider-runnable-track,
.rank-graph-y-filter__input::-webkit-slider-runnable-track{
  height:6px;
  border:none;
  border-radius:999px;
  background:rgba(24,60,95,.18);
}
.rank-graph-time-filter__input::-moz-range-track,
.rank-graph-y-filter__input::-moz-range-track{
  height:6px;
  border:none;
  border-radius:999px;
  background:rgba(24,60,95,.18);
}
.rank-graph-time-filter__input::-webkit-slider-thumb,
.rank-graph-y-filter__input::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  width:18px;
  height:18px;
  border-radius:50%;
  background:#143b63;
  border:2px solid #f7fbff;
  box-shadow:0 2px 8px rgba(12,32,51,.24);
  cursor:pointer;
  margin-top:-6px;
}
.rank-graph-time-filter__input::-moz-range-thumb,
.rank-graph-y-filter__input::-moz-range-thumb{
  width:18px;
  height:18px;
  border-radius:50%;
  background:#143b63;
  border:2px solid #f7fbff;
  box-shadow:0 2px 8px rgba(12,32,51,.24);
  cursor:pointer;
}
.rank-graph-y-filter{
  position:absolute;
  left:12px;
  top:18px;
  bottom:104px;
  width:88px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  align-items:center;
}
.rank-graph-y-filter__control{
  width:100%;
  height:48%;
  display:grid;
  grid-template-rows:auto 1fr auto;
  justify-items:center;
  gap:8px;
  padding:8px 6px;
  border:1px solid rgba(24,60,95,.14);
  background:rgba(255,255,255,.9);
  box-shadow:0 4px 10px rgba(12,32,51,.06);
}
.rank-graph-y-filter__input-wrap{
  position:relative;
  width:100%;
  min-height:220px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.rank-graph-y-filter__input-wrap::before{
  content:"";
  position:absolute;
  left:50%;
  top:8px;
  bottom:8px;
  width:6px;
  transform:translateX(-50%);
  border-radius:999px;
  background:rgba(24,60,95,.18);
}
.rank-graph-y-filter__input{
  position:absolute;
  width:220px;
  transform:rotate(-90deg);
  transform-origin:center;
}
@media (max-width: 1100px){
  .stats-player-detail-layout,
  .rank-analyzer-layout,
  .stats-score-grid{
    grid-template-columns:1fr;
  }
  .stats-player-detail-layout__sidebar{
    align-items:center;
  }
  .stats-player-detail-layout__sidebar > .stats-filter-card,
  .stats-player-detail-layout__sidebar > .stats-player-card{
    margin-left:auto;
    margin-right:auto;
  }
  .rank-player-list__body{max-height:260px;}
  .rank-graph-stage{padding:16px 14px 118px 88px; min-height:560px;}
  .rank-graph-time-filter{left:88px; right:14px;}
  .rank-graph-y-filter{width:68px;}
  .rank-graph-y-filter__control{padding:6px 4px;}
  .rank-graph-y-filter__title,
  .rank-graph-y-filter__value,
  .rank-graph-time-filter__title,
  .rank-graph-time-filter__value{font-size:11px;}
}


@media (max-width: 900px){
  .stats-player-summary{
    grid-template-columns:1fr;
  }
}



.section-title-box h2,
.section-title-box--stats h2{
  color:#ffffff !important;
  text-shadow:0 2px 10px rgba(0,0,0,.42);
}

.stats-overview-card,
.stats-player-card,
.stats-rounds-card{
  border-radius:18px;
  overflow:hidden;
}

.stats-score-column,
.stats-placement-card,
.stats-rounds-table-wrap{
  border-radius:16px;
  overflow:hidden;
}

.stats-score-column{
  border:1px solid #d5e0eb;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
}
.stats-score-column__title,
.stats-placement-card__title,
.stats-rounds-table thead th{
  background:linear-gradient(rgba(0,0,0,.10), rgba(0,0,0,.10)), #d7e4f0 !important;
  color:#1f2937 !important;
  text-shadow:0 1px 3px rgba(255,255,255,.38) !important;
  border-bottom:1px solid #c4d3e2;
}
.stats-score-row:nth-child(odd),
.stats-rounds-table tbody tr:nth-child(odd){
  background:#fff8e7;
}
.stats-score-row:nth-child(even),
.stats-rounds-table tbody tr:nth-child(even){
  background:#eef5fb;
}
.stats-rounds-panel{
  display:flex;
  flex-direction:column;
  gap:18px;
  align-items:center;
}
.stats-rounds-card{
  width:min(100%, 820px);
  background:rgba(248,252,255,.96);
  border:1px solid rgba(152,175,201,.55);
  box-shadow:0 16px 30px rgba(15,23,42,.12);
  padding:18px 20px 20px;
}
.stats-rounds-card__header{
  display:flex;
  justify-content:center;
  margin-bottom:16px;
}
.stats-rounds-summary,
.stats-rounds-empty{
  text-align:center;
  color:#3d5268;
  margin-bottom:14px;
}
.stats-rounds-table-wrap{
  border:1px solid #d5e0eb;
  background:#ffffff;
}
.stats-rounds-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
}
.stats-rounds-table thead th{
  padding:11px 14px;
  font-weight:700;
  text-align:left;
}
.stats-rounds-table tbody td{
  padding:10px 14px;
  border-bottom:1px solid #dde7f1;
  color:#1f2937;
}
.stats-rounds-table tbody tr:last-child td{
  border-bottom:none;
}
.stats-rounds-table tbody td:last-child{
  font-variant-numeric:tabular-nums;
}
.stats-rounds-table--compare tbody td{
  font-weight:400 !important;
  text-align:center !important;
}
.stats-rounds-table--compare tbody td:last-child{
  font-weight:400 !important;
  text-align:center !important;
}
.stats-score-date{
  color:#61758a;
  font-size:12px;
  white-space:nowrap;
  text-decoration:none;
}
.stats-score-date:hover{text-decoration:underline;}
@media (max-width: 900px){
  .stats-score-grid{grid-template-columns:1fr;}
  .stats-player-detail-layout{grid-template-columns:1fr;}
}


.stats-player-search-form--rounds{
  flex-direction:column;
  align-items:center;
}
.stats-player-search-form__multiselect{
  width:min(100%, 360px);
  min-width:280px;
  min-height:190px !important;
}
.stats-player-search-form__hint{
  font-size:13px;
  color:#dbe8f4;
}
.stats-rounds-card{
  width:min(100%, 1180px);
}
.stats-rounds-table--compare thead th,
.stats-rounds-table--compare tbody td{
  text-align:center;
}
.stats-rounds-table--compare thead th:first-child,
.stats-rounds-table--compare tbody td:first-child{
  text-align:left;
}
.stats-rounds-player-head{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.stats-rounds-player-head__name{
  color:#163650;
  font-weight:700;
  text-decoration:none;
}
.stats-rounds-player-head__name:hover{
  text-decoration:underline;
}
.stats-rounds-player-head__count{
  font-size:12px;
  color:#4b6074;
  font-weight:600;
}


/* Pelaajat- ja Asetukset-näkymien otsikot samaan siniseen tyyliin */
.players-table > tr:first-child > td,
.players-table > tbody > tr:first-child > td{
  background:#003192 !important;
  background-image:none !important;
  color:#f8fbff !important;
  text-shadow:none !important;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.players-table > tr:first-child > td h2,
.players-table > tbody > tr:first-child > td h2{
  color:#eff6ff !important;
  text-shadow:0 2px 10px rgba(0,0,0,.42) !important;
}
.settings-panel-header{
  margin:-18px -18px 14px -18px;
  padding:10px 12px;
  background:#003192;
  border-radius:18px 18px 0 0;
  text-align:center;
}
.settings-panel-header h2{
  margin:0;
  color:#eff6ff;
  text-shadow:0 2px 10px rgba(0,0,0,.42);
}


/* Pelaajat-listan otsikko varmasti samaan siniseen tyyliin */
.players-wrap .players-table tr:first-child,
.players-wrap .players-table > tbody > tr:first-child{
  background:#003192 !important;
  background-image:none !important;
}
.players-wrap .players-table tr:first-child > td[colspan],
.players-wrap .players-table > tbody > tr:first-child > td[colspan],
.players-wrap .players-table tr:first-child > td,
.players-wrap .players-table > tbody > tr:first-child > td{
  background:#003192 !important;
  background-image:none !important;
  color:#f8fbff !important;
  text-align:center !important;
}
.players-wrap .players-table tr:first-child > td h2,
.players-wrap .players-table > tbody > tr:first-child > td h2{
  color:#eff6ff !important;
  text-shadow:0 2px 10px rgba(0,0,0,.42) !important;
}

.game-score-layout{
  --game-shared-width:min(100%, 980px);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  width:100%;
  max-width:var(--game-shared-width);
  margin:12px auto 10px;
}
.game-score-layout__table{
  min-width:0;
  width:100%;
  display:flex;
  justify-content:center;
}
.game-score-layout__table .game-score-table{
  margin:0 auto !important;
  width:auto !important;
  max-width:100%;
}
.game-chat-wrap{
  width:100%;
  max-width:var(--game-shared-width, min(100%, 980px));
  margin:12px auto 18px;
  box-sizing:border-box;
}
.game-chat-panel{
  width:100%;
  min-width:0;
  background:rgba(255,255,255,.96);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:var(--shadow);
  overflow:hidden;
  font-size:13px;
}
.game-chat-panel__header{
  background:#003192;
  color:#eff6ff;
  padding:12px 14px 11px;
}
.game-chat-panel__header h2{color:#fff;margin:0 0 3px 0;font-size:16px;text-shadow:0 2px 10px rgba(0,0,0,.36);}
.game-chat-panel__sub{font-size:11px;opacity:.9;line-height:1.35;}
.game-chat-notice{margin:10px 12px 0;padding:8px 10px;border-radius:12px;font-weight:700;font-size:12px;}
.game-chat-notice--success{background:#dff5e8;color:#1f5f38;}
.game-chat-notice--error{background:#fde4e4;color:#9b2c2c;}
.game-chat-list{padding:10px;display:flex;flex-direction:column;gap:8px;max-height:720px;overflow:auto;background:#f7fbff;}
.game-chat-empty,.game-chat-login-note{padding:12px;color:var(--muted);text-align:center;font-size:12px;}
.game-chat-message{
  min-width:0;
  background:#fff;
  border:1px solid #dce7f2;
  border-radius:14px;
  padding:8px 10px;
  box-shadow:0 4px 12px rgba(20,35,60,.05);
}
.game-chat-message,
.game-chat-message *{
  writing-mode:horizontal-tb;
  text-orientation:mixed;
}
.game-chat-message__meta{display:flex;justify-content:space-between;gap:10px;align-items:baseline;margin-bottom:5px;}
.game-chat-message__sender{font-weight:800;color:#183b62;font-size:14px;}
.game-chat-message__time{font-size:11px;color:#607086;white-space:nowrap;}
.game-chat-message__text{
  display:block;
  min-width:0;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  word-break:normal;
  color:#1f2937;
  line-height:1.45;
  font-size:13px;
}
.game-chat-attachment{display:flex;flex-direction:column;gap:6px;align-items:flex-start;margin-top:8px;min-width:0;}
.game-chat-attachment__image-link{display:inline-flex;max-width:100%;flex:0 0 auto;}
.game-chat-attachment__thumb{
  display:block;
  width:auto;
  height:auto;
  max-width:min(100%, 400px);
  max-height:260px;
  object-fit:contain;
  border-radius:12px;
  border:1px solid #d6e1ec;
  box-shadow:0 2px 8px rgba(20,35,60,.08);
  background:#fff;
}
.game-chat-attachment__meta{display:flex;flex-direction:column;gap:3px;min-width:0;max-width:100%;}
.game-chat-attachment__meta a{font-weight:700;word-break:break-word;font-size:12px;}
.game-chat-attachment__meta span{font-size:11px;color:#607086;}
.game-chat-form{padding:10px;border-top:1px solid #e2ebf4;background:#fff;}
.game-chat-form textarea{width:100%;min-height:64px;resize:vertical;font-size:13px;padding:8px 10px;}
.game-chat-form__actions{display:flex;gap:8px;justify-content:space-between;align-items:center;flex-wrap:wrap;margin-top:8px;}
.game-chat-file-input{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:8px 12px;
  border:2px dashed #9ab8dc;
  border-radius:14px;
  background:#f5f9ff;
  color:#1f4d7c;
  font-weight:700;
  font-size:12px;
  cursor:pointer;
  overflow:hidden;
}
.game-chat-file-input input[type="file"]{
  position:absolute;
  inset:0;
  opacity:0;
  cursor:pointer;
}
.game-chat-help{margin-top:8px;font-size:11px;color:#607086;line-height:1.35;}
@media (max-width: 1260px){
  .game-score-layout{grid-template-columns:1fr;}
  .game-chat-list{max-height:none;}
}


.stats-score-column--player-card .stats-score-points{
  font-size:13px;
  font-weight:600;
}
.stats-score-column--player-card .stats-score-player{
  font-size:13px;
  font-weight:600;
}
.stats-score-column--player-card .stats-score-date{
  font-size:12px;
}


.game-score-layout{
  gap:12px;
  width:100%;
  max-width:var(--game-shared-width);
}
.game-score-layout__table{
  min-width:0;
  width:100%;
  display:flex;
  justify-content:center;
}
.game-score-shell{
  min-width:0;
  position:relative;
  width:100%;
  display:flex;
  justify-content:center;
}
.game-score-title-cell{
  position:relative;
  padding:14px 72px 14px 14px;
}
.game-score-title-cell h2{
  margin:0 0 4px;
}
.game-score-title-fullscreen-btn{
  position:absolute;
  top:10px;
  right:10px;
}
.game-score-shell__floating-actions{
  display:none;
  position:sticky;
  top:0;
  z-index:20;
  width:100%;
  padding:0;
  margin:0;
  pointer-events:none;
}
.game-score-floating-exit{
  display:inline-flex;
  margin:0;
  pointer-events:auto;
}
.game-panel-fullscreen-btn{
  min-height:34px;
  padding:7px 12px;
  font-size:12px;
  border-radius:999px;
}
.game-score-shell .game-score-table{
  margin:0 auto !important;
  width:auto !important;
  max-width:100%;
}
.game-chat-panel{
  align-self:start;
  width:100%;
  max-width:100%;
  display:flex;
  flex-direction:column;
  box-sizing:border-box;
}
.game-chat-panel__header{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}
.game-chat-panel__header-main{min-width:0;flex:1 1 auto;}
.game-chat-panel__header-actions{flex:0 0 auto;}
.game-chat-fullscreen-score{display:none;}
.game-chat-fullscreen-score.is-active{display:block;padding:10px 12px 6px;background:#f4f8fe;border-bottom:1px solid #dde7f1;overflow:auto;}
.game-chat-fullscreen-score.is-active .game-score-shell{width:100%;height:auto;padding:0;overflow:visible;background:transparent;}
.game-chat-fullscreen-score.is-active .game-score-table{margin:0 auto !important;width:auto !important;max-width:100%;}
.game-chat-fullscreen-score.is-active .game-score-table input,
.game-chat-fullscreen-score.is-active .game-score-table textarea{font-size:16px !important;}
.game-chat-fullscreen-score.is-active .game-score-title-fullscreen-btn{display:none !important;}
.game-chat-fullscreen-score.is-active .game-score-table > tbody > tr:first-child{display:none;}
.game-chat-fullscreen-score.is-active{padding:6px 8px 4px;background:#f4f8fe;border-bottom:1px solid #dde7f1;}
.game-chat-fullscreen-score__inner{max-height:min(26vh, 220px);overflow:auto;}
.game-chat-fullscreen-score.is-active .game-score-table--compact-readonly{margin:0 auto !important;width:auto !important;max-width:100%;border-collapse:separate;}
.game-chat-fullscreen-score.is-active .game-score-table--compact-readonly > tbody > tr:nth-child(-n+3),
.game-chat-fullscreen-score.is-active .game-score-table--compact-readonly > tbody > tr:nth-last-child(-n+4){display:none;}
.game-chat-fullscreen-score__inner--show-all .game-score-table--compact-readonly > tbody > tr:nth-child(-n+3),
.game-chat-fullscreen-score__inner--show-all .game-score-table--compact-readonly > tbody > tr:nth-last-child(-n+4){display:table-row;}
.game-chat-fullscreen-score.is-active .game-score-table--compact-readonly td{padding:2px 3px !important;font-size:11px;line-height:1.05;white-space:nowrap;vertical-align:middle;}
.game-chat-fullscreen-score.is-active .game-score-table--compact-readonly td:first-child{font-size:10px;font-weight:700;}
.game-chat-fullscreen-score.is-active .game-score-readonly-field{display:inline-block;min-width:2.1em;padding:0 1px;font-size:11px;font-weight:700;line-height:1.05;color:inherit;background:transparent;border:0;}
.game-chat-fullscreen-score.is-active .game-score-readonly-field--multiline{display:block;white-space:normal;text-align:left;}
.game-chat-mini-score{
  display:none;
  padding:10px 12px 8px;
  border-bottom:1px solid #dde7f1;
  background:#f4f8fe;
}
.game-chat-mini-score__title{
  font-size:11px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:#35567e;
  margin-bottom:6px;
}
.game-chat-mini-score__table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
}
.game-chat-mini-score__table th,
.game-chat-mini-score__table td{
  border:1px solid #d6e1ec;
  padding:5px 4px;
  text-align:center;
  font-size:11px;
}
.game-chat-mini-score__table th{
  background:#ffffff;
  color:#163a61;
  font-weight:700;
}
.game-chat-mini-score__table td{
  background:#fff7df;
  color:#2b3848;
  font-weight:700;
}
.game-chat-mini-score__empty{
  font-size:11px;
  color:#607086;
}
.game-chat-list{
  max-height:640px;
}
.game-chat-panel.is-fullscreen .game-chat-fullscreen-score,
.game-chat-panel.is-fullscreen-fallback .game-chat-fullscreen-score{
  display:block;
}
.game-chat-form textarea{
  min-height:56px;
  font-size:12px;
}
.game-chat-panel.is-fullscreen,
.game-chat-panel.is-fullscreen-fallback,
.game-score-shell.is-fullscreen,
.game-score-shell.is-fullscreen-fallback{
  background:#fff;
}
.game-chat-panel.is-fullscreen,
.game-chat-panel.is-fullscreen-fallback{
  width:100%;
  max-width:none;
  height:100%;
  max-height:none;
  border-radius:0;
  display:flex;
  flex-direction:column;
}
.game-chat-panel.is-fullscreen-fallback,
.game-score-shell.is-fullscreen-fallback{
  background:#fff;
}
.game-chat-panel.is-fullscreen .game-chat-list,
.game-chat-panel.is-fullscreen-fallback .game-chat-list{
  max-height:none;
  height:auto;
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
}
.game-chat-panel.is-fullscreen .game-chat-form,
.game-chat-panel.is-fullscreen-fallback .game-chat-form{
  margin-top:auto;
}
.game-score-shell.is-fullscreen,
.game-score-shell.is-fullscreen-fallback{
  position:relative;
  display:block;
  width:100%;
  height:100%;
  padding:18px 12px 12px;
  overflow:auto;
  box-sizing:border-box;
}
.game-score-shell.is-fullscreen .game-score-panel__toolbar,
.game-score-shell.is-fullscreen-fallback .game-score-panel__toolbar{
  position:sticky;
  top:0;
  z-index:6;
  padding:4px 0 10px;
  background:#fff;
}
.game-score-shell.is-fullscreen .game-score-shell__floating-actions,
.game-score-shell.is-fullscreen-fallback .game-score-shell__floating-actions{
  display:block;
  position:fixed;
  top:14px;
  right:16px;
  width:auto;
  padding:0;
  margin:0;
  z-index:10001;
  pointer-events:none;
}
.game-score-shell.is-fullscreen .game-score-title-fullscreen-btn,
.game-score-shell.is-fullscreen-fallback .game-score-title-fullscreen-btn{
  display:none !important;
}
.game-score-shell.is-fullscreen .game-score-floating-exit,
.game-score-shell.is-fullscreen-fallback .game-score-floating-exit{
  width:auto;
  max-width:none;
}
.game-score-shell.is-fullscreen .game-score-table,
.game-score-shell.is-fullscreen-fallback .game-score-table{
  margin:0 auto !important;
}
.game-score-shell.is-fullscreen .game-score-table > tbody > tr:nth-child(-n+3),
.game-score-shell.is-fullscreen-fallback .game-score-table > tbody > tr:nth-child(-n+3){
  display:none;
}
.game-score-shell.is-fullscreen .game-score-table input,
.game-score-shell.is-fullscreen-fallback .game-score-table input{
  font-size:22px !important;
  min-height:44px;
}
.game-score-shell.is-fullscreen .game-score-table td,
.game-score-shell.is-fullscreen-fallback .game-score-table td{
  padding:6px 5px;
}
.game-score-shell.is-fullscreen .game-score-table td:first-child,
.game-score-shell.is-fullscreen-fallback .game-score-table td:first-child{
  font-size:15px;
  white-space:nowrap;
}
.game-score-shell.is-fullscreen-fallback,
.game-chat-panel.is-fullscreen-fallback{
  position:fixed !important;
  inset:0 !important;
  z-index:9999 !important;
  margin:0 !important;
}
body.game-panel-fullscreen-active{
  overflow:hidden;
}
@media (max-width: 1260px){
  .game-score-layout{grid-template-columns:1fr;}
  .game-chat-panel{max-width:none;}
}
@media (max-width: 760px){
  .game-panel-fullscreen-btn{width:100%;}
  .game-score-title-cell{
    padding:14px 78px 12px 12px;
    text-align:left !important;
  }
  .game-score-title-cell h2{
    text-align:left;
    margin-right:0;
  }
  .game-score-title-fullscreen-btn{
    left:auto;
    right:10px;
    top:10px;
    width:auto !important;
    max-width:calc(100% - 20px);
    min-height:28px;
    padding:5px 10px;
    font-size:11px;
    white-space:nowrap;
  }
  .game-chat-panel__header{flex-direction:column;align-items:stretch;}
  .game-chat-panel__header-actions .game-panel-fullscreen-btn{width:100%;}
  .game-score-shell.is-fullscreen .game-score-shell__floating-actions,
  .game-score-shell.is-fullscreen-fallback .game-score-shell__floating-actions{top:10px;right:10px;}
  .game-score-shell.is-fullscreen .game-score-floating-exit,
  .game-score-shell.is-fullscreen-fallback .game-score-floating-exit{
    width:auto !important;
    min-height:28px;
    padding:5px 10px;
    font-size:11px;
    white-space:nowrap;
  }
}


/* Pelaajatilastojen tilastokortin tekstikoot ja viimeisimpien pelien pallurat */
.stats-player-card__header{
  text-align:center;
}
.stats-player-card__name{
  font-size:22px;
  line-height:1.15;
}
.stats-player-card__facts{
  font-size:12px;
}
.stats-player-card__recent-form{
  display:flex;
  justify-content:center;
  align-items:center;
  margin:6px 0 2px;
}
.stats-player-card__recent-form .rank-recent-balls{
  min-height:16px;
  gap:6px;
}
.stats-player-card__recent-form .rank-recent-ball{
  width:11px;
  height:11px;
}
.stats-player-summary{
  gap:10px;
}
.stats-player-summary__item{
  padding:10px 10px;
}
.stats-player-summary__label{
  font-size:11px;
  line-height:1.2;
}
.stats-player-summary__value{
  display:block;
  font-size:15px;
  line-height:1.15;
  white-space:nowrap;
}
.stats-player-summary__item:last-child .stats-player-summary__value,
.stats-player-summary__item:last-child .stats-player-summary__label{
  font-size:10px;
}
.stats-player-summary__item:last-child .stats-player-summary__value{
  font-size:14px;
}
.stats-player-card .stats-score-column__title,
.stats-player-card .stats-placement-card__title{
  font-size:14px;
}
.stats-player-card .stats-score-row{
  font-size:12px;
}
.stats-player-card .stats-score-date,
.stats-player-card .stats-score-player,
.stats-player-card .stats-score-points{
  font-size:12px !important;
}

@media (max-width: 900px){
  .stats-player-card__name{font-size:20px;}
  .stats-player-summary__value{white-space:normal;}
}


/* Tilastokortin lopulliset hienosäädöt */
.stats-player-card__header{
  gap:6px;
  margin-bottom:10px;
}
.stats-player-card__name{
  font-size:20px !important;
  line-height:1.1;
}
.stats-player-card__facts{
  display:block;
  font-size:11px !important;
  line-height:1.2;
  margin-top:1px;
}
.stats-player-card__recent-form{
  display:flex;
  justify-content:center;
  align-items:center;
  margin:2px 0 0;
  min-height:18px;
}
.stats-player-card__recent-form .rank-recent-balls{
  display:inline-flex !important;
  justify-content:center;
  align-items:center;
  gap:7px;
  min-height:16px;
  padding:1px 0;
}
.stats-player-card__recent-form .rank-recent-ball{
  width:12px !important;
  height:12px !important;
  border-radius:50%;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.55), 0 0 0 1px rgba(17,43,69,.20), 0 1px 2px rgba(0,0,0,.18);
  flex:0 0 12px;
}
.stats-placement-card--summary-top{
  margin:0 0 12px;
}
.stats-player-summary{
  gap:10px;
  margin-bottom:14px;
}
.stats-player-summary__item{
  padding:8px 10px;
}
.stats-player-summary__label{
  font-size:10px !important;
  line-height:1.15;
}
.stats-player-summary__value{
  font-size:13px !important;
  line-height:1.1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.stats-player-card .stats-score-column__title,
.stats-player-card .stats-placement-card__title{
  font-size:13px !important;
}
.stats-player-card .stats-score-row{
  font-size:11px !important;
}
.stats-player-card .stats-score-date,
.stats-player-card .stats-score-player,
.stats-player-card .stats-score-points{
  font-size:11px !important;
  line-height:1.15;
}
.stats-player-card .stats-placement-row__label,
.stats-player-card .stats-placement-row__value{
  font-size:11px;
}
@media (max-width: 900px){
  .stats-player-card__name{font-size:18px !important;}
  .stats-player-summary__value{font-size:12px !important;white-space:normal;}
}

.game-score-shell.is-embedded-in-chat-fullscreen{display:flex;justify-content:center;}
.game-chat-panel.is-fullscreen .game-chat-form,
.game-chat-panel.is-fullscreen-fallback .game-chat-form{padding-bottom:calc(10px + env(safe-area-inset-bottom, 0px));}


@media (max-width: 640px){
  .game-score-layout{
    --game-shared-width:calc(100vw - 12px);
    margin:8px auto 8px;
    gap:8px;
  }
  .game-score-layout__table,
  .game-score-shell{
    width:100%;
  }
  .game-score-shell .game-score-table,
  .game-score-layout__table .game-score-table{
    width:100% !important;
    max-width:100% !important;
    table-layout:fixed;
  }
  .game-score-table tr > td{
    padding:3px 2px;
    font-size:12px;
    line-height:1.15;
  }
  .game-score-table tr:not(:first-child) > td:first-child{
    width:100px;
    min-width:100px;
    font-size:11px;
    line-height:1.1;
    white-space:normal;
    word-break:break-word;
  }
  .game-score-table tr > td:last-child{
    width:36px;
    min-width:36px;
  }
  .game-score-table input[type="text"]{
    width:100%;
    min-width:0;
    max-width:42px;
    padding:3px 1px;
    font-size:16px !important;
    line-height:1.05;
    box-sizing:border-box;
    text-align:center;
  }
  .game-score-table textarea{
    width:100%;
    min-height:72px;
    box-sizing:border-box;
    font-size:14px;
  }
  .game-score-table tr:first-child h2{
    font-size:18px;
    line-height:1.15;
  }
  .game-score-title-cell{
    padding-right:14px;
  }
  .game-score-table td[bgcolor="#99CCFF"][align="right"],
  .game-score-table td[bgcolor="#D9D9D9"][align="right"],
  .game-score-table td[bgcolor="gray"][align="center"]{
    font-size:11px;
  }
}

@media (max-width: 420px){
  .game-score-layout{
    --game-shared-width:calc(100vw - 8px);
  }
  .game-score-table tr > td{
    padding:2px 1px;
    font-size:11px;
  }
  .game-score-table tr:not(:first-child) > td:first-child{
    width:88px;
    min-width:88px;
    font-size:10px;
  }
  .game-score-table tr > td:last-child{
    width:32px;
    min-width:32px;
  }
  .game-score-table input[type="text"]{
    max-width:36px;
    padding:2px 0;
    font-size:16px !important;
  }
  .game-score-table textarea{
    min-height:64px;
    font-size:13px;
  }
  .game-score-table tr:first-child h2{
    font-size:16px;
  }
}


.stats-score-grid--overview{
  width:min(100%, 860px);
  margin:0 auto;
  gap:14px;
  grid-template-columns:repeat(2, minmax(0, 1fr));
}
.stats-score-column--overview{
  max-width:420px;
  margin:0 auto;
}
.stats-score-column--overview .stats-score-column__title{
  padding:9px 12px;
}
.stats-score-column--overview .stats-score-row{
  grid-template-columns:76px minmax(0,1fr);
  gap:10px;
  padding:7px 10px;
}
.stats-score-column--overview .stats-score-meta{
  gap:6px;
}
.stats-score-column--overview .stats-score-points{
  font-size:14px;
}
.stats-score-column--overview .stats-score-player{
  font-size:14px;
}
.stats-score-column--overview .stats-score-date{
  font-size:11px;
}
@media (max-width: 900px){
  .stats-score-grid--overview{
    width:min(100%, 780px);
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px){
  .stats-score-grid--overview{
    grid-template-columns:1fr;
    width:min(100%, 420px);
  }
}

.live-game-list-badge{display:inline-flex;align-items:center;gap:6px;margin-bottom:8px;padding:4px 10px;border-radius:999px;background:#173f6b;color:#fff7dc;font-size:12px;font-weight:700;}
#live-game-player-status{font-size:12px;color:#183b62;}
.new-game-submit-button:disabled{opacity:.55;cursor:not-allowed;}
.live-game-view{
  position:relative;
  min-height:calc(100vh - 120px);
  margin:0 auto 28px;
  padding:16px;
  border-radius:28px;
  background:radial-gradient(circle at 50% 45%, rgba(40,118,73,.96) 0%, rgba(18,78,49,.96) 38%, rgba(9,39,25,.98) 100%);
  box-shadow:0 20px 48px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.08);
  color:#f8fbff;
  overflow:hidden;
}
.live-game-view__topbar{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:8px;}
.live-game-view__brand img{display:block;width:auto;height:64px;object-fit:contain;}
.live-game-view__actions{display:flex;flex-direction:column;align-items:flex-end;gap:4px;}
.live-game-view__action-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.live-game-view__meta{font-size:12px;color:rgba(255,255,255,.78);text-shadow:0 1px 2px rgba(0,0,0,.45);}
.live-game-banner{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:0 auto 18px;padding:10px 14px;border-radius:16px;font-weight:700;background:rgba(0,0,0,.26);box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);}
.live-game-banner.is-online{background:rgba(47,158,68,.24);}
.live-game-banner.is-waiting{background:rgba(201,151,0,.22);}
.live-game-banner__done{display:inline-flex;margin-left:auto;padding:4px 10px;border-radius:999px;background:rgba(255,255,255,.14);font-size:12px;}
.live-game-stage-wrap{display:flex;justify-content:center;align-items:center;}
.live-game-stage{
  position:relative;
  width:min(100%, 1120px);
  min-height:660px;
  border-radius:38px;
  background:linear-gradient(180deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,.02) 100%);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.07);
}
.live-player-seat{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:200px;max-width:240px;padding:12px 16px;border-radius:22px;background:rgba(8,24,17,.6);backdrop-filter:blur(6px);box-shadow:0 12px 28px rgba(0,0,0,.24), inset 0 0 0 1px rgba(255,255,255,.08);text-align:center;z-index:2;}
.live-player-seat.is-self{background:rgba(18,53,97,.82);}
.live-player-seat--bottom{left:50%;bottom:22px;transform:translateX(-50%);}
.live-player-seat--top{left:50%;top:18px;transform:translateX(-50%);}
.live-player-seat--left{left:18px;top:50%;transform:translateY(-50%);}
.live-player-seat--right{right:18px;top:50%;transform:translateY(-50%);}
.live-player-seat__label{font-size:22px;font-weight:800;line-height:1.1;display:flex;gap:8px;flex-wrap:wrap;justify-content:center;align-items:center;}
.live-player-seat__label .online-badge{position:static;margin-left:0;}
.live-player-seat__sub{margin-top:6px;font-size:12px;opacity:.86;letter-spacing:.04em;text-transform:uppercase;}
.live-table-core{
  position:absolute;
  inset:92px 110px 92px 110px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:18px;
  border-radius:50px;
  background:radial-gradient(circle at 50% 50%, rgba(64,143,91,.96) 0%, rgba(21,89,55,.94) 58%, rgba(15,61,39,.98) 100%);
  box-shadow:inset 0 0 0 2px rgba(255,227,139,.25), 0 12px 40px rgba(0,0,0,.22);
}
.live-table-core__title{font-size:28px;font-weight:900;text-shadow:0 3px 16px rgba(0,0,0,.32);}
.live-table-core__subtitle{max-width:720px;font-size:14px;text-align:center;color:rgba(255,255,255,.86);}
.live-table-core__zones{display:grid;grid-template-columns:repeat(3, minmax(0, 1fr));gap:16px;width:min(100%, 860px);padding:0 18px;}
.live-zone{padding:16px;border-radius:24px;background:rgba(4,23,14,.35);box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);min-height:170px;display:flex;flex-direction:column;justify-content:flex-start;gap:12px;}
.live-zone--wide{min-width:0;}
.live-zone__title{font-size:13px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#ffe18c;}
.live-zone__content{font-size:14px;line-height:1.45;color:rgba(255,255,255,.88);white-space:pre-wrap;word-break:break-word;}
.live-cards,.live-trick-slots{display:flex;justify-content:center;align-items:center;gap:12px;flex-wrap:wrap;min-height:100px;}
.live-cards span,.live-trick-slots span{display:inline-block;width:64px;height:92px;border-radius:12px;background:linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(230,235,244,.95) 100%);box-shadow:0 8px 18px rgba(0,0,0,.22);}
.live-cards span:nth-child(2){transform:translateY(-6px);}
.live-trick-slots span{width:72px;height:104px;background:linear-gradient(180deg, rgba(255,245,214,.98) 0%, rgba(252,238,196,.96) 100%);}
.live-game-footer{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;align-items:center;margin-top:18px;padding:12px 2px 2px;color:rgba(255,255,255,.84);font-size:13px;}
.live-order-bubble{padding:8px 10px;border-radius:14px;background:rgba(255,255,255,.08);box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);font-weight:700;line-height:1.35;}
.live-order-bubble--stack{display:flex;flex-direction:column;align-items:stretch;gap:6px;background:transparent;box-shadow:none;padding:0;}
.live-order-pill{display:flex;align-items:center;justify-content:space-between;min-height:40px;padding:8px 10px;border-radius:14px;background:rgba(255,255,255,.06);box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);font-size:13px;font-weight:700;line-height:1.2;color:#fff;max-width:100%;width:100%;word-break:break-word;box-sizing:border-box;}
.live-order-arrow{display:none;}
.live-game-footer__hint{opacity:.82;}
@media (max-width: 980px){
  .live-game-stage{min-height:780px;}
  .live-table-core{inset:120px 24px 140px 24px;}
  .live-table-core__zones{grid-template-columns:1fr;}
  .live-player-seat--left{left:12px;top:auto;bottom:150px;transform:none;}
  .live-player-seat--right{right:12px;top:auto;bottom:150px;transform:none;}
}
@media (max-width: 760px){
  .live-game-view{padding:12px;border-radius:20px;}
  .live-game-view__brand img{height:48px;}
  .live-game-view__topbar{flex-direction:column;align-items:flex-start;}
  .live-game-view__actions{align-items:flex-start;}
  .live-game-view__action-row{width:100%;}
  .live-game-banner{flex-direction:column;align-items:flex-start;}
  .live-game-stage{min-height:860px;}
  .live-table-core{inset:150px 12px 180px 12px;border-radius:30px;}
  .live-player-seat{min-width:150px;max-width:180px;padding:10px 12px;}
  .live-player-seat__label{font-size:18px;}
  .live-player-seat--top{top:16px;}
  .live-player-seat--left{left:8px;bottom:184px;}
  .live-player-seat--right{right:8px;bottom:184px;}
  .live-player-seat--bottom{bottom:12px;width:calc(100% - 24px);max-width:none;}
}

/* Live card game stage */
.live-game-app-frame{margin-top:16px;max-width:100%;overflow-x:hidden;overflow-x:clip;}
.live-load-placeholder,.live-load-error{padding:24px 18px;border-radius:18px;background:rgba(5,15,26,.55);color:#fff;text-align:center;font-weight:700;}
.live-game-shell{display:grid;grid-template-columns:minmax(0,1fr) 236px;gap:14px;align-items:start;max-width:100%;}
.live-game-shell__message{grid-column:1 / -1;min-width:0;max-width:100%;}
.live-game-shell__stage,.live-game-shell__sidebar{min-width:0;max-width:100%;}
.live-message-card{padding:12px 14px;border-radius:18px;background:rgba(8,25,42,.62);box-shadow:0 12px 28px rgba(0,0,0,.25), inset 0 0 0 1px rgba(255,255,255,.06);}
.live-message-card--compact{padding:8px 12px 8px;}
.live-message-card__top-row{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;}
.live-message-card__title-group{display:flex;align-items:center;gap:8px;min-width:0;flex:0 1 auto;}
.live-message-card__turn-slot{display:flex;align-items:center;flex:0 1 auto;min-width:0;}
.live-message-card__progress-slot{display:flex;align-items:center;flex:1 1 320px;min-width:240px;}
.live-message-card__tools{display:flex;align-items:center;justify-content:flex-end;flex:0 0 auto;margin-left:0;}
.live-message-card__title{font-size:19px;font-weight:900;color:#ffffff;line-height:1;}
.live-message-card__text{margin-top:4px;font-size:14px;font-weight:700;color:#fff6d9;min-height:1.35em;line-height:1.35;}
.live-message-card__text.is-empty{visibility:hidden;}
.live-help-badge{position:relative;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:999px;background:linear-gradient(180deg,#ffe58a 0%,#f2bc34 100%);box-shadow:0 6px 16px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.55);cursor:default;flex:0 0 auto;}
.live-help-badge__icon{font-size:18px;font-weight:900;color:#5a3b00;font-family:Arial,sans-serif;line-height:1;}
.live-help-badge__tooltip{position:absolute;left:0;top:calc(100% + 10px);width:min(520px, calc(100vw - 60px));padding:12px 14px;border-radius:14px;background:rgba(8,18,30,.96);color:#fff8dc;font-size:13px;font-weight:700;line-height:1.45;box-shadow:0 18px 34px rgba(0,0,0,.34);opacity:0;pointer-events:none;transform:translateY(6px);transition:opacity .16s ease, transform .16s ease;z-index:30;}
.live-help-badge:hover .live-help-badge__tooltip{opacity:1;transform:translateY(0);}
.live-scorebook-badge{position:relative;display:inline-flex;align-items:flex-start;justify-content:flex-end;padding-left:6px;cursor:default;flex:0 0 auto;}
.live-scorebook-badge__sheet{position:relative;display:block;width:52px;height:68px;border-radius:8px 10px 9px 9px;background:linear-gradient(180deg,#fbf9ef 0%,#f3efdf 100%);box-shadow:0 10px 20px rgba(0,0,0,.26), inset 0 1px 0 rgba(255,255,255,.85);border:1px solid rgba(126,102,64,.34);transform:rotate(20deg);overflow:hidden;}
.live-scorebook-badge__spiral{position:absolute;left:7px;top:4px;width:38px;height:7px;border-radius:999px;background:repeating-linear-gradient(90deg,#747d87 0 3px, transparent 3px 7px);opacity:.9;}
.live-scorebook-badge__grid{position:absolute;inset:12px 5px 5px 5px;background:
  repeating-linear-gradient(0deg, rgba(109,155,217,.2) 0 1px, transparent 1px 11px),
  repeating-linear-gradient(90deg, rgba(109,155,217,.14) 0 1px, transparent 1px 11px),
  linear-gradient(90deg, rgba(226,86,86,.35) 0 1px, transparent 1px 100%);
  border-radius:4px;}
.live-scorebook-badge__scribble{position:absolute;font-family:"Comic Sans MS","Bradley Hand",cursive;color:#234d93;font-weight:700;letter-spacing:.02em;z-index:2;pointer-events:none;}
.live-scorebook-badge__scribble--title{left:11px;top:17px;font-size:9px;transform:rotate(-7deg);}
.live-scorebook-badge__scribble--line1{left:12px;top:30px;font-size:10px;transform:rotate(-6deg);}
.live-scorebook-badge__scribble--line2{left:15px;top:42px;font-size:10px;transform:rotate(-3deg);}
.live-scorebook-badge__scribble--line3{left:13px;top:54px;font-size:10px;transform:rotate(-8deg);}
.live-scorebook-badge__tooltip{position:absolute;right:0;top:calc(100% + 12px);min-width:280px;max-width:min(360px, calc(100vw - 44px));padding:12px 12px 10px;border-radius:16px;background:rgba(8,18,30,.97);color:#fff8dc;box-shadow:0 18px 34px rgba(0,0,0,.34);opacity:0;pointer-events:none;transform:translateY(6px);transition:opacity .16s ease, transform .16s ease;z-index:34;}
.live-scorebook-badge:hover .live-scorebook-badge__tooltip{opacity:1;transform:translateY(0);}
.live-scorebook-badge__tooltip-title{display:block;font-size:13px;font-weight:900;color:#fff8dc;}
.live-scorebook-badge__tooltip-round{display:block;margin-top:2px;margin-bottom:8px;font-size:12px;font-weight:700;color:#d8e7ff;}
.live-scorebook-table{width:100%;border-collapse:collapse;font-size:12px;}
.live-scorebook-table th,.live-scorebook-table td{padding:6px 7px;text-align:left;border-bottom:1px solid rgba(255,255,255,.08);}
.live-scorebook-table th{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:#ffd86f;}
.live-scorebook-table td:nth-child(n+2),.live-scorebook-table th:nth-child(n+2){text-align:center;}
.live-scorebook-table tbody tr:last-child td{border-bottom:0;}
.live-turn-banner{display:inline-flex;align-items:center;margin-top:0;padding:6px 10px;border-radius:14px;background:rgba(154,255,149,.16);color:#ecffe9;font-size:14px;font-weight:900;box-shadow:inset 0 0 0 1px rgba(167,255,165,.26);white-space:nowrap;}
.live-status-row{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;}
.live-status-row--inline{margin-top:0;justify-content:flex-start;flex:1 1 auto;}
.live-status-chip{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.12);color:#fff;font-size:12px;font-weight:700;}
@media (max-width: 900px){.live-message-card__top-row{align-items:flex-start;gap:6px;}.live-message-card__progress-slot{flex:1 1 100%;min-width:0;}.live-status-row--inline{justify-content:flex-start;flex:1 1 100%;}}
.live-banner{display:inline-flex;margin-top:10px;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800;}
.live-banner--waiting{background:rgba(233,177,0,.2);color:#ffe38f;}
.live-banner--active{background:rgba(67,160,71,.2);color:#cbffd6;}
.live-banner--done{background:rgba(106,110,255,.18);color:#d9ddff;}
.live-room-stage{position:relative;min-height:840px;border-radius:34px;overflow:hidden;background:radial-gradient(circle at center, #206748 0%, #11402d 38%, #0a241a 70%, #081810 100%);box-shadow:0 24px 54px rgba(0,0,0,.34), inset 0 0 0 2px rgba(255,255,255,.05);}
.live-room-stage__felt{position:absolute;inset:0;border-radius:inherit;border:none;box-shadow:none;pointer-events:none;}
.live-room-stage__deck{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:3;pointer-events:none;}
.live-room-stage__table{position:absolute;left:50%;top:50%;width:min(34vw,300px);height:min(24vw,210px);transform:translate(-50%,-50%);z-index:4;display:flex;align-items:center;justify-content:center;overflow:visible;}
.live-deck-stack{position:relative;width:var(--live-card-width, 110px);height:calc(var(--live-card-width, 110px) * 1.45);} .live-deck-stack--empty{display:none;} .live-deck-stack__empty-label{display:none;}
.live-deck-stack__count{position:absolute;left:50%;bottom:-36px;transform:translateX(-50%);padding:5px 10px;border-radius:999px;background:rgba(0,0,0,.45);color:#fff;font-size:12px;font-weight:800;white-space:nowrap;}
.live-deck-card{position:absolute;left:0;top:0;width:100%;height:100%;object-fit:cover;border-radius:12px;box-shadow:0 12px 22px rgba(0,0,0,.35);transform:translate(calc(var(--deck-offset) * 1px), calc(var(--deck-offset) * -1px)) rotate(calc(var(--deck-offset) * -1deg));}
.live-deck-card.is-shuffling{animation:kingiLiveDeckShake 1.1s ease-in-out infinite;animation-delay:calc(var(--deck-offset) * -0.08s);}
.live-deal-layer{position:absolute;inset:0;z-index:5;pointer-events:none;}
.live-deal-card{position:absolute;left:50%;top:50%;width:min(10vw,96px);height:calc(min(10vw,96px) * 1.45);margin-left:calc(min(10vw,96px) * -0.5);margin-top:calc(min(10vw,96px) * -0.72);border-radius:14px;box-shadow:0 12px 24px rgba(0,0,0,.32);opacity:0;animation:kingiLiveDeal var(--deal-duration,2400ms) ease-out forwards;animation-delay:var(--deal-delay,0ms);}
.live-deal-card--bottom{--deal-x:0px;--deal-y:300px;--deal-r:0deg;}
.live-deal-card--top{--deal-x:0px;--deal-y:-300px;--deal-r:180deg;}
.live-deal-card--left{--deal-x:-360px;--deal-y:120px;--deal-r:-90deg;}
.live-deal-card--right{--deal-x:360px;--deal-y:120px;--deal-r:90deg;}
@keyframes kingiLiveDeal{0%{opacity:1;transform:translate(0,0) rotate(0deg) scale(1);}70%{opacity:1;}100%{opacity:.0;transform:translate(var(--deal-x),var(--deal-y)) rotate(var(--deal-r)) scale(.96);}}

@keyframes kingiLiveDeckShake{0%,100%{transform:translate(calc(var(--deck-offset) * 1px), calc(var(--deck-offset) * -1px)) rotate(-2deg);}25%{transform:translate(calc(var(--deck-offset) * 2px + 8px), calc(var(--deck-offset) * -1px - 4px)) rotate(8deg);}50%{transform:translate(calc(var(--deck-offset) * -1px - 8px), calc(var(--deck-offset) * -1px + 6px)) rotate(-10deg);}75%{transform:translate(calc(var(--deck-offset) * 1px + 5px), calc(var(--deck-offset) * -1px + 3px)) rotate(5deg);}}
.live-seat{--live-card-width:clamp(38px, calc((100vw - 280px) / 9), 70px);position:absolute;display:flex;flex-direction:column;gap:8px;min-width:160px;max-width:min(92vw, 720px);padding:8px 10px 10px;border-radius:20px;background:rgba(8,22,18,.58);backdrop-filter:blur(4px);box-shadow:0 12px 24px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.06);z-index:6;}
.live-seat.is-self{background:rgba(17,43,75,.82);}
.live-seat.is-last-winner{box-shadow:0 0 0 2px rgba(255,228,128,.38), 0 16px 30px rgba(0,0,0,.32), inset 0 0 0 1px rgba(255,255,255,.08);}
.live-seat.is-current-turn{box-shadow:0 0 0 3px rgba(166,255,158,.52), 0 0 24px rgba(137,255,120,.18), 0 16px 30px rgba(0,0,0,.32), inset 0 0 0 1px rgba(255,255,255,.12);}
.live-seat--bottom{left:50%;bottom:10px;transform:translateX(-50%);width:min(96vw, 1220px);}
.live-seat--top{left:50%;top:10px;transform:translateX(-50%);min-width:220px;}
.live-seat--left{left:10px;top:50%;transform:translateY(-50%);min-width:130px;max-width:156px;}
.live-seat--right{right:10px;top:50%;transform:translateY(-50%);min-width:130px;max-width:156px;}
.live-seat__header,.live-seat__footer{display:flex;justify-content:space-between;gap:8px;align-items:center;flex-wrap:wrap;} .live-seat__name-wrap{display:flex;align-items:center;gap:8px;flex-wrap:wrap;} .live-seat__tricks{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;background:rgba(255,215,112,.18);color:#fff1b8;font-size:11px;font-weight:900;box-shadow:inset 0 0 0 1px rgba(255,230,150,.16);}
.live-seat__name{font-size:15px;font-weight:900;color:#fff7d4;line-height:1.05;}
.live-seat__badges{display:flex;flex-wrap:wrap;gap:6px;}
.live-seat-badge{display:inline-flex;align-items:center;padding:3px 7px;border-radius:999px;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.03em;}
.live-seat-badge--online{background:rgba(46,204,113,.18);color:#beffd3;}
.live-seat-badge--offline{background:rgba(255,87,87,.16);color:#ffd0d0;}
.live-seat-badge--present{background:rgba(101,164,255,.2);color:#dce7ff;}
.live-seat-badge--waiting{background:rgba(255,209,71,.18);color:#fff0bc;}
.live-seat-badge--turn{background:rgba(255,245,157,.25);color:#fff8cf;}
.live-hand{display:flex;align-items:flex-end;position:relative;min-height:110px;}
.live-hand--self{display:flex;justify-content:center;align-items:flex-end;flex-wrap:nowrap;overflow-x:visible;overflow-y:visible;width:100%;padding:18px 18px 10px;gap:0;min-height:170px;}
.live-hand--backs{display:block;overflow:visible;--fan-size:calc(var(--live-card-width, 110px) * 2.25);width:var(--fan-size);height:var(--fan-size);min-height:var(--fan-size);}
.live-hand--top{margin:0 auto 4px;}
.live-hand--left,.live-hand--right{margin:0 auto;}
.live-seat--bottom .live-seat__body{width:100%;display:flex;justify-content:center;}
.live-seat--bottom .live-card-button{flex:0 1 auto;display:flex;justify-content:center;align-items:flex-end;margin-right:calc(clamp(118px, 10.6vw, var(--live-self-card-width, 132px)) * -0.09);min-width:0;position:relative;z-index:calc(var(--fan-index, 0) + 1);}
.live-seat--bottom .live-card-button:last-child{margin-right:0;}
.live-seat--bottom .live-card{width:clamp(118px, 10.6vw, var(--live-self-card-width, 132px));height:calc(clamp(118px, 10.6vw, var(--live-self-card-width, 132px)) * 1.45);transform:rotate(calc((var(--fan-index, 0) - var(--fan-mid, 0)) * 1.6deg));transform-origin:center bottom;}
.live-seat--bottom .live-card-button:hover{transform:translateY(-6px);z-index:40;}
.live-seat--bottom .live-card-button.is-selected{transform:translateY(-16px) scale(1.04);z-index:50;}
.live-card-button{position:relative;flex:0 0 auto;padding:0;margin-right:calc(var(--live-card-width, 110px) * -0.18);border:0;background:transparent;cursor:pointer;transition:transform .18s ease;}
.live-card-button:last-child{margin-right:0;}
.live-card-button:hover{transform:translateY(-4px);}
.live-card-button.is-selected{transform:translateY(-14px) scale(1.035);z-index:3;}
.live-card-button.is-disabled{cursor:default;opacity:.92;}
.live-card-button.is-disabled:hover{transform:none;}
.live-card{display:block;width:var(--live-card-width, 110px);height:calc(var(--live-card-width, 110px) * 1.45);border-radius:0;object-fit:contain;box-shadow:0 8px 15px rgba(0,0,0,.26);background:transparent;}
.live-card--back{position:absolute;left:50%;top:50%;z-index:calc(var(--fan-index) + 1);margin:0;}
.live-hand--top .live-card--back{transform-origin:88% 100%;transform:translate(-88%, -88%) rotate(calc(var(--fan-start, 45deg) + (var(--fan-spread, 90deg) * var(--fan-index) / max(1, calc(var(--fan-count) - 1)))));}
.live-hand--left .live-card--back{transform-origin:100% 88%;transform:translate(-78%, -50%) rotate(calc(var(--fan-start, 135deg) + (var(--fan-spread, 90deg) * var(--fan-index) / max(1, calc(var(--fan-count) - 1)))));}
.live-hand--right .live-card--back{transform-origin:0% 88%;transform:translate(-22%, -50%) rotate(calc(var(--fan-start, 135deg) + (var(--fan-spread, 90deg) * var(--fan-index) / max(1, calc(var(--fan-count) - 1)))));}

.live-room-stage__table{position:absolute;left:50%;top:50%;width:min(34vw,300px);height:min(24vw,210px);transform:translate(-50%,-50%);z-index:6;display:flex;align-items:center;justify-content:center;overflow:visible;}
.live-previous-trick-toggle{position:absolute;right:12px;bottom:10px;display:inline-flex;align-items:center;gap:8px;padding:9px 12px;border:1px solid rgba(255,224,143,.58);border-radius:999px;background:linear-gradient(180deg,rgba(42,19,6,.92) 0%,rgba(20,9,3,.94) 100%);color:#ffe8ab;font-weight:900;font-size:12px;letter-spacing:.02em;box-shadow:0 10px 22px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.12);cursor:pointer;z-index:8;}
.live-previous-trick-toggle:hover{transform:translateY(-1px);}
.live-previous-trick-toggle.is-open{background:linear-gradient(180deg,rgba(78,39,9,.96) 0%,rgba(31,15,5,.98) 100%);box-shadow:0 12px 24px rgba(0,0,0,.34), 0 0 0 1px rgba(255,228,142,.16), inset 0 1px 0 rgba(255,255,255,.14);}
.live-previous-trick-toggle__icon{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:radial-gradient(circle at 35% 30%, #fef1b5 0%, #d6a53a 45%, #7b4b0c 100%);color:#4a2d00;box-shadow:0 0 0 1px rgba(108,67,8,.72), inset 0 1px 0 rgba(255,255,255,.42);font-size:14px;line-height:1;}
.live-room-stage.is-showing-previous-trick .live-room-stage__table,.live-room-stage.is-showing-previous-trick .live-turn-compass{opacity:0;visibility:hidden;pointer-events:none;}
.live-room-stage.is-showing-previous-trick .live-previous-trick{pointer-events:auto;}
.live-previous-trick::before{content:"";position:absolute;inset:0;background:radial-gradient(circle at center, rgba(7,32,21,.08) 0%, rgba(3,16,10,.20) 58%, rgba(1,8,5,.34) 100%);border-radius:inherit;}
.live-previous-trick__badge{z-index:1;}
.live-previous-trick .live-trick-card{z-index:1;}
.live-previous-trick-toggle{z-index:10;}
.live-previous-trick-toggle__text{white-space:nowrap;}
.live-previous-trick{position:absolute;inset:0;pointer-events:none;z-index:9;cursor:pointer;}
.live-previous-trick__badge{position:absolute;left:50%;top:8px;transform:translateX(-50%);padding:6px 12px;border-radius:999px;background:rgba(8,20,14,.78);color:#fff2c0;font-size:12px;font-weight:900;letter-spacing:.03em;box-shadow:0 8px 16px rgba(0,0,0,.22), inset 0 0 0 1px rgba(255,240,188,.12);}
.live-history__item.is-latest-preview{cursor:pointer;transition:transform .16s ease, box-shadow .16s ease, background .16s ease;}
.live-history__item.is-latest-preview:hover{transform:translateY(-1px);box-shadow:0 8px 16px rgba(0,0,0,.18);background:rgba(255,240,188,.12);}
.live-trick-card--preview{opacity:1;}
.live-previous-trick.is-animating .live-trick-card--preview{animation-duration:720ms;animation-timing-function:cubic-bezier(.2,.8,.2,1);animation-fill-mode:both;animation-delay:var(--preview-delay, 0ms);}
.live-previous-trick.is-animating .live-trick-card--preview.is-previewing-from-bottom{animation-name:kingiLivePreviewFromBottom;}
.live-previous-trick.is-animating .live-trick-card--preview.is-previewing-from-top{animation-name:kingiLivePreviewFromTop;}
.live-previous-trick.is-animating .live-trick-card--preview.is-previewing-from-left{animation-name:kingiLivePreviewFromLeft;}
.live-previous-trick.is-animating .live-trick-card--preview.is-previewing-from-right{animation-name:kingiLivePreviewFromRight;}
@keyframes kingiLivePreviewFromBottom{0%{opacity:0;transform:translate(-50%, calc(-50% + 240px)) scale(.84) rotate(calc(var(--card-rotate) * .2));}100%{opacity:1;transform:translate(-50%,-50%) rotate(var(--card-rotate));}}
@keyframes kingiLivePreviewFromTop{0%{opacity:0;transform:translate(-50%, calc(-50% - 240px)) scale(.84) rotate(calc(var(--card-rotate) * .2));}100%{opacity:1;transform:translate(-50%,-50%) rotate(var(--card-rotate));}}
@keyframes kingiLivePreviewFromLeft{0%{opacity:0;transform:translate(calc(-50% - 240px),-50%) scale(.84) rotate(calc(var(--card-rotate) * .2));}100%{opacity:1;transform:translate(-50%,-50%) rotate(var(--card-rotate));}}
@keyframes kingiLivePreviewFromRight{0%{opacity:0;transform:translate(calc(-50% + 240px),-50%) scale(.84) rotate(calc(var(--card-rotate) * .2));}100%{opacity:1;transform:translate(-50%,-50%) rotate(var(--card-rotate));}}

.live-trick-card{position:absolute;overflow:visible;transition:transform .36s ease, opacity .36s ease;will-change:transform,opacity;}
.live-trick-card--bottom{left:50%;top:68%;transform:translate(-50%,-50%) rotate(var(--card-rotate));}
.live-trick-card--top{left:50%;top:32%;transform:translate(-50%,-50%) rotate(var(--card-rotate));}
.live-trick-card--left{left:24%;top:50%;transform:translate(-50%,-50%) rotate(var(--card-rotate));}
.live-trick-card--right{left:76%;top:50%;transform:translate(-50%,-50%) rotate(var(--card-rotate));}
.live-trick-card.is-entering{animation:kingiLiveTrickIn .28s ease-out;}
.live-trick-card.is-collecting{animation-duration:1.4s;animation-timing-function:ease-in;animation-fill-mode:forwards;}
.live-trick-card.is-collecting.is-collecting-to-bottom{animation-name:kingiLiveCollectBottom;}
.live-trick-card.is-collecting.is-collecting-to-top{animation-name:kingiLiveCollectTop;}
.live-trick-card.is-collecting.is-collecting-to-left{animation-name:kingiLiveCollectLeft;}
.live-trick-card.is-collecting.is-collecting-to-right{animation-name:kingiLiveCollectRight;}
@keyframes kingiLiveCollectBottom{to{opacity:0;transform:translate(-50%, calc(-50% + 250px)) rotate(var(--card-rotate));}}
@keyframes kingiLiveCollectTop{to{opacity:0;transform:translate(-50%, calc(-50% - 250px)) rotate(var(--card-rotate));}}
@keyframes kingiLiveCollectLeft{to{opacity:0;transform:translate(calc(-50% - 260px),-50%) rotate(var(--card-rotate));}}
@keyframes kingiLiveCollectRight{to{opacity:0;transform:translate(calc(-50% + 260px),-50%) rotate(var(--card-rotate));}}

@keyframes kingiLiveTrickIn{0%{opacity:.2;transform:translate(-50%, calc(-50% + 10px)) scale(.96) rotate(var(--card-rotate));}100%{opacity:1;transform:translate(-50%,-50%) scale(1) rotate(var(--card-rotate));}}
.live-card--table{display:block;width:min(10vw, 96px);height:calc(min(10vw, 96px) * 1.45);object-fit:contain;max-width:none;background:transparent;border-radius:0;}
.live-side-card{padding:12px;border-radius:20px;background:rgba(8,22,36,.62);box-shadow:0 12px 24px rgba(0,0,0,.24), inset 0 0 0 1px rgba(255,255,255,.05);color:#fff;}
.live-side-card h3{margin:0 0 8px;font-size:15px;color:#fff4cc;}
.live-order-list,.live-history__list{display:flex;flex-direction:column;gap:6px;}
.live-order-list__item,.live-history__item{display:flex;justify-content:space-between;gap:8px;padding:8px 10px;border-radius:14px;background:rgba(255,255,255,.06);font-size:13px;font-weight:700;}
.live-history__empty{font-size:13px;color:rgba(255,255,255,.78);}
.live-side-card--compact{padding:10px 11px;border-radius:18px;}
.live-order-pill--history{background:rgba(255,255,255,.06);box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);}
.live-order-pill--history:hover{background:rgba(255,255,255,.10);}

@media (max-width: 1120px){
  .live-game-shell{grid-template-columns:1fr;}
  .live-game-shell__sidebar{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
  .live-room-stage{min-height:760px;}
}
@media (max-width: 700px){
  .live-message-card__top-row{align-items:flex-start;}
  .live-message-card__title{font-size:18px;}
  .live-help-badge__tooltip{left:auto;right:0;}
  .live-room-stage{min-height:700px;}
}
@media (max-width: 900px){
  .live-room-stage{min-height:680px;}
  .live-seat--left{left:8px;top:auto;bottom:142px;transform:none;max-width:150px;}
  .live-seat--right{right:8px;top:auto;bottom:142px;transform:none;max-width:150px;}
  .live-seat--top{top:10px;max-width:88vw;min-width:0;width:auto;}
  .live-seat--bottom{bottom:8px;width:calc(100% - 16px);max-width:none;}
  .live-room-stage__table{width:min(54vw,280px);height:min(34vw,190px);}
}
@media (max-width: 640px){
  .live-game-shell__sidebar{grid-template-columns:1fr;}
  .live-seat{padding:8px 10px;}
  .live-hand--self{min-height:144px;padding:14px 8px 8px;gap:0;}
  .live-seat--bottom .live-card{width:clamp(88px, 16vw, var(--live-self-card-width-mobile, 104px));height:calc(clamp(88px, 16vw, var(--live-self-card-width-mobile, 104px)) * 1.45);}
  .live-seat__name{font-size:14px;}
  .live-seat--left,.live-seat--right{bottom:132px;max-width:128px;min-width:108px;}
  .live-room-stage{min-height:680px;}
}

.live-game-debugbar{margin:10px auto 14px;padding:10px 14px;border-radius:16px;background:rgba(255,255,255,.86);box-shadow:0 8px 18px rgba(0,0,0,.08);}
.live-game-debugbar__form{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.live-game-debugbar__form select{min-width:180px;padding:7px 10px;border-radius:10px;border:1px solid #c8d2db;background:#fff;}
.live-game-debugbar__hint{font-size:13px;color:#425466;}


.live-card-button.is-animating-play{opacity:.08;pointer-events:none;transform:translateY(4px) scale(.96);}
.live-card-button.is-dragging{opacity:.2;}
.live-drag-card-ghost{position:fixed;left:0;top:0;transform:translate3d(-50%,-50%,0) rotate(8deg);border-radius:0;pointer-events:none;z-index:9999;box-shadow:0 18px 38px rgba(0,0,0,.34);will-change:transform;backface-visibility:hidden;}
.live-flying-card{position:absolute;border-radius:0;box-shadow:0 16px 34px rgba(0,0,0,.34);pointer-events:none;z-index:20;transform:translate3d(0,0,0) rotate(var(--fly-start-rotate, 0deg)) scale(1);opacity:1;will-change:transform,opacity;backface-visibility:hidden;contain:layout paint style;}
.live-flying-card.is-active{animation:kingiLivePlayToTable var(--fly-duration,560ms) cubic-bezier(.22,.72,.18,1) forwards;}
@keyframes kingiLivePlayToTable{0%{opacity:1;transform:translate(0,0) rotate(var(--fly-start-rotate, 0deg)) scale(1,1);}22%{opacity:1;transform:translate(calc(var(--fly-x) * .16), calc(var(--fly-y) * .04 - 18px)) rotate(calc((var(--fly-start-rotate, 0deg) * .78) + (var(--fly-end-rotate, 0deg) * .22))) scale(.985,.985);}58%{opacity:1;transform:translate(calc(var(--fly-x) * .62), calc(var(--fly-y) * .64 - 8px)) rotate(calc((var(--fly-start-rotate, 0deg) * .34) + (var(--fly-end-rotate, 0deg) * .66))) scale(calc(1 + ((var(--fly-end-scale-x, .94) - 1) * .38)),calc(1 + ((var(--fly-end-scale-y, .94) - 1) * .38)));}82%{opacity:1;transform:translate(calc(var(--fly-x) * .9), calc(var(--fly-y) * 1.03)) rotate(calc((var(--fly-start-rotate, 0deg) * .08) + (var(--fly-end-rotate, 0deg) * .92))) scale(calc(1 + ((var(--fly-end-scale-x, .94) - 1) * .82)),calc(1 + ((var(--fly-end-scale-y, .94) - 1) * .82)));}100%{opacity:1;transform:translate(var(--fly-x), var(--fly-y)) rotate(var(--fly-end-rotate, 0deg)) scale(var(--fly-end-scale-x, .94), var(--fly-end-scale-y, .94));}}


.live-seat--left .live-seat__header{align-items:flex-start;justify-content:space-between;gap:6px;}
.live-seat__tricks--left{order:-1;align-self:flex-start;margin-right:auto;margin-bottom:4px;}
.live-turn-compass{position:absolute;left:50%;top:50%;width:232px;height:232px;transform:translate(-50%,-50%);z-index:3;pointer-events:none;filter:drop-shadow(0 16px 26px rgba(0,0,0,.24));opacity:.98;}
.live-turn-compass__ring{position:absolute;left:50%;top:50%;width:74px;height:74px;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(circle at 35% 35%, rgba(255,249,215,.98) 0%, rgba(37,92,69,.94) 28%, rgba(12,48,35,.98) 60%, rgba(6,22,18,.98) 100%);border:2px solid rgba(255,219,120,.85);box-shadow:0 0 0 3px rgba(113,74,13,.52), 0 0 0 8px rgba(255,225,150,.10), inset 0 0 0 1px rgba(255,249,214,.42);}
.live-turn-compass__ring::before,.live-turn-compass__ring::after{content:"";position:absolute;left:50%;top:50%;width:108px;height:28px;transform:translate(-50%,-50%);border-radius:999px;border-top:2px solid rgba(255,220,132,.62);border-bottom:2px solid rgba(119,77,13,.42);opacity:.92;}
.live-turn-compass__ring::after{transform:translate(-50%,-50%) rotate(90deg);}
.live-turn-compass__needle{position:absolute;left:50%;top:50%;width:24px;height:122px;transform:translate(-50%,-96%) rotate(var(--turn-angle,0deg));transform-origin:50% 96%;transition:transform .9s cubic-bezier(.22,.8,.2,1);filter:drop-shadow(0 8px 10px rgba(0,0,0,.30));}
.live-turn-compass__needle::before{content:"";position:absolute;left:50%;top:0;transform:translateX(-50%);width:24px;height:96px;clip-path:polygon(50% 0%, 73% 13%, 85% 26%, 96% 66%, 100% 77%, 70% 74%, 62% 100%, 50% 92%, 38% 100%, 30% 74%, 0% 77%, 4% 66%, 15% 26%, 27% 13%);background:linear-gradient(180deg,#fff2b6 0%,#f2ca66 22%,#b77a16 54%,#f7de8e 72%,#7c4d0b 100%);border:1px solid rgba(111,67,7,.88);box-shadow:inset 0 1px 0 rgba(255,255,255,.58), inset 0 -2px 4px rgba(80,41,0,.34);}
.live-turn-compass__needle::after{content:"";position:absolute;left:50%;bottom:10px;transform:translateX(-50%);width:10px;height:42px;border-radius:999px;background:linear-gradient(180deg,#f6d57b 0%, #9d6410 58%, #5f3606 100%);box-shadow:0 0 0 1px rgba(96,55,5,.72), inset 0 1px 0 rgba(255,255,255,.34);}
.live-turn-compass__core{position:absolute;left:50%;top:50%;width:28px;height:28px;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(circle at 35% 30%, #d7fff3 0%, #63d5a4 24%, #14905e 48%, #0c4c35 68%, #08241a 100%);box-shadow:0 0 0 3px rgba(255,224,136,.92), 0 0 0 7px rgba(120,75,10,.54), 0 5px 12px rgba(0,0,0,.34), inset 0 2px 4px rgba(255,255,255,.34);}
.live-turn-compass__core::before,.live-turn-compass__core::after{content:"";position:absolute;left:50%;top:50%;width:54px;height:14px;transform:translate(-50%,-50%);border-radius:999px;background:linear-gradient(90deg, rgba(255,223,133,0) 0%, rgba(255,223,133,.95) 18%, rgba(123,76,10,.85) 50%, rgba(255,223,133,.95) 82%, rgba(255,223,133,0) 100%);opacity:.82;z-index:-1;}
.live-turn-compass__core::after{transform:translate(-50%,-50%) rotate(90deg);}

.live-history__item.is-latest-preview{cursor:pointer;}
.live-history__item.is-latest-preview.is-open{box-shadow:0 0 0 2px rgba(255,224,143,.28) inset;}
button.live-history__item{appearance:none;-webkit-appearance:none;display:flex;justify-content:space-between;align-items:center;gap:10px;width:100%;border:none;padding:8px 10px;border-radius:14px;background:rgba(255,255,255,.06);color:inherit;font:inherit;text-align:left;box-sizing:border-box;cursor:pointer;}
button.live-history__item b,button.live-history__item span{display:block;}


/* 2026-04-04: live game hand spacing, previous trick button, larger logo */
.live-seat--bottom{
  width:min(96vw, 1280px);
}
.live-hand--self{
  justify-content:center;
  padding:18px 56px 12px;
  min-height:176px;
}
.live-seat--bottom .live-seat__body{
  overflow:visible;
}
.live-seat--bottom .live-card-button{
  overflow:visible;
  margin-right:calc(clamp(100px, 9.1vw, var(--live-self-card-width, 118px)) * -0.028);
}
.live-seat--bottom .live-card-button:first-child{
  margin-left:22px;
}
.live-seat--bottom .live-card-button:last-child{
  margin-right:22px;
}
.live-seat--bottom .live-card{
  width:clamp(100px, 9.1vw, var(--live-self-card-width, 118px));
  height:calc(clamp(100px, 9.1vw, var(--live-self-card-width, 118px)) * 1.45);
  transform:rotate(calc((var(--fan-index, 0) - var(--fan-mid, 0)) * 0.68deg));
  transform-origin:center bottom;
}
.live-seat--bottom .live-card-button:hover{
  transform:translateY(-6px);
}
.live-seat--bottom .live-card-button.is-selected{
  transform:translateY(-16px) scale(1.04);
}

.live-previous-trick-toggle{
  right:14px;
  bottom:12px;
  gap:8px;
  padding:8px 14px;
  border:1px solid rgba(255,228,142,.38);
  border-radius:999px;
  background:linear-gradient(180deg, rgba(182,148,46,.34) 0%, rgba(103,77,19,.34) 100%);
  color:#fff7d4;
  font-size:13px;
  font-weight:900;
  box-shadow:0 8px 18px rgba(0,0,0,.22), inset 0 0 0 1px rgba(255,255,255,.06);
}
.live-previous-trick-toggle:hover{
  transform:translateY(-1px);
  background:linear-gradient(180deg, rgba(205,167,54,.42) 0%, rgba(120,90,22,.42) 100%);
}
.live-previous-trick-toggle.is-open{
  background:linear-gradient(180deg, rgba(236,194,67,.56) 0%, rgba(145,105,20,.48) 100%);
  box-shadow:0 10px 22px rgba(0,0,0,.28), 0 0 0 2px rgba(255,235,156,.16), inset 0 1px 0 rgba(255,255,255,.16);
}
.live-previous-trick-toggle__icon{
  width:18px;
  height:18px;
  font-size:12px;
  background:none;
  color:inherit;
  box-shadow:none;
}
.live-previous-trick-toggle__text{
  font-weight:900;
}

.app-logo-link{
  max-width:min(100%, 920px) !important;
}
.app-logo-wordmark{
  width:min(100%, 920px) !important;
  max-height:116px !important;
}
.app-header__top--centered{
  min-height:108px !important;
}
@media (max-width: 900px){
  .live-hand--self{
    padding:14px 24px 10px;
    min-height:150px;
  }
  .live-seat--bottom .live-card-button{
    margin-right:calc(clamp(84px, 13.2vw, var(--live-self-card-width-mobile, 98px)) * -0.03);
  }
  .live-seat--bottom .live-card-button:first-child{
    margin-left:10px;
  }
  .live-seat--bottom .live-card-button:last-child{
    margin-right:10px;
  }
  .live-seat--bottom .live-card{
    width:clamp(84px, 13.2vw, var(--live-self-card-width-mobile, 98px));
    height:calc(clamp(84px, 13.2vw, var(--live-self-card-width-mobile, 98px)) * 1.45);
    transform:rotate(calc((var(--fan-index, 0) - var(--fan-mid, 0)) * 0.58deg));
  }
  .app-logo-link{
    max-width:min(100%, 720px) !important;
  }
  .app-logo-wordmark{
    width:min(100%, 720px) !important;
    max-height:84px !important;
  }
  .app-header__top--centered{
    min-height:84px !important;
  }
}
@media (max-width: 640px){
  .live-hand--self{
    padding:12px 18px 8px;
    min-height:140px;
  }
  .live-seat--bottom .live-card-button{
    margin-right:calc(clamp(78px, 14.8vw, var(--live-self-card-width-mobile, 92px)) * -0.032);
  }
  .live-seat--bottom .live-card{
    width:clamp(78px, 14.8vw, var(--live-self-card-width-mobile, 92px));
    height:calc(clamp(78px, 14.8vw, var(--live-self-card-width-mobile, 92px)) * 1.45);
    transform:rotate(calc((var(--fan-index, 0) - var(--fan-mid, 0)) * 0.5deg));
  }
}

/* 2026-04-04: shift side/top info seats away from main hand and closer to edges */
.live-seat--left,
.live-seat--right{
  top:42%;
}
.live-seat--left{
  left:4px;
}
.live-seat--right{
  right:4px;
}
.live-seat--top{
  top:2px;
}
.live-seat--left .live-seat__body,
.live-seat--right .live-seat__body,
.live-seat--top .live-seat__body{
  overflow:visible;
}
.live-seat--left .live-hand--left{
  margin-left:-14px;
  margin-right:auto;
}
.live-seat--right .live-hand--right{
  margin-right:-14px;
  margin-left:auto;
}
.live-seat--top .live-hand--top{
  margin-top:-10px;
  margin-bottom:0;
}

@media (max-width: 900px){
  .live-seat--left,
  .live-seat--right{
    bottom:168px;
  }
  .live-seat--left{left:4px;}
  .live-seat--right{right:4px;}
  .live-seat--top{top:2px;}
  .live-seat--left .live-hand--left{margin-left:-10px;}
  .live-seat--right .live-hand--right{margin-right:-10px;}
  .live-seat--top .live-hand--top{margin-top:-6px;}
}

@media (max-width: 640px){
  .live-seat--left,
  .live-seat--right{
    bottom:154px;
  }
}


/* 2026-04-04: remove separate previous trick button; make latest history row match others */
.live-previous-trick-toggle{display:none !important;}
.live-history__item{align-items:center;min-height:52px;box-sizing:border-box;}
.live-history__item b,.live-history__item span{line-height:1.2;}
.live-history__item.is-latest-preview{background:rgba(255,255,255,.06);}
.live-history__item.is-latest-preview:hover{background:rgba(255,255,255,.10);}


.avatar-edit-block{display:flex;flex-direction:column;gap:14px}
.avatar-current img{width:88px;height:88px;object-fit:cover;border-radius:20px;border:2px solid rgba(0,0,0,.15)}
.avatar-gallery{display:flex;flex-wrap:wrap;gap:10px}
.avatar-choice{display:flex;flex-direction:column;align-items:center;gap:6px;padding:8px;border:1px solid rgba(0,0,0,.12);border-radius:14px;background:#faf7ef;min-width:86px;cursor:pointer}
.avatar-choice img{width:64px;height:64px;object-fit:cover;border-radius:16px}
.avatar-choice.is-disabled{opacity:.45;cursor:not-allowed}
.avatar-choice--none,.avatar-choice--upload{min-width:120px;justify-content:center}
.avatar-upload{display:flex;flex-direction:column;gap:8px}
.form-help{font-size:12px;opacity:.85}
.live-seat__avatar-wrap{flex:0 0 auto;display:flex;align-items:center;justify-content:center;margin-right:14px}
.live-seat__avatar{width:140px;height:140px;object-fit:cover;border-radius:36px;box-shadow:0 10px 28px rgba(0,0,0,.28);border:3px solid rgba(255,255,255,.68);background:rgba(255,255,255,.08)}
@media (max-width: 1280px){
  .live-seat__avatar{width:120px;height:120px;border-radius:32px;}
}
@media (max-width: 980px){
  .live-seat__avatar-wrap{margin-right:10px}
  .live-seat__avatar{width:96px;height:96px;border-radius:26px;}
}

/* 2026-04-04: show full cards in live hand without cropping */
.live-card,
.live-card--face,
.live-card--table,
.live-flying-card,
.live-drag-card-ghost{
  object-fit:contain !important;
  background:#fff;
}

.live-seat--bottom .live-seat__body{
  overflow:visible;
}
.live-hand--self{
  overflow:visible;
}
.live-seat--bottom .live-card-button{
  overflow:visible;
  margin-right:calc(clamp(78px, 9.2vw, 108px) * -0.16);
}
.live-seat--bottom .live-card-button:first-child{
  margin-left:8px;
}
.live-seat--bottom .live-card-button:last-child{
  margin-right:8px;
}
.live-seat--bottom .live-card{
  width:clamp(78px, 9.2vw, 108px);
  height:calc(clamp(78px, 9.2vw, 108px) * 1.45);
  transform:rotate(calc((var(--fan-index, 0) - var(--fan-mid, 0)) * 0.55deg));
  transform-origin:center bottom;
}

@media (max-width: 900px){
  .live-seat--bottom .live-card-button{
    margin-right:calc(clamp(66px, 12.5vw, 92px) * -0.18);
  }
  .live-seat--bottom .live-card{
    width:clamp(66px, 12.5vw, 92px);
    height:calc(clamp(66px, 12.5vw, 92px) * 1.45);
  }
}

@media (max-width: 640px){
  .live-seat--bottom .live-card-button{
    margin-right:calc(clamp(54px, 14vw, 78px) * -0.20);
  }
  .live-seat--bottom .live-card{
    width:clamp(54px, 14vw, 78px);
    height:calc(clamp(54px, 14vw, 78px) * 1.45);
  }
}


/* 2026-04-04: move self avatar left of hand and enlarge 1.5x */
.live-seat__body-row{display:flex;align-items:flex-end;justify-content:center;gap:18px;width:100%;}
.live-seat__body-main{min-width:0;flex:1 1 auto;display:flex;justify-content:center;}
.live-seat--bottom .live-seat__avatar-wrap{order:-1;align-self:flex-end;margin:0 8px 10px 0;}
.live-seat--bottom .live-seat__avatar{width:210px;height:210px;border-radius:48px;border-width:4px;box-shadow:0 14px 36px rgba(0,0,0,.30);}
.live-seat--bottom .live-hand--self{justify-content:flex-start;}
@media (max-width: 1280px){
  .live-seat--bottom .live-seat__avatar{width:180px;height:180px;border-radius:42px;}
  .live-seat__body-row{gap:14px;}
}
@media (max-width: 980px){
  .live-seat--bottom .live-seat__avatar{width:144px;height:144px;border-radius:34px;}
  .live-seat__body-row{align-items:center;gap:10px;}
}
@media (max-width: 760px){
  .live-seat__body-row{flex-direction:column;align-items:center;}
  .live-seat--bottom .live-seat__avatar-wrap{margin:0 0 8px 0;}
  .live-seat--bottom .live-hand--self{justify-content:center;}
}

/* 2026-04-04: lower top player block by lifting top fan upward aggressively */
.live-seat--top{
  padding:6px 10px 2px;
}
.live-seat--top .live-seat__header{
  position:relative;
  z-index:2;
  margin-bottom:-20px;
}
.live-seat--top .live-seat__body{
  margin-top:-28px;
  margin-bottom:-12px;
  min-height:78px;
}
.live-seat--top .live-hand--top{
  margin-top:-42px;
  margin-bottom:-22px;
}

@media (max-width: 900px){
  .live-seat--top{
    padding:5px 8px 2px;
  }
  .live-seat--top .live-seat__header{
    margin-bottom:-16px;
  }
  .live-seat--top .live-seat__body{
    margin-top:-22px;
    margin-bottom:-10px;
    min-height:68px;
  }
  .live-seat--top .live-hand--top{
    margin-top:-34px;
    margin-bottom:-18px;
  }
}

@media (max-width: 640px){
  .live-seat--top .live-seat__header{
    margin-bottom:-12px;
  }
  .live-seat--top .live-seat__body{
    margin-top:-18px;
    margin-bottom:-8px;
    min-height:60px;
  }
  .live-seat--top .live-hand--top{
    margin-top:-26px;
    margin-bottom:-14px;
  }
}


/* 2026-04-04: avatars integrated into seat bubbles and all hand fans centered upward */
.live-seat{overflow:visible;}
.live-seat__header,.live-seat__footer,.live-seat__badges,.live-seat-badge{display:none !important;}
.live-seat__body{width:100%;display:flex;align-items:center;gap:12px;overflow:visible;}
.live-seat__body--self{justify-content:flex-start;gap:14px;}
.live-seat__body--stacked{flex-direction:column;justify-content:flex-start;align-items:center;gap:10px;}
.live-seat__identity{display:flex;align-items:center;gap:12px;flex:0 0 auto;}
.live-seat__identity--self{min-width:220px;max-width:280px;}
.live-seat__identity--stacked{flex-direction:column;align-items:center;text-align:center;gap:8px;width:100%;}
.live-seat__meta{display:flex;flex-direction:column;justify-content:center;gap:4px;}
.live-seat__identity--stacked .live-seat__meta{align-items:center;}
.live-seat__name{font-size:16px;font-weight:900;color:#fff7d4;line-height:1.05;}
.live-seat__line{font-size:12px;font-weight:800;color:#dfeaff;line-height:1.15;}
.live-seat__line--status{text-transform:uppercase;letter-spacing:.04em;}
.live-seat__avatar-wrap{display:none !important;}
.live-seat__avatar{flex:0 0 auto;display:block;width:140px;height:140px;object-fit:cover;border-radius:28px;box-shadow:0 10px 28px rgba(0,0,0,.28);border:3px solid rgba(255,255,255,.68);background:rgba(255,255,255,.08);}
.live-seat__avatar--placeholder{background:rgba(255,255,255,.05);border-style:dashed;opacity:.45;}
.live-seat__cards{flex:1 1 auto;min-width:0;width:100%;display:flex;justify-content:center;align-items:flex-end;overflow:visible;}
.live-seat--bottom{width:min(96vw, 1260px);}
.live-seat--bottom .live-seat__body{justify-content:flex-start;}
.live-seat--bottom .live-seat__avatar{width:140px;height:140px;border-radius:30px;}
.live-seat--bottom .live-seat__cards{justify-content:flex-start;}
.live-seat--bottom .live-hand--self{justify-content:flex-start;padding:10px 8px 6px;min-height:158px;}
.live-seat--bottom .live-card-button{margin-right:calc(clamp(94px, 8.5vw, var(--live-self-card-width, 112px)) * -0.19);}
.live-seat--bottom .live-card{width:clamp(94px, 8.5vw, var(--live-self-card-width, 112px));height:calc(clamp(94px, 8.5vw, var(--live-self-card-width, 112px)) * 1.45);transform:rotate(calc((var(--fan-index, 0) - var(--fan-mid, 0)) * 1.2deg));}
.live-seat--top,.live-seat--left,.live-seat--right{padding-top:10px;}
.live-seat--left,.live-seat--right{min-width:168px;max-width:188px;}
.live-seat--top{min-width:240px;max-width:340px;}
.live-seat--left .live-seat__avatar,.live-seat--right .live-seat__avatar,.live-seat--top .live-seat__avatar{width:96px;height:96px;border-radius:24px;}
.live-hand--backs{display:flex;justify-content:center;align-items:flex-end;width:100%;min-height:118px;height:auto;overflow:visible;}
.live-hand--top,.live-hand--left,.live-hand--right{margin:0 auto;}
.live-hand--backs .live-card--back{position:relative;left:auto;top:auto;margin:0 0 0 calc(var(--live-card-width, 110px) * -0.24);transform-origin:center bottom;transform:rotate(calc((var(--fan-index, 0) - var(--fan-mid, 0)) * 1.12deg));}
.live-hand--backs .live-card--back:first-child{margin-left:0;}
.live-seat--top .live-hand--backs .live-card--back,.live-seat--left .live-hand--backs .live-card--back,.live-seat--right .live-hand--backs .live-card--back{width:clamp(44px, 4.2vw, 62px);height:calc(clamp(44px, 4.2vw, 62px) * 1.45);}
@media (max-width: 1280px){.live-seat--bottom .live-seat__avatar{width:124px;height:124px;}.live-seat--left .live-seat__avatar,.live-seat--right .live-seat__avatar,.live-seat--top .live-seat__avatar{width:86px;height:86px;}}
@media (max-width: 980px){.live-seat--bottom .live-seat__body{gap:10px;}.live-seat--bottom .live-seat__identity--self{min-width:170px;max-width:190px;}.live-seat--bottom .live-seat__avatar{width:108px;height:108px;border-radius:24px;}.live-seat--left,.live-seat--right{min-width:152px;max-width:164px;}.live-seat--top{max-width:280px;}.live-hand--backs{min-height:104px;}}
@media (max-width: 640px){.live-seat--bottom .live-seat__body{flex-direction:column;align-items:flex-start;}.live-seat--bottom .live-seat__identity--self{min-width:0;max-width:none;width:100%;}.live-seat--bottom .live-seat__cards{width:100%;}.live-seat--bottom .live-hand--self{width:100%;}}

/* 2026-04-04: tighten top/side fans, enlarge avatars, top seat avatar+meta side by side, self hand background tightened */
.live-seat--left .live-seat__avatar,
.live-seat--right .live-seat__avatar,
.live-seat--top .live-seat__avatar{
  width:134px;
  height:134px;
  border-radius:30px;
}
.live-seat--bottom .live-seat__avatar{
  width:196px;
  height:196px;
  border-radius:38px;
}

.live-seat--left .live-seat__body,
.live-seat--right .live-seat__body{
  gap:6px;
}
.live-seat--left .live-seat__identity,
.live-seat--right .live-seat__identity{
  gap:6px;
}
.live-seat--left .live-seat__meta,
.live-seat--right .live-seat__meta{
  gap:2px;
}
.live-seat--left .live-hand--backs .live-card--back,
.live-seat--right .live-hand--backs .live-card--back,
.live-seat--top .live-hand--backs .live-card--back{
  margin-left:calc(var(--live-card-width, 110px) * -0.34);
}
.live-seat--left .live-hand--backs,
.live-seat--right .live-hand--backs,
.live-seat--top .live-hand--backs{
  min-height:98px;
}
.live-seat--top{
  min-width:320px;
  max-width:420px;
}
.live-seat--top .live-seat__body{
  flex-direction:column;
  align-items:center;
  gap:8px;
}
.live-seat--top .live-seat__identity{
  width:100%;
  flex-direction:row;
  align-items:center;
  justify-content:flex-start;
  text-align:left;
  gap:12px;
}
.live-seat--top .live-seat__meta{
  align-items:flex-start;
  justify-content:center;
  gap:2px;
}
.live-seat--top .live-seat__cards{
  justify-content:center;
}

.live-seat--bottom .live-seat__body{
  align-items:flex-end;
  gap:10px;
}
.live-seat--bottom .live-seat__cards{
  align-self:flex-end;
}
.live-seat--bottom .live-hand--self{
  padding:0 4px 0;
  min-height:auto;
  align-items:flex-end;
}
.live-seat--bottom .live-card-button,
.live-seat--bottom .live-card{
  display:block;
  line-height:0;
  vertical-align:bottom;
}
.live-seat--bottom .live-card{
  background:#fff;
  border-radius:12px;
}

@media (max-width: 1280px){
  .live-seat--left .live-seat__avatar,
  .live-seat--right .live-seat__avatar,
  .live-seat--top .live-seat__avatar{width:118px;height:118px;border-radius:28px;}
  .live-seat--bottom .live-seat__avatar{width:172px;height:172px;border-radius:34px;}
  .live-seat--top{min-width:290px;max-width:380px;}
}
@media (max-width: 980px){
  .live-seat--left .live-seat__avatar,
  .live-seat--right .live-seat__avatar,
  .live-seat--top .live-seat__avatar{width:102px;height:102px;border-radius:24px;}
  .live-seat--bottom .live-seat__avatar{width:148px;height:148px;border-radius:30px;}
  .live-seat--left .live-hand--backs .live-card--back,
  .live-seat--right .live-hand--backs .live-card--back,
  .live-seat--top .live-hand--backs .live-card--back{margin-left:calc(var(--live-card-width, 110px) * -0.38);}
  .live-seat--top{min-width:250px;max-width:330px;}
}
@media (max-width: 640px){
  .live-seat--left .live-seat__avatar,
  .live-seat--right .live-seat__avatar,
  .live-seat--top .live-seat__avatar{width:84px;height:84px;border-radius:20px;}
  .live-seat--bottom .live-seat__avatar{width:120px;height:120px;border-radius:26px;}
  .live-seat--bottom .live-hand--self{padding:0;}
}

/* 2026-04-04: fix avatar crop, keep opponent fans centered inside bubbles, and match card aspect ratio */
:root{
  --kingi-card-ratio: 1.4108;
}

.live-seat__avatar{
  object-position:center top;
}

.live-card,
.live-card--face,
.live-card--table,
.live-flying-card,
.live-drag-card-ghost,
.live-deal-card,
.live-deck-card{
  background:transparent !important;
}

.live-seat--top .live-hand--backs .live-card--back,
.live-seat--left .live-hand--backs .live-card--back,
.live-seat--right .live-hand--backs .live-card--back{
  height:calc(clamp(44px, 4.2vw, 62px) * var(--kingi-card-ratio)) !important;
}

.live-trick-card .live-card,
.live-trick-card .live-card--table,
.live-previous-trick .live-card,
.live-previous-trick .live-card--table{
  background:transparent !important;
  height:calc(var(--live-card-width, 110px) * var(--kingi-card-ratio)) !important;
}

@media (max-width: 900px){
  .live-seat--bottom .live-card,
  .live-seat--bottom .live-card--face,
  .live-seat--bottom .live-card--table{
    height:calc(clamp(66px, 12.5vw, 92px) * var(--kingi-card-ratio)) !important;
  }
}

@media (max-width: 640px){
  .live-seat--bottom .live-card,
  .live-seat--bottom .live-card--face,
  .live-seat--bottom .live-card--table{
    height:calc(clamp(54px, 14vw, 78px) * var(--kingi-card-ratio)) !important;
  }
}


/* 2026-04-05: refined compass, transparent card corners, top meta centered, and bottom fan shifted right */
.live-turn-compass{
  width:464px;
  height:464px;
  filter:drop-shadow(0 22px 34px rgba(0,0,0,.26));
}
.live-turn-compass__ring{
  width:186px;
  height:186px;
  background:
    repeating-conic-gradient(
      from -90deg,
      rgba(255,224,146,.98) 0deg 1.2deg,
      rgba(255,224,146,0) 1.2deg 9deg,
      rgba(136,88,14,.92) 9deg 10deg,
      rgba(136,88,14,0) 10deg 15deg
    ),
    radial-gradient(circle at center,
      transparent 0 39%,
      rgba(10,44,32,.0) 39.5%,
      rgba(255,237,175,.92) 40%,
      rgba(171,119,27,.95) 45%,
      rgba(34,95,70,.96) 58%,
      rgba(11,41,30,.98) 69%,
      rgba(255,235,171,.84) 76%,
      rgba(85,55,9,.9) 82%,
      rgba(255,230,160,.65) 86%,
      rgba(255,230,160,0) 87%
    );
  border:none;
  box-shadow:
    0 0 0 3px rgba(88,58,10,.55),
    0 0 0 9px rgba(255,226,154,.12),
    inset 0 0 0 1px rgba(255,245,213,.34);
}
.live-turn-compass__ring::before,
.live-turn-compass__ring::after{
  content:"";
  position:absolute;
  inset:18px;
  border-radius:50%;
  border:1px solid rgba(255,233,177,.22);
  transform:none;
  width:auto;
  height:auto;
  opacity:.8;
}
.live-turn-compass__ring::after{
  inset:30px;
  border-color:rgba(111,76,18,.34);
}
.live-turn-compass__needle{
  width:42px;
  height:246px;
  transform:translate(-50%,-95%) rotate(var(--turn-angle,0deg));
  transform-origin:50% 95%;
  transition:transform .92s cubic-bezier(.2,.82,.2,1);
  filter:drop-shadow(0 10px 14px rgba(0,0,0,.30));
}
.live-turn-compass__needle::before{
  width:42px;
  height:188px;
  clip-path:polygon(50% 0%, 61% 7%, 78% 22%, 92% 46%, 100% 64%, 83% 63%, 72% 86%, 61% 100%, 50% 92%, 39% 100%, 28% 86%, 17% 63%, 0 64%, 8% 46%, 22% 22%, 39% 7%);
  background:linear-gradient(180deg,#fff8dd 0%,#d5d9de 10%,#f4db89 22%,#caa13b 41%,#a06d14 57%,#f4d57a 75%,#d8dde2 88%,#8a5a10 100%);
  border:1px solid rgba(90,58,9,.9);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72), inset 0 -3px 6px rgba(75,41,0,.28);
}
.live-turn-compass__needle::after{
  width:16px;
  height:78px;
  bottom:16px;
  background:linear-gradient(180deg,#eceff3 0%, #acb5bf 22%, #f3da87 42%, #bb8a28 66%, #6e4810 100%);
  box-shadow:0 0 0 1px rgba(92,58,12,.82), inset 0 1px 0 rgba(255,255,255,.36);
}
.live-turn-compass__core{
  width:42px;
  height:42px;
  background:transparent;
  box-shadow:none;
  border:2px solid rgba(255,227,150,.92);
}
.live-turn-compass__core::before,
.live-turn-compass__core::after{display:none;}

.live-card,
.live-card--face,
.live-card--table,
.live-flying-card,
.live-drag-card-ghost,
.live-deal-card,
.live-deck-card{
  background:transparent !important;
}

.live-seat--top .live-seat__identity{
  justify-content:center;
}
.live-seat--top .live-seat__meta{
  align-items:center;
  text-align:center;
}

.live-seat--bottom .live-seat__cards{
  padding-left:26px;
}
.live-seat--bottom .live-hand--self{
  padding-left:18px;
}
.live-seat--bottom .live-card-button:first-child{
  margin-left:34px;
}

@media (max-width: 1280px){
  .live-turn-compass{width:400px;height:400px;}
  .live-turn-compass__ring{width:160px;height:160px;}
  .live-turn-compass__needle{height:214px;}
  .live-turn-compass__needle::before{height:164px;}
  .live-turn-compass__needle::after{height:66px;}
  .live-seat--bottom .live-seat__cards{padding-left:18px;}
  .live-seat--bottom .live-card-button:first-child{margin-left:26px;}
}

@media (max-width: 980px){
  .live-turn-compass{width:332px;height:332px;}
  .live-turn-compass__ring{width:132px;height:132px;}
  .live-turn-compass__needle{width:34px;height:178px;}
  .live-turn-compass__needle::before{width:34px;height:136px;}
  .live-turn-compass__needle::after{width:13px;height:54px;}
  .live-turn-compass__core{width:34px;height:34px;}
  .live-seat--bottom .live-seat__cards{padding-left:12px;}
  .live-seat--bottom .live-hand--self{padding-left:10px;}
  .live-seat--bottom .live-card-button:first-child{margin-left:18px;}
}


/* 2026-04-05 live scoring + round-end score overlay */
.live-room-stage__round-score{position:absolute;left:18px;top:50%;transform:translateY(-50%);z-index:7;pointer-events:none;}
.live-scoreboard{min-width:240px;max-width:min(30vw,360px);padding:12px 12px 10px;border-radius:18px;background:rgba(7,16,28,.92);color:#fff7dc;box-shadow:0 18px 32px rgba(0,0,0,.34), inset 0 0 0 1px rgba(255,255,255,.08);}
.live-scoreboard--compact{min-width:280px;max-width:min(420px, calc(100vw - 44px));padding:0;background:transparent;box-shadow:none;border-radius:0;}
.live-scoreboard__title{font-size:13px;font-weight:900;color:#fff1bf;}
.live-scoreboard__round{margin-top:2px;margin-bottom:8px;font-size:12px;font-weight:700;color:#d8e7ff;}
.live-scoreboard__table{width:100%;border-collapse:collapse;font-size:12px;table-layout:auto;}
.live-scoreboard__table th,.live-scoreboard__table td{padding:6px 7px;border-bottom:1px solid rgba(255,255,255,.08);text-align:center;white-space:nowrap;}
.live-scoreboard__table th:first-child,.live-scoreboard__table td:first-child{text-align:left;white-space:normal;}
.live-scoreboard__table th{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:#ffd86f;}
.live-scoreboard__table tbody tr:last-child td{border-bottom:0;}
.live-scorebook-badge__tooltip{min-width:320px;}
.live-scorebook-badge__tooltip .live-scoreboard__round{margin-bottom:6px;}
.live-room-stage.is-shuffling .live-room-stage__deck .live-deck-card{animation:kingiLiveDeckShuffle 1.05s cubic-bezier(.42,0,.2,1) infinite;}
.live-room-stage.is-shuffling .live-room-stage__deck .live-deck-card:nth-child(2n){animation-duration:1.2s;}
.live-room-stage.is-shuffling .live-room-stage__deck .live-deck-card:nth-child(3n){animation-duration:.92s;}
@keyframes kingiLiveDeckShuffle{0%{transform:translate(calc(var(--deck-offset) * 1px), calc(var(--deck-offset) * -1px)) rotate(calc(var(--deck-offset) * -1deg));}20%{transform:translate(calc(var(--deck-offset) * -4px), calc(var(--deck-offset) * -6px)) rotate(-10deg);}45%{transform:translate(calc(var(--deck-offset) * 6px), calc(var(--deck-offset) * 4px)) rotate(11deg);}70%{transform:translate(calc(var(--deck-offset) * -3px), calc(var(--deck-offset) * 2px)) rotate(-8deg);}100%{transform:translate(calc(var(--deck-offset) * 1px), calc(var(--deck-offset) * -1px)) rotate(calc(var(--deck-offset) * -1deg));}}
@media (max-width: 1100px){.live-room-stage__round-score{left:12px;top:86px;transform:none;}.live-scoreboard{max-width:min(44vw,320px);}}
@media (max-width: 900px){.live-room-stage__round-score{position:relative;left:auto;top:auto;transform:none;margin:12px 12px 0 12px;}.live-scoreboard{max-width:none;width:calc(100% - 0px);}}


/* 2026-04-05: self hand auto-fit sizing so cards stay playable and fit the live window */
.live-seat--bottom .live-seat__body{
  display:grid !important;
  grid-template-columns:clamp(128px, 15vw, 182px) minmax(0, 1fr);
  align-items:end;
  gap:12px;
}
.live-seat--bottom .live-seat__identity--self{
  min-width:0 !important;
  max-width:none !important;
  width:100%;
}
.live-seat--bottom .live-seat__cards{
  min-width:0;
  width:100%;
  overflow:hidden;
  justify-content:flex-start;
  padding-left:0 !important;
}
.live-seat--bottom .live-hand--self{
  --self-card-width: clamp(62px, calc((100% - 24px) / ((var(--self-hand-count, 13) * 0.72) + 0.85)), 108px);
  width:100%;
  min-width:0;
  justify-content:flex-start;
  align-items:flex-end;
  padding:6px 6px 4px !important;
  min-height:calc((var(--self-card-width) * var(--kingi-card-ratio)) + 24px);
}
.live-seat--bottom .live-card-button{
  margin-right:calc(var(--self-card-width) * -0.30) !important;
}
.live-seat--bottom .live-card-button:first-child{
  margin-left:0 !important;
}
.live-seat--bottom .live-card-button:last-child{
  margin-right:0 !important;
}
.live-seat--bottom .live-card,
.live-seat--bottom .live-card--face,
.live-seat--bottom .live-card--table{
  width:var(--self-card-width) !important;
  height:calc(var(--self-card-width) * var(--kingi-card-ratio)) !important;
  max-width:none;
}
.live-seat--bottom .live-card{
  transform:rotate(calc((var(--fan-index, 0) - var(--fan-mid, 0)) * 0.78deg));
}
.live-seat--bottom .live-card-button.is-selected{
  transform:translateY(-14px) scale(1.03);
}

@media (max-width: 980px){
  .live-seat--bottom .live-seat__body{
    grid-template-columns:120px minmax(0, 1fr);
    gap:10px;
  }
  .live-seat--bottom .live-hand--self{
    --self-card-width: clamp(54px, calc((100% - 18px) / ((var(--self-hand-count, 13) * 0.74) + 0.8)), 90px);
    padding:4px 4px 2px !important;
  }
  .live-seat--bottom .live-card-button{
    margin-right:calc(var(--self-card-width) * -0.32) !important;
  }
}

@media (max-width: 640px){
  .live-seat--bottom .live-seat__body{
    grid-template-columns:1fr;
    align-items:start;
  }
  .live-seat--bottom .live-seat__identity--self{
    display:flex;
    justify-content:flex-start;
  }
  .live-seat--bottom .live-seat__cards{
    width:100%;
  }
  .live-seat--bottom .live-hand--self{
    --self-card-width: clamp(42px, calc((100% - 12px) / ((var(--self-hand-count, 13) * 0.78) + 0.75)), 72px);
    justify-content:center;
  }
  .live-seat--bottom .live-card-button{
    margin-right:calc(var(--self-card-width) * -0.34) !important;
  }
}

/* 2026-04-05: balance live table layout - taller top seat, narrower opponent fans, smaller trick cards */
.live-room-stage{
  min-height:860px;
}
.live-room-stage__table{
  width:min(28vw, 248px);
  height:min(20vw, 176px);
}

.live-card--table,
.live-trick-card .live-card,
.live-trick-card .live-card--table,
.live-previous-trick .live-card,
.live-previous-trick .live-card--table{
  width:min(8.1vw, 78px) !important;
  height:calc(min(8.1vw, 78px) * var(--kingi-card-ratio)) !important;
}
.live-trick-card--bottom{top:66%;}
.live-trick-card--top{top:34%;}
.live-trick-card--left{left:27%;}
.live-trick-card--right{left:73%;}

.live-seat--top{
  top:8px;
  min-width:300px;
  max-width:380px;
  min-height:224px;
  padding:18px 14px 12px;
}
.live-seat--top .live-seat__body{
  justify-content:flex-start;
  gap:12px;
}
.live-seat--top .live-seat__identity{
  padding-top:4px;
}
.live-seat--top .live-seat__cards{
  min-height:86px;
  align-items:flex-start;
}
.live-seat--top .live-hand--top,
.live-seat--top .live-hand--backs{
  min-height:82px;
}

.live-seat--left,
.live-seat--right{
  min-width:150px;
  max-width:164px;
}
.live-seat--left .live-seat__avatar,
.live-seat--right .live-seat__avatar,
.live-seat--top .live-seat__avatar{
  width:108px;
  height:108px;
  border-radius:26px;
}
.live-seat--left .live-hand--backs,
.live-seat--right .live-hand--backs,
.live-seat--top .live-hand--backs{
  min-height:88px;
}
.live-seat--left .live-hand--backs .live-card--back,
.live-seat--right .live-hand--backs .live-card--back,
.live-seat--top .live-hand--backs .live-card--back{
  width:clamp(36px, 3.4vw, 50px) !important;
  height:calc(clamp(36px, 3.4vw, 50px) * var(--kingi-card-ratio)) !important;
  margin-left:calc(clamp(36px, 3.4vw, 50px) * -0.46) !important;
}
.live-seat--top .live-hand--backs .live-card--back{
  margin-left:calc(clamp(36px, 3.4vw, 50px) * -0.42) !important;
}
.live-seat--left .live-hand--backs .live-card--back:first-child,
.live-seat--right .live-hand--backs .live-card--back:first-child,
.live-seat--top .live-hand--backs .live-card--back:first-child{
  margin-left:0 !important;
}

@media (max-width: 1280px){
  .live-room-stage{min-height:800px;}
  .live-room-stage__table{width:min(32vw, 230px);height:min(22vw, 164px);}
  .live-seat--top{min-width:270px;max-width:340px;min-height:204px;padding-top:16px;}
  .live-seat--left .live-seat__avatar,
  .live-seat--right .live-seat__avatar,
  .live-seat--top .live-seat__avatar{width:94px;height:94px;border-radius:22px;}
  .live-seat--left .live-hand--backs .live-card--back,
  .live-seat--right .live-hand--backs .live-card--back,
  .live-seat--top .live-hand--backs .live-card--back{
    width:clamp(34px, 3.2vw, 44px) !important;
    height:calc(clamp(34px, 3.2vw, 44px) * var(--kingi-card-ratio)) !important;
    margin-left:calc(clamp(34px, 3.2vw, 44px) * -0.48) !important;
  }
  .live-card--table,
  .live-trick-card .live-card,
  .live-trick-card .live-card--table,
  .live-previous-trick .live-card,
  .live-previous-trick .live-card--table{
    width:min(7.6vw, 72px) !important;
    height:calc(min(7.6vw, 72px) * var(--kingi-card-ratio)) !important;
  }
}

@media (max-width: 980px){
  .live-room-stage{min-height:720px;}
  .live-room-stage__table{width:min(42vw, 210px);height:min(28vw, 150px);}
  .live-seat--top{min-width:230px;max-width:290px;min-height:182px;padding:14px 10px 10px;}
  .live-seat--left,
  .live-seat--right{min-width:132px;max-width:144px;}
  .live-seat--left .live-seat__avatar,
  .live-seat--right .live-seat__avatar,
  .live-seat--top .live-seat__avatar{width:82px;height:82px;border-radius:20px;}
  .live-seat--left .live-hand--backs .live-card--back,
  .live-seat--right .live-hand--backs .live-card--back,
  .live-seat--top .live-hand--backs .live-card--back{
    width:clamp(30px, 4vw, 40px) !important;
    height:calc(clamp(30px, 4vw, 40px) * var(--kingi-card-ratio)) !important;
    margin-left:calc(clamp(30px, 4vw, 40px) * -0.5) !important;
  }
  .live-card--table,
  .live-trick-card .live-card,
  .live-trick-card .live-card--table,
  .live-previous-trick .live-card,
  .live-previous-trick .live-card--table{
    width:min(10vw, 64px) !important;
    height:calc(min(10vw, 64px) * var(--kingi-card-ratio)) !important;
  }
}

@media (max-width: 640px){
  .live-room-stage__table{width:min(48vw, 188px);height:min(34vw, 136px);}
  .live-seat--top{top:6px;min-width:200px;max-width:250px;min-height:164px;padding-top:12px;}
  .live-seat--left,
  .live-seat--right{min-width:118px;max-width:128px;}
  .live-seat--left .live-seat__avatar,
  .live-seat--right .live-seat__avatar,
  .live-seat--top .live-seat__avatar{width:68px;height:68px;border-radius:17px;}
  .live-seat--left .live-hand--backs .live-card--back,
  .live-seat--right .live-hand--backs .live-card--back,
  .live-seat--top .live-hand--backs .live-card--back{
    width:clamp(26px, 5vw, 34px) !important;
    height:calc(clamp(26px, 5vw, 34px) * var(--kingi-card-ratio)) !important;
    margin-left:calc(clamp(26px, 5vw, 34px) * -0.52) !important;
  }
  .live-card--table,
  .live-trick-card .live-card,
  .live-trick-card .live-card--table,
  .live-previous-trick .live-card,
  .live-previous-trick .live-card--table{
    width:min(11vw, 54px) !important;
    height:calc(min(11vw, 54px) * var(--kingi-card-ratio)) !important;
  }
}


/* 2026-04-05: self player info row above hand + live list action links */
.live-seat--bottom .live-seat__body{
  display:grid !important;
  grid-template-columns:clamp(128px, 15vw, 182px) minmax(0, 1fr);
  align-items:end;
  gap:14px;
}
.live-seat--bottom .live-seat__avatar-area{
  display:flex;
  align-items:flex-end;
  justify-content:center;
  min-width:0;
}
.live-seat--bottom .live-seat__identity--self{
  width:100%;
  justify-content:center;
}
.live-seat--bottom .live-seat__cards-area{
  min-width:0;
  width:100%;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  gap:8px;
}
.live-seat--bottom .live-seat__meta--self-inline{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:12px;
  flex-wrap:wrap;
  padding:0 6px;
  min-height:28px;
}
.live-seat--bottom .live-seat__meta--self-inline .live-seat__name,
.live-seat--bottom .live-seat__meta--self-inline .live-seat__line{
  margin:0;
}
.live-seat--bottom .live-seat__meta--self-inline .live-seat__line{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.12);
}
.live-seat--bottom .live-seat__meta--self-inline .live-seat__line--status{
  background:rgba(104, 211, 145, .18);
}
.live-seat--bottom .live-seat__cards{
  min-width:0;
  width:100%;
  overflow:hidden;
  justify-content:flex-start;
  padding-left:0 !important;
}
.live-seat--bottom .live-hand--self{
  padding:2px 6px 4px !important;
}
@media (max-width: 980px){
  .live-seat--bottom .live-seat__body{
    grid-template-columns:120px minmax(0, 1fr);
  }
  .live-seat--bottom .live-seat__meta--self-inline{
    gap:8px;
    padding:0 4px;
  }
  .live-seat--bottom .live-seat__meta--self-inline .live-seat__name{font-size:15px;}
  .live-seat--bottom .live-seat__meta--self-inline .live-seat__line{font-size:11px;padding:4px 8px;}
}
@media (max-width: 640px){
  .live-seat--bottom .live-seat__body{
    grid-template-columns:1fr;
    align-items:start;
  }
  .live-seat--bottom .live-seat__avatar-area{
    justify-content:flex-start;
  }
  .live-seat--bottom .live-seat__cards-area{
    gap:6px;
  }
  .live-seat--bottom .live-seat__meta--self-inline{
    padding:0 2px;
  }
}

.game-live-actions{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin-top:6px;
}
.game-live-actions a{
  display:inline-block;
}


.live-game-shell__message{position:relative;}
.live-inline-notice{display:none;position:absolute;left:50%;top:100%;transform:translate(-50%, 12px);z-index:35;max-width:min(92vw, 680px);padding:12px 16px;border-radius:16px;font-size:14px;font-weight:900;line-height:1.35;text-align:center;box-shadow:0 16px 34px rgba(0,0,0,.34), inset 0 0 0 1px rgba(255,255,255,.08);backdrop-filter:blur(8px);pointer-events:none;}
.live-inline-notice.is-visible{display:block;animation:kingiLiveInlineNoticeIn .18s ease-out;}
.live-inline-notice--error{background:rgba(117,17,17,.94);color:#ffe0e0;}
.live-inline-notice--success{background:rgba(18,97,54,.94);color:#ddffe9;}
@keyframes kingiLiveInlineNoticeIn{0%{opacity:0;transform:translate(-50%, 4px) scale(.98);}100%{opacity:1;transform:translate(-50%, 12px) scale(1);}}
@media (max-width: 900px){.live-inline-notice{max-width:calc(100vw - 28px);font-size:13px;padding:10px 12px;}}



/* 2026-04-05: self info single row + playable/non-playable card highlighting */
.live-seat--bottom .live-seat__body{
  grid-template-columns:clamp(112px, 13vw, 156px) minmax(0, 1fr) !important;
  align-items:end !important;
  gap:10px !important;
}
.live-seat--bottom .live-seat__cards-area{
  gap:10px !important;
}
.live-seat--bottom .live-seat__meta--self-inline{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto auto !important;
  align-items:center !important;
  column-gap:10px !important;
  row-gap:0 !important;
  flex-wrap:nowrap !important;
  min-width:0;
  width:100%;
}
.live-seat--bottom .live-seat__meta--self-inline .live-seat__name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.live-seat--bottom .live-seat__meta--self-inline .live-seat__line{
  white-space:nowrap;
}
.live-seat--bottom .live-seat__cards{
  overflow:visible !important;
}
.live-card-button{
  position:relative;
  background:none;
}
.live-card-button__bg{
  position:absolute;
  left:50%;
  bottom:-8px;
  transform:translateX(-50%);
  width:calc(var(--self-card-width, 72px) + 12px);
  height:26px;
  border-radius:12px;
  opacity:.95;
  pointer-events:none;
  z-index:0;
  transition:transform .18s ease, opacity .18s ease, box-shadow .18s ease;
}
.live-card-button .live-card{position:relative;z-index:1;}
.live-card-button.is-playable .live-card-button__bg{
  background:linear-gradient(180deg, rgba(61, 184, 92, .88) 0%, rgba(23, 111, 47, .90) 100%);
  box-shadow:0 10px 18px rgba(8, 48, 18, .30), inset 0 0 0 1px rgba(212,255,221,.30);
}
.live-card-button.is-blocked .live-card-button__bg{
  background:linear-gradient(180deg, rgba(218, 74, 74, .88) 0%, rgba(122, 20, 20, .90) 100%);
  box-shadow:0 10px 18px rgba(58, 8, 8, .28), inset 0 0 0 1px rgba(255,216,216,.24);
}
.live-card-button.is-selected .live-card-button__bg{
  transform:translateX(-50%) translateY(-4px);
}
.live-card-button.is-blocked,
.live-card-button.is-blocked *{
  cursor:not-allowed !important;
}
.live-card-button.is-blocked .live-card{
  filter:saturate(.88) brightness(.95);
}
@media (max-width: 980px){
  .live-seat--bottom .live-seat__body{
    grid-template-columns:96px minmax(0,1fr) !important;
    gap:8px !important;
  }
  .live-seat--bottom .live-seat__meta--self-inline{
    column-gap:8px !important;
  }
  .live-seat--bottom .live-seat__meta--self-inline .live-seat__name{font-size:14px;}
  .live-seat--bottom .live-seat__meta--self-inline .live-seat__line{font-size:11px;padding:4px 8px;}
}
@media (max-width: 640px){
  .live-seat--bottom .live-seat__body{
    grid-template-columns:84px minmax(0,1fr) !important;
    align-items:end !important;
  }
  .live-seat--bottom .live-seat__meta--self-inline{
    grid-template-columns:minmax(0,1fr) auto auto !important;
    column-gap:6px !important;
  }
  .live-seat--bottom .live-seat__meta--self-inline .live-seat__name{font-size:13px;}
  .live-seat--bottom .live-seat__meta--self-inline .live-seat__line{font-size:10px;padding:3px 7px;}
  .live-card-button__bg{height:22px;bottom:-6px;}
}


/* 2026-04-05: direct drag-to-table for playable cards + tighter opponent fans */
.live-room-stage__table{
  transition:box-shadow .18s ease, transform .18s ease, background .18s ease;
}
.live-room-stage__table.is-drop-target-ready{
  box-shadow:0 0 0 2px rgba(125, 211, 146, .18), inset 0 0 0 1px rgba(255,255,255,.04);
}
.live-room-stage__table.is-drop-target-hover{
  background:radial-gradient(circle at center, rgba(46, 160, 67, .18) 0%, rgba(46, 160, 67, .06) 45%, rgba(46, 160, 67, 0) 72%);
  box-shadow:0 0 0 2px rgba(125, 211, 146, .42), 0 18px 30px rgba(15, 61, 27, .20), inset 0 0 0 1px rgba(226,255,233,.18);
}
.live-card-button.is-playable{cursor:grab;}
.live-card-button.is-playable:active{cursor:grabbing;}
.live-card-button.is-disabled.is-blocked,
.live-card-button.is-blocked[aria-disabled="true"]{
  pointer-events:auto;
}

.live-seat--left,
.live-seat--right{
  max-width:148px !important;
  min-width:134px !important;
  overflow:hidden;
}
.live-seat--left .live-seat__cards,
.live-seat--right .live-seat__cards,
.live-seat--left .live-hand--backs,
.live-seat--right .live-hand--backs{
  width:100%;
  max-width:100%;
  overflow:hidden;
  justify-content:center;
}
.live-seat--left .live-hand--backs .live-card--back,
.live-seat--right .live-hand--backs .live-card--back{
  width:clamp(30px, 2.8vw, 42px) !important;
  height:calc(clamp(30px, 2.8vw, 42px) * var(--kingi-card-ratio)) !important;
  margin-left:calc(clamp(30px, 2.8vw, 42px) * -0.60) !important;
}
.live-seat--top .live-hand--backs .live-card--back{
  width:clamp(32px, 3vw, 44px) !important;
  height:calc(clamp(32px, 3vw, 44px) * var(--kingi-card-ratio)) !important;
  margin-left:calc(clamp(32px, 3vw, 44px) * -0.54) !important;
}

@media (max-width: 1280px){
  .live-seat--left,
  .live-seat--right{max-width:138px !important;min-width:124px !important;}
  .live-seat--left .live-hand--backs .live-card--back,
  .live-seat--right .live-hand--backs .live-card--back{
    width:clamp(28px, 3vw, 38px) !important;
    height:calc(clamp(28px, 3vw, 38px) * var(--kingi-card-ratio)) !important;
    margin-left:calc(clamp(28px, 3vw, 38px) * -0.62) !important;
  }
  .live-seat--top .live-hand--backs .live-card--back{
    width:clamp(30px, 3.1vw, 40px) !important;
    height:calc(clamp(30px, 3.1vw, 40px) * var(--kingi-card-ratio)) !important;
    margin-left:calc(clamp(30px, 3.1vw, 40px) * -0.56) !important;
  }
}

@media (max-width: 980px){
  .live-seat--left,
  .live-seat--right{max-width:126px !important;min-width:114px !important;}
  .live-seat--left .live-hand--backs .live-card--back,
  .live-seat--right .live-hand--backs .live-card--back{
    width:clamp(24px, 3.6vw, 34px) !important;
    height:calc(clamp(24px, 3.6vw, 34px) * var(--kingi-card-ratio)) !important;
    margin-left:calc(clamp(24px, 3.6vw, 34px) * -0.64) !important;
  }
  .live-seat--top .live-hand--backs .live-card--back{
    width:clamp(28px, 3.8vw, 36px) !important;
    height:calc(clamp(28px, 3.8vw, 36px) * var(--kingi-card-ratio)) !important;
    margin-left:calc(clamp(28px, 3.8vw, 36px) * -0.58) !important;
  }
}

@media (max-width: 640px){
  .live-seat--left,
  .live-seat--right{max-width:112px !important;min-width:102px !important;}
  .live-seat--left .live-hand--backs .live-card--back,
  .live-seat--right .live-hand--backs .live-card--back{
    width:clamp(22px, 4.2vw, 28px) !important;
    height:calc(clamp(22px, 4.2vw, 28px) * var(--kingi-card-ratio)) !important;
    margin-left:calc(clamp(22px, 4.2vw, 28px) * -0.66) !important;
  }
  .live-seat--top .live-hand--backs .live-card--back{
    width:clamp(24px, 4.6vw, 30px) !important;
    height:calc(clamp(24px, 4.6vw, 30px) * var(--kingi-card-ratio)) !important;
    margin-left:calc(clamp(24px, 4.6vw, 30px) * -0.60) !important;
  }
}


/* 2026-04-05: drag-drop fix, single trick-end animation, compass label */
.live-turn-compass__label{
  position:absolute;
  left:50%;
  top:-10px;
  transform:translate(-50%, -100%);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:96px;
  padding:8px 16px;
  border-radius:999px;
  background:linear-gradient(180deg, rgba(20,56,40,.92) 0%, rgba(9,28,20,.96) 100%);
  color:#fff5c3;
  font-size:22px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
  box-shadow:0 10px 24px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,236,171,.20);
  z-index:2;
  pointer-events:none;
  white-space:nowrap;
}
@media (max-width: 900px){
  .live-turn-compass__label{
    min-width:72px;
    padding:6px 12px;
    font-size:16px;
  }
}

/* 2026-04-05: full-width self seat, clearer drop target, and live table chat overlay */
.live-seat--bottom{
  left:18px !important;
  right:18px !important;
  bottom:12px !important;
  transform:none !important;
  width:auto !important;
  max-width:none !important;
}
.live-seat--bottom .live-seat__body{
  grid-template-columns:clamp(108px, 11vw, 150px) minmax(0, 1fr) !important;
  width:100% !important;
}
.live-seat--bottom .live-seat__cards-area{
  width:100%;
}
.live-seat--bottom .live-hand--self{
  --self-card-width: clamp(74px, calc((100% - 20px) / ((var(--self-hand-count, 13) * 0.70) + 0.62)), 128px);
  min-height:calc((var(--self-card-width) * var(--kingi-card-ratio)) + 24px);
}
.live-seat--bottom .live-card-button{
  margin-right:calc(var(--self-card-width) * -0.28) !important;
}
.live-seat--bottom .live-card-button__bg{
  width:calc(var(--self-card-width, 78px) + 14px);
  height:30px;
  bottom:-10px;
}
.live-room-stage__table.is-drop-target-ready{
  background:radial-gradient(circle at center, rgba(170, 227, 185, .10) 0%, rgba(74, 166, 95, .05) 36%, rgba(0,0,0,0) 72%);
  box-shadow:0 0 0 3px rgba(125, 211, 146, .24), inset 0 0 0 1px rgba(226,255,233,.10);
}
.live-room-stage__table.is-drop-target-hover{
  background:radial-gradient(circle at center, rgba(74, 201, 102, .28) 0%, rgba(74, 201, 102, .12) 38%, rgba(74, 201, 102, 0) 72%);
  box-shadow:0 0 0 3px rgba(125, 211, 146, .65), 0 0 38px rgba(72, 186, 97, .22), inset 0 0 0 2px rgba(233,255,238,.20);
  transform:translate(-50%,-50%) scale(1.03);
}
.live-room-stage__table.is-drop-target-hover::after{
  content:"Pudota tähän";
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  padding:10px 16px;
  border-radius:999px;
  background:rgba(15, 60, 28, .72);
  color:#ebfff0;
  font-size:14px;
  font-weight:900;
  letter-spacing:.04em;
  box-shadow:0 10px 24px rgba(0,0,0,.24);
  pointer-events:none;
}
.live-message-card__tools{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.live-chat-launch{
  border:0;
  border-radius:999px;
  padding:9px 14px;
  font-weight:900;
  color:#ecfff4;
  background:linear-gradient(180deg, rgba(39,115,180,.96) 0%, rgba(25,72,130,.96) 100%);
  box-shadow:0 10px 18px rgba(6,28,57,.24), inset 0 0 0 1px rgba(255,255,255,.10);
  cursor:pointer;
}
.live-chat-launch:hover{transform:translateY(-1px);}
.live-table-chat{
  position:absolute;
  left:50%;
  top:50%;
  width:min(54vw, 420px);
  max-width:92%;
  transform:translate(-50%,-50%);
  z-index:1;
  pointer-events:none;
  opacity:.34;
  filter:blur(.15px);
}
.live-table-chat__title{
  display:inline-flex;
  margin:0 auto 10px;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(8,18,14,.48);
  color:rgba(244,255,247,.84);
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.live-table-chat__list{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.live-table-chat__item,
.live-table-chat__empty{
  padding:8px 12px;
  border-radius:14px;
  background:rgba(6,12,10,.32);
  color:rgba(245,252,246,.82);
  backdrop-filter:blur(3px);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.04);
}
.live-table-chat__sender{display:block;font-weight:900;font-size:11px;margin-bottom:2px;color:rgba(226,250,233,.92);}
.live-table-chat__text{display:block;font-size:12px;line-height:1.35;overflow-wrap:anywhere;}
.live-chat-modal[hidden]{display:none !important;}
.live-chat-modal{position:fixed;inset:0;z-index:10020;}
.live-chat-modal__backdrop{position:absolute;inset:0;background:rgba(3,7,10,.56);backdrop-filter:blur(6px);}
.live-chat-modal__dialog{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(92vw, 720px);max-height:min(86vh, 820px);display:flex;flex-direction:column;overflow:hidden;border-radius:26px;background:linear-gradient(180deg, rgba(10,25,45,.97) 0%, rgba(13,33,60,.95) 100%);box-shadow:0 34px 80px rgba(0,0,0,.44), inset 0 0 0 1px rgba(255,255,255,.08);color:#eef5ff;}
.live-chat-modal__header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:18px 20px 14px;border-bottom:1px solid rgba(255,255,255,.08);}
.live-chat-modal__header h3{margin:0 0 4px;font-size:24px;color:#fff;}
.live-chat-modal__sub{font-size:13px;color:rgba(226,236,255,.80);}
.live-chat-modal__close{border:0;background:rgba(255,255,255,.08);color:#fff;width:42px;height:42px;border-radius:50%;font-size:28px;line-height:1;cursor:pointer;}
.live-chat-modal__messages{padding:16px 18px;overflow:auto;display:flex;flex-direction:column;gap:10px;background:rgba(255,255,255,.03);}
.live-chat-modal__message{padding:10px 12px;border-radius:16px;background:rgba(255,255,255,.07);box-shadow:inset 0 0 0 1px rgba(255,255,255,.05);}
.live-chat-modal__meta{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:4px;font-size:12px;color:#d7e7ff;}
.live-chat-modal__text{font-size:14px;line-height:1.45;color:#f6fbff;white-space:pre-wrap;overflow-wrap:anywhere;}
.live-chat-modal__empty{padding:18px;border-radius:16px;background:rgba(255,255,255,.05);text-align:center;color:#d6e3f8;}
.live-chat-modal__form{padding:16px 18px 18px;border-top:1px solid rgba(255,255,255,.08);background:rgba(7,18,34,.94);}
.live-chat-modal__form textarea{width:100%;min-height:110px;border:1px solid rgba(255,255,255,.16);border-radius:16px;background:rgba(255,255,255,.08);color:#fff;padding:12px 14px;font-size:14px;resize:vertical;}
.live-chat-modal__actions{margin-top:12px;display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap;}
.live-chat-modal__hint{font-size:12px;color:rgba(220,233,255,.78);}
body.live-chat-modal-open{overflow:hidden;}
@media (max-width: 980px){
  .live-seat--bottom{left:12px !important;right:12px !important;}
  .live-seat--bottom .live-hand--self{--self-card-width: clamp(62px, calc((100% - 16px) / ((var(--self-hand-count, 13) * 0.72) + 0.64)), 102px);} 
  .live-table-chat{width:min(66vw, 360px);}
}
@media (max-width: 640px){
  .live-seat--bottom .live-seat__body{grid-template-columns:76px minmax(0,1fr) !important;}
  .live-seat--bottom .live-hand--self{--self-card-width: clamp(48px, calc((100% - 10px) / ((var(--self-hand-count, 13) * 0.78) + 0.7)), 78px);} 
  .live-table-chat{width:min(74vw, 280px); opacity:.26;}
  .live-chat-modal__dialog{width:min(96vw, 720px); max-height:90vh;}
  .live-chat-modal__header h3{font-size:20px;}
}


/* 2026-04-05: move live table chat left, remove compass ring, keep chat modal stable */
.live-turn-compass__ring{display:none !important;}
.live-turn-compass__core{box-shadow:0 0 0 2px rgba(255,224,136,.88), 0 4px 10px rgba(0,0,0,.28), inset 0 2px 4px rgba(255,255,255,.30) !important;}
.live-turn-compass__label{top:-10px !important; transform:translate(-50%, -100%) !important;}
.live-table-chat{
  left:14px !important;
  right:auto !important;
  top:auto !important;
  bottom:168px !important;
  transform:none !important;
  width:min(22vw, 220px) !important;
  max-width:220px;
  z-index:0 !important;
  pointer-events:none;
  opacity:.22;
}
.live-table-chat__title,
.live-table-chat__list,
.live-table-chat__item,
.live-table-chat__empty{
  pointer-events:none;
}
.live-table-chat__list{max-height:min(31vh, 250px);}
.live-trick-card,
.live-trick-card .live-card,
.live-trick-card .live-card--table{
  z-index:2;
}
@media (max-width: 980px){
  .live-table-chat{left:10px !important; right:auto !important; top:auto !important; bottom:150px !important; transform:none !important; width:min(26vw, 200px) !important; max-width:200px; opacity:.18;}
}
@media (max-width: 640px){
  .live-table-chat{left:8px !important; right:auto !important; top:auto !important; bottom:138px !important; transform:none !important; width:min(40vw, 156px) !important; max-width:156px; opacity:.14;}
  .live-table-chat__title{margin-bottom:6px; font-size:10px;}
  .live-table-chat__item,
  .live-table-chat__empty{padding:6px 8px; border-radius:12px;}
  .live-table-chat__sender{font-size:10px;}
  .live-table-chat__text{font-size:11px; line-height:1.25;}
}
.live-chat-modal{z-index:10040 !important;}
.live-chat-modal__dialog{z-index:10041;}
.live-chat-modal__messages{min-height:180px;}
.live-chat-modal__form textarea{position:relative; z-index:2;}


/* 2026-04-05: fix self-card highlight bars in fullscreen and prevent chat modal scroll lock */
.live-seat--bottom .live-card-button{
  width:var(--self-card-width) !important;
  min-width:var(--self-card-width) !important;
  max-width:var(--self-card-width) !important;
  padding:0 0 14px !important;
  box-sizing:border-box;
  align-items:flex-end !important;
}
.live-seat--bottom .live-card-button__bg{
  left:50% !important;
  right:auto !important;
  width:calc(100% - 8px) !important;
  min-width:calc(100% - 8px) !important;
  max-width:calc(100% - 8px) !important;
  bottom:2px !important;
  transform:translateX(-50%) !important;
}
.live-seat--bottom .live-card-button.is-selected .live-card-button__bg{
  transform:translateX(-50%) translateY(-4px) !important;
}
.live-seat--bottom .live-card-button .live-card{
  display:block;
  width:100% !important;
  height:auto !important;
  aspect-ratio:1 / var(--kingi-card-ratio);
}
body.live-chat-modal-open{
  overflow:auto !important;
}


/* 2026-04-05: fix persistent drag-drop and tighten side fans / reposition table chat */
.live-seat--left,
.live-seat--right{
  min-width:118px !important;
  max-width:126px !important;
}
.live-seat--left .live-seat__cards,
.live-seat--right .live-seat__cards,
.live-seat--left .live-hand--backs,
.live-seat--right .live-hand--backs{
  overflow:visible !important;
}
.live-seat--left .live-hand--backs .live-card--back,
.live-seat--right .live-hand--backs .live-card--back{
  width:clamp(28px, 2.35vw, 36px) !important;
  height:calc(clamp(28px, 2.35vw, 36px) * var(--kingi-card-ratio)) !important;
  margin-left:calc(clamp(28px, 2.35vw, 36px) * -0.74) !important;
  transform:rotate(calc((var(--fan-index, 0) - var(--fan-mid, 0)) * 0.78deg)) !important;
}
.live-seat--top .live-hand--backs .live-card--back{
  width:clamp(30px, 2.55vw, 38px) !important;
  height:calc(clamp(30px, 2.55vw, 38px) * var(--kingi-card-ratio)) !important;
  margin-left:calc(clamp(30px, 2.55vw, 38px) * -0.68) !important;
  transform:rotate(calc((var(--fan-index, 0) - var(--fan-mid, 0)) * 0.76deg)) !important;
}
.live-table-chat{
  left:clamp(240px, 19vw, 300px) !important;
  right:auto !important;
  top:auto !important;
  bottom:clamp(206px, 22vh, 274px) !important;
  transform:none !important;
  width:min(20vw, 240px) !important;
  max-width:240px !important;
  z-index:0 !important;
}
@media (max-width: 1280px){
  .live-seat--left,
  .live-seat--right{max-width:118px !important; min-width:110px !important;}
  .live-seat--left .live-hand--backs .live-card--back,
  .live-seat--right .live-hand--backs .live-card--back{
    width:clamp(26px, 2.55vw, 34px) !important;
    height:calc(clamp(26px, 2.55vw, 34px) * var(--kingi-card-ratio)) !important;
    margin-left:calc(clamp(26px, 2.55vw, 34px) * -0.78) !important;
  }
  .live-seat--top .live-hand--backs .live-card--back{
    width:clamp(28px, 2.75vw, 36px) !important;
    height:calc(clamp(28px, 2.75vw, 36px) * var(--kingi-card-ratio)) !important;
    margin-left:calc(clamp(28px, 2.75vw, 36px) * -0.72) !important;
  }
  .live-table-chat{
    left:clamp(214px, 18vw, 272px) !important;
    bottom:clamp(188px, 20vh, 244px) !important;
    width:min(21vw, 220px) !important;
    max-width:220px !important;
  }
}
@media (max-width: 980px){
  .live-seat--left,
  .live-seat--right{max-width:104px !important; min-width:96px !important;}
  .live-seat--left .live-hand--backs .live-card--back,
  .live-seat--right .live-hand--backs .live-card--back{
    width:clamp(22px, 3vw, 30px) !important;
    height:calc(clamp(22px, 3vw, 30px) * var(--kingi-card-ratio)) !important;
    margin-left:calc(clamp(22px, 3vw, 30px) * -0.82) !important;
  }
  .live-seat--top .live-hand--backs .live-card--back{
    width:clamp(24px, 3.2vw, 32px) !important;
    height:calc(clamp(24px, 3.2vw, 32px) * var(--kingi-card-ratio)) !important;
    margin-left:calc(clamp(24px, 3.2vw, 32px) * -0.76) !important;
  }
  .live-table-chat{
    left:clamp(170px, 17vw, 214px) !important;
    bottom:clamp(164px, 18vh, 206px) !important;
    width:min(24vw, 188px) !important;
    max-width:188px !important;
  }
}
@media (max-width: 640px){
  .live-table-chat{
    left:96px !important;
    bottom:132px !important;
    width:min(34vw, 148px) !important;
    max-width:148px !important;
  }
}


/* 2026-04-05: place table chat to the LEFT of center cards, and tighten side fans further */
.live-room-stage__table{
  overflow:visible !important;
}
.live-table-chat{
  left:auto !important;
  right:calc(100% + clamp(22px, 2.3vw, 34px)) !important;
  top:50% !important;
  bottom:auto !important;
  transform:translateY(-50%) !important;
  width:clamp(180px, 15vw, 220px) !important;
  max-width:220px !important;
  z-index:0 !important;
  opacity:.18 !important;
}
.live-trick-card,
.live-trick-card .live-card,
.live-trick-card .live-card--table,
.live-room-stage__table > *:not(.live-table-chat){
  position:relative;
  z-index:2;
}
.live-seat--left,
.live-seat--right{
  min-width:110px !important;
  max-width:118px !important;
}
.live-seat--left .live-hand--backs,
.live-seat--right .live-hand--backs{
  width:100% !important;
  justify-content:center !important;
}
.live-seat--left .live-hand--backs .live-card--back,
.live-seat--right .live-hand--backs .live-card--back{
  width:clamp(26px, 2.05vw, 32px) !important;
  height:calc(clamp(26px, 2.05vw, 32px) * var(--kingi-card-ratio)) !important;
  margin-left:calc(clamp(26px, 2.05vw, 32px) * -0.88) !important;
  transform:rotate(calc((var(--fan-index, 0) - var(--fan-mid, 0)) * 0.55deg)) !important;
  transform-origin:center bottom !important;
}
.live-seat--left .live-hand--backs .live-card--back:first-child,
.live-seat--right .live-hand--backs .live-card--back:first-child{
  margin-left:0 !important;
}
@media (max-width: 1280px){
  .live-table-chat{
    right:calc(100% + 20px) !important;
    width:clamp(164px, 14vw, 196px) !important;
    max-width:196px !important;
  }
  .live-seat--left,
  .live-seat--right{
    min-width:104px !important;
    max-width:112px !important;
  }
  .live-seat--left .live-hand--backs .live-card--back,
  .live-seat--right .live-hand--backs .live-card--back{
    width:clamp(24px, 2vw, 30px) !important;
    height:calc(clamp(24px, 2vw, 30px) * var(--kingi-card-ratio)) !important;
    margin-left:calc(clamp(24px, 2vw, 30px) * -0.90) !important;
  }
}
@media (max-width: 980px){
  .live-table-chat{
    right:calc(100% + 14px) !important;
    width:clamp(144px, 16vw, 176px) !important;
    max-width:176px !important;
    opacity:.14 !important;
  }
  .live-seat--left,
  .live-seat--right{
    min-width:94px !important;
    max-width:102px !important;
  }
  .live-seat--left .live-hand--backs .live-card--back,
  .live-seat--right .live-hand--backs .live-card--back{
    width:clamp(20px, 2.4vw, 26px) !important;
    height:calc(clamp(20px, 2.4vw, 26px) * var(--kingi-card-ratio)) !important;
    margin-left:calc(clamp(20px, 2.4vw, 26px) * -0.92) !important;
  }
}
@media (max-width: 640px){
  .live-table-chat{
    right:calc(100% + 10px) !important;
    width:124px !important;
    max-width:124px !important;
    opacity:.12 !important;
  }
}

/* 2026-04-05: tighten top player bubble height to remove empty lower space */
.live-seat--top{
  min-height:188px !important;
  padding:14px 14px 6px !important;
}
.live-seat--top .live-seat__body{
  gap:8px !important;
}
.live-seat--top .live-seat__identity{
  padding-top:0 !important;
}
.live-seat--top .live-seat__cards{
  min-height:68px !important;
  padding-bottom:0 !important;
}
.live-seat--top .live-hand--top,
.live-seat--top .live-hand--backs{
  min-height:68px !important;
  height:auto !important;
}
@media (max-width: 980px){
  .live-seat--top{
    min-height:174px !important;
    padding:12px 12px 6px !important;
  }
  .live-seat--top .live-seat__cards,
  .live-seat--top .live-hand--top,
  .live-seat--top .live-hand--backs{
    min-height:60px !important;
  }
}


/* 2026-04-05: dynamic opponent fan fill — fewer cards => less overlap and wider spread */
.live-seat--top .live-hand--backs,
.live-seat--left .live-hand--backs,
.live-seat--right .live-hand--backs{
  display:flex !important;
  align-items:flex-end !important;
  justify-content:center !important;
  width:100% !important;
  max-width:100% !important;
  gap:0 !important;
  min-height:calc((var(--dynamic-card-width, 34px) * var(--kingi-card-ratio)) + 4px) !important;
}
.live-seat--top .live-hand--backs .live-card--back,
.live-seat--left .live-hand--backs .live-card--back,
.live-seat--right .live-hand--backs .live-card--back{
  position:relative !important;
  left:auto !important;
  top:auto !important;
  width:var(--dynamic-card-width, 34px) !important;
  height:calc(var(--dynamic-card-width, 34px) * var(--kingi-card-ratio)) !important;
  margin-left:calc(var(--dynamic-step, 0px) - var(--dynamic-card-width, 34px)) !important;
  transform:rotate(calc((var(--fan-index, 0) - var(--fan-mid, 0)) * var(--dynamic-rotation, 0.6deg))) !important;
  transform-origin:center bottom !important;
}
.live-seat--top .live-hand--backs .live-card--back:first-child,
.live-seat--left .live-hand--backs .live-card--back:first-child,
.live-seat--right .live-hand--backs .live-card--back:first-child{
  margin-left:0 !important;
}
.live-seat--top .live-seat__cards,
.live-seat--left .live-seat__cards,
.live-seat--right .live-seat__cards{
  width:100% !important;
}


/* Final live trick layout override: compact central stack for current and previous trick */
.live-room-stage__table{overflow:visible;}
.live-trick-card,
.live-previous-trick .live-trick-card{transition:transform .18s ease, opacity .18s ease;}
.live-trick-card--bottom{left:50%;top:57%;transform:translate(-50%,-50%) rotate(var(--card-rotate)) !important;}
.live-trick-card--top{left:50%;top:43%;transform:translate(-50%,-50%) rotate(var(--card-rotate)) !important;}
.live-trick-card--left{left:45%;top:52%;transform:translate(-50%,-50%) rotate(var(--card-rotate)) !important;}
.live-trick-card--right{left:55%;top:50%;transform:translate(-50%,-50%) rotate(var(--card-rotate)) !important;}
.live-trick-card--preview.live-trick-card--bottom{left:50%;top:57%;}
.live-trick-card--preview.live-trick-card--top{left:50%;top:43%;}
.live-trick-card--preview.live-trick-card--left{left:45%;top:52%;}
.live-trick-card--preview.live-trick-card--right{left:55%;top:50%;}
@media (max-width: 1100px){
  .live-trick-card--bottom{top:58% !important;}
  .live-trick-card--top{top:44% !important;}
  .live-trick-card--left{left:46% !important;top:52% !important;}
  .live-trick-card--right{left:54% !important;top:50% !important;}
}

/* chat position now follows live layout editor settings */

/* 2026-04-05: enlarge played cards and keep compact central overlap */
.live-card--table,
.live-trick-card .live-card,
.live-trick-card .live-card--table,
.live-previous-trick .live-card,
.live-previous-trick .live-card--table{
  width:min(12.15vw, 117px) !important;
  height:calc(min(12.15vw, 117px) * var(--kingi-card-ratio)) !important;
}
@media (max-width: 1100px){
  .live-card--table,
  .live-trick-card .live-card,
  .live-trick-card .live-card--table,
  .live-previous-trick .live-card,
  .live-previous-trick .live-card--table{
    width:min(11vw, 98px) !important;
    height:calc(min(11vw, 98px) * var(--kingi-card-ratio)) !important;
  }
}
@media (max-width: 700px){
  .live-card--table,
  .live-trick-card .live-card,
  .live-trick-card .live-card--table,
  .live-previous-trick .live-card,
  .live-previous-trick .live-card--table{
    width:min(10vw, 84px) !important;
    height:calc(min(10vw, 84px) * var(--kingi-card-ratio)) !important;
  }
}

/* 2026-04-05: layout editor managed elements must be freely scalable and share one visual coordinate system */
.live-seat[data-layout-id],
.live-table-chat[data-layout-id],
.live-turn-compass[data-layout-id],
.live-trick-card[data-layout-id]{
  min-width:0 !important;
  max-width:none !important;
  min-height:0 !important;
  max-height:none !important;
  box-sizing:border-box !important;
}
.live-seat[data-layout-id] .live-seat__body,
.live-seat[data-layout-id] .live-seat__cards,
.live-seat[data-layout-id] .live-seat__meta,
.live-seat[data-layout-id] .live-hand,
.live-seat[data-layout-id] .live-hand--backs,
.live-seat[data-layout-id] .live-hand--top,
.live-seat[data-layout-id] .live-hand--left,
.live-seat[data-layout-id] .live-hand--right,
.live-seat[data-layout-id] .live-hand--self,
.live-table-chat[data-layout-id] .live-table-chat__title,
.live-table-chat[data-layout-id] .live-table-chat__list{
  min-width:0 !important;
  max-width:none !important;
  min-height:0 !important;
  max-height:none !important;
  box-sizing:border-box !important;
}

/* 2026-04-05: fixed preset stage system for live game + pixel editor */
.live-room-viewport{
  position:relative;
  width:100%;
  max-width:100%;
  overflow-x:hidden;
  overflow-x:clip;
  overflow-y:visible;
}
.live-room-scale{
  position:absolute;
  left:0;
  top:0;
  transform-origin:top left;
  will-change:transform;
}
.live-room-stage[data-stage-width]{
  width:var(--live-stage-width) !important;
  height:var(--live-stage-height) !important;
  min-height:0 !important;
  max-height:none !important;
}
.live-room-stage[data-stage-width] .live-room-stage__felt{
  inset:0 !important;
  border:none !important;
  box-shadow:none !important;
  border-radius:inherit !important;
}
.live-room-stage[data-stage-width] .live-room-stage__table{
  width:var(--live-table-zone-width) !important;
  height:var(--live-table-zone-height) !important;
  max-width:none !important;
  max-height:none !important;
}
.live-room-stage[data-stage-width] .live-deck-stack,
.live-room-stage[data-stage-width] .live-card--table,
.live-room-stage[data-stage-width] .live-trick-card .live-card,
.live-room-stage[data-stage-width] .live-trick-card .live-card--table,
.live-room-stage[data-stage-width] .live-previous-trick .live-card,
.live-room-stage[data-stage-width] .live-previous-trick .live-card--table,
.live-room-stage[data-stage-width] .live-deal-card{
  width:var(--live-table-card-width-stage) !important;
  height:calc(var(--live-table-card-width-stage) * var(--kingi-card-ratio)) !important;
  max-width:none !important;
}
.live-room-stage[data-stage-width] .live-deal-card{
  margin-left:calc(var(--live-table-card-width-stage) * -0.5) !important;
  margin-top:calc(var(--live-table-card-width-stage) * var(--kingi-card-ratio) * -0.5) !important;
}
.live-room-stage[data-stage-width] .live-seat{
  --live-card-width:var(--live-back-card-width-stage) !important;
  min-width:0 !important;
  max-width:none !important;
}
.live-room-stage[data-stage-width] .live-seat--bottom{
  width:auto !important;
  max-width:none !important;
}
.live-room-stage[data-stage-width] .live-seat--bottom .live-card-button{
  margin-right:calc(var(--live-self-card-width-stage) * -0.12) !important;
}
.live-room-stage[data-stage-width] .live-seat--bottom .live-card-button:last-child{
  margin-right:0 !important;
}
.live-room-stage[data-stage-width] .live-seat--bottom .live-card,
.live-room-stage[data-stage-width] .live-seat--bottom .live-card--face,
.live-room-stage[data-stage-width] .live-seat--bottom .live-card--table{
  width:var(--live-self-card-width-stage) !important;
  height:calc(var(--live-self-card-width-stage) * var(--kingi-card-ratio)) !important;
}
.live-room-stage[data-stage-width] .live-hand--backs{
  --fan-size:calc(var(--live-back-card-width-stage) * 2.8) !important;
  width:var(--fan-size) !important;
  height:var(--fan-size) !important;
  min-height:var(--fan-size) !important;
}
.live-room-stage[data-stage-width] .live-seat--top .live-hand--backs .live-card--back,
.live-room-stage[data-stage-width] .live-seat--left .live-hand--backs .live-card--back,
.live-room-stage[data-stage-width] .live-seat--right .live-hand--backs .live-card--back{
  width:var(--live-back-card-width-stage) !important;
  height:calc(var(--live-back-card-width-stage) * var(--kingi-card-ratio)) !important;
  margin-left:calc(var(--live-back-card-width-stage) * -0.30) !important;
}
.live-room-stage[data-stage-width] .live-seat--top .live-hand--backs .live-card--back:first-child,
.live-room-stage[data-stage-width] .live-seat--left .live-hand--backs .live-card--back:first-child,
.live-room-stage[data-stage-width] .live-seat--right .live-hand--backs .live-card--back:first-child{
  margin-left:0 !important;
}
.live-room-stage[data-stage-width] .live-seat__avatar{
  width:var(--live-avatar-size-stage) !important;
  height:var(--live-avatar-size-stage) !important;
  border-radius:calc(var(--live-avatar-size-stage) * 0.24) !important;
}
.live-room-stage[data-stage-width] .live-seat--bottom .live-seat__avatar{
  width:var(--live-self-avatar-size-stage) !important;
  height:var(--live-self-avatar-size-stage) !important;
  border-radius:calc(var(--live-self-avatar-size-stage) * 0.24) !important;
}
.live-room-stage[data-stage-width] .live-turn-compass{
  width:var(--live-compass-size-stage) !important;
  height:var(--live-compass-size-stage) !important;
}
.live-room-stage[data-stage-width] .live-turn-compass__ring{
  width:var(--live-compass-ring-size-stage) !important;
  height:var(--live-compass-ring-size-stage) !important;
}
.live-room-stage[data-stage-width] .live-turn-compass__ring::before,
.live-room-stage[data-stage-width] .live-turn-compass__ring::after{
  width:calc(var(--live-compass-ring-size-stage) * 1.45) !important;
  height:calc(var(--live-compass-ring-size-stage) * 0.38) !important;
}
.live-room-stage[data-stage-width] .live-turn-compass__needle{
  width:calc(var(--live-compass-ring-size-stage) * 0.22) !important;
  height:var(--live-compass-needle-height-stage) !important;
}
.live-room-stage[data-stage-width] .live-turn-compass__needle::before{
  width:calc(var(--live-compass-ring-size-stage) * 0.22) !important;
  height:calc(var(--live-compass-needle-height-stage) * 0.78) !important;
}
.live-room-stage[data-stage-width] .live-turn-compass__needle::after{
  width:calc(var(--live-compass-ring-size-stage) * 0.09) !important;
  height:calc(var(--live-compass-needle-height-stage) * 0.32) !important;
}
.live-room-stage[data-stage-width] .live-turn-compass__core{
  width:calc(var(--live-compass-ring-size-stage) * 0.38) !important;
  height:calc(var(--live-compass-ring-size-stage) * 0.38) !important;
}


/* 2026-04-05: fan bounding box from layout editor controls card size and overlap */
.live-seat__cards[data-layout-id="fan_top"],
.live-seat__cards[data-layout-id="fan_left"],
.live-seat__cards[data-layout-id="fan_right"],
.live-seat__cards[data-layout-id="fan_bottom"]{
  overflow:visible !important;
}
.live-seat__cards[data-layout-id="fan_top"] .live-hand,
.live-seat__cards[data-layout-id="fan_left"] .live-hand,
.live-seat__cards[data-layout-id="fan_right"] .live-hand,
.live-seat__cards[data-layout-id="fan_bottom"] .live-hand{
  width:100% !important;
  height:100% !important;
  min-height:0 !important;
  max-width:100% !important;
  overflow:visible !important;
  display:flex !important;
  justify-content:center !important;
  align-items:flex-end !important;
  padding:0 !important;
}
.live-seat__cards[data-layout-id="fan_top"] .live-card--back,
.live-seat__cards[data-layout-id="fan_left"] .live-card--back,
.live-seat__cards[data-layout-id="fan_right"] .live-card--back{
  width:var(--layout-fan-card-width, 34px) !important;
  height:var(--layout-fan-card-height, 48px) !important;
  margin-left:calc(var(--layout-fan-step, 0px) - var(--layout-fan-card-width, 34px)) !important;
  transform:rotate(calc((var(--fan-index, 0) - var(--fan-mid, 0)) * var(--layout-fan-rotation, 0.6deg))) !important;
  transform-origin:center bottom !important;
}
.live-seat__cards[data-layout-id="fan_top"] .live-card--back:first-child,
.live-seat__cards[data-layout-id="fan_left"] .live-card--back:first-child,
.live-seat__cards[data-layout-id="fan_right"] .live-card--back:first-child{
  margin-left:0 !important;
}
.live-seat__cards[data-layout-id="fan_bottom"] .live-card-button{
  flex:0 0 auto !important;
  margin-right:calc(var(--layout-fan-step, 0px) - var(--layout-fan-card-width, 34px)) !important;
}
.live-seat__cards[data-layout-id="fan_bottom"] .live-card-button:last-child{
  margin-right:0 !important;
}
.live-seat__cards[data-layout-id="fan_bottom"] .live-card,
.live-seat__cards[data-layout-id="fan_bottom"] .live-card--face,
.live-seat__cards[data-layout-id="fan_bottom"] .live-card--back{
  width:var(--layout-fan-card-width, 34px) !important;
  height:var(--layout-fan-card-height, 48px) !important;
  transform:rotate(calc((var(--fan-index, 0) - var(--fan-mid, 0)) * var(--layout-fan-rotation, 1deg))) !important;
  transform-origin:center bottom !important;
}
.live-seat__cards[data-layout-id="fan_bottom"] .live-card--back{
  position:relative !important;
  left:auto !important;
  top:auto !important;
  margin:0 0 0 calc(var(--layout-fan-step, 0px) - var(--layout-fan-card-width, 34px)) !important;
}
.live-seat__cards[data-layout-id="fan_bottom"] .live-card--back:first-child{
  margin-left:0 !important;
}

/* 2026-05-18: deal animation uses the layout fan box also for bottom-player backs, not the large self-hand face-card size. */
.live-seat--bottom.is-dealing .live-seat__cards[data-layout-id="fan_bottom"] .live-card--back,
.live-seat--bottom.is-dealing .live-layout-detached-proxy[data-layout-proxy-id="fan_bottom"] .live-card--back{
  width:var(--layout-fan-card-width, 34px) !important;
  height:var(--layout-fan-card-height, 48px) !important;
  max-width:none !important;
  position:relative !important;
  left:auto !important;
  top:auto !important;
}


/* 2026-04-05: seat text boxes centered and inline preview when meta box is wide enough */
.live-seat__meta[data-layout-id$="_meta"],
.live-layout-detached-proxy[data-layout-proxy-id$="_meta"]{
  display:grid !important;
  width:100% !important;
  height:100% !important;
  min-width:0 !important;
  min-height:0 !important;
  box-sizing:border-box !important;
  align-content:center !important;
  justify-content:center !important;
  justify-items:center !important;
  text-align:center !important;
  row-gap:6px !important;
  column-gap:10px !important;
  padding:6px 8px !important;
}
.live-seat__meta[data-layout-id$="_meta"] > .live-seat__name,
.live-seat__meta[data-layout-id$="_meta"] > .live-seat__line,
.live-layout-detached-proxy[data-layout-proxy-id$="_meta"] > .live-seat__name,
.live-layout-detached-proxy[data-layout-proxy-id$="_meta"] > .live-seat__line{
  margin:0 !important;
  max-width:100% !important;
  text-align:center !important;
}
.live-seat__meta[data-layout-id$="_meta"] > .live-seat__name,
.live-layout-detached-proxy[data-layout-proxy-id$="_meta"] > .live-seat__name{
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
.live-seat__meta[data-layout-id$="_meta"].live-seat__meta--layout-stacked,
.live-layout-detached-proxy[data-layout-proxy-id$="_meta"].live-seat__meta--layout-stacked{
  grid-template-columns:minmax(0, 1fr) !important;
  grid-auto-flow:row !important;
}
.live-seat__meta[data-layout-id$="_meta"].live-seat__meta--layout-inline,
.live-layout-detached-proxy[data-layout-proxy-id$="_meta"].live-seat__meta--layout-inline{
  grid-template-columns:minmax(0, max-content) max-content max-content !important;
  grid-auto-flow:column !important;
  align-items:center !important;
}
.live-seat__meta[data-layout-id$="_meta"].live-seat__meta--layout-inline > .live-seat__name,
.live-layout-detached-proxy[data-layout-proxy-id$="_meta"].live-seat__meta--layout-inline > .live-seat__name,
.live-seat__meta[data-layout-id$="_meta"].live-seat__meta--layout-inline > .live-seat__line,
.live-layout-detached-proxy[data-layout-proxy-id$="_meta"].live-seat__meta--layout-inline > .live-seat__line{
  white-space:nowrap !important;
}


/* 2026-04-05: editor must be able to grab detached fans and compass */
.live-layout-editing .live-turn-compass[data-layout-id],
.live-layout-editing .live-seat__cards[data-layout-id^="fan_"]{
  pointer-events:auto !important;
}


/* 2026-04-05: layout editor must support horizontal scrolling for wide stage presets */
.live-game-shell__stage{
  min-width:0;
}
.live-layout-editing .live-game-shell__stage{
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}
.live-layout-editing .live-room-viewport{
  overflow:auto;
  max-width:none;
}
.live-layout-editing .live-room-scale{
  position:relative;
}


/* 2026-04-05: normalize live table chat as a single free layout object */
.live-table-chat{
  position:absolute !important;
  left:0 !important;
  top:0 !important;
  right:auto !important;
  bottom:auto !important;
  transform:none !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  justify-content:flex-start !important;
  gap:10px !important;
  box-sizing:border-box !important;
  width:240px;
  min-width:140px !important;
  min-height:120px !important;
  max-width:none !important;
  padding:0 !important;
  overflow:hidden !important;
}
.live-table-chat__title{
  flex:0 0 auto;
  margin:0 auto !important;
}
.live-table-chat__list{
  display:flex !important;
  flex-direction:column-reverse !important;
  justify-content:flex-start !important;
  gap:8px !important;
  flex:1 1 auto !important;
  min-height:0 !important;
  max-height:none !important;
  overflow:hidden !important;
}


/* 2026-04-05: detached bottom hand must stay interactive and stack right cards above left cards */
.live-seat__cards[data-layout-id="fan_bottom"]{
  display:flex !important;
  justify-content:flex-start !important;
  align-items:flex-end !important;
  overflow:visible !important;
}
.live-seat__cards[data-layout-id="fan_bottom"] .live-hand--self{
  justify-content:flex-start !important;
  align-items:flex-end !important;
  width:100% !important;
  min-height:0 !important;
  padding:10px 8px 6px !important;
  gap:0 !important;
}
.live-seat__cards[data-layout-id="fan_bottom"] .live-card-button{
  position:relative !important;
  flex:0 0 auto !important;
  display:flex !important;
  justify-content:center !important;
  align-items:flex-end !important;
  width:var(--layout-fan-card-width, 96px) !important;
  min-width:var(--layout-fan-card-width, 96px) !important;
  max-width:var(--layout-fan-card-width, 96px) !important;
  padding:0 0 14px !important;
  box-sizing:border-box !important;
  margin-right:calc(var(--layout-fan-step, 0px) - var(--layout-fan-card-width, 96px)) !important;
  z-index:calc(var(--fan-index, 0) + 1) !important;
  pointer-events:auto !important;
  transition:transform .18s ease !important;
}
.live-seat__cards[data-layout-id="fan_bottom"] .live-card-button:first-child{
  margin-left:0 !important;
}
.live-seat__cards[data-layout-id="fan_bottom"] .live-card-button:last-child{
  margin-right:0 !important;
}
.live-seat__cards[data-layout-id="fan_bottom"] .live-card-button:hover{
  transform:translateY(-6px) !important;
  z-index:200 !important;
}
.live-seat__cards[data-layout-id="fan_bottom"] .live-card-button.is-selected{
  transform:translateY(-16px) scale(1.04) !important;
  z-index:220 !important;
}
.live-seat__cards[data-layout-id="fan_bottom"] .live-card-button.is-disabled:hover,
.live-seat__cards[data-layout-id="fan_bottom"] .live-card-button.is-blocked:hover{
  transform:none !important;
}
.live-seat__cards[data-layout-id="fan_bottom"] .live-card-button__bg{
  left:50% !important;
  right:auto !important;
  width:calc(100% - 8px) !important;
  min-width:calc(100% - 8px) !important;
  max-width:calc(100% - 8px) !important;
  bottom:2px !important;
  transform:translateX(-50%) !important;
}
.live-seat__cards[data-layout-id="fan_bottom"] .live-card-button.is-selected .live-card-button__bg{
  transform:translateX(-50%) translateY(-4px) !important;
}
.live-seat__cards[data-layout-id="fan_bottom"] .live-card,
.live-seat__cards[data-layout-id="fan_bottom"] .live-card--face{
  display:block !important;
  width:100% !important;
  height:auto !important;
  aspect-ratio:1 / var(--kingi-card-ratio) !important;
  transform:rotate(calc((var(--fan-index, 0) - var(--fan-mid, 0)) * var(--layout-fan-rotation, 1deg))) !important;
  transform-origin:center bottom !important;
}
.live-seat__cards[data-layout-id="fan_bottom"] .live-card-button.is-playable{
  cursor:grab !important;
}
.live-seat__cards[data-layout-id="fan_bottom"] .live-card-button.is-playable:active{
  cursor:grabbing !important;
}

/* 2026-05-18: bottom dealing backs must not inherit the self-hand face-card scaling rule above. */
.live-seat__cards[data-layout-id="fan_bottom"] .live-card--back,
.live-layout-detached-proxy[data-layout-proxy-id="fan_bottom"] .live-card--back{
  display:block !important;
  width:var(--layout-fan-card-width, 34px) !important;
  min-width:var(--layout-fan-card-width, 34px) !important;
  max-width:var(--layout-fan-card-width, 34px) !important;
  height:var(--layout-fan-card-height, 48px) !important;
  min-height:var(--layout-fan-card-height, 48px) !important;
  max-height:var(--layout-fan-card-height, 48px) !important;
  aspect-ratio:auto !important;
  position:relative !important;
  left:auto !important;
  top:auto !important;
  margin:0 0 0 calc(var(--layout-fan-step, 0px) - var(--layout-fan-card-width, 34px)) !important;
  transform:rotate(calc((var(--fan-index, 0) - var(--fan-mid, 0)) * var(--layout-fan-rotation, 1deg))) !important;
  transform-origin:center bottom !important;
}
.live-seat__cards[data-layout-id="fan_bottom"] .live-card--back:first-child,
.live-layout-detached-proxy[data-layout-proxy-id="fan_bottom"] .live-card--back:first-child{
  margin-left:0 !important;
}


.game-online-pill{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:3px 12px;border-radius:999px;background:linear-gradient(180deg,#41be5e 0%,#2ca448 100%);box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 2px 6px rgba(10,40,12,.25);color:#fff;font-size:11px;font-weight:900;letter-spacing:.04em;vertical-align:middle;}
.game-score-player-name{display:inline-block;vertical-align:middle;}
.live-scoreboard__legacy-wrap{display:block;}
.live-scoreboard__legacy-wrap.game-chat-fullscreen-score.is-active{width:100%;background:transparent;}
.live-scoreboard__legacy-wrap .game-chat-fullscreen-score__inner{display:flex;justify-content:center;}
.live-scoreboard__legacy-wrap .game-score-table{margin:0 auto !important;width:auto !important;max-width:100%;border-collapse:separate;}
.live-scoreboard__legacy-wrap .game-score-table--compact-readonly > tbody > tr:first-child{display:none;}
.live-scoreboard__legacy-wrap .live-score-grid > tbody > tr:first-child{display:table-row !important;}
.live-scoreboard__legacy-wrap .game-score-table--compact-readonly td{padding:2px 3px !important;font-size:11px;line-height:1.05;white-space:nowrap;vertical-align:middle;}
.live-scoreboard__legacy-wrap .game-score-table--compact-readonly td:first-child{font-size:10px;font-weight:700;white-space:normal;}
.live-scoreboard__legacy-wrap .game-score-readonly-field{display:inline-block;min-width:2.1em;padding:0 1px;font-size:11px;font-weight:700;line-height:1.05;color:inherit;background:transparent;border:0;}
.live-scorebook-badge__tooltip{min-width:520px;max-width:min(92vw,920px);overflow:auto;}
.live-scorebook-badge__tooltip .live-scoreboard--compact{min-width:0;max-width:none;}
.live-room-stage__round-score .live-scoreboard{max-width:none;background:transparent;box-shadow:none;padding:0;}
.live-room-stage__round-score .live-scoreboard__legacy-wrap .game-score-table--compact-readonly > tbody > tr:first-child{display:table-row;}
.live-room-stage__round-score .live-scoreboard__legacy-wrap .game-score-table--compact-readonly td{padding:4px 6px !important;font-size:13px;line-height:1.15;}
.live-room-stage__round-score .live-scoreboard__legacy-wrap .game-score-table--compact-readonly td:first-child{font-size:12px;}
.live-room-stage__round-score .live-scoreboard__legacy-wrap .game-score-readonly-field{font-size:13px;}


/* 2026-04-06: live game must be able to break out of app-shell max-width and use full browser width */
.live-game-view{
  width:calc(100vw - 24px) !important;
  max-width:none !important;
  margin-left:calc(50% - 50vw + 12px) !important;
  margin-right:calc(50% - 50vw + 12px) !important;
  overflow:visible !important;
}
.live-game-app-frame,
.live-game-shell,
.live-game-shell__stage,
.live-room-viewport{
  width:100% !important;
  max-width:none !important;
}
.live-game-shell__stage{
  overflow:visible !important;
}
.live-room-scale{
  max-width:none !important;
}
@media (max-width: 760px){
  .live-game-view{
    width:calc(100vw - 12px) !important;
    margin-left:calc(50% - 50vw + 6px) !important;
    margin-right:calc(50% - 50vw + 6px) !important;
  }
}


/* 2026-04-06: fix bottom hand first-card auto-hover lift with full 13-card fan */
.live-seat--bottom .live-card-button:hover,
.live-seat__cards[data-layout-id="fan_bottom"] .live-card-button:hover{
  transform:none !important;
}
.live-seat--bottom .live-card-button.is-selected,
.live-seat__cards[data-layout-id="fan_bottom"] .live-card-button.is-selected{
  transform:translateY(-14px) scale(1.03) !important;
  z-index:220 !important;
}
.live-seat--bottom .live-card-button.is-disabled:hover,
.live-seat--bottom .live-card-button.is-blocked:hover,
.live-seat__cards[data-layout-id="fan_bottom"] .live-card-button.is-disabled:hover,
.live-seat__cards[data-layout-id="fan_bottom"] .live-card-button.is-blocked:hover{
  transform:none !important;
}


/* 2026-04-06 scoreboard/deal/collection refinements */
.live-scoreboard__legacy-wrap--plain{width:100%;background:transparent;overflow:visible;}
.live-score-grid{margin:0 auto !important;width:auto !important;max-width:100%;border-collapse:separate;border-spacing:1px;background:#000;}
.live-score-grid thead th{background:linear-gradient(rgba(0,0,0,.10), rgba(0,0,0,.10)), #eef5fb !important;background-image:none !important;color:#10283a !important;text-shadow:none !important;box-shadow:none !important;font-size:11px;font-weight:800;padding:3px 5px !important;white-space:nowrap;}
.live-score-grid thead th:first-child{background:linear-gradient(rgba(0,0,0,.10), rgba(0,0,0,.10)), #eef5fb !important;background-image:none !important;color:#10283a !important;}
.live-score-grid tbody th{background-image:none !important;color:#153245 !important;text-shadow:none !important;box-shadow:none !important;text-align:right;font-size:10px;font-weight:800;padding:2px 5px !important;white-space:normal;}
.live-score-grid tbody tr:nth-child(2n+1) th{background:linear-gradient(rgba(0,0,0,.10), rgba(0,0,0,.10)), #eef5fb !important;}
.live-score-grid tbody tr:nth-child(2n) th{background:linear-gradient(rgba(0,0,0,.10), rgba(0,0,0,.10)), #fff8e7 !important;}
.live-score-grid tbody td{color:#111;text-align:center;padding:2px 4px !important;font-size:11px;white-space:nowrap;}
.live-score-grid tbody tr:nth-child(2n+1) td{background:linear-gradient(rgba(0,0,0,.10), rgba(0,0,0,.10)), #eef5fb !important;}
.live-score-grid tbody tr:nth-child(2n) td{background:linear-gradient(rgba(0,0,0,.10), rgba(0,0,0,.10)), #fff8e7 !important;}
.live-score-grid tbody tr.is-summary th,.live-score-grid tbody tr.is-summary td{background:#D9D9D9 !important;}
.live-score-grid tbody tr.is-total th,.live-score-grid tbody tr.is-total td{background:orange !important;}
.live-score-grid .game-score-readonly-field{display:inline-block;min-width:1.6em;padding:0;font-size:11px;font-weight:800;line-height:1.05;background:transparent;border:0;}
.live-scorebook-badge__tooltip{overflow:visible;min-width:0;}
.live-scorebook-badge__tooltip .live-score-grid{transform:scale(.96);transform-origin:top center;}
.live-room-stage__round-score .live-score-grid tbody th{font-size:11px;}
.live-room-stage__round-score .live-score-grid tbody td,.live-room-stage__round-score .live-score-grid .game-score-readonly-field{font-size:12px;}
.live-room-stage__round-score .live-score-grid{box-shadow:none;}

.live-deal-layer .live-room-stage__deck,.live-deal-layer .live-room-stage__deck{display:block;}
.live-deal-layer .live-deck-stack{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);}
.live-deck-stack{position:relative;width:88px;height:128px;}
.live-deck-card{position:absolute;left:0;top:0;width:88px;height:128px;border-radius:12px;transform:translate(calc(var(--deck-offset, 0) * .35px), calc(var(--deck-offset, 0) * .55px));box-shadow:0 10px 22px rgba(0,0,0,.28);}
.live-deck-stack__count{position:absolute;left:50%;bottom:-26px;transform:translateX(-50%);padding:5px 10px;border-radius:999px;background:rgba(7,18,14,.84);color:#fff4c2;font-weight:900;font-size:12px;white-space:nowrap;}
.live-room-stage__deck .live-deck-stack{left:50%;top:50%;transform:translate(-50%,-50%);}
.live-room-stage__deck{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:4;}
.live-deal-card{z-index:6;}
@keyframes kingiLiveDeal{0%{opacity:1;transform:translate(0,0) rotate(0deg) scale(1);}80%{opacity:1;}100%{opacity:0;transform:translate(var(--deal-x),var(--deal-y)) rotate(var(--deal-r)) scale(.88);}}
.live-trick-card.is-collecting{animation-timing-function:cubic-bezier(.2,.8,.2,1);animation-fill-mode:forwards;}
@keyframes kingiLiveCollectBottom{to{opacity:0;transform:translate(calc(-50% + var(--collect-dx, 0px)), calc(-50% + var(--collect-dy, 0px))) scale(.24) rotate(var(--card-rotate));}}
@keyframes kingiLiveCollectTop{to{opacity:0;transform:translate(calc(-50% + var(--collect-dx, 0px)), calc(-50% + var(--collect-dy, 0px))) scale(.24) rotate(var(--card-rotate));}}
@keyframes kingiLiveCollectLeft{to{opacity:0;transform:translate(calc(-50% + var(--collect-dx, 0px)), calc(-50% + var(--collect-dy, 0px))) scale(.24) rotate(var(--card-rotate));}}
@keyframes kingiLiveCollectRight{to{opacity:0;transform:translate(calc(-50% + var(--collect-dx, 0px)), calc(-50% + var(--collect-dy, 0px))) scale(.24) rotate(var(--card-rotate));}}

.live-status-chip--trump{
  background: linear-gradient(180deg, rgba(244,206,120,.28), rgba(164,108,28,.34));
  border-color: rgba(244,206,120,.48);
  color: #fff2bf;
}
.live-order-pill.is-current-turn{
  background: linear-gradient(180deg, rgba(242,208,96,.30), rgba(182,120,24,.34));
  border-color: rgba(242,208,96,.55);
  color: #fff4cb;
  box-shadow: 0 0 0 1px rgba(255,226,144,.18) inset, 0 10px 18px rgba(0,0,0,.22);
}
.live-action-panel{
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(7,25,20,.54);
  border: 1px solid rgba(255,255,255,.10);
}
.live-action-panel__title{
  font-weight: 700;
  color: #f4efd7;
  margin-bottom: 10px;
}
.live-action-panel__hint{
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255,255,255,.74);
}
.live-choice-grid{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.live-choice-grid--two .live-choice-button{
  min-width: 140px;
}
.live-choice-grid--suits .live-choice-button{
  min-width: 110px;
}
.live-choice-button{
  appearance: none;
  border: 1px solid rgba(240,240,240,.18);
  background: linear-gradient(180deg, rgba(249,248,242,.98), rgba(215,222,231,.92));
  color: #17352a;
  border-radius: 16px;
  padding: 12px 16px;
  min-width: 64px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(0,0,0,.18);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.live-choice-button:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 22px rgba(0,0,0,.22);
}
.live-choice-button.is-selected,
.live-choice-button--primary{
  border-color: rgba(245,205,107,.72);
  background: linear-gradient(180deg, rgba(255,245,204,.98), rgba(232,207,125,.96));
  color: #3f2a09;
}
.live-final-panel{
  display: grid;
  gap: 14px;
}
.live-final-panel__section{
  background: rgba(9,25,21,.42);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  padding: 12px;
}
.live-final-panel__section h3{
  margin: 0 0 10px;
  color: #f5eed1;
}
.live-final-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.live-final-table th,
.live-final-table td{
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  text-align: left;
}
.live-final-table thead th,
.live-final-table tfoot th{
  color: #f6eed0;
  background: rgba(255,255,255,.06);
}
.live-final-table tbody tr:nth-child(even) td{
  background: rgba(255,255,255,.03);
}
.live-final-panel__actions{
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}
.live-final-panel__acknowledged{
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(143,201,127,.18);
  border: 1px solid rgba(143,201,127,.28);
  color: #e7f9df;
  font-weight: 700;
}
.live-inline-note{
  margin: 8px 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  font-weight: 700;
}

/* 2026-05-18 live round score overlay, real deal animation and bidding bubbles */
.live-room-stage__round-score--topmost{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  z-index:3200;
  width:min(720px, calc(100% - 220px));
  max-height:min(72vh, 620px);
  overflow:auto;
  padding:12px;
  border-radius:22px;
  background:rgba(5,18,14,.88);
  border:1px solid rgba(255,231,160,.38);
  box-shadow:0 28px 70px rgba(0,0,0,.58), 0 0 0 9999px rgba(0,0,0,.10);
  pointer-events:auto;
}
.live-room-stage__round-score--topmost .live-score-grid{
  margin:0 auto !important;
  box-shadow:0 16px 34px rgba(0,0,0,.28);
}
.live-deal-layer{
  z-index:3100 !important;
}
.live-deal-layer .live-deck-stack{
  left:calc(50% + min(34vw, 380px)) !important;
  top:50% !important;
  transform:translate(-50%,-50%) !important;
}
.live-deal-layer__deck-label{
  position:absolute;
  left:calc(50% + min(34vw, 380px));
  top:calc(50% - 118px);
  transform:translateX(-50%);
  z-index:2;
  padding:6px 12px;
  border-radius:999px;
  background:rgba(7,18,14,.86);
  color:#fff2bf;
  font-size:12px;
  font-weight:900;
  letter-spacing:.03em;
  white-space:nowrap;
  box-shadow:0 10px 24px rgba(0,0,0,.32), inset 0 0 0 1px rgba(255,235,174,.18);
}
.live-seat.is-dealing .live-seat__cards{
  min-height:86px;
}
.live-hand--backs.is-empty{
  min-width:72px;
  min-height:92px;
  opacity:.24;
}
.live-seat.is-dealing .live-card--back{
  animation:kingiLiveDealtCardSettle .34s cubic-bezier(.2,.78,.22,1) both;
}
@keyframes kingiLiveDealtCardSettle{
  0%{opacity:0;transform:translateY(-10px) scale(.94) rotate(calc((var(--fan-index, 0) - var(--fan-mid, 0)) * var(--dynamic-rotation, .58deg)));}
  100%{opacity:1;transform:translateX(calc((var(--fan-index, 0) - var(--fan-mid, 0)) * var(--dynamic-step, 18px))) rotate(calc((var(--fan-index, 0) - var(--fan-mid, 0)) * var(--dynamic-rotation, .58deg)));}
}
.live-bid-bubble{
  position:absolute;
  z-index:3400;
  pointer-events:none;
  max-width:210px;
  padding:8px 12px;
  border-radius:999px;
  background:linear-gradient(180deg, rgba(255,247,211,.98), rgba(238,209,128,.98));
  color:#3f2a09;
  font-size:14px;
  font-weight:950;
  line-height:1.1;
  text-align:center;
  box-shadow:0 14px 28px rgba(0,0,0,.32), inset 0 0 0 1px rgba(116,76,12,.22);
  border:1px solid rgba(255,236,170,.82);
  animation:kingiLiveBidBubbleIn .22s ease-out both;
}
.live-bid-bubble--bottom{left:50%;top:-20px;transform:translate(-50%,-100%);} 
.live-bid-bubble--top{left:50%;bottom:-20px;transform:translate(-50%,100%);} 
.live-bid-bubble--left{left:100%;top:50%;transform:translate(12px,-50%);} 
.live-bid-bubble--right{right:100%;top:50%;transform:translate(-12px,-50%);} 
@keyframes kingiLiveBidBubbleIn{0%{opacity:0;filter:blur(2px);transform:translateY(4px) scale(.96);}100%{opacity:1;filter:blur(0);}}
.live-trick-card.is-waiting-collection .live-card--table{
  box-shadow:0 18px 34px rgba(0,0,0,.36), 0 0 0 2px rgba(255,228,142,.16);
}
.live-trick-card.is-collecting-hidden{
  opacity:0 !important;
  transition:opacity .14s ease !important;
}
@media (max-width: 980px){
  .live-room-stage__round-score--topmost{width:min(94vw, 640px);top:42%;max-height:56vh;}
  .live-deal-layer .live-deck-stack{left:50% !important;top:22% !important;}
  .live-deal-layer__deck-label{left:50%;top:calc(22% - 108px);}
}

/* 2026-05-18: Tikin keruu vaiheittain: 3 s näkyvissä, kääntö, 1 s selkäpuoli, sitten liuku voittajalle. */
.live-trick-card.is-flipping-to-back,
.live-trick-card.is-back-up{
  perspective:900px;
  z-index:5200 !important;
}
.live-trick-card.is-flipping-to-back .live-card--table{
  animation:kingiLiveFlipTrickToBack .52s cubic-bezier(.2,.72,.16,1) both;
  transform-origin:50% 50%;
  backface-visibility:hidden;
  will-change:transform,filter;
}
.live-trick-card.is-back-up .live-card--table{
  transform:rotateY(0deg) translateZ(0);
  filter:brightness(.98);
}
.live-trick-card.is-collecting-hidden{
  opacity:0 !important;
  visibility:hidden !important;
  transition:none !important;
}
@keyframes kingiLiveFlipTrickToBack{
  0%{transform:rotateY(0deg) translateZ(0);filter:brightness(1);}
  48%{transform:rotateY(88deg) translateZ(6px);filter:brightness(1.12);}
  52%{transform:rotateY(88deg) translateZ(6px);filter:brightness(1.12);}
  100%{transform:rotateY(0deg) translateZ(0);filter:brightness(.98);}
}

/* 2026-05-18: jaon pakka ja lentävät kortit käyttävät lavan omaa koordinaatistoa. */
.live-deal-layer{
  z-index:5400 !important;
  overflow:visible !important;
}
.live-deal-layer__deck-anchor{
  position:absolute !important;
  transform:translate(-50%,-50%) !important;
  z-index:4 !important;
  pointer-events:none !important;
}
.live-deal-layer__deck-anchor .live-deck-stack{
  position:relative !important;
  left:auto !important;
  top:auto !important;
  transform:none !important;
}
.live-deal-layer__deck-label{
  transform:translateX(-50%) !important;
  z-index:5 !important;
}
.live-room-stage .live-seat--bottom.is-dealing .live-seat__cards[data-layout-id="fan_bottom"] .live-hand--backs,
.live-room-stage .live-layout-detached-proxy[data-layout-proxy-id="fan_bottom"] .live-hand--backs{
  display:flex !important;
  justify-content:flex-start !important;
  align-items:flex-end !important;
  width:100% !important;
  height:100% !important;
  min-height:0 !important;
  max-height:none !important;
  padding:0 !important;
  overflow:visible !important;
  gap:0 !important;
}
.live-room-stage .live-seat--bottom.is-dealing .live-seat__cards[data-layout-id="fan_bottom"] .live-hand--backs .live-card--back,
.live-room-stage .live-layout-detached-proxy[data-layout-proxy-id="fan_bottom"] .live-hand--backs .live-card--back{
  display:block !important;
  position:relative !important;
  left:auto !important;
  top:auto !important;
  flex:0 0 auto !important;
  width:var(--layout-fan-card-width, 34px) !important;
  min-width:var(--layout-fan-card-width, 34px) !important;
  max-width:var(--layout-fan-card-width, 34px) !important;
  height:var(--layout-fan-card-height, 48px) !important;
  min-height:var(--layout-fan-card-height, 48px) !important;
  max-height:var(--layout-fan-card-height, 48px) !important;
  aspect-ratio:auto !important;
  margin:0 0 0 calc(var(--layout-fan-step, 0px) - var(--layout-fan-card-width, 34px)) !important;
  transform:rotate(calc((var(--fan-index, 0) - var(--fan-mid, 0)) * var(--layout-fan-rotation, 1deg))) !important;
  transform-origin:center bottom !important;
}
.live-room-stage .live-seat--bottom.is-dealing .live-seat__cards[data-layout-id="fan_bottom"] .live-hand--backs .live-card--back:first-child,
.live-room-stage .live-layout-detached-proxy[data-layout-proxy-id="fan_bottom"] .live-hand--backs .live-card--back:first-child{
  margin-left:0 !important;
}

/* 2026-05-19: tarjouskuplat ja väliajan pistetaulu sidotaan pelipöydän omaan koordinaatistoon. */
.live-room-stage > .live-bid-bubble{
  position:absolute !important;
  z-index:6400 !important;
  pointer-events:none !important;
  right:auto !important;
  bottom:auto !important;
  max-width:210px;
  white-space:nowrap;
  animation:kingiLiveBidBubbleFadeIn .18s ease-out both !important;
}
.live-room-stage > .live-bid-bubble--top{transform:translate(-50%,0) !important;}
.live-room-stage > .live-bid-bubble--bottom{transform:translate(-50%,-100%) !important;}
.live-room-stage > .live-bid-bubble--left{transform:translate(0,-50%) !important;}
.live-room-stage > .live-bid-bubble--right{transform:translate(-100%,-50%) !important;}
@keyframes kingiLiveBidBubbleFadeIn{
  0%{opacity:0;filter:blur(2px);}
  100%{opacity:1;filter:blur(0);}
}
.live-room-stage__round-score--topmost{
  position:absolute !important;
  left:50% !important;
  top:50% !important;
  right:auto !important;
  bottom:auto !important;
  transform:translate(-50%,-50%) !important;
  z-index:6500 !important;
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  width:min(760px, calc(100% - 48px)) !important;
  max-width:calc(100% - 48px) !important;
  max-height:calc(100% - 56px) !important;
  overflow:auto !important;
  pointer-events:auto !important;
}
.live-room-stage__round-score--topmost .live-scoreboard,
.live-room-stage__round-score--topmost .live-scoreboard__legacy-wrap{
  width:100% !important;
  max-width:100% !important;
}
@media (max-width: 980px){
  .live-room-stage__round-score--topmost{
    left:50% !important;
    top:50% !important;
    transform:translate(-50%,-50%) !important;
    width:min(94vw, calc(100% - 28px)) !important;
    max-height:calc(100% - 32px) !important;
  }
  .live-room-stage > .live-bid-bubble{font-size:12px;padding:7px 10px;max-width:180px;}
}

/* 2026-05-19: Canvas-renderöity pelipöydän liikkuva grafiikka */
.live-canvas-layer{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  z-index:6600;
  pointer-events:none;
}
.live-room-stage__felt{z-index:0;}
.live-room-stage__table{z-index:4;}
.live-seat{z-index:6;}
.live-layout-grid,.live-layout-marker,.live-layout-preview-fan,.live-layout-outline,.live-layout-resize-handle{z-index:140;}
.live-seat.is-dealing .live-hand--backs,
.live-seat.is-dealing .live-seat__cards{
  overflow:visible;
}
.live-seat.is-dealing .live-hand--backs .live-card--back,
.live-seat--bottom.is-dealing .live-hand--backs .live-card--back,
.live-seat--bottom.is-dealing .live-card--back{
  --deal-card-width:clamp(34px, 3.4vw, 50px);
  width:var(--deal-card-width) !important;
  height:calc(var(--deal-card-width) * var(--kingi-card-ratio)) !important;
  max-width:none !important;
  transform-origin:center bottom !important;
}
.live-seat--bottom.is-dealing .live-hand--backs{
  min-height:calc(clamp(34px, 3.4vw, 50px) * var(--kingi-card-ratio) + 18px) !important;
}
.live-seat--bottom.is-dealing .live-card--back{
  margin-left:calc(clamp(34px, 3.4vw, 50px) * -0.38) !important;
  margin-right:0 !important;
}
.live-seat--bottom.is-dealing .live-card--back:first-child{margin-left:0 !important;}
.live-seat--bottom.is-dealing .live-hand--backs .live-card--back{
  transform:rotate(calc((var(--fan-index, 0) - var(--fan-mid, 0)) * 0.72deg)) !important;
}

/* 2026-05-19: lyöntianimaation alussa kortti poistuu viuhkasta heti. */
.live-seat--bottom .live-card-button.is-animating-play,
.live-seat__cards[data-layout-id="fan_bottom"] .live-card-button.is-animating-play,
.live-card-button.is-animating-play{
  display:none!important;
  opacity:0!important;
  pointer-events:none!important;
}
.live-status-chip--trump-picker{
  background:rgba(255,216,107,.18);
  color:#fff7d1;
  border:1px solid rgba(255,216,107,.35);
}


/* 2026-05-19: loppupisteet piirretään canvasilla pöydän keskelle; sivupalkkiin jää vain kuittaus. */
.live-final-panel--actions-only{gap:10px;}
.live-final-panel--actions-only .live-final-panel__section{background:rgba(9,25,21,.58);}
.live-inline-note--success{background:rgba(143,201,127,.16);border-color:rgba(143,201,127,.30);color:#e7f9df;}
