@font-face {
  font-family: Minecraft;
  src: url("assets/minecraft.ttf");
}
* {
  box-sizing: border-box;
}
:root {
  color-scheme: dark;
  --bg: #20221f;
  --panel: #292b27;
  --raised: #343730;
  --line: #41443b;
  --text: #edefe9;
  --muted: #b1b5a6;
  --accent: #bddc8a;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px "Segoe UI",
    sans-serif;
  overflow: hidden;
}
button,
input,
select {
  font: inherit;
}
button {
  color: inherit;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 36px;
  padding: 7px 12px;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    opacity 150ms ease;
}
button:active {
  opacity: 0.75;
}
button:disabled {
  opacity: 0.42;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
.stage:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
button.primary {
  background: var(--accent);
  color: #202819;
  border-color: var(--accent);
  font-weight: 600;
}
button.danger {
  color: #ffb7a9;
}
input,
select {
  background: #20221f;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 40px;
  padding: 9px 11px;
  min-width: 0;
  width: 100%;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2 {
  font-size: 19px;
  font-weight: 600;
}
h3 {
  font-size: 14px;
  font-weight: 600;
}
.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  height: 36px;
  width: 36px;
  image-rendering: pixelated;
}
.brand h1 {
  font-family: Minecraft, "Segoe UI", sans-serif;
  font-size: 20px;
  font-weight: 400;
}
.brand span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.offline {
  color: var(--muted);
  font-size: 12px;
  margin-right: 10px;
}
.offline:before,
.creative-dot {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 7px;
}
.workspace {
  display: grid;
  grid-template-columns: 272px minmax(260px, 1fr) 306px;
  gap: 12px;
  padding: 12px;
  height: calc(100dvh - 76px);
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.panel-title > span {
  color: var(--muted);
  font-size: 12px;
}
.search {
  position: relative;
}
.search > span {
  position: absolute;
  top: 6px;
  left: 11px;
  font-size: 23px;
  color: var(--muted);
}
.search input {
  padding-left: 35px;
}
.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 12px 0 16px;
}
.categories button {
  font-size: 12px;
  min-height: 30px;
  padding: 5px 8px;
  background: none;
  border-color: transparent;
}
.categories button[aria-pressed="true"] {
  background: #45483e;
  color: #fff;
}
.items-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  overflow-y: auto;
  align-content: start;
  padding: 2px 4px 12px 2px;
  flex: 1;
}
.item-preview {
  height: 86px;
  padding: 8px 3px 6px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  background: #30332c;
  border: 1px solid #41443a;
  touch-action: none;
  position: relative;
}
.item-preview[aria-pressed="true"] {
  border-color: var(--accent);
  background: #424c35;
}
.item-preview img {
  height: 35px;
  width: 35px;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}
.item-preview span {
  font-size: 11px;
  line-height: 14px;
  width: 100%;
  text-align: center;
  overflow: hidden;
  max-height: 28px;
}
.inventory-footer {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: #1c1f1a;
  background-image:
    linear-gradient(#ffffff04 1px, transparent 1px),
    linear-gradient(90deg, #ffffff04 1px, transparent 1px);
  background-size: 40px 40px;
  min-width: 0;
  touch-action: none;
}
.stage-toolbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  z-index: 3;
  background: #1c1f1a;
  border-bottom: 1px solid #ffffff09;
  font-size: 13px;
}
.stage-toolbar > span > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.stage-toolbar button {
  font-size: 12px;
  background: transparent;
  min-height: 30px;
  padding: 5px 9px;
}
#world {
  position: absolute;
  inset: 64px 0 50px;
}
.empty-world {
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 90%;
  pointer-events: none;
}
.empty-world h2 {
  font-family: Minecraft, sans-serif;
  font-weight: 400;
  font-size: 25px;
  margin: 24px 0 12px;
}
.empty-world p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.empty-world button {
  margin-top: 22px;
  pointer-events: auto;
  background: transparent;
}
.pixel-cube {
  position: relative;
  width: 40px;
  height: 40px;
  margin: auto;
  transform: rotate(-12deg);
  background: #829360;
  box-shadow:
    inset -12px -10px #586843,
    inset 0 7px #c0d399;
}
.pixel-cube i {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #a6b77d;
}
.pixel-cube i:nth-child(1) {
  left: 8px;
  top: 15px;
}
.pixel-cube i:nth-child(2) {
  left: 22px;
  top: 8px;
}
.pixel-cube i:nth-child(3) {
  left: 13px;
  top: 31px;
  background: #596b43;
}
.stage-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 15px;
  font-size: 11px;
  color: var(--muted);
  pointer-events: none;
  background: #1c1f1a;
}
.stage-hint span:last-child {
  white-space: nowrap;
}
.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.crafting-grid {
  display: grid;
  grid-template-columns: repeat(3, 64px);
  gap: 6px;
  justify-content: center;
  margin: 18px 0 10px;
}
.crafting-cell {
  width: 64px;
  height: 64px;
  background: #1e211b;
  border-color: #494d40;
  position: relative;
  padding: 8px;
  touch-action: none;
}
.crafting-cell img {
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
  pointer-events: none;
}
.badge {
  position: absolute;
  right: 3px;
  bottom: 2px;
  font-size: 12px;
  font-weight: 700;
  text-shadow: 1px 1px #000;
}
.crafting-cell.drop-target {
  border-color: var(--accent);
}
.crafting-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  gap: 6px;
}
.crafting-meta button {
  font-size: 11px;
  min-height: 26px;
  padding: 3px 7px;
  background: none;
}
.result-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 0 14px;
}
.craft-arrow {
  font-size: 24px;
  color: var(--muted);
}
#craft-result {
  position: relative;
  width: 56px;
  height: 56px;
  padding: 7px;
  flex-shrink: 0;
}
#craft-result img {
  width: 36px;
  height: 36px;
  image-rendering: pixelated;
}
.result-row strong {
  font-size: 13px;
}
.result-row div > span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.craft-button {
  width: 100%;
}
.recipe-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.recipe-heading span {
  color: var(--muted);
  font-size: 11px;
}
#recipe-search {
  min-height: 34px;
  font-size: 12px;
}
.recipe-list {
  margin-top: 8px;
  overflow: auto;
  min-height: 80px;
  flex: 1;
}
.recipe {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  border-bottom: 1px solid #ffffff08;
  border-radius: 0;
  background: none;
  text-align: left;
  padding: 9px 4px;
}
.recipe img {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
}
.recipe span {
  font-size: 12px;
  flex: 1;
}
.recipe small {
  color: var(--muted);
  font-size: 11px;
}
.world-object {
  position: absolute;
  width: 64px;
  height: 64px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: grab;
  touch-action: none;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 6px;
  user-select: none;
}
.world-object > img {
  height: 48px;
  width: 48px;
  object-fit: contain;
  pointer-events: none;
  image-rendering: pixelated;
  filter: drop-shadow(2px 5px 1px #0005);
}
.world-object.selected {
  border-color: var(--accent);
  background: #bddc8a0b;
}
.world-object.player {
  width: 140px;
  height: 190px;
  padding: 0;
}
.player-name {
  position: absolute;
  top: 0;
  font-size: 11px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #151812c9;
  padding: 3px 7px;
  border-radius: 3px;
  pointer-events: none;
}
.player canvas {
  width: 140px;
  height: 180px;
  pointer-events: none;
}
.world-object.appearing {
  animation: appear 220ms var(--ease-out);
}
@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.selection-bar {
  position: absolute;
  z-index: 4;
  bottom: 55px;
  left: 12px;
  right: 12px;
  background: #30342b;
  border: 1px solid #555d48;
  border-radius: 7px;
  padding: 12px;
  box-shadow: 0 6px 15px #0003;
}
.selection-bar strong {
  display: block;
  font-size: 12px;
  margin-bottom: 8px;
}
.selection-bar > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.selection-bar button {
  font-size: 11px;
  min-height: 30px;
  padding: 4px 9px;
}
.selection-bar[hidden],
[hidden] {
  display: none !important;
}
dialog {
  width: 440px;
  max-width: calc(100vw - 32px);
  max-height: 90dvh;
  overflow: auto;
  background: var(--panel);
  color: var(--text);
  border: 1px solid #555b4c;
  border-radius: 12px;
  padding: 26px;
  box-shadow: 0 20px 90px #0008;
}
dialog::backdrop {
  background: #070a07b3;
}
dialog[open] {
  animation: appear 220ms var(--ease-out);
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dialog-heading button {
  font-size: 22px;
  background: none;
  border: none;
}
dialog p {
  line-height: 1.7;
  color: var(--muted);
  margin: 16px 0;
}
dialog label {
  display: block;
  margin: 17px 0 7px;
  font-size: 12px;
}
dialog label input,
dialog select {
  margin-top: 7px;
}
.file-picker {
  background: #3c4433;
  border: 1px dashed #869e66;
  border-radius: 7px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
}
.file-picker input {
  display: block;
  font-size: 11px;
  background: none;
  border: none;
  min-height: 0;
  padding: 4px;
}
dialog .small {
  font-size: 11px;
}
#import-submit {
  width: 100%;
}
#import-error {
  color: #ffb7a9;
  font-size: 12px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 10px);
  padding: 12px 18px;
  background: #ecf1e3;
  color: #252d1e;
  border-radius: 7px;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition:
    transform 180ms var(--ease-out),
    opacity 180ms ease;
  font-size: 13px;
  max-width: 90vw;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.mobile-tabs {
  display: none;
}
.no-results {
  color: var(--muted);
  font-size: 12px;
  grid-column: 1/-1;
  padding: 18px 0;
}
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-thumb {
  background: #555d4b;
  border-radius: 4px;
}
@media (hover: hover) and (pointer: fine) {
  button:not(:disabled):hover {
    background: #4b5142;
  }
  button.primary:not(:disabled):hover {
    background: #cce8a2;
  }
  button.item-preview:hover {
    border-color: #9da58e;
  }
  .recipe:hover {
    background: #393f32;
  }
}
@media (max-width: 1150px) {
  .workspace {
    grid-template-columns: 218px minmax(230px, 1fr) 266px;
    gap: 8px;
    padding: 8px;
  }
  .panel {
    padding: 14px;
  }
  .items-container {
    gap: 5px;
  }
  .stage-hint span:last-child {
    display: none;
  }
  .crafting-grid {
    grid-template-columns: repeat(3, 60px);
  }
  .crafting-cell {
    width: 60px;
    height: 60px;
  }
  .brand h1 {
    font-size: 17px;
  }
}
@media (max-width: 800px) {
  .topbar {
    height: 65px;
    padding: 0 12px;
  }
  .brand h1 {
    font-size: 14px;
  }
  .brand img {
    width: 28px;
    height: 28px;
  }
  .brand span {
    font-size: 11px;
  }
  .offline {
    display: none;
  }
  .top-actions {
    gap: 6px;
  }
  .top-actions button {
    font-size: 12px;
    padding: 6px 9px;
  }
  .workspace {
    height: calc(100dvh - 123px);
    display: block;
    padding: 8px;
  }
  .workspace > .panel,
  .workspace > .stage {
    height: 100%;
    display: none;
  }
  .workspace > .stage {
    display: block;
  }
  .workspace[data-tab="inventory"] > .stage,
  .workspace[data-tab="crafting"] > .stage {
    display: none;
  }
  .workspace[data-tab="inventory"] > .inventory,
  .workspace[data-tab="crafting"] > .crafting {
    display: flex;
  }
  .mobile-tabs {
    height: 58px;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    padding: 6px 12px max(6px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
  }
  .mobile-tabs button {
    flex: 1;
    font-size: 12px;
  }
  .mobile-tabs button[aria-pressed="true"] {
    border-color: var(--accent);
  }
  .items-container {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  }
  .crafting-grid {
    margin-top: 12px;
  }
  .recipe-heading {
    margin-top: 14px;
  }
  .stage-toolbar {
    padding: 10px;
  }
  .empty-world h2 {
    font-size: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
  #toast {
    transform: translateX(-50%);
  }
}

.cube-icon {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 35px;
  height: 35px;
  pointer-events: none;
  filter: drop-shadow(2px 3px 1px #0004);
}
.cube-icon i {
  position: absolute;
  inset: 0;
  background-size: 100% 100%;
  image-rendering: pixelated;
}
.cube-icon .front {
  clip-path: polygon(5% 26%, 50% 49%, 50% 100%, 5% 76%);
  filter: brightness(0.8);
}
.cube-icon .side {
  clip-path: polygon(50% 49%, 95% 26%, 95% 76%, 50% 100%);
  filter: brightness(0.58);
}
.cube-icon .top {
  clip-path: polygon(5% 26%, 50% 2%, 95% 26%, 50% 49%);
}
.world-object > .cube-icon {
  width: 52px;
  height: 52px;
}
.crafting-cell .cube-icon {
  width: 40px;
  height: 40px;
}
.recipe .cube-icon {
  width: 28px;
  height: 28px;
}
#details-text {
  white-space: pre-wrap;
  line-height: 1.8;
  font-size: 13px;
  color: var(--muted);
  margin-top: 18px;
}

#details-text {
  white-space: normal;
}
#details-text p {
  margin: 12px 0;
}
#details-text table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
#details-text th,
#details-text td {
  text-align: left;
  padding: 7px;
  border-bottom: 1px solid var(--line);
}
#details-text h1,
#details-text h2 {
  font-size: 17px;
  margin: 18px 0 10px;
}
#details-text li {
  margin-bottom: 6px;
}

/* Palette swipes scroll on touch; a pointer cancellation discards its drag preview. */
.item-preview {
  touch-action: pan-y;
}
.item-preview > .cube-icon {
  width: 35px;
  flex: 0 0 35px;
}
.recipe > .cube-icon {
  flex: 0 0 28px;
  width: 28px;
}

.world-object[data-dying="true"] .player-name {
  opacity: 0;
}

/* Monochrome chrome; colour belongs to the Minecraft assets. */
:root {
  --bg: #202020;
  --panel: #292929;
  --raised: #353535;
  --line: #444;
  --text: #eee;
  --muted: #aaa;
  --accent: #ddd;
  color-scheme: dark;
}
body {
  background: var(--bg);
}
.stage {
  background: #202020;
  background-image: none;
}
.stage::before {
  content: "";
  position: absolute;
  inset: 60px 0 0;
  background-image:
    linear-gradient(#ffffff16 1px, transparent 1px),
    linear-gradient(90deg, #ffffff16 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(
    ellipse at 50% 46%,
    #000 15%,
    #0009 65%,
    #0003 100%
  );
  pointer-events: none;
}
button.primary {
  background: #ddd;
  border-color: #ddd;
  color: #202020;
}
input,
select {
  background: #202020;
}
.categories button[aria-pressed="true"] {
  background: #454545;
}
.item-preview {
  background: #303030;
  border-color: #414141;
}
.item-preview[aria-pressed="true"] {
  background: #3b3b3b;
  border-color: #aaa;
}
.creative-dot,
.offline:before {
  background: #aaa;
}
.crafting-cell {
  background: #202020;
  border-color: #494949;
}
.file-picker {
  background: #353535;
  border-color: #777;
}
.stage-toolbar,
.stage-hint {
  background: #202020;
}
.stage-hint,
.inventory-footer,
.crafting > .muted,
.crafting-meta > span,
.offline {
  display: none;
}
#world {
  inset: 64px 0 0;
}
.selection-bar {
  display: none !important;
}
.world-object.selected,
.world-object.player {
  border-color: transparent;
  background: none;
}
.world-object.player canvas {
  position: absolute;
  width: 280px;
  height: 280px;
  left: -70px;
  top: -45px;
  max-width: none;
  pointer-events: none;
}
.player-name {
  z-index: 1;
  background: #171717ba;
  top: -3px;
}
.world-object.player {
  overflow: visible;
}
.world-object.dragging,
.drag-ghost {
  position: fixed;
  z-index: 100;
  pointer-events: none;
  transition: none !important;
  animation: none !important;
  cursor: grabbing;
}
.drag-ghost {
  opacity: 0.95;
}
.world-object:not(.player) > img {
  filter: drop-shadow(2px 5px 2px #0005);
}
#craft-button {
  display: none;
}
.result-row {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}
.crafting-cell.drop-target {
  background: #3f3f3f;
  border-color: #eee;
}
.ui-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
  pointer-events: none;
}
button:has(> .ui-icon) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.search > span {
  top: 12px;
  left: 12px;
  display: flex;
}
.search > span .ui-icon {
  width: 16px;
  height: 16px;
}
.craft-arrow {
  display: flex;
}
button.danger {
  color: #e2b4b4;
}
.context-menu {
  position: fixed;
  z-index: 50;
  min-width: 190px;
  padding: 5px;
  background: #303030;
  border: 1px solid #505050;
  border-radius: 8px;
  box-shadow: 0 8px 30px #0006;
  animation: menu-enter 150ms var(--ease-out);
  transform-origin: top left;
}
.context-menu-title {
  padding: 9px 10px;
  font-size: 12px;
  color: #aaa;
  border-bottom: 1px solid #ffffff12;
  margin-bottom: 4px;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.context-menu button {
  display: flex;
  width: 100%;
  gap: 10px;
  justify-content: flex-start;
  background: transparent;
  border: 0;
  border-radius: 4px;
  text-align: left;
  padding: 8px 10px;
  font-size: 13px;
}
.context-menu .ui-icon {
  width: 16px;
  height: 16px;
}
.context-menu button:focus {
  background: #444;
  outline: none;
}
@keyframes menu-enter {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
#details-dialog {
  width: 640px;
  padding: 26px;
}
#details-dialog > .dialog-heading {
  align-items: flex-start;
}
.details-heading {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
  padding: 5px 0 18px;
}
#details-icon {
  width: 85px;
  height: 85px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: #222;
  border: 1px solid #444;
  border-radius: 8px;
}
#details-icon img {
  width: 68px;
  height: 68px;
  image-rendering: pixelated;
}
#details-identifier {
  display: block;
  margin-top: 10px;
  font:
    11px "Consolas",
    monospace;
  color: #999;
  overflow-wrap: anywhere;
}
#details-text {
  border-top: 1px solid #444;
  padding-top: 12px;
  color: #ccc;
  line-height: 1.8;
  font-size: 14px;
  overflow-wrap: anywhere;
}
#details-text h1 {
  display: none;
}
#details-text h2 {
  font-size: 18px;
  margin: 24px 0 12px;
  color: #eee;
}
#details-text h3 {
  color: #ddd;
}
#details-text table {
  font-size: 13px;
  border: 1px solid #444;
  background: #252525;
  border-radius: 6px;
}
#details-text th {
  color: #eee;
  background: #333;
}
#details-text td,
#details-text th {
  padding: 10px 12px;
}
#details-text strong {
  color: #eee;
}
#details-text code {
  background: #383838;
  border-radius: 3px;
  padding: 2px 4px;
}
#details-text blockquote {
  margin: 12px 0;
  border-left: 2px solid #777;
  padding-left: 14px;
}
#player-preview {
  height: 190px;
  position: relative;
  overflow: hidden;
  margin: 12px 0;
  background: #222;
  border: 1px solid #444;
  border-radius: 8px;
  display: grid;
  place-items: center;
}
#player-preview canvas {
  width: 280px;
  height: 280px;
  position: absolute;
  left: calc(50% - 140px);
  top: calc(50% - 140px);
}
#detected-arms {
  text-align: center;
  font-size: 12px;
}
#import-dialog {
  width: 460px;
  padding: 22px;
}
#import-dialog p {
  font-size: 12px;
  margin: 10px 0;
}
#import-dialog label {
  margin-top: 12px;
}
.file-picker {
  padding: 9px;
}
.empty-world p {
  display: none;
}
.pixel-cube {
  background: #999;
  box-shadow:
    inset -12px -10px #666,
    inset 0 7px #bbb;
}
.pixel-cube i {
  background: #aaa;
}
.pixel-cube i:nth-child(3) {
  background: #777;
}
#toast {
  background: #ddd;
  color: #222;
}
dialog {
  border-color: #555;
}
.empty-world h2 {
  font-size: 23px;
}
@media (hover: hover) and (pointer: fine) {
  button:not(:disabled):hover {
    background: #484848;
  }
  button.primary:not(:disabled):hover {
    background: #f0f0f0;
  }
  .item-preview:hover {
    border-color: #888;
  }
  .recipe:hover {
    background: #383838;
  }
}
@media (max-width: 800px) {
  .top-actions button {
    white-space: nowrap;
  }
  .brand h1 {
    font-size: 13px;
  }
  .details-heading {
    gap: 12px;
  }
  #details-icon {
    width: 64px;
    height: 64px;
  }
  #details-icon img {
    width: 52px;
    height: 52px;
  }
  #details-dialog {
    padding: 18px;
  }
  .context-menu button {
    min-height: 42px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .context-menu {
    animation: none;
  }
  .world-object.appearing {
    animation: none;
  }
}

.pixel-cube {
  background: none;
  box-shadow: none;
  transform: none;
  width: 44px;
  height: 44px;
}
.pixel-cube .ui-icon {
  width: 44px;
  height: 44px;
}
.player.dragging canvas {
  opacity: 0.95;
}

.world-object.block {
  width: 96px;
  height: 96px;
}
.world-object.block > img {
  width: 80px;
  height: 80px;
}
#clear-craft {
  margin-left: auto;
}
.crafting-meta {
  justify-content: flex-end;
}
.result-row {
  border-bottom: 0;
}
.recipe-heading {
  margin-top: 8px;
}
button {
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    opacity 150ms ease,
    transform 120ms var(--ease-out);
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
.crafting-cell img {
  transform-origin: top left;
}
.context-menu button:active {
  transform: none;
}
.world-object:focus-visible {
  outline: 1px solid #aaa;
  outline-offset: 2px;
}
.player:focus-visible {
  outline: none;
}

.item-preview,
#craft-result:not(:disabled),
.crafting-cell:has(img) {
  cursor: grab;
}
.item-preview:active,
#craft-result:active:not(:disabled),
.crafting-cell:has(img):active {
  cursor: grabbing;
}

.crafting-cell img.recipe-ghost {
  opacity: 0.24;
  filter: grayscale(0.5);
}
.crafting-cell:has(img.recipe-ghost) {
  cursor: default;
}
.recipe[aria-pressed="true"] {
  background: #383838;
}

#telegram-link {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 36px;
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: 8px;
  color: #ddd;
  transition:
    background-color 150ms ease,
    transform 150ms var(--ease-out);
}
#telegram-link:hover {
  background: #484848;
}
#telegram-link:focus-visible {
  outline: 2px solid #ddd;
  outline-offset: 3px;
}
.ui-icon {
  stroke-linejoin: round;
  stroke-linecap: round;
}
.top-actions button,
.context-menu,
.context-menu button {
  border-radius: 8px;
}
.item-preview[aria-pressed="true"] {
  background: #303030;
  border-color: #414141;
}
.crafting-cell .recipe-ghost {
  pointer-events: none;
}
.crafting-cell.drop-target {
  box-shadow: inset 0 0 0 1px #aaa;
}
@media (prefers-reduced-motion: reduce) {
  #telegram-link {
    transition: none;
  }
}

.dragging,
.drag-ghost {
  will-change: transform;
}
.item-preview > img,
.recipe > img {
  image-rendering: auto;
}
.item-preview,
.crafting-cell {
  border-radius: 8px;
}

@media (max-width: 560px) {
  #import-button > span {
    display: none;
  }
  #import-button {
    min-width: 38px;
  }
  .top-actions {
    flex-shrink: 0;
  }
  .brand {
    min-width: 0;
  }
  .brand h1 {
    overflow-wrap: anywhere;
  }
}

#supporters-dialog {
  width: 620px;
  padding: 26px;
}
#supporters-dialog .dialog-heading {
  align-items: flex-start;
}
#supporters-dialog .dialog-heading p {
  font-size: 13px;
  margin: 10px 0 0;
}
#supporters-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
}
.supporter-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #242424;
  border: 1px solid #414141;
  border-radius: 9px;
  min-width: 0;
}
.supporter-card.featured {
  border-color: #888;
  background: #303030;
}
.supporter-card img {
  width: 64px;
  height: 64px;
  aspect-ratio: 1;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 8px;
  background: #333;
}
.supporter-card a,
.supporter-card strong {
  color: #eee;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.supporter-card a {
  text-decoration: none;
}
.supporter-card a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.supporter-card div > span {
  display: block;
  color: #aaa;
  font-size: 11px;
  line-height: 1.5;
  margin-top: 6px;
}
.supporters-footer {
  font-size: 12px;
  line-height: 1.7;
  color: #aaa;
  padding-top: 14px;
  border-top: 1px solid #414141;
}
#supporters-button {
  color: #ddd;
}
#supporters-button .ui-icon {
  width: 18px;
  height: 18px;
}
@media (max-width: 560px) {
  #supporters-list {
    grid-template-columns: 1fr;
  }
  #supporters-dialog {
    padding: 18px;
  }
  .top-actions {
    gap: 4px;
  }
  .brand {
    gap: 7px;
  }
  .brand h1 {
    font-size: 11px;
  }
  .top-actions button,
  #telegram-link {
    min-width: 32px;
    padding: 6px;
  }
  .supporter-card {
    padding: 12px;
  }
}

.supporter-card.linked {
  padding: 0;
}
.supporter-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  padding: 14px;
  border-radius: inherit;
  text-decoration: none !important;
  transition: background-color 150ms ease;
}
.supporter-link strong {
  text-decoration: underline;
  text-decoration-color: #777;
  text-underline-offset: 3px;
}
.supporter-card div > .supporter-action {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #d0d0d0;
  font-size: 11px;
  margin-top: 10px;
}
.supporter-action .ui-icon {
  width: 13px;
  height: 13px;
}
.supporter-link:hover,
.supporter-link:focus-visible {
  background: #3b3b3b;
}
.supporter-link:focus-visible {
  outline: 2px solid #eee;
  outline-offset: 2px;
}
.supporter-link:hover .supporter-action {
  color: white;
}
@media (max-width: 560px) {
  .supporter-link {
    padding: 12px;
  }
}
