/* Eldervale: slate, aged brass, readable type, and an uninterrupted world. */
body:not(.loginPage) {
  --bg: #142329;
  --panel: #1c2a2c;
  --panel2: #142023;
  --text: #e6e4d6;
  --muted: #a7b5af;
  --accent: #d7be87;
  --good: #afc9a5;
  --bad: #d49d8e;
  /* Responsive default (breakpoint-driven); --elder-chat-height is the resolved,
     possibly player-resized, value the layout actually uses. */
  --elder-chat-height-default: 150px;
  --elder-chat-height: var(--elder-chat-height-default);
}
body:not(.loginPage) .wrap {
  padding: 0;
  display: block;
  min-height: 100dvh;
}
body:not(.loginPage) #gameCard {
  width: 100%;
  height: 100dvh;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #17282c;
}
#gameCard > .header {
  display: none;
}
#gameCard > .main {
  padding: 0;
  height: calc(100dvh - 62px);
}
.elderTopbar {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 26px;
  background: #152226;
  border-bottom: 1px solid #b5a47640;
  position: relative;
  z-index: 30;
}
.elderWordmark {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.21em;
  font-size: 23px;
  color: #e4d1a1;
  white-space: nowrap;
}
.elderWordmark span {
  display: block;
  font:
    10px/1.4 system-ui,
    sans-serif;
  letter-spacing: 0.35em;
  color: #8eaaa8;
  margin-top: 2px;
}
.elderLocation {
  font:
    12px/1.5 system-ui,
    sans-serif;
  letter-spacing: 0.21em;
  color: #c3c8b9;
  text-transform: uppercase;
}
.elderTopActions {
  display: flex;
  gap: 8px;
}
.elderTopActions button {
  background: #223237;
  border-color: #61736a60;
  border-radius: 4px;
  font-size: 12px;
  padding: 8px 13px;
  letter-spacing: 0.015em;
}
.elderTopActions #versionLabel {
  display: inline-flex;
  align-items: center;
  margin: 0;
  background: #223237;
  border: 1px solid #61736a60;
  border-radius: 4px;
  color: #d7be87;
  font-size: 12px;
  letter-spacing: 0.015em;
  padding: 8px 13px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}
.elderTopActions #versionLabel:hover,
.elderTopActions #versionLabel:focus-visible {
  border-color: #d7be8790;
  background: #28393d;
  color: #f0dfb2;
  outline: none;
}
body:not(.loginPage) .gameShell {
  position: relative;
  display: flex;
  height: 100%;
  gap: 0;
  align-items: stretch;
}
body:not(.loginPage) .gameMainColumn {
  position: relative;
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}
body:not(.loginPage) .playArea {
  height: calc(100% - 150px);
  min-height: 280px;
  flex: 1;
  width: 100%;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  position: relative;
  background: #15262c;
}
body:not(.loginPage) #game {
  width: 100% !important;
  height: 100% !important;
  display: block;
  position: relative;
  z-index: 2;
  touch-action: none;
}
body.elder3d #game {
  background: transparent !important;
  image-rendering: auto !important;
}
#elderWorld {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
body.elder3d .playArea::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  box-shadow: inset 0 0 85px 20px #12242840;
}
body.elderNoVignette .playArea::after {
  display: none;
}
body:not(.loginPage) .gamePanelColumn {
  width: 318px;
  flex: 0 0 318px;
  height: 100%;
  padding: 0;
  background: linear-gradient(140deg, #203033f7, #142329fa);
  border-left: 1px solid #9e957548;
}
body:not(.loginPage) .gamePanelColumn .panel {
  height: 100%;
  max-height: none;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
}
body:not(.loginPage) .panelTabs {
  padding: 14px 12px 9px;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 1px solid #88978b35;
  background: transparent;
}
body:not(.loginPage) .panelTabs .tab {
  border-radius: 3px;
  font-size: 12px;
  padding: 8px 9px;
  border: 1px solid transparent;
  color: #a5b8b1;
  background: transparent;
}
body:not(.loginPage) .panelTabs .tab.active {
  background: #c3b17717;
  border-color: #c3b17750;
  color: #e6d3a4;
}
body:not(.loginPage) .panelBody {
  flex: 1;
  overflow: auto;
  max-height: none;
  padding: 18px 16px 28px;
  font-size: 14px;
  line-height: 1.55;
  scrollbar-color: #758377 #1b2a2e;
  scrollbar-width: thin;
}
body:not(.loginPage) .panelBody h2,
body:not(.loginPage) .panelBody h3 {
  font-family: Georgia, serif;
  color: #dfcfab;
  font-weight: 400;
}
body:not(.loginPage) .panelBody .sectionTitle {
  font-family: Georgia, serif;
  letter-spacing: 0.04em;
}
body.elderPanelClosed .gamePanelColumn {
  display: none !important;
}
body:not(.loginPage) .chat {
  height: var(--elder-chat-height);
  flex: 0 0 var(--elder-chat-height);
  padding: 9px 18px 10px;
  margin: 0;
  border: 0;
  border-radius: 0;
  border-top: 1px solid #a6986845;
  background: #122025;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}
body:not(.loginPage) .chatResizeHandle {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ns-resize;
  touch-action: none;
  z-index: 4;
  background: transparent;
  border: 0;
}
body:not(.loginPage) .chatResizeHandle::before {
  content: "";
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: #a6986860;
  transition:
    background 0.15s ease,
    width 0.15s ease;
}
body:not(.loginPage) .chatResizeHandle:hover::before,
body:not(.loginPage) .chatResizeHandle:focus-visible::before,
body.chatResizing .chatResizeHandle::before {
  background: #d7be87d0;
  width: 62px;
}
body:not(.loginPage) .chatResizeHandle:focus-visible {
  outline: none;
}
body.chatResizing {
  cursor: ns-resize;
}
body.chatResizing,
body.chatResizing .chatLog {
  user-select: none;
}
body:not(.loginPage) .chat.fullscreenChatDock .chatResizeHandle {
  display: none;
}
body.fullscreenMode .playArea > .chat.fullscreenChatDock {
  padding-top: 0;
  height: var(--elder-chat-height-default);
  flex: 0 0 var(--elder-chat-height-default);
}
body:not(.loginPage) .chatTabs {
  margin: 0;
  padding: 5px 0;
  gap: 10px;
  min-height: 30px;
  border: 0;
}
body:not(.loginPage) .chatTab {
  font-size: 12px;
  border: 0;
  background: transparent;
  padding: 5px 7px;
  color: #8ba9a8;
  border-radius: 0;
}
body:not(.loginPage) .chatTab.active {
  color: #dfc998;
  border-bottom: 1px solid #dfc998;
  background: transparent;
}
body:not(.loginPage) .chatLog {
  flex: 1;
  max-height: none;
  min-height: 0;
  height: auto;
  background: transparent;
  padding: 3px 6px;
  line-height: 1.45;
  font-size: 12px;
  border: 0;
}
body:not(.loginPage) .chatInputRow {
  margin-top: 3px;
  height: 29px;
  gap: 8px;
}
body:not(.loginPage) .chatInputRow input {
  padding: 4px 8px;
  margin: 0;
  border-radius: 3px;
  background: #1f3033;
  border-color: #50615d50;
  font-size: 12px;
}
body:not(.loginPage) .chatInputRow button {
  padding: 3px 15px;
  border-radius: 3px;
  background: #a9915a18;
  border-color: #a9915a40;
  color: #d8c79e;
}
#cornerLogoWrap {
  display: none !important;
}
body:not(.loginPage) .gameFooter,
body:not(.loginPage) .gameBottomRow {
  background: #19282c;
}
body:not(.loginPage) .minimapWrap {
  border-radius: 4px !important;
  background: #142629e8 !important;
  border: 1px solid #b1a26c75 !important;
  box-shadow: 0 8px 30px #071a2445 !important;
  padding: 8px !important;
  backdrop-filter: blur(10px);
}
body:not(.loginPage) #minimap {
  border-radius: 2px !important;
  border-color: #a6996770 !important;
  opacity: 0.92;
}
body:not(.loginPage) .minimapMeta {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c2be9c;
}
body:not(.loginPage) #miniText {
  font-size: 10px;
  color: #a5bcb5;
}
body:not(.loginPage) .hpHud {
  background: #203032e8 !important;
  border: 1px solid #b1a26c75 !important;
  border-radius: 4px !important;
  box-shadow: 0 6px 24px #10202230;
}
body:not(.loginPage) .hpHudText {
  color: #e5d8b7;
  font-family: Georgia, serif;
}
body:not(.loginPage) .hudBtn {
  border-radius: 5px !important;
  background: linear-gradient(150deg, #334541, #1c2f32) !important;
  border: 1px solid #b2a16d70 !important;
  box-shadow: 0 3px 10px #071a2455;
}
body:not(.loginPage) .hudBtn img {
  image-rendering: auto !important;
  filter: drop-shadow(0 2px 2px #0008);
}
.elderControls {
  position: absolute;
  z-index: 12;
  pointer-events: none;
  left: 18px;
  bottom: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  color: #eee4caaa;
  text-shadow: 0 1px 5px #112b33;
  font-size: 11px;
  line-height: 1.8;
}
.elderControls span {
  white-space: nowrap;
}
.elderControls kbd {
  font: 10px system-ui;
  padding: 2px 4px;
  margin-right: 3px;
  border-radius: 2px;
  border: 1px solid #b6bca650;
  color: #eee8d3;
  background: #21343990;
}
body:not(.loginPage) .hotbarWrap {
  bottom: 44px !important;
  background: #172a2ac9;
  border: 1px solid #a3925f70;
  border-radius: 5px;
  backdrop-filter: blur(12px);
}
body:not(.loginPage) .hotbarSlot {
  border-radius: 3px;
  background: linear-gradient(145deg, #34443d, #223337);
  border-color: #8e956260;
}
body:not(.loginPage) .hudPanel,
body:not(.loginPage) .modal,
body:not(.loginPage) .appearanceModal {
  background: linear-gradient(145deg, #23363afa, #17262afa);
  border: 1px solid #b7a57670;
  border-radius: 8px;
  box-shadow: 0 20px 80px #06141caa;
  backdrop-filter: blur(15px);
}
body:not(.loginPage) .modalHeader {
  background: #263a3a;
  border-color: #b7a57640;
  color: #e1cfa7;
}
body:not(.loginPage) .modalHeader h2,
body:not(.loginPage) .modalHeader h3 {
  font-family: Georgia, serif;
  font-weight: 400;
}
body:not(.loginPage) .modalOverlay {
  background: #07161d88;
  backdrop-filter: blur(3px);
}
body:not(.loginPage) .invSlot,
body:not(.loginPage) .gearSlot {
  background: linear-gradient(145deg, #35433c, #233336);
  border-color: #8e996d50;
  border-radius: 5px;
}
body:not(.loginPage) .invSlot img,
body:not(.loginPage) .gearSlot img {
  image-rendering: auto;
  filter: drop-shadow(0 3px 3px #091e28a0);
}
body:not(.loginPage) .playerCtxMenu {
  border: 1px solid #af9f6b80;
  background: #1b2e32f5;
  border-radius: 5px;
  box-shadow: 0 10px 40px #10222b99;
  backdrop-filter: blur(10px);
}
body:not(.loginPage) .settingsCategoryCard {
  border-radius: 5px;
  background: #34494255;
  border-color: #a09a6740;
}
body:not(.loginPage) .settingsCategoryCard:hover {
  border-color: #b8a56a99;
  background: #40554a55;
}
body:not(.loginPage) .areaTitleMain {
  font-family: Georgia, serif;
  letter-spacing: 0.13em;
  font-weight: 400;
  color: #fff0c9;
  text-shadow: 0 3px 15px #152930;
}
body:not(.loginPage) .contextHint {
  background: #1c3033e8;
  border: 1px solid #b7a16b88;
  border-radius: 4px;
  box-shadow: 0 10px 30px #13272d40;
}
body:not(.loginPage) .contextHintTitle {
  font-family: Georgia, serif;
  font-weight: 400;
  color: #e8d4a2;
}
body:not(.loginPage) .loadingOverlay {
  background:
    linear-gradient(90deg, #071b24ee, #132a39a8),
    url("/static/engine/title.png") center/cover;
}
body:not(.loginPage) .loadingCard {
  background: #0c2226bf;
  border: 1px solid #b7a16b77;
  border-radius: 8px;
  backdrop-filter: blur(14px);
  box-shadow: 0 15px 80px #03101d90;
}
body:not(.loginPage) .loadingBarFill {
  background: linear-gradient(90deg, #637f73, #d4c295);
}
.elderEngineStatus {
  display: none;
  position: absolute;
  z-index: 50;
  bottom: 50px;
  left: 20px;
  max-width: 450px;
  padding: 12px 16px;
  background: #213432f2;
  border: 1px solid #cbb879;
  border-radius: 5px;
  font-size: 13px;
}
.elderEngineStatus.show {
  display: block;
}
.elderGraphics {
  color: #e6e4d6;
  background: linear-gradient(135deg, #263a3d, #15252b);
  border: 1px solid #b9a97888;
  border-radius: 10px;
  width: min(460px, calc(100vw - 32px));
  padding: 28px;
  box-shadow: 0 30px 100px #041018c0;
}
.elderGraphics::backdrop {
  background: #071720a8;
  backdrop-filter: blur(5px);
}
.elderDialogHead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
  gap: 15px;
}
.elderEyebrow {
  color: #a1b6ab;
  font-size: 10px;
  letter-spacing: 0.17em;
}
.elderDialogHead h2 {
  font:
    25px/1.4 Georgia,
    serif;
  font-weight: 400;
  color: #e5d4ad;
  margin: 5px 0 0;
}
.elderClose {
  padding: 0 8px;
  background: transparent !important;
  border: 0;
  font-size: 26px;
}
.elderField {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: #d2dbce;
  font-size: 14px;
  margin: 16px 0;
}
.elderField select {
  max-width: 240px;
  background: #15282c;
  border: 1px solid #82927d80;
  color: #e0deca;
  border-radius: 4px;
  padding: 7px 9px;
  font-size: 13px;
}
.elderField input[type="range"] {
  width: 210px;
  accent-color: #c5b57e;
}
.elderToggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #d2dbce;
  margin: 15px 0;
}
.elderToggle input {
  appearance: none;
  width: 34px;
  height: 19px;
  min-width: 34px;
  padding: 0;
  border-radius: 12px;
  background: #41544f;
  position: relative;
  cursor: pointer;
}
.elderToggle input::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #d2d4bb;
  top: 3px;
  left: 4px;
  transition: transform 0.15s;
}
.elderToggle input:checked {
  background: #82916b;
}
.elderToggle input:checked::after {
  transform: translateX(13px);
}
.elderCameraHelp {
  font-size: 12px;
  line-height: 1.7;
  color: #a6bbb2;
  padding-top: 14px;
  border-top: 1px solid #a7b39b30;
  margin-top: 24px;
}
.elderGraphicsFoot {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 22px;
}
.elderGraphicsFoot button {
  border-radius: 4px;
  background: #9c9a7018;
  border-color: #bba66d66;
  font-size: 13px;
}
.elderGraphicsFoot .elderPrimary {
  background: #c4b17c;
  color: #172b2c;
  border-color: #c4b17c;
  min-width: 90px;
}
.elderRenderNote {
  font-size: 11px;
  color: #8ca7a1;
  margin: 20px 0 0;
  text-align: center;
}
body.loginPage {
  background: #10232c url("/static/engine/title.png") center/cover fixed;
  font-family:
    system-ui,
    Segoe UI,
    sans-serif;
  --accent: #d6c18d;
}
body.loginPage::before {
  background: linear-gradient(
    90deg,
    #071e2adc 0%,
    #0b222976 44%,
    #0823310d 80%
  ) !important;
}
body.loginPage .login-shell {
  width: min(1120px, 100%);
  grid-template-columns: 440px 1fr;
  grid-template-rows: auto 1fr;
  gap: 20px;
  min-height: 100dvh;
  padding: 7vh 28px 6vh;
  align-content: center;
  align-items: start;
  justify-content: start;
  margin: auto;
}
body.loginPage .login-hero {
  grid-column: 1;
  grid-row: 1;
  text-align: left;
  min-height: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}
body.loginPage .hero-orb {
  display: none;
}
body.loginPage #loginLogo {
  max-width: 310px;
  filter: drop-shadow(0 5px 25px #01141b90);
  margin: 0;
  width: 100%;
}
body.loginPage .hero-title {
  font:
    26px/1.35 Georgia,
    serif;
  color: #ede1c2;
  font-weight: 400;
  letter-spacing: 0.02em;
  margin: 16px 0 7px;
}
body.loginPage .hero-sub {
  color: #a6bfc0;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  max-width: 360px;
}
body.loginPage .login-card {
  grid-column: 1;
  grid-row: 2;
  width: 100%;
  background: #122b32d9;
  border: 1px solid #bba56c66;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 20px 90px #00162377;
  backdrop-filter: blur(16px);
}
body.loginPage .login-card .mode-pill {
  color: #d7c28f;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #a59f6880;
  border-radius: 0;
  font: 12px system-ui;
  letter-spacing: 0.16em;
  padding: 2px 0 10px;
  text-transform: uppercase;
}
body.loginPage input {
  background: #10292fbb;
  border: 1px solid #758c8166;
  border-radius: 4px;
  padding: 12px 14px;
  font-size: 15px;
  color: #e4e4cf;
}
body.loginPage label {
  font-size: 13px;
  color: #b5c5bb;
}
body.loginPage .btn {
  border-radius: 4px;
  font-size: 14px;
}
.loginPage .btn-primary {
  background: #c8b17a !important;
  color: #182b31 !important;
  border: 1px solid #d7c597 !important;
  box-shadow: 0 4px 16px #00141c60;
}
.loginPage .btn-ghost,
.loginPage .btn-soft {
  background: #82957c15 !important;
  border-color: #89977e60 !important;
  color: #cbd6c9 !important;
}
body.loginPage .login-footer {
  color: #9cafad;
}
.loginPage .btn-text {
  color: #b1c2b4;
}
@media (min-width: 1600px) {
  body:not(.loginPage) .gamePanelColumn {
    width: 350px;
    flex-basis: 350px;
  }
  body:not(.loginPage) {
    --elder-chat-height-default: 160px;
  }
  .elderTopbar {
    padding: 0 30px;
  }
  .elderWordmark {
    font-size: 25px;
  }
}
@media (max-width: 1050px) {
  .elderLocation {
    display: none;
  }
  .elderControls span:nth-child(n + 4) {
    display: none;
  }
  body:not(.loginPage) .gamePanelColumn {
    width: 285px;
    flex-basis: 285px;
  }
  .elderTopbar {
    padding: 0 14px;
    gap: 10px;
  }
  .elderWordmark {
    font-size: 19px;
  }
}
@media (max-width: 760px) {
  body:not(.loginPage) .gamePanelColumn {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 35;
    width: min(318px, 85vw);
    box-shadow: -10px 0 45px #07182099;
  }
  .elderTopActions button,
  .elderTopActions #versionLabel {
    font-size: 11px;
    padding: 7px 9px;
  }
  .elderTopbar {
    height: 58px;
  }
  .elderWordmark {
    font-size: 17px;
  }
  .elderWordmark span {
    font-size: 8px;
  }
  #gameCard > .main {
    height: calc(100dvh - 58px);
  }
  .elderControls {
    font-size: 9px;
    left: 10px;
    gap: 7px;
  }
  .elderControls span:nth-child(n + 3) {
    display: none;
  }
  .elderGraphics {
    padding: 20px;
  }
  .elderField {
    gap: 12px;
  }
  .elderField select,
  .elderField input[type="range"] {
    max-width: 180px;
  }
  body:not(.loginPage) {
    --elder-chat-height-default: 125px;
  }
  body:not(.loginPage) .chat {
    padding: 7px 8px 7px;
  }
  body.loginPage .login-shell {
    display: flex;
    flex-direction: column;
    padding: 32px 22px;
    gap: 18px;
    width: min(440px, 100%);
    justify-content: center;
  }
  body.loginPage .login-hero {
    width: 100%;
  }
  body.loginPage #loginLogo {
    max-width: 230px;
  }
  .elderTopActions #elderCamera {
    max-width: 85px;
    line-height: 1.2;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
/* Keep the chat entry usable when the log flexes in a shorter viewport. */
body:not(.loginPage) .chatInputRow {
  flex: 0 0 32px;
  min-height: 32px;
  align-items: center;
}
body:not(.loginPage) .chatInputRow input {
  flex: 1;
  box-sizing: border-box;
  min-width: 0;
  min-height: 30px;
  height: 30px;
  line-height: 20px;
}
body:not(.loginPage) .chatInputRow button {
  height: 30px;
  min-height: 30px;
}
