/* Shared visual language based on the game's extracted frame and typeface. */
@font-face { font-family: DigimonOriginal; src: url('assets/ui/original-font.ttf?v=3'); }
:root { --panel: rgba(45,56,64,.96); --text: #fff; --muted: #c5cbd1; --accent: #e5dd80; --error: #ff9b9b; }
body { font-family: DigimonOriginal, monospace; }
.panel, .appearance-window, .atlas-window {
  background: rgba(45,56,64,.96); color: #fff; border: 8px solid transparent;
  border-image: url('assets/ui/original-border.png') 4 fill / 8px stretch;
  border-radius: 0; box-shadow: none; image-rendering: pixelated;
}
#login { background: #101820; }
#login h1 { font-size: 18px; color: #fff; }
input, button, select { font: inherit; border-radius: 0; }
input, select { background: #1c252a; color: #fff; border: 1px solid #aeb9b9; }
button, button.alt {
  background: transparent; color: #fff; border: 1px solid #aab2ad;
  font-weight: normal; cursor: pointer;
}
button:hover:not(:disabled), button:focus-visible, button.alt:hover:not(:disabled) {
  background: rgba(160,160,0,.25); outline: 1px solid #d0c858; outline-offset: 0;
}
button:disabled { opacity: .45; cursor: default; }
#socialBtn, #hub .tabs button.on { background: rgba(160,160,0,.3); color: #fff; }
#chatLog .sys { font-style: normal; }
#partyHud .bar { border-radius: 0; }
.appearance, .atlas { background: #0009; }
.appearance header, .atlas header { padding: 12px 14px; border-bottom: 1px solid #9ba6a4; }
.appearance header small, .atlas header small, .appearance legend, .atlas h3 { color: #e5dd80; letter-spacing: 0; font-weight: normal; }
.appearance h2, .atlas h2 { font-size: 18px; font-weight: normal; }
.appearance header p, .atlas header p, .atlas-help { color: #c5cbd1; }
.appearance .appearance-close, .atlas .atlas-close { background: transparent; color: #fff; border: 1px solid #aab2ad; font-size: 16px; }
.appearance-body { gap: 12px; padding: 14px; }
.appearance-preview { border: 1px solid #aab2ad; border-radius: 0; }
.appearance .appearance-swatch { border-radius: 0; border-color: #c5cbd1; }
.appearance .appearance-swatch[aria-pressed="true"] { outline: 2px solid #e5dd80; }
.atlas-legend { color: #e5dd80; }
.atlas-scroll { background: #1e292b; }
.atlas-graph line { stroke: #c5cbd1; }
.atlas-node { background: #34413e; border: 1px solid #aab2ad; color: #fff; }
.atlas-node small { color: #d2d9d1; }
.atlas-node.current { background: #525037; border-color: #e5dd80; }
.atlas-node.selected { outline: 2px solid #e5dd80; }
.atlas aside { border-color: #9ba6a4; }
.atlas-position { color: #e5dd80; }
.market-form { display:flex; flex-wrap:wrap; gap:4px; align-items:center; }
.market-form select { max-width:100%; flex:1 1 150px; }
.market-form input { width:90px; min-width:0; }
/* The same focus indicator is visible for keyboard and controller navigation. */
:is(#loginForm, .appearance, .atlas, #hub, #ctxMenu, #inspect, #trade, #prompts, .rz, [data-menu-focus]) :is(button, select, input, textarea, a):focus-visible,
.using-pad :is(#loginForm, .appearance, .atlas, #hub, #ctxMenu, #inspect, #trade, #prompts, .rz, [data-menu-focus]) :is(button, select, input, textarea, a):focus {
  outline: 2px solid #ffdc72 !important;
  outline-offset: 2px;
}
.pad-popup {
  position: fixed;
  z-index: 100;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(540px, calc(100vw - 28px));
  max-height: 88vh;
  overflow: auto;
  box-sizing: border-box;
  padding: 12px;
  background: #2d3840;
  border: 8px solid transparent;
  border-image: url(assets/ui/original-border.png) 4 fill / 8px stretch;
  color: white;
  font: 14px DigimonOriginal, monospace;
}
.pad-popup h2 { margin: 0 0 10px; font: inherit; }
.pad-popup button, .pad-popup input {
  color: inherit;
  border: 1px solid #aab2ad;
  background: #202b32;
  padding: 6px;
  font: inherit;
}
.pad-popup input { width: 100%; box-sizing: border-box; margin: 10px 0; }
.pad-popup > button { margin: 3px; }
.pad-choices, .pad-keyboard { display: grid; gap: 5px; margin: 8px 0; }
.pad-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pad-keyboard { grid-template-columns: repeat(10, minmax(0, 1fr)); }
