:root {
  --green: #153c34;
  --cream: #f6ecd2;
  --gold: #ebce8b;
}
body,
button,
input,
select {
  font-family: Arial, KeralaMalayalam, sans-serif;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
button {
  min-height: 42px;
}
a {
  color: var(--gold);
}
.brand {
  top: 24px;
  left: 26px;
  max-width: none;
}
.brand img {
  width: 300px;
  height: auto;
  filter: drop-shadow(0 2px 3px #0006);
}
.brand small {
  display: none;
}
.join-logo {
  width: 250px;
  max-width: 90%;
  height: auto;
}
.join-card {
  width: min(460px, 94vw);
  padding: 30px;
}
.join-card h1 {
  font-size: 42px;
  line-height: 1.08;
  letter-spacing: -1px;
  margin: 24px 0 12px;
}
.join-card p {
  font-size: 14px;
}
.join-card label {
  font-size: 13px;
}
.avatarChoices {
  grid-template-columns: 1fr 1fr;
}
.avatarChoices button {
  text-align: center;
  font-size: 15px;
}
.terms-check {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.5;
}
.terms-check input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #eacc8d;
}
.joinbuttons {
  margin-top: 12px;
}
.joinbuttons button {
  padding: 14px;
}
.google-area {
  text-align: center;
  border-top: 1px solid #fff2;
  padding-top: 16px;
}
.google-area p {
  font-size: 12px;
  margin: 10px 0 0;
}
#googleButton,
#profileGoogle {
  display: flex;
  justify-content: center;
}
#joinStatus:empty {
  display: none;
}
#toolbar {
  top: 20px;
  right: 24px;
  left: auto;
  gap: 10px;
}
#toolbar button {
  width: 48px;
  height: 48px;
}
#roomStatus {
  top: 82px;
  right: 24px;
  padding: 8px 18px;
  letter-spacing: 0;
  font-size: 13px;
  line-height: 18px;
  border-radius: 24px;
  border: 1px solid #87b6a777;
  background: #163e35ef;
}
#moneyBox {
  top: 132px;
  right: 24px;
  padding: 13px 20px;
}
#money {
  font-size: 25px;
  font-weight: 700;
}
#mapPanel {
  bottom: 70px;
  width: 170px;
  padding: 10px;
}
#mapPanel small {
  font-size: 13px;
  letter-spacing: 0;
  font-weight: 700;
}
#mission {
  display: none !important;
}
#speedPanel {
  bottom: 70px;
  right: 24px;
  padding: 12px 18px;
  min-width: 140px;
  border-radius: 30px;
}
#speed {
  font-size: 18px;
}
#unit:empty {
  display: none;
}
#unit {
  font-size: 11px;
  margin-top: 4px;
}
#actionDock {
  bottom: 133px;
  right: 24px;
  display: grid;
  grid-template-columns: 60px 60px;
  gap: 10px;
}
#actionDock button {
  min-width: 0;
  padding: 10px;
  border-radius: 50%;
  height: 52px;
}
#jobsButton {
  grid-column: span 2;
  border-radius: 28px !important;
  height: 44px !important;
  font-size: 16px;
}
#cameraControls {
  right: 24px;
  bottom: 260px;
  grid-template-columns: repeat(3, 40px);
  grid-template-rows: repeat(2, 40px);
  gap: 5px;
}
#cameraControls button {
  min-height: 40px;
}
#actionDock svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#voiceButton.active {
  background: #60884c;
  border-color: #edce8b;
}
#voiceButton.muted {
  opacity: 0.65;
}
#chatButton.unread {
  border: 2px solid var(--gold);
}
#controls {
  padding: 17px;
  font-size: 12px;
  height: 48px;
}
#controls b {
  margin-left: 22px;
}
#prompt {
  bottom: 80px;
  pointer-events: auto;
  cursor: pointer;
  font-size: 13px;
  max-width: 45%;
  text-align: center;
}
#chatBox {
  bottom: 195px;
  right: 180px;
  width: 320px;
  box-shadow: 0 10px 50px #0005;
}
h2 {
  font-size: 24px;
}
.card p {
  line-height: 1.6;
}
.product {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid #fff2;
}
.product strong {
  font-size: 15px;
}
.product small {
  display: block;
  margin-top: 5px;
  color: #bdd0c0;
}
.product button {
  white-space: nowrap;
}
.product-info {
  display: flex;
  align-items: center;
  gap: 11px;
}
.product-swatch {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 2px solid #ffffff4d;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #0002;
}
.product-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.owned-label,
.equipped-label {
  color: #8ee0b9;
  font-size: 12px;
  font-weight: 700;
}
.gender-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0 4px;
}
.gender-tabs button.selected {
  color: #153b33;
  border-color: var(--gold);
  background: var(--gold);
}
.avatar-customizer {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #ffffff26;
  border-radius: 14px;
  background: #0c302966;
}
.customizer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.customizer-heading small {
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
}
.customizer-heading h3 {
  margin: 3px 0 0;
  font-size: 18px;
}
.customizer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.customizer-grid label {
  display: grid;
  gap: 6px;
  color: #bdd0c0;
  font-size: 12px;
}
.customizer-grid select {
  width: 100%;
}
#equippedSummary {
  margin-top: 12px;
  color: #dbe7d9;
  font-size: 12px;
  line-height: 1.6;
}
#peopleDialog .card,
#shopDialog .card,
#inventoryDialog .card {
  width: min(680px, 94vw);
}
#shopProducts,
#inventoryList {
  max-height: min(52vh, 480px);
  overflow: auto;
  padding-right: 4px;
}
#inventoryList:empty:after {
  content: "No items yet. Visit a shop to buy something.";
}
.inventory-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.inventory-column {
  min-width: 0;
  padding: 12px;
  border: 1px solid #ffffff24;
  border-radius: 12px;
  background: #0b302866;
}
.inventory-column h3 {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 15px;
}
.inventory-column .product {
  gap: 8px;
  padding: 11px 0;
}
.inventory-column .product strong {
  font-size: 13px;
}
.inventory-column .product button {
  padding: 9px 10px;
  font-size: 12px;
}
.inventory-empty {
  margin: 12px 0 4px;
  color: #9db6a8;
  font-size: 12px;
}
@media (max-width: 620px) {
  .inventory-columns {
    grid-template-columns: 1fr;
  }
  .customizer-grid {
    grid-template-columns: 1fr;
  }
  .customizer-heading,
  .product {
    align-items: stretch;
  }
  .product-actions {
    justify-content: flex-end;
  }
}
.football-card {
  width: min(760px, 95vw);
  overflow: hidden;
  padding: 24px;
}
.football-heading h2 {
  margin-top: 3px;
}
.football-eyebrow {
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
}
.football-scorebar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 10px;
  color: #dce8d7;
  font-size: 13px;
}
.football-scorebar strong {
  color: var(--gold);
}
#penaltyStage {
  --ball-x: 0px;
  --ball-y: 0px;
  position: relative;
  height: min(52vh, 380px);
  min-height: 265px;
  overflow: hidden;
  border: 1px solid #ffffff2b;
  border-radius: 14px;
  background:
    linear-gradient(#9dc8c5 0 27%, transparent 27%),
    repeating-linear-gradient(0deg, #5f884b 0 48px, #668f50 48px 96px);
  box-shadow: inset 0 0 60px #17362d44;
}
#penaltyStage:after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -21%;
  height: 45%;
  border: 3px solid #f5edd3cc;
  border-radius: 50% 50% 0 0;
}
#penaltyGoalArea {
  position: absolute;
  z-index: 2;
  top: 9%;
  left: 16%;
  width: 68%;
  height: 43%;
  cursor: crosshair;
  border: 7px solid #f8f3df;
  border-bottom-width: 6px;
  background: #dff0e417;
  box-shadow: 0 7px 0 #18392e33;
  touch-action: none;
}
.goal-net {
  position: absolute;
  inset: 0;
  opacity: 0.62;
  background-image:
    linear-gradient(#f5f0dc99 2px, transparent 2px),
    linear-gradient(90deg, #f5f0dc99 2px, transparent 2px);
  background-size: 26px 22px;
}
#penaltyTarget {
  position: absolute;
  z-index: 5;
  width: 30px;
  height: 30px;
  margin: -15px;
  border: 3px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 4px #17362d88;
  pointer-events: none;
}
#penaltyTarget:after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--gold);
}
#penaltyKeeper {
  --keeper-x: 0px;
  --keeper-y: 0px;
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 0;
  width: 58px;
  height: 92px;
  margin-left: -29px;
  transform-origin: 50% 88%;
  transition: transform 0.62s cubic-bezier(.22,.9,.31,1);
}
#penaltyKeeper.dive {
  transform: translate(var(--keeper-x), var(--keeper-y)) rotate(var(--keeper-rotate));
}
.keeper-head {
  position: absolute;
  left: 19px;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #7f4d32;
}
.keeper-body {
  position: absolute;
  left: 14px;
  top: 20px;
  width: 30px;
  height: 50px;
  border-radius: 8px 8px 4px 4px;
  background: #d05c46;
  box-shadow: -27px 8px 0 -11px #d05c46, 27px 8px 0 -11px #d05c46;
}
.keeper-body:after {
  content: "";
  position: absolute;
  left: 2px;
  top: 42px;
  width: 10px;
  height: 31px;
  border-radius: 5px;
  background: #172e29;
  box-shadow: 16px 0 #172e29;
}
#penaltyBall {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 15%;
  width: 28px;
  height: 28px;
  margin-left: -14px;
  border: 3px solid #263832;
  border-radius: 50%;
  background: radial-gradient(circle at 37% 35%, #263832 0 17%, #f8f4df 18% 53%, #263832 54% 63%, #f8f4df 64%);
  box-shadow: 0 5px 8px #0005;
  transition: transform .68s cubic-bezier(.2,.8,.3,1), width .68s, height .68s;
}
#penaltyBall.kicked {
  width: 18px;
  height: 18px;
  transform: translate(var(--ball-x), var(--ball-y)) rotate(540deg);
}
.penalty-spot {
  position: absolute;
  left: 50%;
  bottom: 12%;
  width: 7px;
  height: 4px;
  margin-left: -3px;
  border-radius: 50%;
  background: #f5ecd2aa;
}
#penaltyMessage {
  min-height: 24px;
  margin: 12px 0 8px;
  text-align: center;
  color: #f6ecd2;
  font-weight: 700;
}
#penaltyShots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin: 8px 0 15px;
}
.penalty-shot {
  width: 17px;
  height: 17px;
  border: 2px solid #e8dcbf99;
  border-radius: 50%;
}
.penalty-shot.goal {
  border-color: #8ecb76;
  background: #8ecb76;
}
.penalty-shot.saved {
  border-color: #e37d65;
  background: #e37d65;
}
.football-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
}
.football-actions button {
  min-height: 48px;
}
.personRow {
  flex-wrap: wrap;
}
.personRow .personActions {
  display: flex;
  gap: 6px;
}
.personRow button {
  font-size: 11px;
  padding: 8px;
}
.panel,
button {
  box-shadow: 0 2px 6px #0001;
}
.dialog .card {
  max-height: 92dvh;
}
.touchMove button,
.touchAct button {
  user-select: none;
  -webkit-user-select: none;
}
#turnstileBox {
  margin-top: 12px;
}
@media (max-width: 900px), (pointer: coarse) {
  .brand {
    left: 12px;
    top: 12px !important;
    max-width: none;
  }
  .brand img {
    width: 180px;
  }
  #toolbar {
    top: 52px !important;
    left: 12px !important;
    right: auto !important;
    gap: 8px;
    max-width: none;
  }
  #toolbar button {
    width: 42px;
    height: 42px;
  }
  #roomStatus {
    top: 108px;
    left: 12px;
    right: auto;
    max-width: none;
    font-size: 11px;
    padding: 6px 12px;
  }
  #moneyBox {
    left: auto;
    right: 12px;
    top: 16px;
    padding: 8px 12px;
  }
  #money {
    font-size: 20px;
  }
  #mapPanel {
    display: none;
  }
  #actionDock {
    right: 12px;
    bottom: 190px;
    grid-template-columns: 46px 46px;
    gap: 8px;
  }
  #actionDock button {
    height: 46px;
    min-height: 44px;
  }
  #cameraControls {
    right: 12px;
    bottom: 302px;
    grid-template-columns: repeat(3, 34px);
    grid-template-rows: repeat(2, 34px);
    gap: 4px;
  }
  #cameraControls button {
    min-height: 34px;
  }
  #speedPanel {
    display: block !important;
    right: 12px;
    bottom: 133px;
    min-width: 100px;
    padding: 8px 12px;
  }
  #speed {
    font-size: 14px;
  }
  #prompt {
    bottom: 130px;
    left: 12px;
    transform: none;
    max-width: 52%;
    font-size: 12px;
    padding: 10px;
  }
  #controls {
    display: none;
  }
  #chatBox {
    left: 10px;
    right: 10px;
    bottom: 125px;
    width: auto;
    z-index: 14;
  }
  .card {
    padding: 20px;
  }
  .join-card h1 {
    font-size: 34px;
  }
  .join-logo {
    width: 215px;
  }
  .join-card {
    max-height: 95dvh;
  }
  .touchAct button {
    min-height: 44px;
    font-size: 12px;
  }
  .touchMove {
    grid-template-columns: repeat(3, 44px);
    grid-template-rows: repeat(2, 44px);
  }
  #toast {
    top: 150px;
    width: 90%;
    font-size: 12px;
  }
  .avatarChoices button {
    font-size: 15px !important;
  }
  .mapgrid {
    grid-template-columns: 1fr;
  }
  #districtList {
    grid-template-columns: 1fr;
  }
  .brand small {
    display: none;
  }
  .football-card {
    padding: 16px;
  }
  #penaltyStage {
    height: min(48vh, 330px);
    min-height: 230px;
  }
  #penaltyGoalArea {
    left: 9%;
    width: 82%;
  }
}
@media (max-height: 540px) and (orientation: landscape) {
  .brand img {
    width: 165px;
  }
  #toolbar {
    top: 12px !important;
    left: auto !important;
    right: 12px !important;
  }
  #roomStatus {
    top: 68px;
    left: auto;
    right: 12px;
  }
  #moneyBox {
    top: 58px;
    left: 12px;
    right: auto;
  }
  #cameraControls {
    right: 126px;
    bottom: 150px;
  }
  #actionDock {
    bottom: 190px;
  }
  #speedPanel {
    bottom: 136px;
  }
  #prompt {
    left: 50%;
    transform: translateX(-50%);
    bottom: 24px;
  }
  #toast {
    top: 90px;
  }
  .touchAct {
    bottom: 15px;
  }
  .touchMove {
    bottom: 15px;
  }
}

/* Keep dismissed notifications fully hidden on short and narrow screens. */
#toast {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 0.15s;
}
#toast.show {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%);
}

    
/* Standalone inventory bag control */
#inventoryButton {
  grid-column: span 2;
  justify-self: center;
  width: 52px;
}

#cameraControls {
  bottom: 322px;
}

@media (max-width: 900px), (pointer: coarse) {
  #inventoryButton {
    width: 46px;
  }

  #cameraControls {
    bottom: 356px;
  }
}

@media (max-height: 540px) and (orientation: landscape) {
  #cameraControls {
    bottom: 150px;
  }
}
