* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  overflow: hidden;
  background: #173a32;
  color: #f5ecd4;
  font-family: Arial, sans-serif;
}
canvas {
  display: block;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid #ffffff26;
  border-radius: 7px;
  background: #294c40;
  color: #eee8d3;
  padding: 10px 13px;
}
button:hover {
  background: #40634e;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button.primary {
  background: #eaca89;
  color: #253c30;
  font-weight: bold;
  border: 0;
}
input,
select {
  background: #17382e;
  border: 1px solid #8a9d8055;
  border-radius: 7px;
  padding: 12px;
  color: #f6efd9;
  width: 100%;
}
label {
  font-size: 12px;
  display: block;
  margin: 14px 0 6px;
  color: #c7d7be;
}
h1 {
  font-size: 54px;
  letter-spacing: -2px;
  line-height: 1.03;
  margin: 18px 0;
}
h1 span {
  color: #edcb87;
}
h2 {
  margin: 0;
  font-size: 26px;
}
p {
  font-size: 13px;
  line-height: 1.8;
  color: #c8d5c4;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 3px;
  color: #dfc58e;
}
.overlay,
.dialog {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background: #0e261edb;
}
.card {
  padding: 32px;
  border: 1px solid #d0d4a630;
  background: #1c3d32;
  border-radius: 15px;
  width: min(530px, 92vw);
  max-height: 94vh;
  overflow: auto;
  box-shadow: 0 20px 100px #0005;
}
.wide {
  width: min(1000px, 94vw);
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.note {
  font-size: 11px;
  color: #aabbab;
  line-height: 1.7;
}
.joinbuttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.joinbuttons .primary {
  flex: 1;
}
#joinStatus {
  min-height: 18px;
  color: #efcf88;
  margin-top: 12px;
  font-size: 12px;
}
#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.panel {
  background: #17362de8;
  border: 1px solid #ffffff20;
  border-radius: 10px;
  backdrop-filter: blur(8px);
}
.brand {
  position: absolute;
  left: 26px;
  top: 24px;
  font-size: 20px;
  letter-spacing: 4px;
  font-weight: bold;
}
.brand small {
  font-size: 9px;
  display: block;
  letter-spacing: 2px;
  margin-top: 7px;
  color: #e2cf9c;
}
#toolbar {
  position: absolute;
  right: 24px;
  top: 22px;
  display: flex;
  gap: 5px;
  pointer-events: auto;
}
#toolbar button {
  font-size: 11px;
  padding: 10px;
}
#roomStatus {
  position: absolute;
  right: 25px;
  top: 72px;
  font-size: 10px;
  letter-spacing: 1px;
  text-align: right;
  color: #deead2;
  background: #1e3e32bd;
  border-radius: 5px;
  padding: 7px 10px;
}
#mission {
  position: absolute;
  left: 26px;
  top: 98px;
  width: 285px;
  padding: 18px;
  border-left: 3px solid #e3c38a;
}
#missionTitle {
  font-size: 17px;
  margin: 10px 0;
}
#missionText {
  font-size: 12px;
  margin: 0;
}
#distance {
  font-size: 10px;
  color: #e6c78e;
  margin-top: 14px;
}
#moneyBox {
  position: absolute;
  right: 25px;
  top: 116px;
  padding: 12px 20px;
  text-align: right;
}
#money {
  font-size: 24px;
}
#fishCount {
  font-size: 11px;
  color: #c0d1b8;
  margin-top: 5px;
}
#mapPanel {
  position: absolute;
  left: 26px;
  bottom: 70px;
  width: 188px;
  padding: 8px;
  pointer-events: auto;
  cursor: pointer;
}
#map {
  width: 100%;
  height: auto;
  border-radius: 6px;
}
#mapPanel small {
  display: block;
  font-size: 9px;
  letter-spacing: 1px;
  padding-top: 8px;
}
#speedPanel {
  position: absolute;
  right: 25px;
  bottom: 70px;
  padding: 18px;
  text-align: center;
  min-width: 145px;
}
#speed {
  font-size: 30px;
}
#unit {
  font-size: 9px;
  letter-spacing: 1px;
  margin-top: 6px;
}
#controls {
  position: absolute;
  bottom: 0;
  background: #152f27ef;
  padding: 16px;
  width: 100%;
  text-align: center;
  font-size: 11px;
  color: #cbd5c1;
}
#controls b {
  color: #f6e4b7;
  margin: 0 4px 0 12px;
}
#prompt {
  position: absolute;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  background: #e6c88c;
  color: #193a2e;
  padding: 12px 20px;
  border-radius: 7px;
}
#prompt:empty {
  display: none;
}
#toast {
  position: absolute;
  top: 78px;
  left: 50%;
  transform: translate(-50%, -180px);
  z-index: 9;
  background: #ead2a3;
  color: #273c30;
  border-radius: 8px;
  padding: 13px 20px;
  font-size: 12px;
  max-width: 470px;
  text-align: center;
  transition: transform 0.2s;
}
#toast.show {
  transform: translate(-50%, 0);
}
.mapgrid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 20px;
  margin-top: 20px;
}
#keralaSvg {
  width: 100%;
  height: 470px;
  background: #16372f;
  border-radius: 10px;
}
#keralaSvg g {
  cursor: pointer;
}
#keralaSvg circle {
  fill: #e4c786;
  stroke: #f8e6b7;
  stroke-width: 2;
}
#keralaSvg text {
  fill: #e4e7d5;
  font-size: 11px;
}
#keralaSvg g:hover circle {
  fill: #fff6ce;
  r: 11;
}
#districtList {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-height: 470px;
  overflow: auto;
}
.district,
.job {
  text-align: left;
}
.district strong,
.job strong {
  display: block;
  font-size: 13px;
}
.district small,
.job small {
  display: block;
  font-size: 10px;
  color: #b8c7b0;
  margin-top: 5px;
  line-height: 1.5;
}
#jobList {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0;
}
#chatBox {
  position: absolute;
  right: 25px;
  bottom: 70px;
  width: 320px;
  z-index: 4;
  padding: 12px;
  background: #17372ef5;
  border: 1px solid #fff3;
  border-radius: 10px;
}
#messages {
  height: 190px;
  overflow-y: auto;
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
#messages div {
  padding: 4px 0;
}
#messages b {
  color: #e5cb94;
}
#chatForm {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
#chatInput {
  font-size: 12px;
  padding: 9px;
}
#chatForm button {
  font-size: 11px;
}
#busStatus {
  padding: 14px;
  background: #264d3c;
  border-radius: 7px;
  color: #f0d5a0;
  margin-top: 18px;
}
.personRow {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #fff2;
  padding: 14px 0;
  font-size: 12px;
}
.personRow button {
  font-size: 10px;
}
#respawn,
#lost {
  z-index: 8;
}
.pill {
  font-size: 10px;
  border: 1px solid #ddcf8a44;
  padding: 6px 9px;
  border-radius: 4px;
  color: #d2d9be;
}
.pills {
  display: flex;
  gap: 7px;
  margin: 18px 0;
}
.close {
  font-size: 12px;
}
.footactions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  flex-wrap: wrap;
}
@media (max-width: 900px) {
  #toolbar {
    top: 66px;
    left: 25px;
    right: auto;
  }
  #roomStatus {
    top: 20px;
  }
  #mission {
    top: 118px;
    width: 245px;
  }
  #moneyBox {
    top: 118px;
  }
  .brand {
    font-size: 16px;
  }
  .mapgrid {
    grid-template-columns: 1fr;
  }
  #keralaSvg {
    display: none;
  }
  #districtList {
    max-height: 55vh;
  }
  .card {
    padding: 24px;
  }
}
@media (max-height: 700px) {
  h1 {
    font-size: 40px;
  }
  .card {
    padding: 24px;
  }
  .pills {
    margin: 10px 0;
  }
  #mapPanel {
    width: 150px;
  }
  #mission {
    padding: 12px;
  }
  #keralaSvg {
    height: 380px;
  }
  #districtList {
    max-height: 380px;
  }
}
