:root {
  --panel: rgba(18, 26, 24, 0.72);
  --panel-border: rgba(255, 255, 255, 0.12);
  --accent: #2fbf71;
  --accent-dark: #1f5f3f;
  --gold: #f2c230;
  --text: #f5f3ec;
  --muted: rgba(245, 243, 236, 0.65);
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: #0d1f18;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}
#game { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; outline: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ------------------------------------------------------------- screens */
.screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 20; }
.logo { width: 120px; height: 120px; filter: drop-shadow(0 6px 18px rgba(0,0,0,0.4)); }
.logo.small { width: 72px; height: 72px; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: 2.6rem; margin: 0.3rem 0 0; letter-spacing: 0.02em; }
.tag { margin: 0.2rem 0 1.2rem; color: var(--gold); font-style: italic; font-family: Georgia, serif; }
.bar { height: 10px; border-radius: 6px; background: rgba(255,255,255,0.15); overflow: hidden; }
#load-bar { height: 100%; width: 0; background: linear-gradient(90deg, #f2c230, #2fbf71); transition: width 0.3s; }
#load-text { margin-top: 0.8rem; }
.tip { color: var(--muted); font-size: 0.9rem; margin-top: 1.6rem; }

#menu { background: linear-gradient(90deg, rgba(8, 24, 18, 0.88) 0%, rgba(8, 24, 18, 0.55) 55%, rgba(8, 24, 18, 0.15) 100%); }
.menu-card { display: flex; gap: 2rem; width: min(1100px, 94vw); max-height: 94vh; align-items: center; }
.menu-left { flex: 1 1 52%; overflow-y: auto; max-height: 92vh; padding-right: 0.5rem; }
.menu-right { flex: 1 1 48%; display: flex; flex-direction: column; align-items: center; }
#preview { width: 100%; height: min(70vh, 560px); display: block; cursor: grab; }
.group h3 { margin: 1rem 0 0.4rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip {
  background: rgba(255,255,255,0.08); border: 1px solid var(--panel-border); border-radius: 999px;
  padding: 0.45rem 0.9rem; font-size: 0.92rem; transition: background 0.15s, border-color 0.15s;
}
.chip:hover { background: rgba(255,255,255,0.16); }
.chip.sel { background: var(--accent-dark); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.field { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; color: var(--muted); max-width: 280px; }
.field input {
  font: inherit; color: var(--text); background: rgba(255,255,255,0.08); border: 1px solid var(--panel-border);
  border-radius: 10px; padding: 0.55rem 0.75rem; outline: none; user-select: text;
}
.field input:focus { border-color: var(--accent); }
.menu-buttons { display: flex; gap: 0.8rem; margin-top: 1.4rem; flex-wrap: wrap; }
.small-print { font-size: 0.78rem; margin-top: 1rem; line-height: 1.5; }

.btn {
  background: rgba(255,255,255,0.1); border: 1px solid var(--panel-border); border-radius: 12px;
  padding: 0.7rem 1.3rem; font-weight: 600; transition: transform 0.1s, background 0.15s;
  text-decoration: none; display: inline-block;
}
.btn:hover { background: rgba(255,255,255,0.18); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: linear-gradient(180deg, #37c97a, #1f8f52); border-color: #46e08c; color: #fff; }
.btn.danger { background: rgba(200, 50, 40, 0.35); border-color: rgba(255, 90, 80, 0.5); }
.btn.small { padding: 0.4rem 0.8rem; font-size: 0.85rem; }

/* ---------------------------------------------------------------- HUD */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#hud > * { pointer-events: auto; }
.panel { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* the HUD sits along the bottom of the screen; only the compass is at the top */
#profile { position: absolute; left: 14px; bottom: 12px; display: flex; align-items: center; gap: 0.55rem; padding: 4px 14px 4px 4px; border-radius: 999px; }
#portrait { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.85); background: #2e6b4f; object-fit: cover; }
#p-name { font-weight: 700; font-size: 0.88rem; }
.lvl-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.72rem; color: var(--muted); }
.xp { width: 100px; height: 6px; background: rgba(255,255,255,0.18); border-radius: 6px; overflow: hidden; }
#xp-fill { height: 100%; width: 0; background: linear-gradient(90deg, #2fbf71, #8ef0a8); transition: width 0.4s; }

#mission-panel { position: absolute; left: 14px; bottom: 66px; width: 250px; overflow: hidden; cursor: pointer; font-size: 0.8rem; }
.m-head { padding: 0.4rem 0.7rem; font-weight: 700; border-bottom: 1px solid var(--panel-border); display: flex; align-items: center; gap: 0.5rem; }
.m-head .chev, .m-title-row .chev { margin-left: auto; font-size: 1.3rem; color: var(--muted); }
.leaf-ic { filter: hue-rotate(10deg); }
.m-body { padding: 0.45rem 0.7rem 0.55rem; }
.m-title-row { display: flex; align-items: center; gap: 0.45rem; font-weight: 700; font-size: 0.88rem; }
.m-diamond { width: 10px; height: 10px; background: var(--gold); transform: rotate(45deg); border-radius: 3px; flex: none; }
#m-desc { margin: 0.25rem 0 0.45rem; font-size: 0.78rem; color: rgba(245,243,236,0.85); line-height: 1.35; }
.m-prog { display: flex; align-items: center; gap: 0.7rem; }
.m-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.18); border-radius: 6px; overflow: hidden; }
#m-fill { height: 100%; width: 0; background: linear-gradient(90deg, #2fbf71, #8ef0a8); transition: width 0.4s; }
#m-count { font-weight: 700; min-width: 2.2rem; text-align: right; }
#mission-panel.done .m-diamond { background: var(--accent); }

#compass-wrap { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: min(520px, 46vw); pointer-events: none; }
#compass { width: 100%; height: auto; display: block; }
#compass-dist { position: absolute; top: 40px; transform: translateX(-50%); font-weight: 700; font-size: 0.9rem; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }

#topright { position: absolute; right: 14px; bottom: 214px; display: flex; gap: 0.35rem; align-items: center; }
.chip-stat { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 10px; padding: 0.28rem 0.6rem; display: flex; align-items: center; gap: 0.35rem; font-weight: 700; font-size: 0.82rem; min-width: 0; white-space: nowrap; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.chip-stat.bump { animation: bump 0.35s; }
@keyframes bump { 50% { transform: scale(1.15); } }
.ic.coin { width: 15px; height: 15px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe680, #f2a91a 60%, #b8730a); box-shadow: inset 0 0 0 2px #d48a12; }
.icon-btn { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 10px; width: 34px; height: 30px; font-size: 0.95rem; }

#minimap-wrap { position: absolute; right: 14px; bottom: 12px; width: 190px; padding: 5px; cursor: pointer; }
#minimap { width: 180px; height: 180px; display: block; border-radius: 10px; }
#location-row { position: absolute; left: 6px; bottom: 6px; background: rgba(10, 20, 16, 0.78); padding: 0.22rem 0.55rem; border-radius: 0 10px 0 10px; font-weight: 700; font-size: 0.72rem; display: flex; gap: 0.4rem; align-items: center; }
.expand { position: absolute; right: 10px; top: 8px; background: rgba(10,20,16,0.7); border-radius: 6px; padding: 0 5px; font-size: 0.85rem; }

#prompt { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--panel-border); border-radius: 999px; padding: 0.4rem 0.95rem; font-size: 0.88rem; font-weight: 700; pointer-events: none; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(47, 191, 113, 0.2); } }

#toasts { position: absolute; left: 50%; top: 58px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 0.4rem; pointer-events: none; width: min(560px, 90vw); }
.toast { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 12px; padding: 0.4rem 0.85rem; font-size: 0.85rem; animation: toastIn 0.3s ease-out; transition: opacity 0.5s, transform 0.5s; text-align: center; }
.toast.out { opacity: 0; transform: translateY(-8px); }
.toast.eco { border-color: rgba(47, 191, 113, 0.7); }
.toast.star { border-color: rgba(242, 194, 48, 0.8); }
.toast.level { border-color: rgba(140, 200, 255, 0.8); }
.toast.info { border-color: rgba(255,255,255,0.35); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } }

.banner { position: fixed; left: 50%; top: 26%; transform: translate(-50%, -20px); text-align: center; z-index: 15; pointer-events: none; opacity: 0; transition: opacity 0.5s, transform 0.5s; text-shadow: 0 3px 14px rgba(0,0,0,0.7); width: 90vw; }
.banner.show { opacity: 1; transform: translate(-50%, 0); }
#banner-title { font-family: Georgia, serif; font-size: clamp(1.8rem, 4.5vw, 3.2rem); font-weight: 700; }
#banner-sub { font-size: clamp(0.95rem, 1.8vw, 1.2rem); margin-top: 0.3rem; color: #fdf6e0; max-width: 680px; margin-left: auto; margin-right: auto; }
.banner.mission #banner-title { color: #8ef0a8; }
.banner.star #banner-title { color: var(--gold); }
.banner.title #banner-title { font-size: clamp(3rem, 8vw, 5.5rem); letter-spacing: 0.06em; }
.banner.title #banner-sub { font-style: italic; font-family: Georgia, serif; color: var(--gold); font-size: 1.4rem; }

/* touch controls (shown on touch devices) */
#joystick { position: absolute; left: 4vw; bottom: 5vh; width: 150px; height: 150px; border-radius: 50%; background: rgba(20, 30, 28, 0.35); border: 2px solid rgba(255,255,255,0.35); display: none; touch-action: none; }
#joystick::before { content: ''; position: absolute; inset: 22px; border-radius: 50%; border: 1px dashed rgba(255,255,255,0.25); }
#joystick-knob { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #f4f4f4, #b9b9b9); box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
#buttons { position: absolute; right: 216px; bottom: 12px; display: grid; grid-template-columns: repeat(3, auto); gap: 12px; align-items: end; justify-items: center; }
.round { border-radius: 50%; border: 2px solid rgba(255,255,255,0.4); background: rgba(20, 30, 28, 0.6); color: #fff; display: flex; align-items: center; justify-content: center; touch-action: none; }
.round.small { width: 46px; height: 46px; font-size: 1.1rem; font-weight: 800; }
.round.big { width: 76px; height: 76px; font-size: 2rem; grid-column: 3; grid-row: 1 / span 2; }
.round.active { background: rgba(47, 191, 113, 0.6); }
#btn-action.glow { background: rgba(47, 191, 113, 0.75); border-color: #8ef0a8; }
#btn-sprint, #btn-jump, #btn-view, #btn-namaskaram { display: none; }
body.touch #joystick, body.touch #btn-sprint, body.touch #btn-jump, body.touch #btn-view, body.touch #btn-namaskaram { display: flex; }
body:not(.touch) #buttons { grid-template-columns: auto; gap: 8px; }
/* touch screens: the joystick and buttons keep the corners, the HUD goes above them */
body.touch #profile { bottom: calc(5vh + 160px); }
body.touch #mission-panel { bottom: calc(5vh + 214px); }
body.touch #buttons { right: 14px; bottom: 12px; gap: 10px; }
body.touch #minimap-wrap { bottom: 150px; }
body.touch #topright { bottom: 352px; }
body.touch #speedo { right: 230px; bottom: 150px; }

/* dialog */
#dialog { position: fixed; left: 50%; bottom: 6vh; transform: translateX(-50%); width: min(760px, 92vw); z-index: 12; background: rgba(16, 24, 22, 0.88); border: 1px solid rgba(242, 194, 48, 0.5); border-radius: 18px; padding: 1.1rem 1.4rem 1rem; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.dialog-name { position: absolute; top: -16px; left: 22px; background: linear-gradient(180deg, #37c97a, #1f8f52); padding: 0.25rem 0.9rem; border-radius: 999px; font-weight: 700; font-size: 0.95rem; }
#dialog-text { font-size: 1.1rem; line-height: 1.5; margin: 0.6rem 0 0.8rem; }
#dialog-next { float: right; }

/* photo mode */
#photo-ui { position: fixed; inset: 0; z-index: 12; pointer-events: none; }
.viewfinder { position: absolute; inset: 7vh 7vw; }
.viewfinder .c { position: absolute; width: 46px; height: 46px; border: 4px solid rgba(255,255,255,0.9); }
.viewfinder .tl { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.viewfinder .tr { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.viewfinder .bl { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.viewfinder .br { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.viewfinder .cross { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px; border: 2px solid rgba(255,255,255,0.7); border-radius: 50%; }
.photo-bar { position: absolute; left: 50%; bottom: 3vh; transform: translateX(-50%); display: flex; align-items: center; gap: 1.5rem; pointer-events: auto; background: var(--panel); padding: 0.6rem 1.2rem; border-radius: 999px; border: 1px solid var(--panel-border); }
.shutter { width: 64px; height: 64px; border-radius: 50%; border: 5px solid #fff; background: #e23b3b; box-shadow: 0 0 0 3px rgba(0,0,0,0.35); }
.shutter:active { transform: scale(0.94); }
#flash { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 30; }
#flash.go { animation: flash 0.45s ease-out; }
@keyframes flash { 0% { opacity: 0.9; } 100% { opacity: 0; } }

/* modals */
#pause, #bigmap, #album, #certificate { background: rgba(5, 12, 10, 0.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal { background: rgba(18, 28, 25, 0.95); border: 1px solid var(--panel-border); border-radius: 20px; padding: 1.4rem 1.8rem; width: min(640px, 94vw); max-height: 92vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.modal h2 { margin: 0 0 0.8rem; font-family: Georgia, serif; }
.modal h3 { margin: 1.2rem 0 0.5rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.8rem; }
.modal-head h2 { margin: 0; }
.modal-buttons { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 0.5rem; }
.settings { display: grid; gap: 0.7rem; }
.settings label { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.settings label.check { justify-content: flex-start; }
.settings input[type=range] { width: 55%; accent-color: var(--accent); }
.settings select { font: inherit; background: #22342e; color: var(--text); border: 1px solid var(--panel-border); border-radius: 8px; padding: 0.3rem 0.5rem; }
table.controls { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.controls td { padding: 0.35rem 0.4rem; border-bottom: 1px solid rgba(255,255,255,0.07); }
table.controls td:first-child { color: var(--muted); width: 40%; }
.map-modal { width: min(940px, 96vw); }
#bigmap-canvas { width: min(calc(96vw - 44px), calc(100vh - 170px), 900px); height: auto; aspect-ratio: 1; border-radius: 12px; display: block; cursor: grab; touch-action: none; }
#bigmap-canvas.dragging { cursor: grabbing; }
.map-stage { position: relative; width: fit-content; margin: 0 auto; }
.map-zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; }
.map-zoom .btn { width: 40px; height: 40px; padding: 0; font-size: 22px; line-height: 1; }
.map-hint { text-align: center; font-size: 12px; margin: 8px 0 0; width: 0; min-width: 100%; }
.legend-me { color: #ffdd33; } .legend-friend { color: #b26bff; } .legend-player { color: #5ec8ff; }
.mm-zoom { position: absolute; left: 12px; top: 12px; display: flex; flex-direction: column; gap: 4px; }
.mm-zoom button { width: 26px; height: 26px; border-radius: 8px; border: 0; background: rgba(10, 30, 22, 0.75); color: #fff; font: bold 17px/1 system-ui, sans-serif; cursor: pointer; padding: 0; }
.mm-zoom button:hover { background: rgba(30, 90, 60, 0.9); }
#album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.9rem; }
#album-grid figure { margin: 0; background: rgba(255,255,255,0.06); border-radius: 12px; overflow: hidden; padding-bottom: 0.6rem; text-align: center; }
#album-grid img { width: 100%; display: block; aspect-ratio: 16 / 10; object-fit: cover; }
#album-grid figcaption { font-size: 0.82rem; padding: 0.4rem 0.5rem; color: var(--muted); }
.cert { text-align: center; border: 3px double var(--gold); background: linear-gradient(180deg, rgba(40, 32, 12, 0.96), rgba(18, 28, 25, 0.96)); }
.cert-name { font-family: Georgia, serif; font-size: 2.2rem; color: var(--gold); margin: 0.4rem 0 0.6rem; }

/* states */
body[data-state="photo"] #hud { display: none; }
body[data-state="loading"] #hud, body[data-state="menu"] #hud { display: none; }

/* small screens */
@media (max-width: 900px) {
  .menu-card { flex-direction: column-reverse; gap: 0.5rem; overflow-y: auto; }
  .menu-left { max-height: none; overflow: visible; }
  #preview { height: 34vh; }
  #menu { align-items: flex-start; overflow-y: auto; padding: 1rem 0; }
  h1 { font-size: 1.9rem; }
  #mission-panel { width: 200px; }
  #minimap-wrap { width: 132px; }
  #minimap { width: 122px; height: 122px; }
  #topright { bottom: 200px; flex-wrap: wrap; justify-content: flex-end; max-width: 60vw; }
  #buttons { right: 152px; }
  #prompt { bottom: 240px; }
  #radio-panel { max-width: 46vw; }
  #radio-vol { display: none; }
  .chip-stat { padding: 0.22rem 0.45rem; font-size: 0.75rem; }
  #compass-wrap { width: 60vw; }
}
@media (max-height: 520px) {
  #mission-panel #m-desc { display: none; }
  #joystick { width: 120px; height: 120px; }
  .round.big { width: 76px; height: 76px; }
  .round.small { width: 48px; height: 48px; font-size: 1.1rem; }
}

/* ---------------------------------------------------------- accounts */
#auth { background: radial-gradient(ellipse at 50% 20%, rgba(45, 122, 85, 0.92) 0%, rgba(10, 29, 22, 0.96) 70%); z-index: 40; overflow-y: auto; }
.auth-card { width: min(440px, 92vw); text-align: center; padding: 1.5rem 0; }
.auth-tabs { display: flex; background: rgba(255,255,255,0.08); border-radius: 12px; padding: 4px; margin: 0.6rem 0 1rem; }
.auth-tabs button { flex: 1; background: none; border: 0; padding: 0.6rem; border-radius: 9px; font-weight: 700; color: var(--muted); }
.auth-tabs button.sel { background: var(--accent-dark); color: #fff; box-shadow: 0 0 0 1px var(--accent) inset; }
.auth-form { display: grid; gap: 0.75rem; text-align: left; }
.auth-form label { display: grid; gap: 0.3rem; font-size: 0.85rem; color: var(--muted); }
.auth-form label.check { display: flex; align-items: center; gap: 0.5rem; color: var(--text); font-size: 0.92rem; }
.auth-form input[type=tel], .auth-form input[type=password], .auth-form input[type=text], .auth-form input:not([type]) {
  font: inherit; color: var(--text); background: rgba(255,255,255,0.08); border: 1px solid var(--panel-border);
  border-radius: 10px; padding: 0.65rem 0.8rem; outline: none; user-select: text; width: 100%;
}
.auth-form input:focus { border-color: var(--accent); }
.auth-form input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.auth-form .btn { width: 100%; margin-top: 0.3rem; }
.auth-form.busy { opacity: 0.6; }
.pw-wrap { position: relative; display: block; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); border: 0; border-radius: 7px; padding: 0.25rem 0.55rem; font-size: 0.78rem; }
.auth-error { background: rgba(200, 50, 40, 0.25); border: 1px solid rgba(255, 90, 80, 0.5); border-radius: 10px; padding: 0.5rem 0.7rem; margin: 0; color: #ffd6d0; font-size: 0.9rem; }
.auth-foot { margin-top: 1.1rem; display: grid; gap: 0.5rem; justify-items: center; }
.linkish { background: none; border: 0; color: var(--gold); text-decoration: underline; padding: 0.2rem; }
.linkish.small { font-size: 0.8rem; color: var(--muted); }
.server-status { font-size: 0.82rem; color: var(--muted); }
.server-status.ok { color: #8ef0a8; }
.server-status.bad { color: #ffb4a8; }
.server-status::before { content: '\25CF  '; }

/* online indicator */
.online-chip { cursor: pointer; font-size: 0.9rem; color: var(--text); }
.net-dot { width: 10px; height: 10px; border-radius: 50%; background: #888; box-shadow: 0 0 0 2px rgba(0,0,0,0.3); }
.online-chip.on .net-dot { background: #3ddc84; box-shadow: 0 0 8px #3ddc84; }
#profile { cursor: pointer; }

/* profile page */
.profile-modal { width: min(720px, 96vw); }
.pf-head { display: flex; gap: 1.1rem; align-items: center; }
.pf-portrait { width: 110px; height: 110px; border-radius: 50%; border: 3px solid var(--gold); background: #2e6b4f; flex: none; }
.pf-id h2 { margin: 0 0 0.3rem; display: inline-block; margin-right: 0.6rem; }
.pf-meta { color: var(--muted); font-size: 0.9rem; margin: 0.2rem 0 0.5rem; }
.pf-level { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; }
.pf-level .xp { width: 180px; height: 9px; background: rgba(255,255,255,0.18); border-radius: 6px; overflow: hidden; }
.pf-level .xp div { height: 100%; background: linear-gradient(90deg, #2fbf71, #8ef0a8); }
.pf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin: 1.1rem 0 0.4rem; }
.pf-stat { background: rgba(255,255,255,0.06); border-radius: 12px; padding: 0.7rem; display: grid; justify-items: center; gap: 0.15rem; }
.pf-stat .ic { font-size: 1.3rem; }
.pf-stat b { font-size: 1.15rem; }
.pf-stat small { color: var(--muted); }
.pf-districts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.4rem; }
.pf-districts li { display: flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.55rem; border-radius: 10px; background: rgba(255,255,255,0.05); color: var(--muted); font-size: 0.88rem; min-width: 0; white-space: nowrap; }
.pf-districts li.on { background: rgba(47, 191, 113, 0.18); color: #fff; }
.pf-districts .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.3); display: inline-flex; align-items: center; justify-content: center; font-size: 0.7rem; flex-shrink: 0; }
.pf-districts .nm { overflow: hidden; text-overflow: ellipsis; }
.pf-districts li.on .dot { background: var(--accent); border-color: var(--accent); }
.player-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0.2rem; border-bottom: 1px solid rgba(255,255,255,0.07); }
.player-row span { flex: 1; }
.district-ml { font-size: 1.4rem; color: var(--gold); margin: 0 0 0.6rem; }
#district-facts li { margin-bottom: 0.5rem; line-height: 1.45; }

/* highway HUD: route bar & speedometer */
#route { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); width: min(430px, 36vw); padding: 0.25rem 0.6rem 0.1rem; text-align: center; pointer-events: none; }
#route-next { font-weight: 700; font-size: 0.78rem; }
#route-bar { width: 100%; height: auto; display: block; }
#speedo { position: absolute; right: 270px; bottom: 8px; width: 120px; height: 120px; pointer-events: none; }
#radio-panel { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); display: flex; align-items: center; gap: 0.45rem; padding: 0.3rem 0.55rem; font-size: 0.85rem; pointer-events: auto; max-width: min(560px, 94vw); }
#radio-panel .r-ic { font-size: 1.15rem; font-family: system-ui, "Segoe UI Emoji", "Apple Color Emoji", sans-serif; }
#radio-panel .r-info { min-width: 0; flex: 1; }
#radio-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
#radio-panel .r-sub { font-size: 0.75rem; color: var(--muted); }
#radio-state.live { color: #ff5a5a; font-weight: 700; letter-spacing: 0.06em; }
#radio-panel .r-btn { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); color: inherit; border-radius: 8px; width: 28px; height: 28px; cursor: pointer; font-size: 0.8rem; }
#radio-panel .r-btn:hover { background: rgba(47, 191, 113, 0.25); }
#radio-vol { width: 80px; }
#fade { position: fixed; inset: 0; background: #0b1a14; z-index: 45; display: flex; align-items: center; justify-content: center; transition: opacity 0.35s; }
#fade-text { font-family: Georgia, serif; font-size: 1.6rem; color: var(--gold); }
body[data-state="profile"] #hud, body[data-state="players"] #hud, body[data-state="district"] #hud { pointer-events: none; }
@media (max-width: 900px) {
  #route { width: 38vw; }
  #speedo { width: 86px; height: 86px; right: 148px; bottom: 108px; }
  body.touch #route { width: 32vw; }
  body.touch #topright { right: auto; left: 50%; transform: translateX(-50%); bottom: 76px; max-width: 60vw; flex-wrap: nowrap; justify-content: center; gap: 0.25rem; }
  body.touch .chip-stat { font-size: 0.7rem; padding: 0.2rem 0.4rem; }
  body.touch .icon-btn { width: 30px; height: 26px; font-size: 0.8rem; }
  body.touch #radio-panel { bottom: 112px; }
  body.touch #prompt { bottom: 160px; }
  body.touch #minimap-wrap { bottom: 182px; }
  body.touch #speedo { right: 148px; bottom: 182px; }
  .pf-stats { grid-template-columns: repeat(2, 1fr); }
  .pf-head { flex-direction: column; text-align: center; }
}
/* shown when the mouse is not captured yet */
#mouse-hint { position: fixed; left: 50%; top: 42%; transform: translateX(-50%); z-index: 30; padding: 0.6rem 1.1rem; border-radius: 999px; background: rgba(10, 30, 22, 0.78); color: #fff; font-weight: 600; cursor: pointer; box-shadow: 0 4px 18px rgba(0,0,0,0.3); }
/* garage */
#garage-list { display: grid; gap: 0.6rem; margin-top: 0.6rem; }
.travel-modal { width: min(760px, 94vw); }
.head-buttons { margin-top: 0; }
#travel-list h3:first-child { margin-top: 0.4rem; }
.travel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 0.5rem; }
.travel-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; padding: 0.6rem 0.75rem; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.06); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.travel-btn:hover, .travel-btn:focus-visible { background: rgba(47, 191, 113, 0.22); border-color: rgba(47, 191, 113, 0.6); outline: none; }
.travel-btn .t-name { font-weight: 700; }
.travel-btn .t-sub { font-size: 0.8rem; color: var(--muted); }
.travel-btn .t-ml { font-size: 0.85rem; color: var(--gold); }
.travel-btn.here { border-color: var(--gold); }
.travel-btn .t-icon { font-family: system-ui, "Segoe UI Emoji", "Apple Color Emoji", sans-serif; }
.garage-card { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 0.8rem; padding: 0.7rem 0.9rem; border-radius: 14px; background: rgba(255,255,255,0.06); }
.garage-card.owned { background: rgba(47, 191, 113, 0.16); }
.garage-card .g-icon { font-size: 2.6rem; text-align: center; font-family: system-ui, "Segoe UI Emoji", "Apple Color Emoji", sans-serif; }
.garage-card .g-ml { color: var(--gold); font-size: 0.9rem; margin-left: 0.3rem; }
.garage-card .g-price { font-weight: 700; margin-top: 0.2rem; }
.garage-card .g-status { min-width: 170px; text-align: right; }
.g-prog { height: 8px; border-radius: 4px; background: rgba(255,255,255,0.15); overflow: hidden; margin-bottom: 0.3rem; }
.g-prog > div { height: 100%; background: linear-gradient(90deg, #3ddc84, #ffd34d); }
@media (max-width: 640px) { .garage-card { grid-template-columns: 44px 1fr; } .garage-card .g-status { grid-column: 1 / -1; text-align: left; } .garage-card .g-icon { font-size: 2rem; } }
/* fishing */
#fishing { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); width: min(460px, 90vw); padding: 0.8rem 1rem; text-align: center; z-index: 25; }
#fish-title { font-weight: 800; font-size: 1.15rem; margin-bottom: 0.4rem; }
#fish-bar { position: relative; height: 22px; border-radius: 11px; background: rgba(255,255,255,0.15); margin: 0.5rem 0; overflow: hidden; }
#fish-zone { position: absolute; top: 0; bottom: 0; background: rgba(61, 220, 132, 0.75); }
#fish-marker { position: absolute; top: -2px; bottom: -2px; width: 6px; margin-left: -3px; background: #ffd34d; box-shadow: 0 0 8px #ffd34d; border-radius: 3px; }
#fish-haul { margin-top: 0.4rem; }
/* usernames */
.at-wrap { position: relative; display: block; }
.at-wrap .at { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; }
.at-wrap input { padding-left: 1.7rem !important; }
.pf-username { color: var(--gold); font-weight: 600; margin: -0.2rem 0 0.25rem; }
/* badges */
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #e5484d; color: #fff; font-size: 0.7rem; font-weight: 800; line-height: 18px; text-align: center; }
#btn-groups { position: relative; }
#btn-groups .badge { position: absolute; top: -6px; right: -6px; }
.chip-active { font-size: 0.72rem; color: var(--gold); white-space: nowrap; }
/* groups screen */
.groups-modal { width: min(980px, 96vw); }
.tabs { display: flex; gap: 4px; background: rgba(255,255,255,0.08); border-radius: 12px; padding: 4px; margin: 0.4rem 0 0.9rem; overflow-x: auto; }
.tabs button { flex: 1; background: none; border: 0; padding: 0.55rem 0.8rem; border-radius: 9px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.tabs button.sel { background: var(--accent-dark); color: #fff; box-shadow: 0 0 0 1px var(--accent) inset; }
.group-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 0.8rem; border-radius: 12px; background: rgba(255,255,255,0.06); margin-bottom: 0.45rem; }
.group-row .g-main { flex: 1; min-width: 0; }
.g-search input, .g-create input:not([type]), .g-send input, .g-invite input { font: inherit; color: var(--text); background: rgba(255,255,255,0.08); border: 1px solid var(--panel-border); border-radius: 10px; padding: 0.55rem 0.75rem; outline: none; width: 100%; user-select: text; }
.g-search { margin-bottom: 0.7rem; }
.g-create { display: grid; gap: 0.7rem; max-width: 520px; }
.g-create label { display: grid; gap: 0.3rem; color: var(--muted); font-size: 0.88rem; }
.g-create label.check { display: flex; align-items: center; gap: 0.45rem; color: var(--text); }
.g-vis { display: grid; gap: 0.35rem; }
.g-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.7rem; }
.g-title { min-width: 0; }
.g-cols { display: grid; grid-template-columns: 1fr 300px; gap: 0.9rem; }
.g-chat { display: flex; flex-direction: column; min-height: 0; }
.g-messages { height: min(52vh, 440px); overflow-y: auto; padding: 0.4rem; border-radius: 12px; background: rgba(0,0,0,0.22); display: flex; flex-direction: column; gap: 0.35rem; user-select: text; }
.g-msg { max-width: 82%; padding: 0.4rem 0.65rem; border-radius: 12px 12px 12px 4px; background: rgba(255,255,255,0.09); align-self: flex-start; }
.g-msg.mine { align-self: flex-end; background: rgba(47, 191, 113, 0.25); border-radius: 12px 12px 4px 12px; }
.g-who { font-size: 0.78rem; }
.g-text { white-space: pre-wrap; word-break: break-word; }
.g-send { display: flex; gap: 0.4rem; margin-top: 0.5rem; }
.g-side { display: grid; gap: 0.5rem; align-content: start; }
.g-side h4 { margin: 0.2rem 0; font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.g-members { display: grid; gap: 0.3rem; max-height: 220px; overflow-y: auto; }
.g-member { display: flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.5rem; border-radius: 10px; background: rgba(255,255,255,0.05); }
.g-member .net-dot { flex: 0 0 auto; }
.g-member .net-dot.on { background: #3ddc84; box-shadow: 0 0 6px #3ddc84; }
.g-minfo { flex: 1; min-width: 0; font-size: 0.9rem; }
.g-owner { color: var(--gold); }
.g-invite { display: grid; gap: 0.35rem; }
.g-sugg { display: grid; justify-items: start; }
.g-voice { padding: 0.5rem 0.6rem; border-radius: 12px; background: rgba(43, 108, 176, 0.18); }
.v-list { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.3rem 0; }
.v-chip { padding: 0.15rem 0.5rem; border-radius: 999px; background: rgba(255,255,255,0.1); font-size: 0.82rem; transition: box-shadow 0.1s; }
.v-chip.speaking { box-shadow: 0 0 0 2px #3ddc84; }
.v-buttons { display: flex; gap: 0.4rem; }
@media (max-width: 760px) { .g-cols { grid-template-columns: 1fr; } .g-messages { height: 38vh; } }
/* in-game chat dock */
#chat-dock { position: fixed; left: 14px; bottom: 210px; width: min(360px, 60vw); padding: 0.45rem 0.6rem; z-index: 22; font-size: 0.88rem; pointer-events: auto; opacity: 0.82; }
#chat-dock.typing, #chat-dock:hover { opacity: 1; }
.dock-head { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; }
.dock-head .linkish { color: var(--gold); text-decoration: none; font-weight: 700; padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#dock-voice { width: 34px; height: 30px; font-size: 1rem; }
#dock-voice.on { background: rgba(47, 191, 113, 0.35); border-color: #3ddc84; }
#dock-voice.speaking { box-shadow: 0 0 0 3px #3ddc84; }
#dock-messages { display: grid; gap: 0.1rem; margin: 0.25rem 0; max-height: 7.5em; overflow: hidden; }
.dock-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#dock-input { width: 100%; font: inherit; color: var(--text); background: rgba(255,255,255,0.08); border: 1px solid var(--panel-border); border-radius: 8px; padding: 0.35rem 0.55rem; outline: none; user-select: text; }
#dock-input:focus { border-color: var(--accent); }
body.touch #chat-dock { left: 50%; transform: translateX(-50%); bottom: auto; top: 120px; width: min(320px, 80vw); }
/* the chat dock belongs to the game view, not the menus */
body:not([data-state=playing]):not([data-state=fishing]):not([data-state=dialog]) #chat-dock { display: none; }
.weather-chip { cursor: pointer; font-size: 0.9rem; color: var(--text); font-family: inherit; }
@media (max-width: 700px) { .weather-chip span:last-child { display: none; } }

/* ------------------------------------------- cel-shaded (storybook) theme */
body.toon {
  --panel: rgba(52, 42, 32, 0.74);
  --panel-border: rgba(255, 230, 190, 0.3);
  --accent: #7cc06b;
  --accent-dark: #3f6b35;
  --gold: #f3cd72;
  --text: #fcf5e6;
  --muted: rgba(252, 245, 230, 0.72);
  --radius: 18px;
}
body.toon .panel, body.toon .chip-stat { border-width: 1.5px; box-shadow: 0 4px 0 rgba(30, 20, 12, 0.22), 0 10px 24px rgba(0, 0, 0, 0.18); }
body.toon .modal { background: rgba(50, 41, 31, 0.96); border: 1.5px solid rgba(255, 230, 190, 0.32); border-radius: 22px; box-shadow: 0 6px 0 rgba(30, 20, 12, 0.3), 0 24px 60px rgba(0, 0, 0, 0.45); }
body.toon .btn { border-radius: 14px; }
body.toon .btn.primary { background: linear-gradient(180deg, #8fcf72, #4f9447); border-color: #a5dc88; box-shadow: 0 3px 0 #355f2f; }
body.toon .btn.primary:active { box-shadow: 0 1px 0 #355f2f; transform: translateY(2px); }
body.toon #loading { background: radial-gradient(ellipse at 50% 30%, #7fb36a 0%, #3d6b43 55%, #22382a 100%); }
body.toon .travel-btn, body.toon .garage-card { background: rgba(255, 240, 210, 0.07); border-color: rgba(255, 230, 190, 0.16); }
body.toon .travel-btn:hover, body.toon .travel-btn:focus-visible { background: rgba(124, 192, 107, 0.25); border-color: rgba(165, 220, 136, 0.7); }

/* ------------------------------------- loading + sign-in (one screen)
   A game-styled card in the painted look: a wooden name plaque with a
   palm and a houseboat on a wave, a dark wood panel trimmed in gold, and
   chunky yellow buttons. While the world loads the card shows the bar
   over a painted sky and backwater; then the form takes its place and the
   live 3D backwaters show through behind it. */
#auth { z-index: 50; padding: 4.2rem 0 1.5rem; align-items: flex-start; font-family: 'Fredoka', 'Nunito', 'Segoe UI', system-ui, sans-serif;
  background: radial-gradient(ellipse at 50% 120%, rgba(8, 24, 18, 0.15), rgba(8, 24, 18, 0.55) 75%); }
/* the painted, animated backwater shown while the world loads; it fades
   away to the live 3D backwaters once they are ready */
.boot-scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; transition: opacity 1.2s ease;
  background: radial-gradient(circle at 78% 18%, rgba(255, 246, 200, 0.95) 0 4%, rgba(255, 230, 150, 0) 15%), linear-gradient(180deg, #6fbcea 0%, #bfe6f5 40%, #d8eef5 42%); }
#auth:not(.booting) .boot-scene { opacity: 0; }
.boot-scene .hills { position: absolute; left: -5%; right: -5%; top: 30%; height: 16%;
  background: radial-gradient(ellipse 22% 55% at 12% 70%, #2f6e35 60%, transparent 62%), radial-gradient(ellipse 26% 60% at 40% 70%, #3a7d3c 60%, transparent 62%),
    radial-gradient(ellipse 24% 58% at 72% 70%, #2f6e35 60%, transparent 62%), radial-gradient(ellipse 18% 50% at 96% 70%, #3a7d3c 60%, transparent 62%),
    linear-gradient(180deg, transparent 62%, #4f9a4c 62%); }
.boot-scene .water { position: absolute; left: 0; right: 0; top: 45%; bottom: 0;
  background: repeating-linear-gradient(180deg, transparent 0 16px, rgba(255, 255, 255, 0.09) 16px 18px), linear-gradient(180deg, #2a96bd, #1d6f93 55%, #145470);
  background-size: 120px 34px, 100% 100%; animation: bootWater 3s linear infinite; }
@keyframes bootWater { from { background-position: 0 0, 0 0; } to { background-position: 0 34px, 0 0; } }
.boot-scene .cloud { position: absolute; width: 180px; height: 52px; border-radius: 60px; background: #fff; opacity: 0.92;
  box-shadow: 40px -22px 0 6px #fff, 90px -8px 0 -2px #fff; animation: bootCloud 60s linear infinite; }
.boot-scene .c1 { top: 9%; left: -15%; }
.boot-scene .c2 { top: 18%; left: -15%; transform: scale(0.7); animation-duration: 85s; animation-delay: -40s; }
.boot-scene .c3 { top: 5%; left: -15%; transform: scale(0.55); animation-duration: 110s; animation-delay: -75s; opacity: 0.8; }
@keyframes bootCloud { to { left: 115%; } }
.boot-boat { position: absolute; width: 150px; top: 52%; left: -15%; animation: bootBoat 38s linear infinite, bootBob 2.6s ease-in-out infinite; }
.boot-boat.b2 { width: 100px; top: 64%; animation-duration: 52s, 3.1s; animation-delay: -30s, -1s; animation-direction: reverse, normal; }
@keyframes bootBoat { to { left: 110%; } }
@keyframes bootBob { 0%, 100% { margin-top: 0; } 50% { margin-top: 5px; } }
@media (prefers-reduced-motion: reduce) { .boot-scene *, .boot-scene { animation: none !important; } }
.auth-card { width: min(430px, 92vw); text-align: center; padding: 0.4rem 1.4rem 1.3rem; margin: auto;
  background: linear-gradient(180deg, rgba(74, 44, 22, 0.94), rgba(46, 26, 12, 0.95));
  border: 3px solid #d8a032; border-radius: 26px;
  box-shadow: 0 0 0 5px rgba(58, 32, 14, 0.85), 0 18px 50px rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 220, 140, 0.25); }
#auth .tag { font-family: inherit; font-weight: 500; color: #ffe7a8; margin: 0.1rem 0 0.9rem; font-style: normal; }

/* the name plaque */
.brand { position: relative; margin: -3.4rem auto 0.1rem; width: min(330px, 84vw); }
.brand-palm { display: block; width: 92px; margin: 0 auto -16px; position: relative; z-index: 2; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.3)); }
.brand-plaque { position: relative; display: grid; line-height: 0.88; padding: 0.55rem 1rem 0.7rem;
  background: linear-gradient(180deg, #8a5527, #5c3416); border: 4px solid #3a1f0c; border-radius: 22px;
  box-shadow: inset 0 3px 0 rgba(255, 200, 120, 0.35), 0 6px 0 #2a1608, 0 10px 20px rgba(0, 0, 0, 0.35); }
.brand-1, .brand-2 { font-weight: 700; letter-spacing: 0.01em; paint-order: stroke fill; -webkit-text-stroke: 7px #3a1f0c; }
.brand-1 { font-size: clamp(2.1rem, 8.5vw, 2.8rem); color: #fff3d6; }
.brand-2 { font-size: clamp(2.6rem, 10.5vw, 3.6rem); color: #ffc61a; }
@supports not (paint-order: stroke) { .brand-1, .brand-2 { -webkit-text-stroke: 2px #3a1f0c; } }
.brand-1, .brand-2 { text-shadow: 0 4px 0 #2a1608; }
.brand-wave { display: block; width: 86%; margin: -14px auto 0; position: relative; z-index: 2; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.3)); }

/* the loading bar: a wooden track filling with gold */
.load-box { display: none; margin-bottom: 0.9rem; }
#auth.booting .load-box { display: block; }
#auth .load-box .tip { display: none; }
#auth.signed .load-box .tip { display: block; }
.signed-text { display: none; color: #fff3d6; font-weight: 600; font-size: 1.1rem; margin: 0.2rem 0 0.4rem; }
#auth.signed .signed-text { display: block; }
#auth.signed .auth-tabs, #auth.signed .auth-form, #auth.signed .auth-foot { display: none !important; }
#auth .bar { height: 18px; border-radius: 999px; background: #2a1608; border: 2px solid #d8a032; overflow: hidden; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6); }
#auth #load-bar { height: 100%; width: 0; border-radius: 999px; transition: width 0.3s ease;
  background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.18) 0 8px, transparent 8px 16px), linear-gradient(180deg, #ffe45c, #f5a31a); }
#auth #load-text { color: #fff3d6; font-weight: 600; margin: 0.6rem 0 0.3rem; }
#auth .tip { color: #e8cf98; font-size: 0.88rem; margin: 0.4rem 0 0.2rem; }

/* tabs and fields */
#auth .auth-tabs { background: rgba(0, 0, 0, 0.3); border: 2px solid rgba(216, 160, 50, 0.55); border-radius: 999px; padding: 4px; margin: 0.4rem 0 1rem; }
#auth .auth-tabs button { font-family: inherit; font-size: 1rem; font-weight: 600; color: #f0dcae; border-radius: 999px; }
#auth .auth-tabs button.sel { background: linear-gradient(180deg, #ffe45c, #f5a31a); color: #4a2608; box-shadow: 0 3px 0 #a8650e; }
#auth .auth-form label { color: #f0dcae; font-size: 0.88rem; font-weight: 500; }
#auth .auth-form label.check { color: #fff3d6; }
#auth .auth-form input[type=tel], #auth .auth-form input[type=password], #auth .auth-form input[type=text], #auth .auth-form input:not([type]) {
  background: #fff8e6; color: #3a2210; border: 2px solid #c99a4a; border-radius: 14px; font-family: inherit; font-weight: 500; }
#auth .auth-form input::placeholder { color: #b39770; }
#auth .auth-form input:focus { border-color: #ffc61a; box-shadow: 0 0 0 3px rgba(255, 198, 26, 0.35); }
#auth .auth-form input[type=checkbox] { accent-color: #f5a31a; }
#auth .at { color: #8a5a2a; }
#auth .pw-toggle { background: #e9d7b0; color: #4a2608; font-family: inherit; }
#auth .small-print, #auth h3 { color: #f0dcae; }

/* chunky yellow buttons, as on the title art */
#auth .btn.primary { font-family: inherit; font-size: 1.2rem; font-weight: 700; color: #4a2608; padding: 0.8rem 1rem; border-radius: 999px;
  background: linear-gradient(180deg, #ffe65e 0%, #ffc61a 55%, #f59d16 100%); border: 3px solid #fff1b0;
  box-shadow: 0 5px 0 #a8650e, 0 9px 16px rgba(0, 0, 0, 0.35); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4); transition: transform 0.12s, box-shadow 0.12s, filter 0.12s; }
#auth .btn.primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
#auth .btn.primary:active { transform: translateY(4px); box-shadow: 0 1px 0 #a8650e, 0 3px 8px rgba(0, 0, 0, 0.35); }
#auth .btn.guest { font-family: inherit; font-size: 1.05rem; font-weight: 600; color: #fff3d6; padding: 0.6rem 1.6rem; border-radius: 999px;
  background: linear-gradient(180deg, #5d5a2a, #3a3816); border: 3px solid #d8a032; box-shadow: 0 4px 0 #22200c; }
#auth .btn.guest:hover { filter: brightness(1.12); }
#auth .btn.guest:active { transform: translateY(3px); box-shadow: 0 1px 0 #22200c; }
#auth .auth-error { font-family: inherit; }
#auth .server-status { color: #e8cf98; }
#auth .linkish.small { color: #d8c08e; }
#auth .auth-form { gap: 0.55rem; }
#auth .auth-form input[type=tel], #auth .auth-form input[type=password], #auth .auth-form input[type=text], #auth .auth-form input:not([type]) { padding: 0.55rem 0.8rem; }
