@font-face {
  font-family: "MC";
  src: url("assets/gui/minecraft.ttf") format("truetype");
  font-display: block;
}

:root {
  --u: 2px;
  --k: 3px;
  --ink: #e6eff7;
  --ink-dim: #93a8bc;
  --ink-faint: #5a6f84;
  --accent: #00cbff;
  --accent-deep: #0b6f93;
  --green: #00fc00;
  --red: #e00202;
  --page: #050c14;
  --hud-a: rgba(13, 23, 36, 0.93);
  --hud-b: rgba(7, 13, 22, 0.93);
  --hud-line: #1d2f43;
  --hud-edge: #02060b;
  --mc-bg: #c6c6c6;
  --mc-slot: #8b8b8b;
  --mc-dark: #373737;
  --mc-light: #ffffff;
  --mc-label: #404040;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--page); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "MC", "Courier New", monospace;
  font-size: 16px;
  line-height: 18px;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
  font-smooth: never;
  text-rendering: optimizeSpeed;
  background-color: var(--page);
  background-image:
    radial-gradient(1200px 700px at 58% 22%, rgba(0, 203, 255, 0.10), transparent 62%),
    radial-gradient(900px 600px at 10% 100%, rgba(0, 120, 170, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(5, 13, 22, 0.90) 0%, rgba(3, 8, 14, 0.96) 70%),
    url("assets/gui/bg_prismarine.png");
  background-size: auto, auto, auto, 64px 64px;
  background-attachment: fixed, fixed, fixed, fixed;
  image-rendering: pixelated;
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.sh { text-shadow: 2px 2px 0 color-mix(in srgb, currentColor 25%, black); }

.creative, .kit-wrap, .held, .tooltip, .insp-slot, .toasts, .admin-fab {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.page {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.brand-icon { --sz: 48px; filter: drop-shadow(0 0 14px rgba(0, 203, 255, 0.35)); }
.brand-text { display: flex; flex-direction: column; gap: 8px; }
.brand-name {
  font-size: 32px;
  line-height: 32px;
  color: var(--accent);
  text-shadow: 4px 4px 0 #003342;
}
.brand-sub {
  font-size: 16px;
  line-height: 16px;
  color: var(--ink-dim);
  text-shadow: 2px 2px 0 #0b1520;
}

.server-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 16px;
  background: linear-gradient(180deg, var(--hud-a), var(--hud-b));
  border: 2px solid var(--hud-line);
  box-shadow: 0 0 0 2px var(--hud-edge);
  color: var(--ink);
  text-shadow: 2px 2px 0 #0b1520;
}
.server-chip:hover { border-color: #2d4863; }
.server-chip:active { transform: translateY(2px); }
.chip-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  box-shadow: 0 0 0 2px #0a3d0a, 0 0 10px rgba(0, 252, 0, 0.55);
}

.layout {
  display: grid;
  grid-template-columns: auto auto minmax(300px, 344px);
  justify-content: center;
  align-items: start;
  gap: 28px;
}

.col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

.hud {
  position: relative;
  background: linear-gradient(180deg, var(--hud-a), var(--hud-b));
  border: 2px solid var(--hud-line);
  box-shadow: 0 0 0 2px var(--hud-edge), inset 0 2px 0 rgba(255, 255, 255, 0.035);
}

.hud-h {
  margin: 0;
  font-size: 16px;
  font-weight: normal;
  line-height: 18px;
  color: var(--accent);
  text-shadow: 2px 2px 0 #003342;
}
.hud-h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: normal;
  color: #cfe0ee;
  text-shadow: 2px 2px 0 #0b1520;
}

.mc-panel {
  position: relative;
  border-style: solid;
  border-color: transparent;
  border-image: url("assets/gui/panel.png") 4 fill / calc(4 * var(--s)) / 0 stretch;
  border-width: calc(4 * var(--s));
  image-rendering: pixelated;
}

.mc-label {
  position: absolute;
  color: var(--mc-label);
  font-size: calc(8 * var(--s));
  line-height: calc(8 * var(--s));
  white-space: nowrap;
  pointer-events: none;
}

.slot {
  position: absolute;
  width: calc(18 * var(--s));
  height: calc(18 * var(--s));
  background: var(--mc-slot);
  box-shadow:
    inset var(--s) var(--s) 0 var(--mc-dark),
    inset calc(-1 * var(--s)) calc(-1 * var(--s)) 0 var(--mc-light);
  touch-action: none;
}
.slot > .icon {
  position: absolute;
  left: var(--s);
  top: var(--s);
  --sz: calc(16 * var(--s));
  pointer-events: none;
}
.slot > .sil {
  position: absolute;
  left: var(--s);
  top: var(--s);
  width: calc(16 * var(--s));
  height: calc(16 * var(--s));
  background-size: 100% 100%;
  image-rendering: pixelated;
  pointer-events: none;
}
.slot::after {
  content: "";
  position: absolute;
  left: var(--s);
  top: var(--s);
  width: calc(16 * var(--s));
  height: calc(16 * var(--s));
  pointer-events: none;
}
@media (hover: hover) {
  .slot:hover::after { background: rgba(255, 255, 255, 0.42); }
}
.slot.drop-ok::after { background: rgba(255, 255, 255, 0.42); }
.slot.drop-bad::after { background: rgba(224, 2, 2, 0.35); }
.slot.selected {
  outline: var(--s) solid #fff;
  outline-offset: calc(-1 * var(--s));
  z-index: 2;
}
.slot.selected::before {
  content: "";
  position: absolute;
  inset: calc(-2 * var(--s));
  border: var(--s) solid var(--accent);
  pointer-events: none;
  animation: pulse 1.2s steps(2, end) infinite;
}
.slot.lifted > .icon, .slot.lifted > .count, .slot.lifted > .glint { opacity: 0.25; }
.slot.banned > .icon { filter: grayscale(1) brightness(0.8); opacity: 0.55; }
.slot.banned::before {
  content: "";
  position: absolute;
  inset: var(--s);
  border: var(--s) solid var(--red);
  pointer-events: none;
}
.slot.shake { animation: shake 0.28s steps(4, end); }

@keyframes pulse { 50% { border-color: #9ff0ff; } }
@keyframes shake {
  25% { transform: translateX(calc(-1 * var(--s))); }
  75% { transform: translateX(var(--s)); }
}

.icon {
  display: block;
  width: var(--sz, 32px);
  height: var(--sz, 32px);
  background-repeat: no-repeat;
  image-rendering: pixelated;
}
.icon.smooth { image-rendering: auto; }

.glint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("assets/gui/glint.png");
  background-size: 180% 180%;
  mix-blend-mode: plus-lighter;
  opacity: 0.58;
  -webkit-mask-image: var(--m);
  mask-image: var(--m);
  -webkit-mask-size: var(--ms);
  mask-size: var(--ms);
  -webkit-mask-position: var(--mp);
  mask-position: var(--mp);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  animation: glint 6s linear infinite;
}
@keyframes glint {
  from { background-position: 0% 100%; }
  to { background-position: 100% 0%; }
}

.count {
  position: absolute;
  right: 0;
  top: calc(10 * var(--s));
  font-size: calc(8 * var(--s));
  line-height: calc(8 * var(--s));
  color: #fff;
  text-shadow: var(--s) var(--s) 0 #3f3f3f;
  pointer-events: none;
  z-index: 1;
}
.count:empty { display: none; }

.creative {
  --s: var(--u);
  --rows: 9;
  position: relative;
  width: calc(195 * var(--s));
  padding: calc(28 * var(--s)) 0 calc(28 * var(--s));
}
.creative-panel {
  z-index: 2;
  width: calc(195 * var(--s));
  height: calc((25 + var(--rows) * 18) * var(--s));
}
.creative-title { left: calc(4 * var(--s)); top: calc(2 * var(--s)); }
.creative-search {
  position: absolute;
  left: calc(76 * var(--s));
  top: 0;
  width: calc(95 * var(--s));
  height: calc(12 * var(--s));
}
.creative-search input {
  width: 100%;
  height: 100%;
  padding: 0 calc(3 * var(--s));
  border: var(--s) solid #a0a0a0;
  background: #000;
  color: #fff;
  font-size: calc(8 * var(--s));
  line-height: calc(8 * var(--s));
  outline: none;
  border-radius: 0;
}
.creative-search input:focus { border-color: #fff; }
.creative-search input::placeholder { color: #6f6f6f; }
.creative-grid {
  position: absolute;
  left: calc(4 * var(--s));
  top: calc(13 * var(--s));
  width: calc(162 * var(--s));
  height: calc(var(--rows) * 18 * var(--s));
  touch-action: none;
}
.creative-grid .slot { cursor: pointer; }
.creative-empty {
  position: absolute;
  left: calc(4 * var(--s));
  top: calc(13 * var(--s));
  width: calc(162 * var(--s));
  padding-top: calc(40 * var(--s));
  text-align: center;
  color: var(--mc-label);
  font-size: calc(8 * var(--s));
  pointer-events: none;
}
.creative-scroll {
  position: absolute;
  left: calc(170 * var(--s));
  top: calc(13 * var(--s));
  width: calc(14 * var(--s));
  height: calc(var(--rows) * 18 * var(--s));
  background: var(--mc-slot);
  box-shadow:
    inset var(--s) var(--s) 0 var(--mc-dark),
    inset calc(-1 * var(--s)) calc(-1 * var(--s)) 0 var(--mc-light);
  touch-action: none;
}
.scroller {
  position: absolute;
  left: var(--s);
  top: var(--s);
  width: calc(12 * var(--s));
  height: calc(15 * var(--s));
  background: url("assets/gui/scroller.png") 0 0 / 100% 100%;
  image-rendering: pixelated;
  cursor: grab;
}
.scroller.off { background-image: url("assets/gui/scroller_disabled.png"); cursor: default; }
.creative.trash .creative-panel::after {
  content: "Drop here to remove";
  position: absolute;
  left: calc(4 * var(--s));
  top: calc(13 * var(--s));
  width: calc(162 * var(--s));
  height: calc(var(--rows) * 18 * var(--s));
  display: grid;
  place-items: center;
  background: rgba(120, 0, 0, 0.55);
  box-shadow: inset 0 0 0 var(--s) #ff5555;
  color: #fff;
  text-shadow: var(--s) var(--s) 0 #3f0000;
  font-size: calc(8 * var(--s));
  z-index: 5;
}

.tabs {
  position: absolute;
  left: 0;
  width: calc(195 * var(--s));
  height: calc(32 * var(--s));
}
.tabs-top { top: 0; }
.tabs-bottom { bottom: 0; }
.tab {
  position: absolute;
  top: 0;
  width: calc(26 * var(--s));
  height: calc(32 * var(--s));
  padding: 0;
  border: 0;
  background: transparent center / 100% 100% no-repeat;
  image-rendering: pixelated;
  z-index: 1;
}
.tab .icon {
  position: absolute;
  left: calc(5 * var(--s));
  --sz: calc(16 * var(--s));
  pointer-events: none;
}
.tabs-top .tab .icon { top: calc(9 * var(--s)); }
.tabs-bottom .tab .icon { top: calc(7 * var(--s)); }
.tabs-top .tab { background-image: url("assets/gui/tab_top_unselected.png"); }
.tabs-top .tab.first { background-image: url("assets/gui/tab_top_unselected_first.png"); }
.tabs-top .tab.on { background-image: url("assets/gui/tab_top_selected.png"); z-index: 3; }
.tabs-top .tab.on.first { background-image: url("assets/gui/tab_top_selected_first.png"); }
.tabs-bottom .tab { background-image: url("assets/gui/tab_bottom_unselected.png"); }
.tabs-bottom .tab.first { background-image: url("assets/gui/tab_bottom_unselected_first.png"); }
.tabs-bottom .tab.on { background-image: url("assets/gui/tab_bottom_selected.png"); z-index: 3; }
.tabs-bottom .tab.on.first { background-image: url("assets/gui/tab_bottom_selected_first.png"); }
.tabs-top { z-index: 1; }
.tabs-bottom { z-index: 1; }
.tabs .tab.on { z-index: 4; }
.creative .tabs { z-index: auto; }
.creative .tab { z-index: 1; }
.creative .tab.on { z-index: 3; }
.creative-panel { z-index: 2; }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tab.admin-only::after {
  content: "";
  position: absolute;
  right: calc(3 * var(--s));
  top: calc(4 * var(--s));
  width: calc(3 * var(--s));
  height: calc(3 * var(--s));
  background: #ffaa00;
}

.admin-bar {
  width: calc(195 * var(--u));
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-color: #5a2a14;
  background: linear-gradient(180deg, rgba(38, 18, 8, 0.95), rgba(22, 10, 4, 0.95));
}
.admin-bar-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.admin-title { color: #ffaa00; text-shadow: 2px 2px 0 #3f2a00; }
.admin-count { color: #d6b88f; }

.seg { display: inline-flex; gap: 0; box-shadow: 0 0 0 2px #000; }
.seg button {
  height: 28px;
  padding: 0 10px;
  border: 0;
  background: #2a2a2a;
  color: #bdbdbd;
  box-shadow: inset 0 -2px 0 #161616, inset 0 2px 0 #3c3c3c;
}
.seg button + button { border-left: 2px solid #000; }
.seg button.on {
  background: #6b6b6b;
  color: #fff;
  text-shadow: 2px 2px 0 #3f3f3f;
  box-shadow: inset 0 -2px 0 #464646, inset 0 2px 0 #8f8f8f;
}

.link-btn {
  border: 0;
  padding: 0;
  background: none;
  color: var(--accent);
  text-shadow: 2px 2px 0 #003342;
}
.link-btn:hover { color: #7fe6ff; }
.link-btn.dim { color: var(--ink-dim); text-shadow: 2px 2px 0 #0b1520; }
.link-btn.dim:hover { color: var(--ink); }
.link-btn.danger { color: #ff6b5b; text-shadow: 2px 2px 0 #3a0a05; }
.link-btn.danger:hover { color: #ff9a8f; }
.link-btn:disabled { color: var(--ink-faint); text-shadow: none; cursor: default; }

.info {
  width: calc(195 * var(--u));
  padding: 20px 20px 22px;
}
.info-intro { margin: 10px 0 0; color: var(--ink-dim); }
.info-block { margin-top: 22px; }
.steps, .rules, .keys { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.steps li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; color: #c9d7e3; }
.step-icon { --sz: 32px; margin-top: -4px; }
.rules li { position: relative; padding-left: 18px; color: #c9d7e3; }
.rules li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 5px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  box-shadow: 2px 2px 0 #003342;
}
.keys li { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; color: #c9d7e3; }
.kbds { display: inline-flex; align-items: center; gap: 6px; }
.kbd-to { color: var(--ink-faint); }
.for-touch { display: none; }
@media (hover: none) {
  .for-mouse { display: none !important; }
  .for-touch { display: inline; }
}
kbd {
  display: inline-block;
  min-width: 22px;
  padding: 3px 5px 1px;
  background: #1a2533;
  border: 2px solid #33475d;
  border-bottom-width: 4px;
  color: #fff;
  font: inherit;
  line-height: 14px;
  text-align: center;
}

.kit-wrap { --s: var(--k); }
.kit-panel {
  width: calc(176 * var(--s));
  height: calc(166 * var(--s));
}
.doll-box {
  position: absolute;
  left: calc(21 * var(--s));
  top: calc(3 * var(--s));
  width: calc(51 * var(--s));
  height: calc(72 * var(--s));
  background: #000;
  box-shadow:
    inset var(--s) var(--s) 0 var(--mc-dark),
    inset calc(-1 * var(--s)) calc(-1 * var(--s)) 0 var(--mc-light);
  overflow: hidden;
}
.doll {
  position: absolute;
  left: calc(10 * var(--s));
  top: calc(4 * var(--s));
  width: calc(32 * var(--s));
  height: calc(64 * var(--s));
  image-rendering: pixelated;
  filter: drop-shadow(0 calc(2 * var(--s)) 0 rgba(0, 0, 0, 0.35));
}
.kit-label { left: calc(93 * var(--s)); top: calc(2 * var(--s)); }
.kit-stats {
  position: absolute;
  left: calc(93 * var(--s));
  top: calc(16 * var(--s));
  width: calc(73 * var(--s));
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: calc(3 * var(--s));
  font-size: calc(8 * var(--s));
  line-height: calc(8 * var(--s));
  color: var(--mc-label);
}
.kit-stats div { display: flex; justify-content: space-between; }
.kit-stats dt { color: #707070; }
.kit-stats dd { margin: 0; color: var(--mc-label); }
.kit-stats dd.full { color: #8b0000; }
.kit-slots { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.kit-slots .slot { cursor: pointer; }

.actions {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px 16px;
  padding: 16px 18px 18px;
  width: calc(176 * var(--k));
}
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-label { color: var(--ink-dim); }
.action-buttons { display: flex; gap: 10px; }
.action-note { grid-column: 1 / -1; margin: 0; min-height: 18px; color: var(--ink-faint); }
.action-note.bad { color: #ff6b5b; }
.action-note.good { color: #6dff6d; }

.mc-input {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 2px solid #a0a0a0;
  border-radius: 0;
  background: #000;
  color: #fff;
  outline: none;
  font-size: 16px;
  line-height: 16px;
}
.mc-input:focus { border-color: #fff; }
.mc-input::placeholder { color: #666; }
.mc-input.bad { border-color: #ff5555; }
textarea.mc-input { height: auto; min-height: 88px; padding: 8px 10px; line-height: 18px; resize: vertical; }

.mc-select {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 2px solid #a0a0a0;
  border-radius: 0;
  background: #000;
  color: #fff;
  outline: none;
}
.mc-select:focus { border-color: #fff; }

.mc-btn {
  height: 40px;
  min-width: 110px;
  padding: 0 14px;
  border-style: solid;
  border-width: 6px;
  border-color: transparent;
  border-image: url("assets/gui/button.png") 3 fill / 6px / 0 stretch;
  background: none;
  color: #fff;
  line-height: 28px;
  text-shadow: 2px 2px 0 #3f3f3f;
  image-rendering: pixelated;
  white-space: nowrap;
}
.mc-btn:hover, .mc-btn:focus-visible {
  border-image-source: url("assets/gui/button_highlighted.png");
  outline: none;
}
.mc-btn:disabled {
  border-image-source: url("assets/gui/button_disabled.png");
  color: #a0a0a0;
  text-shadow: none;
  cursor: default;
}
.mc-btn.small { height: 36px; min-width: 0; line-height: 24px; padding: 0 12px; }
.mc-btn.danger { color: #ff8a80; }
.mc-btn.danger:hover { color: #ffb3ab; }

.go-btn {
  position: relative;
  height: 40px;
  padding: 0 20px;
  border: 0;
  background: #3c8527;
  color: #fff;
  box-shadow: inset 0 -4px 0 #1e5312, inset 0 2px 0 #6ec14f, 0 0 0 2px #081a04;
  text-shadow: 2px 2px 0 #183d0d;
  white-space: nowrap;
}
.go-btn:hover, .go-btn:focus-visible { background: #469a2e; outline: none; }
.go-btn:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 #1e5312, inset 0 2px 0 #6ec14f, 0 0 0 2px #081a04; }
.go-btn:disabled { background: #3b4a37; color: #a4b0a0; box-shadow: inset 0 -4px 0 #26301f, 0 0 0 2px #081a04; cursor: default; transform: none; }
.go-btn.busy::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 6px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #b8ffa0, transparent);
  animation: busy 0.9s linear infinite;
}
@keyframes busy { from { transform: translateX(-60%); } to { transform: translateX(60%); } }

.inspector { padding: 18px; min-height: 240px; }
.insp-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 8px 12px; }
.insp-empty-icon { --sz: 64px; opacity: 0.85; filter: saturate(0.6); }
.insp-empty-title { margin: 16px 0 0; color: #cfe0ee; text-shadow: 2px 2px 0 #0b1520; }
.insp-empty-text { margin: 10px 0 0; color: var(--ink-dim); max-width: 250px; }
.insp-head { display: flex; gap: 14px; align-items: center; }
.insp-slot {
  --s: 3px;
  position: relative;
  flex: none;
  width: calc(18 * var(--s));
  height: calc(18 * var(--s));
  background: var(--mc-slot);
  box-shadow:
    inset var(--s) var(--s) 0 var(--mc-dark),
    inset calc(-1 * var(--s)) calc(-1 * var(--s)) 0 var(--mc-light);
}
.insp-slot > .icon { position: absolute; left: 3px; top: 3px; --sz: 48px; }
.insp-title { min-width: 0; }
.insp-name { overflow-wrap: anywhere; }
.insp-id { margin-top: 6px; color: #555; text-shadow: 2px 2px 0 #151515; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.insp-actions { display: flex; gap: 10px; margin-top: 16px; }
.insp-actions .mc-btn { flex: 1; }
.insp-section { margin-top: 18px; padding-top: 16px; border-top: 2px solid var(--hud-line); }
.insp-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #cfe0ee;
  text-shadow: 2px 2px 0 #0b1520;
}
.insp-h-actions { display: inline-flex; gap: 14px; }
.stepper { display: flex; align-items: center; gap: 8px; }
.step {
  width: 36px;
  height: 36px;
  border-style: solid;
  border-width: 6px;
  border-color: transparent;
  border-image: url("assets/gui/button.png") 3 fill / 6px / 0 stretch;
  background: none;
  color: #fff;
  line-height: 20px;
  padding: 0;
  text-shadow: 2px 2px 0 #3f3f3f;
  image-rendering: pixelated;
}
.step:hover { border-image-source: url("assets/gui/button_highlighted.png"); }
.step-input { width: 70px; height: 36px; text-align: center; }
.stepper .link-btn { margin-left: 6px; }

.ench-list { display: flex; flex-direction: column; gap: 6px; max-height: 330px; overflow-y: auto; padding-right: 4px; }
.ench-row {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  min-height: 30px;
  padding: 3px 4px 3px 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 2px solid transparent;
}
.ench-row .ench-name { flex: 1 1 auto; min-width: 0; white-space: nowrap; line-height: 18px; }
.ench-row .ench-levels { margin-left: auto; }
.ench-row.on { background: rgba(170, 0, 170, 0.14); border-color: rgba(190, 90, 255, 0.35); }
.ench-row.conflict .ench-name { color: #6d7d8c; }
.ench-name { color: #aaa; text-shadow: 2px 2px 0 #2a2a2a; }
.ench-row.on .ench-name { color: #d8b4ff; text-shadow: 2px 2px 0 #36204f; }
.ench-row.curse .ench-name { color: #ff5555; text-shadow: 2px 2px 0 #3f1515; }
.ench-levels { display: flex; gap: 4px; }
.lvl {
  min-width: 28px;
  height: 24px;
  padding: 0 4px;
  border: 2px solid #2b3a4a;
  background: #0f1822;
  color: #8195a8;
  line-height: 18px;
}
.lvl:hover { border-color: #52708e; color: #fff; }
.lvl.on { background: #5e2a8a; border-color: #b06cff; color: #fff; text-shadow: 2px 2px 0 #2a1040; }
.ench-list::-webkit-scrollbar { width: 8px; }
.ench-list::-webkit-scrollbar-thumb { background: #33475d; }
.ench-list::-webkit-scrollbar-track { background: #0c141e; }

.trim-row { margin-bottom: 10px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch {
  position: relative;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.35), inset -2px -2px 0 rgba(0, 0, 0, 0.35);
}
.swatch.on { outline: 2px solid #fff; outline-offset: 2px; }
.swatch.none {
  background: #11161c;
  box-shadow: none;
}
.swatch.none::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -2px;
  width: 2px;
  height: 26px;
  background: #ff5555;
  transform: rotate(45deg);
}

.tooltip {
  position: fixed;
  z-index: 60;
  left: 0;
  top: 0;
  max-width: 420px;
  padding: 8px 8px 6px;
  background: rgba(16, 0, 16, 0.94);
  clip-path: polygon(2px 0, calc(100% - 2px) 0, calc(100% - 2px) 2px, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 2px calc(100% - 2px), 0 calc(100% - 2px), 0 2px, 2px 2px);
  pointer-events: none;
  white-space: nowrap;
}
.tooltip::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid transparent;
  border-image: linear-gradient(rgba(80, 0, 255, 0.31), rgba(40, 0, 127, 0.31)) 1;
  pointer-events: none;
}
.tt-line { position: relative; min-height: 20px; line-height: 20px; white-space: pre; text-shadow: 2px 2px 0 color-mix(in srgb, currentColor 25%, black); }
.tt-line.first { margin-bottom: 4px; }
.tt-line.blank { min-height: 20px; }
.tt-line i { font-style: italic; }
.tt-line.wrap { white-space: normal; max-width: 360px; }

.held {
  position: fixed;
  z-index: 70;
  left: 0;
  top: 0;
  --s: var(--k);
  width: calc(16 * var(--s));
  height: calc(16 * var(--s));
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.held > .icon { --sz: calc(16 * var(--s)); }
.held > .count { right: calc(-1 * var(--s)); top: calc(9 * var(--s)); }

.toasts {
  position: fixed;
  z-index: 80;
  right: 18px;
  top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 12px;
  width: 320px;
  min-height: 64px;
  padding: 8px 14px 8px 12px;
  border-style: solid;
  border-width: 8px;
  border-color: transparent;
  border-image: url("assets/gui/toast.png") 4 fill / 8px / 0 stretch;
  image-rendering: pixelated;
  pointer-events: auto;
  animation: toast-in 0.25s steps(5, end);
}
.toast.out { animation: toast-out 0.25s steps(5, end) forwards; }
.toast .icon { --sz: 32px; }
.toast-title { color: #ffff55; text-shadow: 2px 2px 0 #3f3f15; }
.toast-title.bad { color: #ff5555; text-shadow: 2px 2px 0 #3f1515; }
.toast-text { margin-top: 4px; color: #fff; text-shadow: 2px 2px 0 #3f3f3f; }
.toast-undo { margin-left: 8px; }
@keyframes toast-in { from { transform: translateX(110%); } to { transform: none; } }
@keyframes toast-out { to { transform: translateX(110%); } }

.admin-fab {
  position: fixed;
  z-index: 40;
  right: 20px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 0;
  height: 40px;
  padding: 0 0 0 40px;
  border: 0;
  background: url("assets/gui/locked_button.png") left center / 40px 40px no-repeat;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 0 #000) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}
.admin-fab:hover { background-image: url("assets/gui/locked_button_highlighted.png"); }
.admin-fab.on { background-image: url("assets/gui/unlocked_button.png"); }
.admin-fab.on:hover { background-image: url("assets/gui/unlocked_button_highlighted.png"); }
.admin-fab-label {
  max-width: 0;
  overflow: hidden;
  padding: 0;
  color: var(--ink);
  text-shadow: 2px 2px 0 #0b1520;
  white-space: nowrap;
  transition: max-width 0.18s steps(6, end), padding 0.18s steps(6, end);
}
.admin-fab:hover .admin-fab-label, .admin-fab:focus-visible .admin-fab-label, .admin-fab.on .admin-fab-label {
  max-width: 140px;
  padding: 0 10px 0 10px;
}
.admin-fab.on .admin-fab-label { color: #ffaa00; text-shadow: 2px 2px 0 #3f2a00; }

.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(1, 4, 8, 0.72); backdrop-filter: blur(3px); }
.modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 22px 22px 22px;
  animation: pop 0.16s steps(4, end);
}
.modal-card.narrow { width: min(400px, 100%); }
@keyframes pop { from { transform: scale(0.96); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-x {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  background: url("assets/gui/cross_button.png") center / 30px 30px no-repeat;
  image-rendering: pixelated;
}
.modal-x:hover { background-image: url("assets/gui/cross_button_highlighted.png"); }
.modal-body { margin-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.modal-body p { margin: 0; color: #c9d7e3; }
.modal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-buttons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.modal-error { min-height: 18px; margin: 0; color: #ff6b5b; }
.review-kit { display: flex; justify-content: center; padding: 6px 0 2px; }
.code-input { letter-spacing: 4px; font-size: 16px; }
.review-kit .kit-mini { --s: 2px; }
.review-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; max-height: 190px; overflow-y: auto; }
.review-list li { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: center; color: #c9d7e3; }
.review-list .icon { --sz: 32px; }
.review-list .sub { color: #a07fd0; }
.success { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 8px 0 4px; }
.success .icon { --sz: 64px; }
.success .ref { color: var(--accent); }

.kit-mini {
  position: relative;
  width: calc(176 * var(--s));
  height: calc(80 * var(--s));
  background: var(--mc-bg);
  box-shadow: 0 0 0 var(--s) #000, inset var(--s) var(--s) 0 #fff, inset calc(-1 * var(--s)) calc(-1 * var(--s)) 0 #555;
}

.foot {
  display: flex;
  justify-content: center;
  padding: 40px 56px 0;
  color: var(--ink-faint);
  text-align: center;
}

.noscript { position: fixed; inset: auto 0 0; margin: 0; padding: 16px; background: #400; color: #fff; text-align: center; }


.mc { text-shadow: 0.125em 0.125em 0 color-mix(in srgb, currentColor 25%, black); }
.mc-b {
  letter-spacing: 0.125em;
  text-shadow:
    0.125em 0 0 currentColor,
    0.125em 0.125em 0 color-mix(in srgb, currentColor 25%, black),
    0.25em 0.125em 0 color-mix(in srgb, currentColor 25%, black);
}
.mc-i { font-style: italic; }
.mc-u { text-decoration: underline; text-decoration-thickness: 0.125em; text-underline-offset: 0.125em; }
.mc-s { text-decoration: line-through; text-decoration-thickness: 0.125em; }
.mc-u.mc-s { text-decoration-line: underline line-through; }

.name-count { color: var(--ink-faint); text-shadow: none; }
.name-count.bad { color: #ff6b5b; }
.name-hint { margin: 10px 0 0; color: var(--ink-faint); }
.code {
  display: inline-block;
  padding: 0 4px;
  background: #0b131d;
  border: 2px solid #1f3043;
  color: #9fd8ff;
}

.maker { padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.maker-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.maker-preset { width: auto; height: 32px; }
.maker-block { display: flex; flex-direction: column; gap: 8px; }
.maker-inline { flex-direction: row; align-items: center; justify-content: space-between; }
.maker-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.maker-actions { display: inline-flex; gap: 12px; }
.stops { display: flex; flex-direction: column; gap: 6px; }
.stop { display: grid; grid-template-columns: 36px 1fr 30px; gap: 8px; align-items: center; }
.stop-pick {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid #000;
  background: none;
  cursor: pointer;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.35), inset -2px -2px 0 rgba(0, 0, 0, 0.35);
}
.stop-pick::-webkit-color-swatch-wrapper { padding: 0; }
.stop-pick::-webkit-color-swatch { border: 0; }
.stop-pick::-moz-color-swatch { border: 0; }
.stop-hex { height: 36px; text-transform: uppercase; }
.stop-del {
  width: 30px;
  height: 30px;
  border: 0;
  background: url("assets/gui/cross_button.png") center / 30px 30px no-repeat;
  image-rendering: pixelated;
}
.stop-del:hover { background-image: url("assets/gui/cross_button_highlighted.png"); }
.stop-del:disabled { opacity: 0.25; cursor: default; }
.fmt-row { display: inline-flex; gap: 6px; }
.fmt {
  width: 40px;
  height: 36px;
  border: 2px solid #2b3a4a;
  background: #0f1822;
  color: #8195a8;
}
.fmt:hover { border-color: #52708e; color: #fff; }
.fmt.on { background: #0b4f69; border-color: var(--accent); color: #fff; }
.maker-preview {
  position: relative;
  min-height: 44px;
  padding: 12px 12px 10px;
  background: rgba(16, 0, 16, 0.94);
  clip-path: polygon(2px 0, calc(100% - 2px) 0, calc(100% - 2px) 2px, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 2px calc(100% - 2px), 0 calc(100% - 2px), 0 2px, 2px 2px);
  overflow-wrap: anywhere;
  line-height: 20px;
}
.maker-preview::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid transparent;
  border-image: linear-gradient(rgba(80, 0, 255, 0.31), rgba(40, 0, 127, 0.31)) 1;
  pointer-events: none;
}
.maker-placeholder { color: #555; }
.maker-format { width: auto; height: 32px; max-width: 190px; }
.maker-output { height: auto; min-height: 76px; resize: none; font-size: 16px; line-height: 18px; padding: 8px 10px; overflow-wrap: anywhere; color: #cfe0ee; }
.maker-meta { display: flex; justify-content: space-between; align-items: center; color: var(--ink-faint); }
.maker-meta .bad, #makerCount.bad { color: #ff6b5b; }
.maker-apply { width: 100%; }
.maker-note { margin: -6px 0 0; color: var(--ink-faint); text-align: center; }

@media (max-width: 1399px) {
  .layout { grid-template-columns: auto auto; }
  .col-side { grid-column: 2; }
  .inspector, .maker { width: calc(176 * var(--k)); }
}

@media (max-width: 1019px) {
  :root { --k: 2px; }
  .layout { grid-template-columns: auto; justify-items: center; }
  .col-left { order: 2; }
  .col-main { order: 1; }
  .col-side { order: 1; grid-column: auto; }
  .col { align-items: center; }
  .inspector, .actions, .maker { width: calc(195 * var(--u)); }
  .actions { grid-template-columns: 1fr; }
  .action-buttons > * { flex: 1; }
  .inspector.empty { display: none; }
}

@media (max-width: 440px) {
  .page { padding: 0 10px 30px; }
  .top { padding: 16px 0 20px; flex-wrap: wrap; }
  .server-chip { flex: 1 1 100%; justify-content: center; }
  .brand-name { font-size: 24px; line-height: 24px; text-shadow: 3px 3px 0 #003342; }
  .brand-sub { font-size: 16px; }
  .actions { grid-template-columns: 1fr; }
  .action-buttons .mc-btn, .action-buttons .go-btn { flex: 1; }
  .modal-row { grid-template-columns: 1fr; }
  .toasts { left: 10px; right: 10px; }
  .toast { width: auto; }
}

@media (max-width: 380px) {
  :root { --u: 1.75px; --k: 1.75px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
