#pixel-world {
  position: relative;
  height: 640px;
  min-height: 480px;
  background: #000;
  color: #f4f5f7;
  overflow: hidden;
  font:
    14px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  border-radius: 12px;
  isolation: isolate;
}
#pixel-world * {
  box-sizing: border-box;
}
#pixel-world canvas.field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  touch-action: none;
}
#pixel-world button {
  font: inherit;
  color: inherit;
  border: 0;
  cursor: inherit;
}
#pixel-world .mast {
  position: absolute;
  top: 26px;
  left: 28px;
  pointer-events: none;
  text-shadow: 0 1px 9px #000;
}
#pixel-world .mast strong {
  font-weight: 500;
  letter-spacing: -0.4px;
  font-size: 19px;
}
#pixel-world .muted {
  color: #aaaeb8;
  font-size: 12px;
}
#pixel-world .intro {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, 18px);
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
  color: #bfc2ca;
  font-size: 12px;
}
#pixel-world .intro strong {
  display: block;
  color: #fff;
  font-size: 15px;
  font-weight: 400;
  margin-bottom: 5px;
}
#pixel-world .glass {
  background: linear-gradient(140deg, #ffffff1b, #ffffff08), #17191ce8;
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid #ffffff30;
  box-shadow:
    inset 0 1px 0 #ffffff17,
    0 12px 45px #0006;
}
#pixel-world .dock {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  align-items: center;
  border-radius: 40px;
  padding: 7px;
}
#pixel-world .pill {
  border-radius: 25px;
  background: transparent;
  padding: 9px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
#pixel-world .home {
  border-left: 1px solid #ffffff20;
  background: transparent;
  padding: 8px 14px;
  color: #c9ccd3;
  font-size: 12px;
}
#pixel-world .panel {
  position: absolute;
  bottom: 104px;
  left: 50%;
  transform: translateX(-50%);
  width: min(340px, calc(100% - 40px));
  border-radius: 25px;
  padding: 20px;
}
#pixel-world [hidden] {
  display: none !important;
}
#pixel-world .panelhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
#pixel-world .panelhead span {
  font-size: 12px;
  color: #bfc2ca;
}
#pixel-world .close {
  background: transparent;
  padding: 4px 10px;
  border-radius: 20px;
}
#pixel-world .modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
#pixel-world .mode {
  text-align: left;
  border-radius: 13px;
  padding: 12px;
  background: #ffffff08;
}
#pixel-world .mode[aria-pressed="true"] {
  background: #ffffff22;
  box-shadow: inset 0 0 0 1px #ffffff35;
}
#pixel-world .mode small {
  display: block;
  font-size: 11px;
  color: #c0c3cb;
  margin-top: 3px;
}
#pixel-world .legend {
  margin-top: 16px;
  color: #bfc2ca;
  font-size: 12px;
  min-height: 38px;
}
#pixel-world .bottom {
  position: absolute;
  bottom: 8px;
  width: 100%;
  text-align: center;
  font-size: 11px;
  color: #9398a3;
  pointer-events: none;
}
#pixel-world .rail {
  position: absolute;
  right: 10px;
  top: 90px;
  bottom: 95px;
  width: 18px;
  touch-action: none;
}
#pixel-world .rail:before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ffffff19;
}
#pixel-world .thumb {
  position: absolute;
  left: 6px;
  width: 6px;
  height: 28px;
  border-radius: 8px;
  background: #ffffff80;
  pointer-events: none;
}
#pixel-world .tooltip {
  position: absolute;
  pointer-events: none;
  padding: 12px 14px;
  border-radius: 16px;
  width: 215px;
  font-size: 12px;
  z-index: 5;
}
#pixel-world .tooltip b {
  font-weight: 500;
  color: #fff;
}
#pixel-world .tooltip canvas {
  display: block;
  width: 65px;
  height: 65px;
  image-rendering: pixelated;
  float: left;
  margin: 2px 12px 6px 0;
  border: 1px solid #ffffff35;
}
#pixel-world .tooltip .detail {
  clear: both;
  color: #bfc2ca;
  padding-top: 5px;
}
#pixel-world .status {
  position: absolute;
  left: 28px;
  top: 82px;
  color: #bbb;
  font-size: 12px;
}
#pixel-world .panel button:focus-visible,
#pixel-world .dock button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
#pixel-world .arrangement {
  margin-top: 17px;
}
#pixel-world .arrangement label {
  display: block;
  font-size: 11px;
  color: #bfc2ca;
  margin-bottom: 7px;
}
#pixel-world .arrangement select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ffffff25;
  border-radius: 12px;
  color: #fff;
  background: #282b30;
  font: inherit;
  color-scheme: dark;
}
#pixel-world .arrangement select:disabled {
  opacity: 0.45;
}
#pixel-world .positioninfo {
  position: absolute;
  top: 85px;
  left: 28px;
  right: 40px;
  pointer-events: none;
  font-size: 12px;
  color: #ddd;
  text-shadow: 0 1px 5px #000;
}
#pixel-world .panel {
  z-index: 3;
}
#pixel-world .dock {
  z-index: 4;
}
#pixel-world .person-number {
  font-size: 12px;
  color: #c4c8d1;
  margin: -8px 0 15px;
  font-variant-numeric: tabular-nums;
}
#pixel-world .personal-value {
  font-size: 12px;
  background: #ffffff0b;
  border-radius: 24px;
  padding: 10px 12px;
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#pixel-world .dock {
  gap: 3px;
  max-width: calc(100% - 24px);
}
#pixel-world .pill {
  padding: 9px 12px;
  gap: 8px;
}
#pixel-world .home {
  padding: 8px 10px;
  white-space: nowrap;
}
#pixel-world .you-form {
  margin-top: 14px;
}
#pixel-world .entry-label {
  display: block;
  color: #c4c8d1;
  font-size: 12px;
  margin-bottom: 6px;
}
#pixel-world .entry-row {
  display: flex;
  gap: 7px;
}
#pixel-world .entry-row input,
#pixel-world .entry-row select {
  font: inherit;
  font-size: 16px;
  color: #fff;
  background: #282b30;
  border: 1px solid #ffffff30;
  border-radius: 11px;
  padding: 8px 10px;
  min-width: 0;
  flex: 1;
  width: 100%;
  color-scheme: dark;
}
#pixel-world .apply-value {
  background: #eff0f3;
  color: #161719;
  border-radius: 11px;
  padding: 8px 13px;
}
#pixel-world .clear-value {
  background: transparent;
  color: #bfc2ca;
  font-size: 12px;
  padding: 7px 0 0;
}
#pixel-world .clear-value:disabled {
  opacity: 0.4;
}
#pixel-world .legend {
  min-height: 0;
  margin-top: 12px;
}
#pixel-world .panel {
  bottom: 99px;
  padding: 17px 20px;
}
#pixel-world .arrangement {
  margin-top: 12px;
}
#pixel-world .mode {
  padding: 9px 12px;
}
#pixel-world .storage-note {
  margin-top: 5px;
}
#pixel-world .intro {
  font-variant-numeric: tabular-nums;
}
#pixel-world .intro-number {
  color: #c4c8d1;
}
#pixel-world .mode small {
  font-size: 11px;
}
@media (max-width: 400px) {
  #pixel-world .mast {
    left: 20px;
  }
  #pixel-world .mast strong {
    font-size: 17px;
  }
  #pixel-world .dock {
    font-size: 13px;
  }
  #pixel-world .personal-value {
    max-width: 94px;
  }
  #pixel-world .panel {
    width: calc(100% - 24px);
  }
}
#pixel-world .modes {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
#pixel-world .mode {
  text-align: center;
  padding: 10px 3px;
  font-size: 13px;
}
#pixel-world .mode small {
  display: none;
}
#pixel-world .panelhead {
  margin-bottom: 8px;
}
#pixel-world .person-number {
  margin: 0 0 12px;
}
#pixel-world .mode small {
  display: none;
}
#pixel-world .home[hidden],
#pixel-world .personal-value[hidden] {
  display: none;
}

/* Standalone export: occupy the viewport rather than the chat preview. */
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: #000;
}
body {
  overflow: hidden;
}
#pixel-world {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  border-radius: 0;
}
#pixel-world .cursor-interaction {
  cursor: pointer;
}
#pixel-world .panel {
  max-height: calc(100vh - 120px);
  max-height: calc(100dvh - 120px);
  overflow-y: auto;
}
#pixel-world button:focus-visible,
#pixel-world select:focus-visible,
#pixel-world input:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* The view button's icon: a 3×3 block of pixels with "you" lit in the middle.
   Hovering or opening the panel lights up the rest of the crowd. */
#pixel-world .pixel-icon {
  width: 11px;
  height: 11px;
  flex: none;
}
#pixel-world .pixel-icon rect {
  fill: #ffffff38;
  transition: fill 0.25s ease;
}
#pixel-world .pixel-icon .lit {
  fill: #fff;
}
#pixel-world .pill:hover .pixel-icon rect,
#pixel-world .pill[aria-expanded="true"] .pixel-icon rect {
  fill: #ffffffb0;
}
#pixel-world .pill:hover .pixel-icon .lit,
#pixel-world .pill[aria-expanded="true"] .pixel-icon .lit {
  fill: #fff;
}
#pixel-world .sources {
  margin-top: 4px;
  font-size: 11px;
}
#pixel-world .sources a {
  color: inherit;
}
#pixel-world .key {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 8px;
  font-size: 11px;
  color: #c0c3cb;
}
#pixel-world .key:empty {
  display: none;
}
#pixel-world .key i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
}
