body.pregame-enabled #lobby { display: none !important; }
body.pregame-enabled:not(.pg-playing) .app { visibility: hidden; }
body.pg-overlay-open { overflow: hidden !important; }
#pregame[hidden] { display: none !important; }
#pregame {
  position: fixed;
  inset: 0;
  z-index: 2000;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #092519;
  color: #f7edcf;
  font-family: Georgia, "Times New Roman", serif;
  scrollbar-width: none;
}
#pregame::-webkit-scrollbar { display: none; }
#pregame * { box-sizing: border-box; }
#pregame input { font: inherit; }
#pregame button { cursor: pointer; }
#pregame button:disabled { cursor: not-allowed; }
#pregame button:focus-visible, #pregame input:focus-visible { outline: 2px solid #f4d28f; outline-offset: 3px; }
.pg-shell {
  display: flex;
  flex-direction: column;
  width: min(100%, 500px);
  min-height: 100dvh;
  margin: auto;
  padding: calc(56px + env(safe-area-inset-top)) 25px calc(24px + env(safe-area-inset-bottom));
  background-color: #092519;
  background-size: cover;
  background-position: center;
}
.pg-shell--hero { background-image: url('/maexchen/assets/table-hero.webp'); }
.pg-shell--inner { background-image: url('/maexchen/assets/table-calm.webp'); }
.pg-header { display: flex; align-items: center; justify-content: space-between; min-height: 46px; }
.pg-header--hero { align-items: flex-start; padding-left: 67px; }
.pg-brand { display: flex; flex-direction: column; gap: 5px; color: #f5e8bd; }
.pg-brand strong { font: 700 20px/1 Georgia, serif; letter-spacing: .07em; }
.pg-brand span { font: 500 10px/1.3 Georgia, serif; letter-spacing: .18em; }
.pg-brand i { width: 86px; height: 1px; margin-top: 6px; background: #bba164; }
.pg-inner-brand { font: 700 15px Georgia, serif; letter-spacing: .16em; }
.pg-header-spacer { display: block; width: 44px; }
.pg-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(205,173,107,.42);
  border-radius: 50%;
  background: rgba(7,31,20,.78);
  color: #e9d3a0;
  font: 25px/1 Georgia, serif;
  box-shadow: 0 2px 10px rgba(0,0,0,.28);
}
.pg-main { display: flex; flex-direction: column; flex: 1; }
.pg-welcome-copy { margin-top: clamp(180px, calc(20vh + 65px), 235px); text-align: center; }
.pg-welcome-copy h1 { margin: 0; color: #fff2d3; font: 700 clamp(39px, 11vw, 48px)/.95 Georgia, serif; letter-spacing: -.035em; text-shadow: 0 2px 9px rgba(0,0,0,.32); }
.pg-gold-rule { width: 100px; height: 1px; margin: 19px auto 0; background: #bba164; }
.pg-welcome-copy p { margin: 17px 0 0; color: #e9d9b2; font: 17px/1.35 Georgia, serif; }
.pg-welcome-actions { display: flex; flex-direction: column; gap: 14px; margin-top: 55px; padding-bottom: 32px; }
.pg-primary, .pg-secondary {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 62px;
  padding: 0 19px;
  border-radius: 999px;
  color: #f4e5be;
  font: 18px/1.2 Georgia, serif;
}
.pg-primary {
  position: relative;
  border: 1px solid #d59762;
  background: radial-gradient(ellipse at 50% 0, #c05b32, #a94022 65%, #842d1a);
  color: #fff3d5;
  box-shadow: inset 0 1px 0 #f1ae74, inset 0 -3px 0 #6b2619, 0 6px 14px rgba(0,0,0,.25);
}
.pg-primary::before {
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(245,190,111,.78);
  border-radius: inherit;
  content: '';
  pointer-events: none;
}
.pg-primary:disabled { opacity: .55; cursor: not-allowed; }
.pg-button-label { min-width: 0; text-align: center; }
.pg-button-arrow { text-align: right; font: 26px/1 Georgia, serif; }
.pg-secondary { border: 1px solid #c2a66f; background: rgba(8,31,22,.5); }
.pg-help-link, .pg-text-link { align-self: center; border: 0; background: transparent; color: #d8bf87; font: 15px Georgia, serif; }
.pg-help-link { min-height: 44px; margin-top: 10px; }
.pg-help-link span { margin-left: 5px; }
.pg-text-link { min-height: 44px; padding: 8px; text-decoration: underline; text-underline-offset: 4px; }
.pg-title { margin-top: 57px; }
.pg-kicker { color: #cbb378; font: 700 11px/1.4 system-ui, sans-serif; letter-spacing: .18em; }
.pg-title h1 { margin: 11px 0 0; color: #fff2d3; font: 700 35px/1.03 Georgia, serif; letter-spacing: -.025em; }
.pg-title p { max-width: 330px; margin: 16px 0 0; color: #e2d3aa; font: 16px/1.45 system-ui, sans-serif; }
.pg-form { display: flex; flex-direction: column; margin-top: 42px; }
.pg-form label { margin-bottom: 10px; color: #f5e7c4; font: 600 14px system-ui, sans-serif; }
.pg-form input { width: 100%; height: 58px; padding: 0 17px; border: 1px solid #c9b27d; border-radius: 15px; background: #f8f0db; color: #18271f; font: 600 20px system-ui, sans-serif !important; }
.pg-form #pg-code { text-align: center; font-size: 25px !important; letter-spacing: .18em; }
.pg-form .pg-primary { margin-top: 31px; }
.pg-status { margin: 18px 0; padding: 10px 12px; border: 1px solid #d7a275; border-radius: 10px; background: rgba(50,20,10,.8); color: #ffe4be; font: 14px/1.4 system-ui, sans-serif; overflow-wrap: anywhere; }
.pg-invite { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 35px; padding: 22px 17px 19px; border: 1px solid rgba(207,172,102,.52); border-radius: 19px; background: rgba(5,27,18,.62); }
.pg-invite strong { color: #fff0cc; font: 700 36px Georgia, serif; letter-spacing: .08em; }
.pg-invite button { min-height: 42px; padding: 0 13px; border: 0; background: transparent; color: #e8cd91; font: 14px system-ui, sans-serif; text-decoration: underline; text-underline-offset: 3px; }
.pg-players { margin-top: 28px; }
.pg-players-heading { display: flex; justify-content: space-between; margin-bottom: 7px; color: #ccb77f; font: 700 12px system-ui, sans-serif; letter-spacing: .11em; text-transform: uppercase; }
.pg-player { display: flex; align-items: center; gap: 12px; min-height: 52px; border-top: 1px solid rgba(218,190,132,.24); color: #f6ebd1; font: 16px system-ui, sans-serif; }
.pg-player--offline { opacity: .55; }
.pg-avatar { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border: 1px solid #b79b63; border-radius: 50%; font: 700 15px Georgia, serif; }
.pg-player small { margin-left: auto; color: #cbb682; font: 12px system-ui, sans-serif; }
.pg-bottom { display: flex; flex-direction: column; align-items: stretch; gap: 9px; margin-top: auto; padding-top: 32px; padding-bottom: 14px; }
.pg-shell--room .pg-bottom { position: sticky; bottom: 0; z-index: 1; padding: 20px 0 max(14px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, #092519 18%, #092519); }
.pg-bottom p { margin: 0; color: #e3d0a2; font: 15px/1.4 system-ui, sans-serif; }
.pg-bottom .pg-fine { font-size: 12px; text-align: center; }
.pg-rows { margin-top: 34px; border-top: 1px solid rgba(218,190,132,.31); }
.pg-row, .pg-toggle { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 63px; padding: 0 5px; border: 0; border-bottom: 1px solid rgba(218,190,132,.31); background: transparent; color: #f4e8ca; font: 16px system-ui, sans-serif; text-align: left; }
.pg-row-end { display: flex; align-items: center; gap: 15px; margin-left: auto; color: #cbb378; font-size: 13px; }
.pg-row-end > span { font: 23px Georgia, serif; }
.pg-toggle { justify-content: space-between; gap: 18px; min-height: 70px; padding: 12px 5px; cursor: pointer; }
.pg-toggle > span { display: flex; flex-direction: column; gap: 6px; }
.pg-toggle small { max-width: 240px; color: #c8b996; font: 12px/1.4 system-ui, sans-serif; }
.pg-toggle input { position: relative; flex: none; appearance: none; width: 48px; height: 28px; margin: 0; border: 1px solid #a99667; border-radius: 999px; background: #2a3e31; transition: background .18s ease; cursor: pointer; }
.pg-toggle input::before { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #f0e2bd; box-shadow: 0 1px 3px #0005; transition: transform .18s ease; }
.pg-toggle input:checked { background: #a94a2b; border-color: #d4a46d; }
.pg-toggle input:checked::before { transform: translateX(20px); }
.pg-toggle input:disabled { opacity: .5; cursor: not-allowed; }
.pg-room-tools { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 18px; margin-top: 42px; padding-top: 20px; border-top: 1px solid rgba(218,190,132,.31); text-align: center; }
.pg-room-tools .pg-kicker { width: 100%; }
.pg-room-tools strong { width: 100%; color: #fff1cb; font: 700 26px Georgia, serif; letter-spacing: .12em; }
.pg-room-tools .pg-text-link { min-width: 120px; }
.pg-swatch { display: block; flex: none; width: 25px; height: 25px; border: 1px solid #b4a780; border-radius: 50%; background: #0b281b; }
.pg-swatch--night { background: #172228; }
.pg-swatch--pop { background: #d6a72b; }
.pg-motion-icon { display: grid; place-items: center; width: 126px; height: 126px; margin: 42px auto 24px; border: 1px solid rgba(207,172,102,.6); border-radius: 50%; background: rgba(7,31,20,.46); color: #e7cd91; font: 700 50px Georgia, serif; }
.pg-support { margin: 0; color: #dac9a1; font: 14px/1.5 system-ui, sans-serif; text-align: center; }
.pg-steps { margin-top: 37px; }
.pg-steps > div { display: grid; grid-template-columns: 36px 1fr; gap: 14px; padding: 18px 0; border-top: 1px solid rgba(218,190,132,.28); }
.pg-steps b { color: #c7a767; font: 700 14px Georgia, serif; }
.pg-steps h2 { margin: 0; color: #fff0cf; font: 700 21px/1.18 Georgia, serif; }
.pg-steps p { margin: 8px 0 0; color: #e0d0aa; font: 14px/1.45 system-ui, sans-serif; }
@media (max-width: 360px) { .pg-shell { padding-left: 19px; padding-right: 19px; } .pg-header--hero { padding-left: 59px; } .pg-welcome-copy h1 { font-size: 39px; } .pg-primary, .pg-secondary { font-size: 17px; } }
@media (max-height: 700px) { .pg-shell--inner { padding-top: calc(32px + env(safe-area-inset-top)); } .pg-welcome-copy { margin-top: 155px; } .pg-welcome-actions { margin-top: 35px; } .pg-title { margin-top: 24px; } .pg-invite { margin-top: 18px; padding-top: 16px; padding-bottom: 16px; } .pg-players { margin-top: 16px; } .pg-bottom { padding-top: 14px; } .pg-room-tools { margin-top: 24px; padding-top: 14px; } }

/* Solid leather buttons with a stable SVG chevron, shared with the game style. */
.pg-primary { background: linear-gradient(#b54d2d,#87331f); border: 1px solid #d9ad70; box-shadow: inset 0 1px #efb578,0 3px 6px #0005; }
.pg-primary::before,.pg-primary::after { content: none; }
.pg-button-arrow svg,.pg-back svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pg-back { display: grid; place-items: center; }

.pg-icon svg { display:block; width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
