/* Minecraft container screen, redrawn from what the server really sent. Light "chest" panel is the game's own look. */
.mcg-wrap { overflow-x: auto; padding: 4px 2px 10px; }
.mcgui { --s: 46px; display: inline-block; background: #C6C6C6; padding: 8px 8px 10px; border-radius: 3px; image-rendering: pixelated;
  box-shadow: inset 3px 3px 0 #fff, inset -3px -3px 0 #555, 0 0 0 2px #000, 0 18px 50px rgba(0, 0, 0, .55); user-select: none; }
.mcgui-title { font: 600 .9rem/1 var(--mono, ui-monospace, monospace); color: #404040; padding: 2px 2px 7px; min-height: 18px; white-space: nowrap; }
.mcgui-inv-t { padding-top: 12px; }
.mcgui-grid { display: grid; width: max-content; }
.mcgui-hotbar { margin-top: 4px; }
.mcg-slot { position: relative; width: var(--s); height: var(--s); box-sizing: border-box; background: #8B8B8B;
  box-shadow: inset 1px 1px 0 #373737, inset -1px -1px 0 #fff; display: grid; place-items: center; outline: none; }
.mcg-slot[tabindex]:hover, .mcg-slot[tabindex]:focus-visible { background: #a6a6c8; box-shadow: inset 1px 1px 0 #373737, inset -1px -1px 0 #fff, inset 0 0 0 2px rgba(255, 255, 255, .55); }
.mcg-ico { width: 38px; height: 38px; display: grid; place-items: center; }
.mcg-img { width: 38px; height: 38px; image-rendering: pixelated; pointer-events: none; }
.mcg-fb { width: 32px; height: 32px; border-radius: 4px; display: grid; place-items: center; color: #fff; font: 700 .9rem var(--mono, monospace); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.mcg-n { position: absolute; right: 2px; bottom: 0; font: 700 .9rem/1 var(--mono, monospace); color: #fff; text-shadow: 2px 2px 0 #3f3f3f; pointer-events: none; }
.glint::after { content: ""; position: absolute; inset: 2px; pointer-events: none; mix-blend-mode: color-dodge; opacity: .55;
  background: linear-gradient(115deg, transparent 30%, rgba(170, 110, 255, .9) 48%, transparent 66%); background-size: 250% 100%; animation: mcg-glint 3.2s linear infinite; }
@keyframes mcg-glint { from { background-position: 150% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .glint::after { animation: none; } }

.mcg-tip { position: fixed; z-index: 1000; max-width: min(420px, 92vw); pointer-events: none; padding: 6px 9px 7px;
  background: rgba(16, 0, 16, .96); border: 2px solid; border-color: #3a0a8a #25065a #25065a #3a0a8a; border-radius: 3px;
  font: .8rem/1.38 var(--mono, ui-monospace, monospace); color: #fff; box-shadow: 0 8px 28px rgba(0, 0, 0, .55); }
.mcg-tip[hidden] { display: none; }
.mcg-tip-t { font-size: .86rem; margin-bottom: 2px; }
.mcg-tip-l { white-space: pre-wrap; overflow-wrap: anywhere; }

/* 1.21.6+ dialog screen */
.mcdlg { width: min(100%, 560px); background: #1d1d1f; border: 2px solid #000; box-shadow: inset 0 0 0 1px #4a4a4e, 0 18px 50px rgba(0, 0, 0, .55); border-radius: 2px; color: #fff; font: .92rem/1.45 var(--mono, ui-monospace, monospace); user-select: none; }
.mcdlg-title { text-align: center; padding: 14px 16px 12px; font-weight: 700; font-size: 1.05rem; border-bottom: 2px solid #000; box-shadow: 0 1px 0 #3a3a3e; background: rgba(255, 255, 255, .03); }
.mcdlg-main { padding: 14px 18px 6px; display: grid; gap: 10px; max-height: 60vh; overflow: auto; }
.mcdlg-p { white-space: pre-wrap; overflow-wrap: anywhere; }
.mcdlg-item { display: flex; gap: 12px; align-items: center; }
.mcdlg-in { display: flex; align-items: center; gap: 10px; min-height: 30px; }
.mcdlg-in.col { flex-direction: column; align-items: stretch; gap: 4px; }
.mcdlg-box { width: 22px; height: 22px; flex: none; background: #000; border: 2px solid #a0a0a0; display: grid; place-items: center; font-size: .9rem; color: #fff; }
.mcdlg-box.on { border-color: #fff; }
.mcdlg-text { background: #000; border: 2px solid #a0a0a0; padding: 5px 8px; min-height: 30px; color: #e0e0e0; }
.mcdlg-slider { position: relative; flex: 1; height: 30px; background: #000; border: 2px solid #a0a0a0; display: grid; align-items: center; overflow: hidden; }
.mcdlg-slider i { position: absolute; left: 0; top: 0; bottom: 0; background: #3a3a3e; }
.mcdlg-sl-t { position: relative; text-align: center; text-shadow: 2px 2px 0 #3f3f3f; }
.mcdlg-foot { display: grid; gap: 6px; padding: 12px 18px 16px; }
.mcdlg-btn { background: #6e6e72; color: #fff; text-align: center; padding: 7px 10px; min-height: 32px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; border: 2px solid #000;
  box-shadow: inset 2px 2px 0 #a6a6aa, inset -2px -2px 0 #4a4a4e; text-shadow: 2px 2px 0 #3f3f3f; cursor: default; overflow-wrap: anywhere; }
.mcdlg-btn:hover { background: #7c7c92; box-shadow: inset 0 0 0 2px #fff; }
.mcdlg-btn.wide { width: 100%; }
@media (max-width: 520px) { .mcdlg-foot { grid-template-columns: 1fr !important; } }

.mcg-chat { background: #0d0c19; border: 1px solid var(--border-2, #2a2745); border-radius: 10px; padding: 14px 16px; font: .84rem/1.5 var(--mono, monospace); }
.mcg-chat-h { color: var(--muted, #9a98b4); margin-bottom: 8px; }
.mcg-chat-l { color: #e9e7ff; white-space: pre-wrap; overflow-wrap: anywhere; }

.menus-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.menus-bar .input { max-width: 200px; }
.menus-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0 0 12px; font-size: .82rem; color: var(--muted, #9a98b4); }
.menus-empty { padding: 36px 16px; text-align: center; color: var(--muted, #9a98b4); border: 1px dashed var(--border-2, #2a2745); border-radius: 12px; }
@media (max-width: 520px) { .mcgui { --s: 34px; } .mcg-ico, .mcg-img { width: 28px; height: 28px; } .mcg-fb { width: 24px; height: 24px; } .menus-bar .input { max-width: none; flex: 1 1 140px; } }

/* live controls */
.mcg-slot.use { cursor: pointer; } .mcg-slot.use:active { background: #b4b4d6; }
.mcg-wrap.busy { opacity: .6; pointer-events: none; transition: opacity .15s; }
button.mcdlg-box { cursor: pointer; padding: 0; font-family: inherit; } button.mcdlg-box:hover { border-color: #fff; }
.mcdlg-in.bool .mcdlg-lab { cursor: pointer; }
button.mcdlg-btn { font: inherit; cursor: pointer; } button.mcdlg-btn:disabled { cursor: default; opacity: .9; }
button.mcdlg-btn:active:not(:disabled) { background: #5b5b60; }
input.mcdlg-text, textarea.mcdlg-text { font: inherit; width: 100%; box-sizing: border-box; outline: none; } input.mcdlg-text:focus, textarea.mcdlg-text:focus { border-color: #fff; }
.mcdlg-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.mcdlg-slider:focus-within { border-color: #fff; }
.menus-say { margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--border-2, #2a2745); border-left: 3px solid var(--accent, #8460F0); border-radius: 8px; font: .84rem/1.5 var(--mono, monospace); background: rgba(132, 96, 240, .06); }
.menus-say b { display: block; font: 600 .7rem var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #9a98b4); margin-bottom: 4px; }

/* durability bar, enchant lines, skull skins */
.mcg-dur { position: absolute; left: 14%; right: 14%; bottom: 3px; height: 3px; background: #000; pointer-events: none; }
.mcg-dur i { display: block; height: 100%; }
.mcg-skin { image-rendering: pixelated; }
.mcg-ench { color: #AAAAAA; }

/* the game's inventory screen (176 x 166 units) */
.mcinv { --k: 2.6; --s: calc(18px * var(--k)); position: relative; width: calc(176px * var(--k)); height: calc(166px * var(--k)); background: #C6C6C6; border-radius: 3px; image-rendering: pixelated;
  box-shadow: inset 3px 3px 0 #fff, inset -3px -3px 0 #555, 0 0 0 2px #000, 0 18px 50px rgba(0, 0, 0, .55); user-select: none; }
.mcinv .mcinv-s { position: absolute; }
.mcinv .mcg-ico, .mcinv .mcg-img { width: calc(16px * var(--k)); height: calc(16px * var(--k)); }
.mcinv .mcg-fb { width: calc(13px * var(--k)); height: calc(13px * var(--k)); }
.mcinv .mcg-n { font-size: calc(7px * var(--k)); text-shadow: 1px 1px 0 #3f3f3f; }
.mcinv-player { position: absolute; left: calc(26px * var(--k)); top: calc(8px * var(--k)); width: calc(49px * var(--k)); height: calc(70px * var(--k)); background: #000; box-shadow: inset 1px 1px 0 #373737, inset -1px -1px 0 #fff; display: grid; place-items: center; overflow: hidden; }
.mcinv-player img { height: 96%; width: auto; image-rendering: auto; }
.mcinv-lab { position: absolute; left: calc(97px * var(--k)); top: calc(7px * var(--k)); font: 600 calc(7px * var(--k)) var(--mono, monospace); color: #404040; }
.mcinv-arrow { position: absolute; left: calc(135px * var(--k)); top: calc(26px * var(--k)); font-size: calc(14px * var(--k)); color: #8B8B8B; line-height: 1; }
.mcinv-s.result { }
@media (max-width: 560px) { .mcinv { --k: 1.7; } }
.inv-sec { margin: 0 0 22px; }
.inv-sec h3 { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #9a98b4); margin: 0 0 10px; font-weight: 600; }
