:is(#profileView,#roomsView,#codeSheet) {
  --paper-card:#fffbf5;
  --line-soft:#e5d9cb;
  --leather:#473326;
  --text-soft:#6e5b4c;
}
body.home-glass :is(#profileView,#roomsView) {max-width:580px;margin-inline:auto}
body.home-glass :is(#profileView,#roomsView) .page-v2-head {
  margin:4px 0 14px;padding:0;
}
body.home-glass :is(#profileView,#roomsView) .page-v2-head h1 {
  font:500 clamp(30px,8vw,37px)/1.08 Georgia,serif;
  letter-spacing:-.05em;color:#39271b;margin:0;
}
body.home-glass :is(#profileView,#roomsView) .page-v2-head h1:after{content:none}

body.home-glass #profileView .player-identity {
  border-radius:23px;border:1px solid #e7d8c5;overflow:hidden;
  background:#f1e5d4;box-shadow:inset 0 1px #ffffff83;margin-bottom:20px;
}
body.home-glass #profileView .profile-compact .compact-identity {
  margin:0;padding:15px 16px 12px;display:flex;align-items:center;gap:12px;
}
body.home-glass #profileView .compact-identity small[hidden]{display:none}
body.home-glass #profileView .compact-identity h3{
  margin:0;color:#362419;font:600 23px/1.15 Georgia,serif;letter-spacing:-.02em;
}
body.home-glass #profileView .compact-identity .profile-v2-avatar{
  width:50px;height:50px;flex:0 0 50px;border:1px solid #fff8ed;border-radius:50%;
  background:#e9d6bb;box-shadow:0 1px 4px #51321525;
}
body.home-glass #profileView .compact-identity .profile-v2-avatar .profile-logo{
  color:#684c32;background:transparent;font:500 24px Georgia,serif
}
body.home-glass #profileView .profile-compact .compact-stats{
  grid-template-columns:repeat(2,minmax(0,1fr));padding:0;margin:0;gap:0;
  background:#fff8ef;border:0;border-top:1px solid #ead9c5;border-radius:0;box-shadow:none;
}
body.home-glass #profileView .profile-compact .compact-stats button{
  position:relative;min-height:61px;min-width:0;margin:0;border:0;border-radius:0;
  text-align:left;padding:8px 27px 8px 15px;background:transparent;color:var(--leather);
}
body.home-glass #profileView .profile-compact .compact-stats button + button{border-left:1px solid #ead9c5}
body.home-glass #profileView .profile-compact .compact-stats b{
  display:block;margin:0 0 2px;font-size:24px;font-variant-numeric:tabular-nums;line-height:1.07;color:#503722;font-weight:700
}
body.home-glass #profileView .profile-compact .compact-stats span{display:block;font-size:11px;color:var(--text-soft)}
body.home-glass #profileView .profile-compact .compact-stats svg{
  position:absolute;right:9px;top:50%;transform:translateY(-50%);width:15px;color:#8c6442
}
body.home-glass #profileView .profile-compact :is(.profile-records,.profile-recent){margin:0 0 18px}
body.home-glass #profileView .profile-compact :is(.profile-records,.profile-recent) h3{
  margin:0;font-size:16px;font-weight:700;letter-spacing:-.025em;color:#39271b
}
body.home-glass #profileView .player-record-grid{
  margin-top:9px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px
}
body.home-glass #profileView .profile-compact .player-record-grid button{
  min-width:0;min-height:103px;position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(46px,42%);
  grid-template-rows:auto auto auto;gap:0 3px;justify-items:start;align-content:center;text-align:left;
  width:100%;padding:10px;margin:0;border:1px solid #e9dccb;border-radius:16px;
  background:var(--paper-card);color:var(--leather);box-shadow:none;
}
body.home-glass #profileView .player-record-grid button > img{
  grid-column:2;grid-row:1/4;align-self:center;width:100%;height:auto;aspect-ratio:1;border-radius:11px;object-fit:cover;max-width:70px;
}
body.home-glass #profileView .player-record-grid button > span{grid-area:1/1;align-self:end;min-width:0}
body.home-glass #profileView .player-record-grid button > span b{font-size:13px;line-height:1.05}
body.home-glass #profileView .player-record-grid button > span small{display:none}
body.home-glass #profileView .player-record-grid button > strong{
  grid-area:2/1;margin:4px 0 0;color:#694b33;font:700 clamp(17px,5.1vw,24px)/1.05 system-ui;
  letter-spacing:-.045em;font-variant-numeric:tabular-nums;
}
body.home-glass #profileView .player-record-grid button > i{display:none}
body.home-glass #profileView .player-record-grid .player-tower-caption{
  grid-area:3/1;margin:3px 0 0;font-size:10px;color:var(--text-soft)
}
body.home-glass #profileView .compact-section-heading{margin:0 0 4px;min-height:42px}
body.home-glass #profileView .compact-section-heading button{min-height:44px;color:#745136;padding-inline:8px}
body.home-glass #profileView .profile-compact .profile-recent > .recent-game-row{
  min-height:64px;margin:0;padding:7px 6px;gap:10px;border-radius:0;border-bottom:1px solid #e7ddcf;
  background:transparent;display:grid;grid-template-columns:42px minmax(0,1fr) 13px;align-items:center
}
body.home-glass #profileView .profile-compact .recent-game-cover{width:42px;height:42px;border-radius:10px;object-fit:cover}
body.home-glass #profileView .profile-compact .recent-game-copy{gap:2px}
body.home-glass #profileView .profile-compact .recent-game-copy b{font-size:14px;color:#38291e}
body.home-glass #profileView .profile-compact .recent-game-result{font-size:12px}
body.home-glass #profileView .profile-compact .recent-game-date{font-size:10.5px;color:var(--text-soft)}
body.home-glass [data-tone="win"]{color:#356148!important}
body.home-glass [data-tone="loss"]{color:#8c4639!important}

body.home-glass #roomsView .page-room-tabs{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin:0 0 13px;padding:4px;
  border-radius:999px;border:1px solid #eee5d8;background:#ece2d4;
}
body.home-glass #roomsView .page-room-tabs button{
  min-height:44px;padding:0 4px;margin:0;font-size:13px;letter-spacing:-.01em;border:1px solid transparent;
  border-radius:999px;background:transparent;color:#645140;box-shadow:none;font-weight:650;
}
body.home-glass #roomsView .page-room-tabs button.active{
  background:#fffaf2;border-color:#fffcf7;color:#3e2b1f;box-shadow:0 2px 5px #5e452020
}
body.home-glass #roomsView .page-games-list{display:grid;gap:8px}
body.home-glass #roomsView .empty-state{
  display:grid;grid-template-columns:43px minmax(0,1fr);gap:3px 10px;align-items:center;
  margin:0;padding:14px;border:1px solid var(--line-soft);border-radius:20px;
  text-align:left;color:var(--leather);background:var(--paper-card);
}
body.home-glass #roomsView .player-empty-icon{
  grid-row:1/3;display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:#efe2d0;
}
body.home-glass #roomsView .player-empty-icon svg{width:22px;height:22px}
body.home-glass #roomsView .player-empty-active{grid-template-columns:64px minmax(0,1fr)}
body.home-glass #roomsView .player-empty-art{grid-area:1/1/3/2;display:block;width:64px;height:64px;object-fit:contain}
body.home-glass #roomsView .empty-state h3{margin:0;font-size:16px;color:#402f23;line-height:1.2}
body.home-glass #roomsView .empty-state p{margin:0;font-size:12px;color:var(--text-soft)}
body.home-glass #roomsView .player-empty-active h3{grid-column:2;align-self:end;color:var(--leather)}
body.home-glass #roomsView .player-empty-active p{grid-column:2;align-self:start}
body.home-glass #roomsView .player-empty-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px}
body.home-glass #roomsView .empty-state .player-empty-actions button{
  min-height:44px;padding:4px 7px;margin:0;border-radius:999px;border:1px solid #edddc9;font-size:12px;
  font-weight:650;background:#fbf1e4;color:#432f21;
}
body.home-glass #roomsView .empty-state .player-empty-actions [data-empty-create]{
  background:#493527;color:#fff9ef;border-color:#493527
}

body.home-glass #roomsView .premium-room{
  min-height:84px;position:relative;margin:0;padding:10px 40px 10px 10px;
  display:grid;grid-template-columns:57px minmax(0,1fr);align-items:center;gap:11px;
  border-radius:17px;border:1px solid #e8ddcf;background:var(--paper-card);box-shadow:none;
}
body.home-glass #roomsView .premium-room.player-has-menu{padding-right:66px}
body.home-glass #roomsView .premium-room .room-thumb{
  width:57px;height:57px;aspect-ratio:1;border-radius:11px;object-fit:cover;margin:0
}
body.home-glass #roomsView .premium-room .room-main{min-width:0;gap:3px}
body.home-glass #roomsView .premium-room .room-main > .kicker{font-size:9px;line-height:1.1;letter-spacing:.05em;margin:0;color:#785c46}
body.home-glass #roomsView .premium-room .room-main > b{color:#35271d;font-size:15px;line-height:1.15;overflow-wrap:anywhere}
body.home-glass #roomsView .premium-room .room-main > .room-state{
  font-size:12px;line-height:1.2;font-weight:600;margin:0;padding:0;border:0;background:transparent;color:#614f3c
}
body.home-glass #roomsView .premium-room .room-main > small{font-size:10.5px;line-height:1.2;color:var(--text-soft)}
body.home-glass #roomsView .premium-room .room-main > .player-redundant,
body.home-glass #roomsView .premium-room .room-main > .player-supporting{display:none}
body.home-glass #roomsView .premium-room .my-game-actions{display:contents}
body.home-glass #roomsView .premium-room .player-room-link{
  position:absolute;inset:0;width:auto;height:auto;min-width:0;min-height:0;display:grid;justify-items:end;align-items:center;
  margin:0;padding:0 10px;border:0;border-radius:inherit;color:#79573b;text-decoration:none;
  background:transparent;box-shadow:none;font-size:0;z-index:1;
}
body.home-glass #roomsView .premium-room .player-room-link svg{
  position:absolute;right:10px;top:50%;width:17px;transform:translateY(-50%);
}
body.home-glass #roomsView .premium-room.player-has-menu .player-room-link svg{right:47px}
body.home-glass #roomsView .premium-room .player-room-link:active{background:#77512b12}
body.home-glass #roomsView .premium-room .player-room-menu{position:absolute;right:3px;top:50%;transform:translateY(-50%);z-index:2}
body.home-glass #roomsView .player-room-menu summary{
  width:44px;height:44px;min-height:44px;display:grid;place-items:center;list-style:none;
  color:#76583e;cursor:pointer;border-radius:50%;
}
body.home-glass #roomsView .player-room-menu summary::-webkit-details-marker{display:none}
body.home-glass #roomsView .player-room-menu[open] summary{background:#f1e4d3}
body.home-glass #roomsView .player-room-menu button{
  position:absolute;z-index:3;right:1px;top:44px;min-height:44px;background:#fffbf4;
  border:1px solid #e1d2bf;border-radius:13px;box-shadow:0 4px 15px #45311a26;
  color:#674937;white-space:nowrap;font-size:12px;padding:6px 11px;
}
body.home-glass #roomsView #pageClearFinished{
  width:auto;min-height:44px;display:block;margin:11px 0 0 auto;background:transparent;box-shadow:none;
  border:0;color:#775a45;font-size:12px
}
body.home-glass #roomsView #pageClearFinished.hidden{display:none}

body.home-glass:has(#codeSheet:not(.hidden)) #backdrop{
  background:#30231638;backdrop-filter:blur(1.5px);
}
body.home-glass #codeSheet{
  inset:auto auto max(12px, var(--safe-bottom,0px)) 50%;width:min(calc(100% - 24px),390px);
  max-height:calc(var(--app-height,100dvh) - var(--safe-top,0px) - 22px);
  padding:0;border:1px solid #fff8ed;border-radius:24px;background:#fbf5eb;
  box-shadow:0 12px 32px #3a271b46,inset 0 1px #fff;
}
body.home-glass #codeSheet .sheet-handle{height:17px;background:transparent;margin:0}
body.home-glass #codeSheet .sheet-handle::after{width:32px;left:calc(50% - 16px);top:8px}
body.home-glass #codeSheet .sheet-body{padding:13px 15px 14px}
body.home-glass #codeSheet h2{
  margin:0 0 4px;color:#39271b;font:500 29px/1.1 Georgia,serif;letter-spacing:-.048em
}
body.home-glass #codeSheet #roomCodeHelp{margin:0 0 13px;font-size:12px;color:var(--text-soft)}
body.home-glass #codeSheet .player-code-control .code-input{
  display:block;width:100%;min-height:51px;margin:0;padding:8px 10px;
  border:1px solid #d8c7b3;border-radius:14px;background:#fffbf6;
  color:#402a1d;font:700 16px/1.2 ui-monospace,Consolas,monospace;
  letter-spacing:.19em;text-align:center;text-transform:uppercase;box-shadow:none;outline:0
}
body.home-glass #codeSheet .player-code-control .code-input:focus{
  border-color:#9d784f;outline:0;box-shadow:inset 0 0 0 1px #9d784f;
}
body.home-glass #codeSheet .code-input::placeholder{color:#806d5d;opacity:1}
body.home-glass #codeSheet .player-code-actions{
  display:grid;grid-template-columns:minmax(81px,1fr) minmax(120px,1.6fr);gap:8px;margin-top:10px;
}
body.home-glass #codeSheet .player-code-actions :is(#submitCode,#cancelCode){
  min-height:46px;width:100%;margin:0;border-radius:999px;font-weight:680;font-size:13px;
}
body.home-glass #codeSheet .player-code-actions #cancelCode{background:#fffaf3;border:1px solid #ecdfce;color:#533c2d}
body.home-glass #codeSheet .player-code-actions #submitCode{background:#483427;border:1px solid #483427;color:#fff9f0;box-shadow:none}
body.home-glass :is(#roomsView,#profileView,#codeSheet) :is(button, summary, a):focus-visible{
  outline:2px solid #91643c;outline-offset:-3px;
}
@supports (backdrop-filter:blur(8px)) {
  body.home-glass #codeSheet{background:#fff7ebef;backdrop-filter:blur(12px) saturate(1.1)}
}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more) {
  body.home-glass #codeSheet{background:#fff7eb;backdrop-filter:none}
  body.home-glass:has(#codeSheet:not(.hidden)) #backdrop{backdrop-filter:none}
}
