:root {
  color-scheme: dark;
  --bg: #0e1420;
  --panel: #1b2332;
  --line: #344052;
  --gold: #d7ba81;
  --muted: #8d99ac;
  --red: #b85151;
  --ink: #e9e7df;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 50% 0, #243047 0, transparent 52%), var(--bg);
  color: var(--ink);
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: 13px;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
  border: 1px solid var(--line);
  background: #242e40;
  border-radius: 3px;
}
button:hover {
  background: #35425a;
  border-color: #737d8e;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.4;
  cursor: wait;
}
a {
  color: inherit;
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
.portal-bar {
  height: 76px;
  padding: 0 6%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ffffff0d;
  background: #101522a8;
}
.world-brand {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.world-brand:before {
  content: "◈";
  font-size: 31px;
  color: var(--gold);
}
.world-brand span {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--muted);
  border-left: 1px solid #4c5260;
  padding-left: 18px;
}
.header-right {
  display: flex;
  gap: 24px;
  align-items: center;
}
.development {
  color: #9daaaf;
  font-size: 11px;
}
.quiet-button {
  background: none;
  border: 0;
  font-size: 12px;
  color: #b7becb;
}
main {
  max-width: 1136px;
  margin: 0 auto;
  padding: 34px 24px 30px;
}
.game-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 27px;
}
.eyebrow {
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 2.3px;
  font-weight: 700;
  margin: 0 0 8px;
}
h1 {
  margin: 0;
  font-size: 29px;
  letter-spacing: -1px;
}
.subtitle {
  font-size: 12px;
  color: var(--muted);
  margin: 9px 0 0;
}
.connection {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 9px;
  align-items: center;
  padding-top: 17px;
}
.connection strong {
  font-size: 11px;
  font-weight: 500;
}
.connection small {
  grid-column: 2;
  color: var(--muted);
  font-size: 10px;
}
.status-dot {
  width: 6px;
  height: 6px;
  display: block;
  border-radius: 100%;
  background: #8b939e;
}
.status-dot.connected {
  background: #79ba87;
  box-shadow: 0 0 10px #79ba8733;
}
.game-shell {
  border: 1px solid #657080;
  border-radius: 4px;
  padding: 4px;
  background: linear-gradient(110deg, #3e4757, #1c2432 35%, #414a59);
  box-shadow:
    0 20px 80px #0005,
    0 0 0 4px #080c13;
}
.scene-toolbar {
  height: 38px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(#293345, #1c2536);
  padding: 0 15px;
  border: 1px solid #090e18;
  border-bottom: 0;
}
.scene-toolbar > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.compass {
  color: var(--gold);
  font-size: 19px;
}
.scene-toolbar strong {
  font-size: 11px;
  letter-spacing: 0.5px;
}
.scene-toolbar button {
  font-size: 9px;
  background: none;
  padding: 4px 8px;
  color: var(--muted);
}
#map-coordinates {
  color: #8f9aab;
  font: 10px monospace;
  margin-left: 8px;
}
.play-area {
  position: relative;
  overflow: hidden;
  border: 1px solid #090e18;
  background: #161e27;
  aspect-ratio: 4/3;
  isolation: isolate;
}
#world {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  image-rendering: pixelated;
  outline-offset: -3px;
}
.scene-tag {
  position: absolute;
  bottom: 12px;
  left: 14px;
  color: #eeead2b0;
  font-size: 9px;
  text-shadow: 0 1px 3px #000;
  background: #111824bb;
  padding: 5px 8px;
  border-radius: 2px;
  pointer-events: none;
}
#scene-message {
  position: absolute;
  top: 65px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  max-width: 85%;
  font-size: 12px;
  text-shadow: 0 2px 4px #000;
  background: #101824eb;
  border: 1px solid #c5ab7440;
  padding: 10px 18px;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 5;
}
#scene-message.show {
  opacity: 1;
}
.target-card {
  position: absolute;
  top: 17px;
  left: 50%;
  transform: translateX(-50%);
  background: #172131e8;
  padding: 8px 18px;
  min-width: 180px;
  border: 1px solid #bfa772;
  color: #e5cf99;
  font-size: 11px;
  text-align: center;
}
.target-card progress {
  width: 100%;
  display: block;
  height: 5px;
  margin-top: 7px;
  accent-color: var(--red);
}
.login-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 352px;
  max-width: 90%;
  padding: 28px 32px 24px;
  text-align: center;
  background: linear-gradient(155deg, #242e41f5, #121a28fc);
  border: 1px solid #bdad885c;
  box-shadow:
    0 0 0 5px #11172480,
    0 20px 70px #0009;
  z-index: 4;
}
.login-emblem {
  font-size: 43px;
  color: var(--gold);
  line-height: 1.1;
  margin-bottom: 14px;
}
.login-panel .eyebrow {
  font-size: 8px;
}
.login-panel h2 {
  font-size: 21px;
  margin: 10px 0 13px;
  font-weight: 600;
}
.login-panel p:not(.eyebrow) {
  color: #b1b9c6;
  font-size: 11px;
  line-height: 1.9;
  margin: 0 0 17px;
}
.login-panel label {
  display: block;
  text-align: left;
  font-size: 10px;
  color: #c3c6cc;
  margin-bottom: 6px;
}
.login-panel input {
  width: 100%;
  border: 1px solid #4e5768;
  background: #0c1422;
  color: #fff;
  padding: 11px 12px;
  border-radius: 2px;
  outline: none;
  margin-bottom: 11px;
}
.primary {
  border: 1px solid #e2c18a;
  background: linear-gradient(#d6b87c, #b89760);
  color: #211d18;
  width: 100%;
  padding: 11px 15px;
  font-weight: 700;
  text-align: left;
  display: flex;
  justify-content: space-between;
}
.primary:hover {
  background: #e2c28b;
  color: #16110b;
}
.login-panel small {
  font-size: 9px;
  color: #78869b;
  line-height: 1.8;
  display: block;
  margin-top: 13px;
}
.error-text {
  color: #eea4a4 !important;
  font-size: 11px !important;
  margin: 8px 0 0 !important;
}
.player-toolbar {
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #0d1320;
  background: linear-gradient(#273143, #1b2434);
  min-height: 99px;
}
.portrait {
  width: 50px;
  height: 59px;
  display: grid;
  place-items: center;
  font-size: 32px;
  background: radial-gradient(#56657b, #1b2331);
  border: 1px solid #7a7e85;
  box-shadow: inset 0 0 0 3px #263141;
  color: #d7d9d8;
}
.player-details {
  width: 235px;
  max-width: 34%;
}
.player-details > strong {
  font-size: 12px;
  font-weight: 700;
}
.player-details > span {
  font: 10px monospace;
  color: var(--gold);
  margin-left: 9px;
}
.stat-line {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  height: 10px;
}
.stat-line label {
  font: 8px monospace;
  color: #acb2bd;
  width: 20px;
}
progress {
  appearance: none;
  height: 7px;
  overflow: hidden;
  border: 1px solid #0e1522;
  background: #111725;
  border-radius: 0;
  accent-color: #a74e4f;
}
progress::-webkit-progress-bar {
  background: #111725;
}
progress::-webkit-progress-value {
  background: linear-gradient(#d27572, #a84547);
}
.stat-line progress {
  width: 100%;
  flex: 1;
}
.stat-line small {
  font: 8px monospace;
  color: #9ea7b7;
  width: 53px;
  text-align: right;
}
.xp progress::-webkit-progress-value {
  background: linear-gradient(#b5ad70, #8f8551);
}
.action-bar {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.action-bar button {
  position: relative;
  padding: 6px 13px;
  min-width: 58px;
  min-height: 64px;
  background: linear-gradient(#354054, #222d3f);
  box-shadow: inset 0 0 0 2px #141c2a;
  border: 1px solid #626a77;
  font-size: 9px;
}
.action-bar button:hover {
  border-color: var(--gold);
  background: #45516a;
}
.action-bar button > span {
  display: block;
}
.action-icon {
  font-size: 25px;
  line-height: 1.3;
  color: #d7d2b7;
}
.action-icon.potion {
  color: #e09080;
}
.action-bar kbd {
  position: absolute;
  top: 3px;
  left: 4px;
  font-size: 8px;
  color: #989fac;
  background: none;
  border: 0;
}
.gold {
  margin-left: auto;
  text-align: right;
  min-width: 70px;
}
.gold span {
  color: #8f9aab;
  font: 8px monospace;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 6px;
}
.gold strong {
  font:
    17px Georgia,
    serif;
  color: #ead39f;
}
.bottom-panels {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4px;
  margin-top: 4px;
}
.chat-panel,
.quest-panel {
  background: #172030;
  border: 1px solid #0a101b;
  min-width: 0;
}
.panel-heading {
  height: 33px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 13px;
  background: #222d3e;
  border-bottom: 1px solid #303c50;
}
.panel-heading h2 {
  font-size: 10px;
  margin: 0;
  font-weight: 600;
}
.panel-heading h2 span {
  font: 8px monospace;
  letter-spacing: 1px;
  color: #758399;
  margin-left: 12px;
}
.panel-heading > span {
  font-size: 9px;
  color: #8d9aaf;
}
#chat-messages {
  list-style: none;
  height: 115px;
  overflow-y: auto;
  margin: 0;
  padding: 11px 13px;
  font-size: 11px;
  line-height: 1.9;
  scrollbar-width: thin;
  scrollbar-color: #44516a #172030;
}
#chat-messages li {
  overflow-wrap: anywhere;
}
#chat-messages b {
  color: #b6c7df;
  font-weight: 500;
  margin-right: 8px;
}
#chat-messages .system {
  color: #a5a38c;
}
#chat-form {
  display: flex;
  align-items: center;
  padding: 5px 9px 5px 12px;
  border-top: 1px solid #303a4d;
  background: #111a28;
  gap: 10px;
}
#chat-form > span {
  font-size: 9px;
  color: var(--gold);
}
#chat-input {
  width: 100%;
  min-width: 0;
  background: none;
  border: 0;
  color: #e5e6e8;
  padding: 5px 0;
  outline: none;
  font-size: 10px;
}
#chat-input::placeholder {
  color: #626e83;
}
#chat-form button {
  background: #263447;
  padding: 3px 8px;
  font-size: 14px;
}
#quest-content {
  padding: 10px 14px;
  color: #aab4c4;
  font-size: 10px;
  line-height: 1.9;
}
#quest-content h3 {
  margin: 0 0 4px;
  color: #decc9e;
  font-size: 12px;
  font-weight: 500;
}
#quest-content p {
  margin: 2px 0;
}
#quest-content .quest-progress {
  color: #839990;
}
.footnote {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 9px;
  color: #758298;
  margin-top: 16px;
}
.footnote button {
  border: 0;
  background: none;
  color: #94a0b3;
  font-size: 9px;
  padding: 0;
}
kbd {
  font: 8px monospace;
  border: 1px solid #394358;
  background: #232c3e;
  border-radius: 2px;
  padding: 1px 4px;
  color: #a6adba;
}
dialog {
  padding: 28px;
  max-width: 520px;
  width: calc(100% - 32px);
  max-height: 80vh;
  background: #1e293b;
  border: 1px solid #9a8f76;
  color: #e5e4de;
  box-shadow: 0 20px 100px #000a;
  line-height: 1.9;
}
dialog::backdrop {
  background: #070d19b8;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font-size: 20px;
  color: #e4cf9f;
  margin: 0 0 20px;
}
dialog h3 {
  font-size: 12px;
  color: #d8c79f;
  margin: 17px 0 6px;
}
dialog p,
dialog li {
  font-size: 12px;
  color: #b7c0ce;
}
.dialog-close {
  position: absolute;
  right: 9px;
  top: 6px;
  border: 0;
  background: none;
  font-size: 24px;
  color: #9fabc0;
}
dialog table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11px;
}
dialog td,
dialog th {
  padding: 7px;
  text-align: left;
  border-bottom: 1px solid #364257;
}
dialog th {
  color: #a8b7cf;
}
.item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #3b4555;
  font-size: 12px;
}
.item-row button {
  font-size: 10px;
  padding: 5px 8px;
}
.mobile-controls {
  display: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
@media (min-width: 1500px) {
  main {
    padding-top: 45px;
    max-width: 1190px;
  }
  .game-heading {
    margin-bottom: 32px;
  }
}
@media (max-width: 750px) {
  .portal-bar {
    height: 58px;
    padding: 0 19px;
  }
  .world-brand {
    font-size: 15px;
    gap: 9px;
    letter-spacing: 1px;
  }
  .world-brand:before {
    font-size: 25px;
  }
  .world-brand span {
    display: none;
  }
  .header-right {
    gap: 10px;
  }
  .development {
    font-size: 8px;
  }
  .quiet-button {
    font-size: 10px;
  }
  main {
    padding: 22px 10px;
  }
  .game-heading {
    padding: 0 8px;
    margin-bottom: 20px;
  }
  h1 {
    font-size: 24px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .subtitle {
    font-size: 10px;
  }
  .connection {
    gap: 4px 6px;
    padding-top: 8px;
  }
  .connection strong {
    font-size: 10px;
  }
  .connection small {
    font-size: 8px;
  }
  .game-shell {
    padding: 2px;
  }
  .play-area {
    aspect-ratio: 1/1.08;
  }
  .scene-toolbar {
    height: 33px;
    padding: 0 9px;
  }
  .scene-toolbar strong {
    font-size: 10px;
  }
  .scene-tag {
    font-size: 7px;
    left: 7px;
    bottom: 8px;
  }
  .login-panel {
    padding: 21px 25px;
  }
  .login-panel p:not(.eyebrow) {
    font-size: 10px;
  }
  .login-panel h2 {
    font-size: 19px;
  }
  .login-emblem {
    font-size: 33px;
    margin-bottom: 10px;
  }
  .player-toolbar {
    padding: 9px 8px;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 0;
  }
  .portrait {
    width: 35px;
    height: 46px;
    font-size: 23px;
  }
  .player-details {
    max-width: none;
    width: calc(100% - 105px);
    flex: 1;
  }
  .player-details > strong {
    font-size: 11px;
  }
  .stat-line {
    margin-top: 6px;
  }
  .action-bar {
    order: 4;
    width: 100%;
    margin-top: 2px;
    gap: 6px;
  }
  .action-bar button {
    flex: 1;
    min-height: 51px;
    padding: 3px 10px;
  }
  .action-bar button > span {
    display: inline;
  }
  .action-bar button > span:nth-child(2) {
    margin-left: 5px;
  }
  .action-icon {
    font-size: 23px;
  }
  .gold {
    min-width: 47px;
  }
  .gold strong {
    font-size: 14px;
  }
  .bottom-panels {
    grid-template-columns: 1fr;
  }
  .quest-panel {
    order: -1;
  }
  #quest-content {
    font-size: 9px;
    padding: 8px 11px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
  }
  #quest-content h3 {
    font-size: 11px;
    margin: 0;
  }
  #quest-content p {
    margin: 0;
  }
  .panel-heading {
    height: 29px;
    padding: 0 10px;
  }
  #chat-messages {
    height: 100px;
    font-size: 10px;
  }
  .footnote {
    padding: 0 7px;
    align-items: flex-start;
    font-size: 8px;
  }
  .footnote > span {
    max-width: 62%;
    line-height: 1.9;
  }
  .footnote button {
    font-size: 8px;
    padding-top: 3px;
  }
  .mobile-controls {
    display: flex;
    padding: 10px 14px;
    background: #1b2536;
    border: 1px solid #0c1320;
    align-items: center;
    justify-content: space-between;
  }
  .dpad {
    display: grid;
    grid-template-columns: 34px 34px 34px;
    grid-template-rows: 30px 30px 30px;
    gap: 3px;
  }
  .dpad button {
    touch-action: none;
    background: #2c394f;
    border-color: #58657a;
    font-size: 11px;
    color: #bdc7da;
  }
  .dpad button:first-child {
    grid-column: 2;
  }
  .dpad button:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }
  .dpad > span {
    grid-column: 2;
    grid-row: 2;
    text-align: center;
    align-content: center;
    color: #798aa2;
  }
  .dpad button:nth-child(4) {
    grid-column: 3;
    grid-row: 2;
  }
  .dpad button:last-child {
    grid-column: 2;
    grid-row: 3;
  }
  .mobile-controls p {
    font-size: 9px;
    color: #8d9cb4;
    text-align: right;
    line-height: 1.9;
  }
  .target-card {
    font-size: 9px;
    top: 11px;
    padding: 6px 10px;
    min-width: 135px;
  }
  #scene-message {
    font-size: 10px;
    top: 53px;
    padding: 7px 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

#appearance-select {
  display: flex;
  gap: 4px;
  margin: 14px 0 17px;
  justify-content: center;
}
#appearance-select button {
  width: 43px;
  height: 67px;
  padding: 3px;
  background: #151d2b;
  border: 1px solid #4b5363;
}
#appearance-select button[aria-pressed="true"] {
  border-color: #dcc18c;
  background: #594b333d;
}
#appearance-select img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.login-panel {
  padding-top: 24px;
  background-image:
    linear-gradient(#131926d9, #111824f0),
    url("./assets/original/ui/woodtile.png?v=reconstruction-v62-a04c1bdf5ecf");
}
.login-panel .login-emblem {
  font-size: 30px;
  margin-bottom: 9px;
}
.login-panel > p:not(.eyebrow) {
  margin-bottom: 10px;
}
.game-shell {
  background-image:
    linear-gradient(110deg, #221c1880, #15141580),
    url("./assets/original/ui/woodtile.png?v=reconstruction-v62-a04c1bdf5ecf");
}
@media (max-width: 750px) {
  .login-panel {
    padding: 17px 23px;
  }
  .login-emblem {
    display: none;
  }
  #appearance-select {
    margin: 9px 0 12px;
  }
  #appearance-select button {
    height: 52px;
    width: 38px;
  }
  .login-panel h2 {
    margin: 6px 0 8px;
  }
  .login-panel input {
    padding: 9px 11px;
  }
  .login-panel small {
    font-size: 8px;
    margin-top: 9px;
  }
  .login-panel p:not(.eyebrow) {
    font-size: 9px;
    line-height: 1.7;
  }
}

#nearby-players {
  font-size: 9px;
  line-height: 1.8;
  color: #8a9aac;
  padding: 0 14px 10px;
  overflow-wrap: anywhere;
}
#map-button {
  font-size: 8px;
  padding: 3px 7px;
  background: #1a2638;
  border: 1px solid #49566b;
}
.action-icon.fire {
  color: #dc9c6a;
}
.action-icon.heal {
  color: #a6c09c;
}
.action-bar {
  gap: 6px;
}
.action-bar button {
  min-width: 48px;
  padding: 5px 9px;
}
@media (max-width: 750px) {
  .action-bar {
    flex-wrap: wrap;
  }
  .action-bar button {
    flex: 1;
    min-width: calc(33% - 6px);
    min-height: 43px;
  }
  .action-bar button .action-icon {
    font-size: 20px;
  }
  #nearby-players {
    font-size: 8px;
    padding: 0 10px 7px;
  }
}

@media (max-width: 750px) {
  .play-area {
    aspect-ratio: 4/3;
  }
  .play-area:has(.login-panel:not([hidden])) {
    aspect-ratio: auto;
    height: 480px;
  }
  .play-area:has(.login-panel:not([hidden])) canvas {
    object-fit: cover;
  }
}

.embedded .portal-bar {
  display: none;
}
.embedded main {
  padding-top: 15px;
}
.embedded .game-heading {
  margin-bottom: 15px;
}

/* Original wood texture frames the HTML controls; labels stay crisp at any DPI. */
select,
textarea {
  font: inherit;
  color: var(--ink);
}
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.view-controls {
  gap: 5px !important;
}
.view-controls select {
  background: #171b23;
  border: 1px solid #675d4b;
  padding: 4px 6px;
  border-radius: 2px;
  font-size: 10px;
}
.view-controls button {
  white-space: nowrap;
}
.game-dock {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 7px;
  background:
    linear-gradient(#201d19e8, #151718ed),
    url("./assets/improved/ui/woodtile.png?v=reconstruction-v62-a04c1bdf5ecf");
  border: 1px solid #6c6250;
  border-top: 0;
}
.game-dock button {
  flex: 1;
  padding: 8px 7px;
  font-size: 11px;
  white-space: nowrap;
  color: #e7d4ac;
  background: linear-gradient(#38352b, #25231e);
  border-color: #62594a;
}
.game-dock kbd {
  color: #b2a88f;
  font-size: 8px;
  background: #181914;
  border-color: #4b483a;
  margin-left: 4px;
}
.quick-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: #151b21;
  border: 1px solid #3f433f;
  border-top: 0;
}
.quick-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.quick-group > span {
  font-size: 9px;
  color: #b5aa91;
  white-space: nowrap;
}
.hotkeys {
  display: flex;
  gap: 3px;
  min-width: 0;
}
.hotkeys button {
  position: relative;
  width: 46px;
  min-width: 28px;
  height: 38px;
  padding: 11px 3px 2px;
  background: linear-gradient(#252b2c, #14191a);
  border-color: #474a40;
  color: #788271;
}
.hotkeys button.assigned {
  color: #e4d4a1;
  border-color: #8f7951;
}
.hotkeys kbd {
  position: absolute;
  top: 1px;
  left: 3px;
  font-size: 8px;
  background: none;
  border: 0;
  padding: 0;
  color: #a49c88;
}
.hotkeys button > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
}
.hotkeys button:has(.quickslot-count) {
  height: 48px;
  padding-bottom: 12px;
}
.hotkeys .quickslot-count {
  position: absolute;
  right: 3px;
  bottom: 1px;
  font-size: 8px;
  color: #e6d7a7;
}
.hotkeys button.empty-reservation {
  opacity: 0.65;
}
.quickslot-manager {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0 18px;
}
.quickslot-manager .game-card {
  padding: 10px;
  min-width: 0;
}
.quickslot-manager .game-card h3 {
  font-size: 11px;
  margin-top: 0;
}
.quickslot-manager .card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.quickslot-manager .card-actions button {
  font-size: 10px;
  padding: 5px;
  min-height: 30px;
}
.quickslot-transfer-controls {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(90px, 1fr);
  gap: 10px;
}
.drag-over {
  outline: 2px solid #e7cb79 !important;
  background: #4f4930 !important;
}
.inventory-transfer {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  border-top: 1px solid #4c4c3e;
  margin-top: 10px;
  padding-top: 8px;
}
.inventory-transfer .field-label {
  width: 100px;
}
.inventory-transfer input {
  max-width: 100%;
}
@media (max-width: 750px) {
  .quickslot-manager {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quickslot-manager .game-card {
    padding: 8px;
  }
  .quickslot-transfer-controls {
    grid-template-columns: minmax(0, 1fr);
  }
  .hotkeys button:has(.quickslot-count) {
    height: 42px !important;
  }
}
#hotkey-settings {
  font-size: 9px;
  padding: 6px;
  margin-left: auto;
  white-space: nowrap;
}
.selected-spell-label {
  font-size: 9px;
  color: #b6b59b;
  white-space: nowrap;
  flex-basis: 100%;
  text-align: right;
}
.quick-bar {
  flex-wrap: wrap;
}
.visit-shop {
  padding: 12px;
  margin-top: 14px;
  border: 1px solid #5d644f;
  background: #202923;
}
.visit-shop > summary {
  color: #d7c49a;
  cursor: pointer;
  font-size: 12px;
}
#nearby-players {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
#nearby-players button {
  font-size: 10px;
  padding: 4px 6px;
  color: #c5d0d7;
  background: #232e36;
  border-color: #45515c;
}
.game-panel {
  padding: 0;
  width: min(820px, calc(100vw - 32px));
  max-width: 820px;
  max-height: min(86dvh, 920px);
  overflow: hidden;
  color: #e9dfc9;
  border: 2px solid #9b8865;
  background:
    linear-gradient(#181c1cf5, #111719fa),
    url("./assets/improved/ui/woodtile.png?v=reconstruction-v62-a04c1bdf5ecf");
  box-shadow:
    0 0 0 4px #25251fee,
    0 22px 100px #000c;
  line-height: 1.65;
}
.game-panel[open] {
  display: flex;
  flex-direction: column;
}
.game-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 21px 13px;
  background:
    linear-gradient(#544935dd, #302d22ee),
    url("./assets/improved/ui/woodtile.png?v=reconstruction-v62-a04c1bdf5ecf");
  border-bottom: 1px solid #85714f;
  flex-shrink: 0;
}
.game-panel-heading small {
  font: 8px/1.5 monospace;
  color: #b7a782;
  letter-spacing: 2px;
}
.game-panel-heading h2 {
  margin: 4px 0 0;
  font-size: 21px;
  color: #f2dfaf;
}
.game-panel-heading button {
  width: 35px;
  height: 35px;
  font-size: 25px;
  line-height: 1;
  background: #282821;
  border-color: #91825f;
  color: #e8d6aa;
}
.game-panel-tabs {
  display: flex;
  gap: 1px;
  padding: 5px 7px 0;
  background: #22251f;
  border-bottom: 1px solid #645c46;
  flex-shrink: 0;
  overflow-x: auto;
}
.game-panel-tabs button {
  flex: 1;
  padding: 8px 10px;
  min-width: max-content;
  background: #272b26;
  border-color: #464b3e;
  border-radius: 3px 3px 0 0;
  font-size: 11px;
  color: #bdb8a6;
}
.game-panel-tabs button[aria-current="page"] {
  background: #4d4732;
  border-color: #a18b5d;
  border-bottom-color: #4d4732;
  color: #ffe6ad;
}
.game-panel-content {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 21px 24px;
  min-height: 190px;
  scrollbar-width: thin;
  scrollbar-color: #79745c #182021;
}
.game-panel-content h3 {
  margin: 18px 0 10px;
  font-size: 13px;
  color: #e4cb93;
}
.game-panel-content h3:first-child {
  margin-top: 0;
}
.game-panel p {
  font-size: 12px;
  color: #cbc5b3;
}
.game-panel .panel-note {
  color: #a9b2a6;
  font-size: 11px;
  margin: 5px 0 12px;
  line-height: 1.8;
}
.game-panel-content button {
  padding: 6px 10px;
  font-size: 11px;
  background: #384039;
  border-color: #666f59;
  color: #e5d7b5;
}
.game-panel-content button:hover {
  background: #555c45;
  border-color: #bcad81;
}
.game-panel-content button:disabled {
  cursor: default;
}
.game-panel-footer {
  padding: 8px 16px;
  border-top: 1px solid #58553f;
  background: #23261f;
  color: #a6a28e;
  font-size: 9px;
  flex-shrink: 0;
}
.game-panel-footer span {
  float: right;
  color: #c5b58d;
}
.character-overview {
  display: flex;
  gap: 22px;
  align-items: center;
  background: linear-gradient(100deg, #46432a88, #24303044);
  border: 1px solid #646247;
  padding: 16px;
}
.character-overview img {
  width: 72px;
  height: 104px;
  object-fit: contain;
}
.character-overview h3 {
  font-size: 16px;
  margin-bottom: 8px;
}
.character-overview p {
  margin: 4px 0;
}
.attribute-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.attribute-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  padding: 9px;
  background: #262d28;
  border: 1px solid #555b48;
}
.attribute-row span {
  font-size: 11px;
  color: #bcb79e;
}
.attribute-row strong {
  font-size: 16px;
  color: #eddbad;
}
.attribute-row button {
  width: 100%;
  padding: 3px 8px;
}
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.item-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 10px 0;
}
.game-card {
  background: linear-gradient(#2b322bd4, #202826ed);
  border: 1px solid #535b49;
  padding: 13px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.game-card h3 {
  margin: 0 0 7px;
  font-size: 13px;
  line-height: 1.5;
}
.game-card p {
  margin: 5px 0 10px;
  font-size: 11px;
  white-space: pre-wrap;
}
.game-card .panel-note {
  font-size: 10px;
  color: #b5b89f;
  margin-bottom: 8px;
}
.game-card.selected {
  border-color: #dbc18a;
}
.game-card.has-item-icon {
  position: relative;
}
.game-card.has-item-icon > h3 {
  padding-left: 44px;
  min-height: 35px;
  display: flex;
  align-items: center;
}
.item-art {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}
.equipment-grid .game-card {
  padding: 10px;
}
.equipment-grid .game-card h3 {
  font-size: 10px;
  color: #abb19c;
}
.equipment-grid .game-card p {
  color: #dfcea4;
  min-height: 32px;
  margin-bottom: 6px;
}
.card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin: 7px 0 1px;
}
.field-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 10px;
  color: #bdbba7;
  margin: 8px 0;
  min-width: 0;
}
.field-label input,
.field-label select,
.field-label textarea {
  padding: 8px 9px;
  border: 1px solid #626a55;
  color: #e9e0c8;
  background: #121c1c;
  border-radius: 2px;
  width: 100%;
  min-width: 0;
}
.field-label textarea {
  resize: vertical;
  min-height: 110px;
}
.card-actions .field-label {
  margin: 0;
}
.card-actions .field-label > span {
  display: none;
}
.card-actions .field-label select {
  padding: 5px 8px;
  font-size: 10px;
  max-width: 130px;
}
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}
.filter-bar .field-label:first-child {
  flex: 1;
}
.filter-bar .field-label:last-child {
  min-width: 130px;
}
.roster-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.roster-list .card-actions button {
  padding: 5px 7px;
  font-size: 10px;
}
.trade-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 8px;
}
.trade-form .card-actions {
  grid-column: 1/-1;
}
.panel-form {
  margin: 12px 0 18px;
}
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.menu-grid button {
  min-height: 52px;
  background: #333d31;
  border-color: #77765a;
}
.original-help details {
  border: 1px solid #545c48;
  margin-top: 8px;
  padding: 0 12px 10px;
  background: #242e27;
}
.original-help summary {
  cursor: pointer;
  padding: 11px 0 0;
  font-size: 12px;
  color: #e1cca1;
}
.original-help details p {
  white-space: pre-wrap;
  line-height: 1.95;
  font-size: 12px;
  padding-top: 5px;
}
.original-help small {
  font: 9px monospace;
  color: #8d9d86;
}
.board-posts {
  margin-top: 12px;
}
.board-posts .game-card {
  margin-bottom: 9px;
}
.board-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.appearance-colors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.appearance-colors details {
  border: 1px solid #626349;
  padding: 9px;
  background: #202922;
}
.appearance-colors summary {
  color: #d7c69d;
  font-size: 11px;
  cursor: pointer;
}
.color-swatches {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 3px;
  margin-top: 10px;
}
.color-swatches button {
  padding: 0;
  width: 100%;
  aspect-ratio: 1;
  min-height: 0;
  border: 1px solid #c3bea955;
  border-radius: 0;
}
.color-swatches button[aria-pressed="true"] {
  outline: 2px solid #fff;
  outline-offset: 1px;
}
.spell-targeting {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 9px;
}
.trade-selection {
  grid-column: 1/-1;
  padding: 8px;
  border: 1px solid #5b634d;
}
.trade-selection summary {
  cursor: pointer;
  color: #cfbf99;
  font-size: 11px;
}
.trade-selection .field-label {
  display: inline-flex;
  width: calc(50% - 5px);
  padding-right: 8px;
}
@media (max-width: 1050px) {
  .quick-bar {
    flex-wrap: wrap;
    gap: 7px;
  }
  .quick-group:last-of-type {
    flex: 1;
  }
  #item-hotkeys {
    width: 100%;
  }
  #item-hotkeys button {
    flex: 1;
    width: 38px;
  }
}
@media (max-width: 750px) {
  .scene-toolbar {
    min-height: 37px;
    height: auto;
    padding: 5px 7px;
    gap: 6px;
  }
  .scene-toolbar > div {
    gap: 4px;
  }
  .scene-toolbar .compass {
    display: none;
  }
  #map-name {
    max-width: 105px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #map-coordinates {
    margin-left: 2px;
    font-size: 8px;
  }
  .view-controls select {
    font-size: 9px;
    padding: 3px;
  }
  .view-controls #sound-button {
    display: none;
  }
  #fullscreen-button {
    padding: 2px 6px;
    font-size: 15px;
  }
  #fullscreen-button span {
    display: none;
  }
  .game-dock {
    padding: 5px;
    gap: 3px;
  }
  .game-dock button {
    padding: 8px 6px;
    font-size: 10px;
    flex: 1 1 20%;
  }
  .game-dock kbd {
    display: none;
  }
  .quick-bar {
    padding: 6px;
  }
  .quick-group {
    gap: 4px;
  }
  .quick-group:first-child {
    flex: 1;
  }
  .quick-group:last-of-type {
    order: 3;
    flex-basis: 100%;
  }
  .selected-spell-label {
    order: 4;
    flex-basis: 100%;
    text-align: right;
    font-size: 8px;
  }
  .quick-group > span {
    width: 28px;
    font-size: 8px;
  }
  #spell-hotkeys button {
    width: 51px;
    height: 35px;
  }
  #item-hotkeys button {
    min-width: 0;
    height: 33px;
    padding-left: 1px;
    padding-right: 1px;
  }
  .hotkeys button > span {
    font-size: 8px;
  }
  .game-panel {
    width: calc(100vw - 18px);
    max-height: 92dvh;
  }
  .game-panel-heading {
    padding: 12px 14px;
  }
  .game-panel-heading h2 {
    font-size: 18px;
  }
  .game-panel-heading small {
    font-size: 7px;
  }
  .game-panel-heading button {
    width: 31px;
    height: 31px;
  }
  .game-panel-tabs {
    gap: 2px;
    padding: 4px 4px 0;
  }
  .game-panel-tabs button {
    font-size: 10px;
    padding: 8px 7px;
  }
  .game-panel-content {
    padding: 13px 12px 18px;
  }
  .game-panel-footer {
    font-size: 8px;
    padding: 7px 10px;
  }
  .game-panel-footer span {
    display: none;
  }
  .character-overview {
    padding: 10px;
    gap: 12px;
  }
  .character-overview img {
    width: 55px;
    height: 86px;
  }
  .character-overview p {
    font-size: 10px;
  }
  .attribute-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }
  .attribute-row {
    padding: 6px;
    gap: 3px;
  }
  .attribute-row span {
    font-size: 10px;
  }
  .attribute-row strong {
    font-size: 14px;
  }
  .equipment-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .item-grid,
  .roster-list {
    grid-template-columns: 1fr;
  }
  .game-card {
    padding: 11px;
  }
  .game-panel-content button {
    min-height: 34px;
  }
  .filter-bar {
    gap: 8px;
  }
  .filter-bar .field-label:last-child {
    min-width: 94px;
  }
  .trade-form {
    grid-template-columns: 2fr 1fr;
  }
  .trade-form .field-label:last-of-type {
    grid-column: 1/-1;
  }
  .appearance-colors {
    grid-template-columns: 1fr;
  }
  .spell-targeting {
    grid-template-columns: 1fr 1fr;
  }
  .spell-targeting .field-label:first-child {
    grid-column: 1/-1;
  }
  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
