/* Minecraft-inspired tool surface */
@font-face {
	font-family: "Minecraft Ten";
	src: url("../fonts/minecraft-ten.ttf") format("truetype");
	font-display: swap;
}

@font-face {
	font-family: "Minecraftia";
	src: url("../fonts/minecraft.otf") format("opentype");
	font-display: swap;
}

:root {
	--bedrock-bg: #060606;
	--stone-100: #f1f1f1;
	--stone-200: #d6d6d6;
	--stone-300: #bcbcbc;
	--stone-400: #929292;
	--stone-500: #686868;
	--stone-600: #3d3d3d;
	--stone-700: #242424;
	--stone-800: #151515;
	--ink: #161616;
	--text-primary: #202020;
	--text-secondary: #5f5f5f;
	--panel: #c6c6c6;
	--panel-raised: #d8d8d8;
	--field: #5c5c5c;
	--field-dark: #333333;
	--accent: #4aa352;
	--accent-hover: #65bd69;
	--accent-soft: rgba(74, 163, 82, 0.2);
	--gold: #e1c16e;
	--danger: #b33c35;
	--border-dark: #191919;
	--border-light: rgba(255, 255, 255, 0.52);
	--button-bg: #d0d1d4;
	--button-hover-bg: #b1b2b5;
	--button-text: #58585a;
	--button-outline: #1e1e1f;
	--button-highlight: #ecedee;
	--button-highlight-strong: #f4f4f5;
	--button-shadow: #58585a;
	--ui-container-border: url("../ui/container.png");
	--ui-button-border: url("../ui/normal_button.png");
	--ui-button-hover-border: url("../ui/normal_button_hover.png");
	--ui-button-active-border: url("../ui/normal_button_active.png");
	--ui-input-border: url("../ui/input2.png");
	--ui-cell-border: url("../ui/cell_image.png");
	--ui-cell-selected-border: url("../ui/cell_image_selected.png");
	--font-title: "Minecraft Ten", Impact, "Arial Black", Consolas, monospace;
	--font-body: "Minecraftia", Consolas, "Lucida Console", "Courier New", monospace;
	--minecraft-panel-shadow: inset 3px 3px 0 #eeeeee,
		inset -3px -3px 0 #727272;
	--minecraft-control-shadow: inset 2px 2px 0 var(--button-highlight),
		inset -1px -1px 0 var(--button-shadow);
	--minecraft-pressed-shadow: inset 1px 1px 0 var(--button-shadow),
		inset -1px -1px 0 var(--button-highlight);
	--radius-card: 0;
	--radius-input: 0;
	--transition: 120ms ease;
}

.dark-mode {
	--panel: #b9b9b9;
	--panel-raised: #cdcdcd;
	--field: #3f3f3f;
	--field-dark: #202020;
	--accent: #5fbf69;
	--accent-hover: #80d385;
	--text-primary: #171717;
	--text-secondary: #555555;
}

* {
	box-sizing: border-box;
	scrollbar-width: thin;
	scrollbar-color: #5f5f5f #252525;
}

html,
body {
	min-height: 100%;
	margin: 0;
}

body {
	color: var(--text-primary);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.45;
	background-color: var(--bedrock-bg);
	background-image:
		linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
		url("../ui/bedrock.png");
	background-size: 160px 160px, 160px 160px;
	image-rendering: pixelated;
	overflow-x: hidden;
	animation: moveBackground 100s linear infinite;
}

@keyframes moveBackground {
	0% {
		background-position: 0 0;
	}

	100% {
		background-position: 100vw 0;
	}
}

body::before {
	content: none;
}

img,
picture,
video,
canvas {
	max-width: 100%;
	height: auto;
	display: block;
}

button,
input,
select,
textarea {
	font: inherit;
}

button,
[role="button"],
.btn,
.dropdown-toggle,
.dropdown-item,
.app-container a,
.modal a,
.drawer-redirect-overlay a,
.app-container h1,
.app-container h2,
.app-container h3,
.modal h1,
.modal h2,
.modal h3,
.modal h4,
.modal h5,
.drawer-redirect-overlay h1,
.drawer-redirect-overlay h2,
.drawer-redirect-overlay h3,
.drawer-redirect-overlay h4,
.drawer-redirect-overlay h5,
.app-container label,
.modal label,
.app-container p,
.modal p,
.drawer-redirect-overlay p,
.app-container small,
.modal small,
.drawer-redirect-overlay small,
.app-container span,
.modal span,
.drawer-redirect-overlay span,
.title-kicker,
.alert,
.replace-label,
.zoom-info,
.vanilla-name,
.glyph-preview-char,
.action-toast,
.footer-links a,
.mobile-nav-card a,
.hint-link,
.detail-field,
.vanilla-tile,
#glyph-output > div {
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	user-select: none;
}

button,
button *,
[role="button"],
[role="button"] *,
.btn,
.btn *,
.dropdown-item,
.dropdown-item *,
.detail-field,
.detail-field *,
.vanilla-tile,
.vanilla-tile * {
	-webkit-user-select: none !important;
	user-select: none !important;
}

button::selection,
button *::selection,
[role="button"]::selection,
[role="button"] *::selection,
.btn::selection,
.btn *::selection,
.dropdown-item::selection,
.dropdown-item *::selection,
.detail-field::selection,
.detail-field *::selection,
.vanilla-tile::selection,
.vanilla-tile *::selection {
	color: inherit;
	background: transparent;
}

button:focus,
button:focus-visible,
.btn:focus,
.btn:focus-visible,
.dropdown-item:focus,
.dropdown-item:focus-visible {
	outline: none !important;
	box-shadow: none !important;
}

.font-monospace {
	font-family: var(--font-body) !important;
}

::-webkit-scrollbar {
	width: 14px;
	height: 14px;
	background-color: #242424;
}

::-webkit-scrollbar-track {
	background-color: #242424;
	border: 2px solid #111111;
}

::-webkit-scrollbar-thumb {
	background-color: #5d5d5d;
	border: 2px solid #202020;
	box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.22),
		inset -2px -2px 0 rgba(0, 0, 0, 0.32);
}

::-webkit-scrollbar-thumb:hover {
	background-color: #757575;
}

.app-container {
	position: relative;
	z-index: 1;
	width: min(1220px, calc(100% - 40px));
	margin: 20px auto;
	padding: 12px;
	background: transparent;
	border: 8px solid transparent;
	border-image-source: var(--ui-container-border);
	border-image-slice: 4 4 4 4 fill;
	border-image-width: 8px;
	border-image-repeat: stretch;
	border-radius: var(--radius-card);
	box-shadow: none;
}

.header-bar {
	position: relative;
	min-height: 112px;
	display: grid;
	place-items: center;
	padding: 12px 58px 16px;
	margin-bottom: 12px;
	background: #b7b7b7;
	border: 3px solid #1f1f1f;
	border-radius: var(--radius-card);
	box-shadow: var(--minecraft-panel-shadow);
}

/* NOTE: Header/title cluster is temporarily hidden per request. Remove this block to show it again. */
.header-bar,
.mobile-nav {
	display: none !important;
}

.title-container {
	text-align: center;
}

.title-kicker {
	color: #4f4f4f;
	font-size: 0.8rem;
	font-weight: 900;
	text-transform: uppercase;
	text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.52);
}

.title-text {
	display: inline-flex;
	align-items: flex-end;
	justify-content: center;
	gap: 12px;
	margin: 0;
	color: #eeeeee;
	font-family: var(--font-title);
	font-size: 3.65rem;
	font-weight: 900;
	line-height: 0.95;
	letter-spacing: 0;
	text-transform: uppercase;
	text-shadow:
		3px 3px 0 #1a1a1a,
		6px 6px 0 #4c4c4c,
		8px 8px 0 rgba(0, 0, 0, 0.42);
	-webkit-text-stroke: 2px #171717;
}

.title-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 8px;
	padding: 5px 8px 4px;
	color: #142116;
	background: var(--accent);
	border: 3px solid #151515;
	border-radius: var(--radius-input);
	box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.48),
		inset -2px -2px 0 rgba(0, 0, 0, 0.3),
		0 3px 0 rgba(0, 0, 0, 0.38);
	font-family: var(--font-body);
	font-size: 1.25rem;
	line-height: 1;
	text-shadow: none;
	-webkit-text-stroke: 0;
}

.subtitle-text {
	margin: 8px 0 0;
	color: #3c3c3c;
	font-size: 0.95rem;
	font-weight: 800;
	text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.58);
}

.header-actions {
	position: absolute;
	top: 12px;
	right: 12px;
	display: flex;
	gap: 8px;
}

.tool-deck {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
	gap: 12px;
	margin-bottom: 12px;
}

.app-card {
	position: relative;
	padding: 10px;
	color: var(--text-primary);
	background: transparent;
	border: 8px solid transparent;
	border-image-source: var(--ui-container-border);
	border-image-slice: 4 4 4 4 fill;
	border-image-width: 8px;
	border-image-repeat: stretch;
	border-radius: var(--radius-card);
	box-shadow: none;
	overflow: hidden;
}

.app-card::after {
	content: none;
}

.tool-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.panel-heading,
.atlas-header,
.atlas-title-group {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.panel-heading {
	justify-content: space-between;
	min-height: 34px;
	padding-bottom: 8px;
	border-bottom: 2px solid rgba(0, 0, 0, 0.18);
}

.panel-heading h2,
.atlas-title-group h2,
.modal-title {
	margin: 0;
	color: #2f2f2f;
	font-family: var(--font-title);
	font-size: 1.35rem;
	font-weight: 900;
	letter-spacing: 0;
	text-transform: uppercase;
	text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.55);
}

.tool-grid,
.converter-grid {
	display: grid;
	flex: 1;
	gap: 10px;
}

.tool-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-template-rows: auto minmax(50px, 1fr);
	column-gap: 8px;
}

.hex-field {
	grid-column: 1;
}

.upload-field {
	grid-column: 2 / 4;
}

.converter-grid {
	align-content: space-between;
}

.preset-actions {
	grid-column: 1 / -1;
	align-self: end;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 8px;
	row-gap: 6px;
}

.preset-label {
	grid-column: 1 / -1;
}

.field-block {
	display: grid;
	gap: 6px;
	min-width: 0;
}

.detail-text,
.form-label {
	margin: 0;
	color: #383838;
	font-size: 0.78rem;
	font-weight: 900;
	letter-spacing: 0;
	text-transform: uppercase;
}

.text-primary {
	color: var(--accent) !important;
}

.text-secondary,
.small,
small {
	color: var(--text-secondary) !important;
}

.text-danger {
	color: var(--danger) !important;
	font-weight: 900;
}

.app-input,
.modal .form-control,
.modal .form-select {
	width: 100%;
	min-height: 44px;
	padding: 6px;
	color: #c6c6c6;
	background: transparent;
	border-width: 4px 3px;
	border-style: solid;
	border-image-source: var(--ui-input-border);
	border-image-slice: 2 1 2 1 fill;
	border-image-repeat: stretch;
	border-radius: var(--radius-input);
	outline: none;
	box-shadow: none;
	transition: filter var(--transition);
}

.app-input::placeholder,
.modal .form-control::placeholder {
	color: #c4c4c4;
	opacity: 0.78;
}

.app-input:hover,
.modal .form-control:hover,
.modal .form-select:hover {
	filter: brightness(1.08);
}

.app-input:focus,
.modal .form-control:focus,
.modal .form-select:focus {
	color: #ffffff;
	filter: brightness(1.12);
}

.output-wrapper .app-input {
	padding-right: 76px;
}

.upload-zone {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 44px;
	padding: 6px;
	color: #c6c6c6;
	background: transparent;
	border-width: 4px 3px;
	border-style: solid;
	border-image-source: var(--ui-input-border);
	border-image-slice: 2 1 2 1 fill;
	border-image-repeat: stretch;
	border-radius: var(--radius-input);
	box-shadow: none;
	transition: filter var(--transition);
}

.upload-zone:hover {
	filter: brightness(1.08);
}

.upload-zone input {
	inset: 0;
	cursor: pointer;
}

.upload-zone-label,
.upload-zone-icon {
	position: relative;
	z-index: 1;
	pointer-events: none;
}

.upload-zone-label {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.upload-label-text {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: #eeeeee !important;
}

.hint-link {
	margin-top: 2px;
	font-size: 0.86rem;
	cursor: pointer;
	text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
}

.btn,
.minecraft-button {
	border-radius: var(--radius-input) !important;
}

.btn,
.icon-button,
.dropdown-item {
	position: relative;
	color: var(--button-text);
	background: transparent;
	border-width: 4px 4px 8px;
	border-style: solid;
	border-image-source: var(--ui-button-border);
	border-image-slice: 2 2 4 2 fill;
	border-image-repeat: stretch;
	box-shadow: none;
	font-weight: 900;
	line-height: 1.1;
	text-shadow: 1px 1px 0 #ffffff;
	transition: margin-top var(--transition), filter var(--transition);
}

.btn:hover,
.icon-button:hover,
.dropdown-item:hover,
.btn:focus,
.icon-button:focus,
.dropdown-item:focus {
	color: var(--button-text);
	background: transparent;
	border-image-source: var(--ui-button-hover-border);
	filter: none;
}

.btn:active,
.btn.active,
.btn.show,
.btn:first-child:active,
.btn-check:checked + .btn,
:not(.btn-check) + .btn:active,
.dropdown-toggle.show,
.dropdown-toggle[aria-expanded="true"],
.icon-button:active,
.dropdown-item:active {
	margin-top: 4px;
	color: var(--button-text);
	background: transparent;
	border-width: 4px;
	border-image-source: var(--ui-button-active-border);
	border-image-slice: 2 fill;
	box-shadow: none;
	transform: none;
}

.btn-primary,
.export-btn {
	color: #58585a;
	background: transparent;
	border-image-source: var(--ui-button-border);
}

.btn-primary:hover,
.export-btn:hover,
.btn-primary:focus,
.export-btn:focus {
	color: var(--button-text);
	background: transparent;
	border-image-source: var(--ui-button-hover-border);
}

.btn-outline-secondary,
.btn-secondary,
.btn-light {
	color: var(--button-text);
	background: transparent;
	border-image-source: var(--ui-button-border);
}

.btn-outline-danger {
	color: #7a2323;
	background: transparent;
	border-image-source: var(--ui-button-border);
	text-shadow: 1px 1px 0 #ffffff;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
	color: #7a2323;
	background: transparent;
	border-image-source: var(--ui-button-hover-border);
}

.btn:active,
.btn:active:hover,
.btn:active:focus,
.btn.active,
.btn.active:hover,
.btn.active:focus,
.btn.show,
.btn.show:hover,
.btn.show:focus,
.btn:first-child:active,
.btn-check:checked + .btn,
:not(.btn-check) + .btn:active,
.dropdown-toggle.show,
.dropdown-toggle.show:hover,
.dropdown-toggle.show:focus,
.dropdown-toggle[aria-expanded="true"],
.dropdown-toggle[aria-expanded="true"]:hover,
.dropdown-toggle[aria-expanded="true"]:focus,
.icon-button:active,
.icon-button:active:hover,
.icon-button:active:focus,
.dropdown-item:active,
.dropdown-item:active:hover,
.dropdown-item:active:focus {
	margin-top: 4px !important;
	color: var(--button-text) !important;
	background: transparent !important;
	border-width: 4px !important;
	border-image-source: var(--ui-button-active-border) !important;
	border-image-slice: 2 fill !important;
	box-shadow: none !important;
	transform: none !important;
}

#exportDropdown.show,
#exportDropdown.show:hover,
#exportDropdown.show:focus,
#exportDropdown[aria-expanded="true"],
#exportDropdown[aria-expanded="true"]:hover,
#exportDropdown[aria-expanded="true"]:focus {
	margin-top: 4px !important;
	border-width: 4px !important;
	border-image-source: var(--ui-button-active-border) !important;
	border-image-slice: 2 fill !important;
	box-shadow: none !important;
	transform: none !important;
}

.pill-action,
.grid-toggle {
	min-height: 50px;
	padding: 6px 12px;
	white-space: nowrap;
}

.grid-toggle .grid-toggle-label {
	white-space: nowrap;
}

.icon-button {
	width: 42px;
	height: 46px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	cursor: pointer;
}

.text-icon-button {
	width: auto;
	min-width: 58px;
	padding-inline: 10px;
}

.copy-button {
	right: 4px;
	top: 50%;
	width: 62px;
	height: 34px;
	border-width: 3px 3px 6px;
	transform: translateY(-50%);
	box-shadow: none;
}

.copy-button:hover {
	transform: translateY(-50%);
}

.copy-button:active {
	margin-top: 0;
	transform: translateY(calc(-50% + 3px));
}

.atlas-card {
	padding: 12px;
}

.atlas-header {
	justify-content: space-between;
	margin-bottom: 10px;
}

.atlas-info {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 6px;
	color: #c6c6c6 !important;
	background: transparent;
	border-width: 4px 3px;
	border-style: solid;
	border-image-source: var(--ui-input-border);
	border-image-slice: 2 1 2 1 fill;
	border-image-repeat: stretch;
	border-radius: var(--radius-input);
	box-shadow: none;
}

.atlas-body {
	/* The border texture has transparent corner pixels; this backing color keeps the panel below from showing through. */
	background: #1e1e1f;
	border: 8px solid transparent;
	border-image-source: var(--ui-container-border);
	border-image-slice: 4 4 4 4 fill;
	border-image-width: 8px;
	border-image-repeat: stretch;
	border-radius: var(--radius-input);
	box-shadow: none;
	padding: 6px;
}

#glyph-output {
	--glyph-columns: 16;
	display: grid;
	grid-template-columns: repeat(var(--glyph-columns), minmax(40px, 1fr));
	gap: 3px;
	width: 100%;
	overflow-x: auto;
	padding: 0;
	background: transparent;
}

#glyph-output div {
	position: relative;
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	color: rgba(255, 255, 255, 0.62);
	font-size: 1.05rem;
	font-weight: 900;
	text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.55);
	background-color: #8d8d8d;
	background-repeat: no-repeat;
	background-position: center;
	image-rendering: pixelated;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 0;
	cursor: pointer;
	transition: transform var(--transition), background-color var(--transition), border-color var(--transition);
}

#glyph-output div:nth-child(even) {
	background-color: #828282;
}

#glyph-output div:hover {
	z-index: 5;
	transform: scale(1.06);
	background-color: #a0a0a0 !important;
	border-color: rgba(255, 255, 255, 0.72);
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.38);
}

#glyph-output div.transparent {
	background-color: #636363;
	background-image:
		linear-gradient(45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.1) 75%),
		linear-gradient(45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.1) 75%);
	background-size: 12px 12px;
	background-position: 0 0, 6px 6px;
	border-style: dashed;
}

#glyph-output div[style*="background-image"] {
	border-radius: 0 !important;
}

#glyph-output div[style*="background-image"]:hover {
	border-radius: 0 !important;
}

.dropdown-menu {
	padding: 6px;
	color: #1e1e1e;
	background: transparent;
	border: 8px solid transparent;
	border-image-source: var(--ui-container-border);
	border-image-slice: 4 4 4 4 fill;
	border-image-width: 8px;
	border-image-repeat: stretch;
	border-radius: var(--radius-card) !important;
	box-shadow: none;
}

.dropdown-item {
	display: flex;
	align-items: center;
	gap: 4px;
	width: calc(100% - 4px);
	margin: 2px;
	border-width: 4px 4px 8px;
	box-shadow: none;
	white-space: normal;
	overflow-wrap: anywhere;
}

.dropdown-divider {
	border-color: rgba(0, 0, 0, 0.28);
}

.rounded-alert,
.alert {
	border-radius: var(--radius-input) !important;
	border: 8px solid transparent;
	border-image-source: var(--ui-container-border);
	border-image-slice: 4 4 4 4 fill;
	border-image-width: 8px;
	border-image-repeat: stretch;
	box-shadow: none;
	font-size: 0.9rem;
	font-weight: 900;
}

.alert-success {
	color: #102114;
	background: #76c873;
}

.alert-danger {
	color: #f7eeee;
	background: #a53a36;
}

.alert-warning {
	color: #2e220b;
	background: #d7b55c;
}

.mobile-alert {
	display: none !important;
}

.footer-links {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px;
	margin: 18px 0 4px;
}

.footer-links a,
.mobile-nav-card a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 6px 12px;
	color: var(--button-text);
	text-decoration: none;
	font-weight: 900;
	background: transparent;
	border-width: 4px 4px 8px;
	border-style: solid;
	border-image-source: var(--ui-button-border);
	border-image-slice: 2 2 4 2 fill;
	border-image-repeat: stretch;
	border-radius: var(--radius-input);
	text-shadow: 1px 1px 0 #ffffff;
}

.footer-links a:hover,
.mobile-nav-card a:hover {
	color: var(--button-text);
	border-image-source: var(--ui-button-hover-border);
}

.mobile-nav-card {
	display: grid;
	gap: 8px;
	margin-bottom: 12px;
}

.toast-layer {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 0;
	z-index: 2147483647;
	overflow: visible;
	pointer-events: none;
	isolation: isolate;
}

.action-toast {
	position: absolute;
	top: 12px;
	left: 50%;
	z-index: 1;
	padding: 9px 12px;
	color: #eeeeee;
	background: transparent;
	border-width: 4px 3px;
	border-style: solid;
	border-image-source: var(--ui-input-border);
	border-image-slice: 2 1 2 1 fill;
	border-image-repeat: stretch;
	border-radius: var(--radius-input);
	box-shadow: none;
	font-size: 0.8rem;
	font-weight: 900;
	line-height: 1.25;
	text-align: center;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	transform: translate(-50%, -8px);
	transition: opacity var(--transition), transform var(--transition);
}

.action-toast.visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

.action-toast.success {
	color: #102114;
	background: var(--accent);
}

.zoom-window {
	padding: 10px;
	background: transparent;
	border: 8px solid transparent;
	border-image-source: var(--ui-container-border);
	border-image-slice: 4 4 4 4 fill;
	border-image-width: 8px;
	border-image-repeat: stretch;
	border-radius: var(--radius-input);
	box-shadow: none;
}

.zoom-window canvas {
	display: block;
	image-rendering: pixelated;
	border-radius: 0;
}

.zoom-window .zoom-info {
	margin-top: 8px;
	color: #252525;
	font-size: 13px;
	font-weight: 900;
	text-align: center;
}

/* Modals */
.modal-content {
	position: relative;
	color: var(--text-primary);
	background: transparent;
	border: 8px solid transparent !important;
	border-image-source: var(--ui-container-border) !important;
	border-image-slice: 4 4 4 4 fill !important;
	border-image-width: 8px !important;
	border-image-repeat: stretch !important;
	border-radius: var(--radius-card) !important;
	box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.46);
}

.modal-header,
.modal-footer {
	border-color: rgba(0, 0, 0, 0.24);
}

.modal-header {
	background: #b8b8b8;
	box-shadow: none;
}

.modal-title {
	color: #343434;
}

.modal-close-btn {
	width: 44px;
	min-width: 44px;
	min-height: 44px;
	padding: 0;
}

.detail-modal {
	overflow: hidden;
}

.detail-notice {
	width: 100%;
	min-height: 58px;
	margin-top: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px 12px;
	color: #2f2f2f;
	background: transparent;
	border-width: 4px 4px 8px;
	border-style: solid;
	border-image-source: var(--ui-button-border);
	border-image-slice: 2 2 4 2 fill;
	border-image-repeat: stretch;
	border-radius: var(--radius-input);
	font-size: 0.84rem;
	font-weight: 900;
	line-height: 1.25;
	text-align: center;
	white-space: normal;
	overflow-wrap: anywhere;
	pointer-events: none;
	opacity: 0;
	text-shadow: 1px 1px 0 #ffffff;
	transform: translateY(-4px);
	transition: opacity var(--transition), transform var(--transition);
}

.detail-notice.visible {
	opacity: 1;
	transform: translateY(0);
}

.detail-notice.error {
	color: #7a2323;
}

.detail-body {
	padding: 16px;
}

.detail-footer {
	padding: 12px 16px 16px;
	background: #bfbfbf;
	border-top: 2px solid rgba(0, 0, 0, 0.18);
}

.detail-preview-col {
	display: flex;
	align-items: stretch;
	align-self: stretch;
	height: auto;
}

.detail-preview {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 340px;
	margin: 0 auto;
	padding: 14px;
	background: #777777;
	border: 8px solid transparent;
	border-image-source: var(--ui-container-border);
	border-image-slice: 4 4 4 4 fill;
	border-image-width: 8px;
	border-image-repeat: stretch;
	border-radius: var(--radius-input);
	box-shadow: none;
}

.detail-preview.transparent-state::before {
	content: "";
	position: absolute;
	inset: 14px;
	z-index: 0;
	pointer-events: none;
	background-size: 16px 16px;
	background-image:
		linear-gradient(45deg, rgba(0, 0, 0, 0.16) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.16) 75%),
		linear-gradient(45deg, rgba(0, 0, 0, 0.16) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.16) 75%);
	background-position: 0 0, 8px 8px;
}

.glyph-preview-img {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	max-width: 320px;
	max-height: 360px;
	object-fit: contain;
	image-rendering: pixelated;
	border: none;
	border-radius: 0;
	background: transparent;
}

.glyph-preview-char {
	padding: 20px 0;
	color: #f0f0f0;
	font-size: 4rem;
	font-weight: 900;
	text-shadow: 2px 2px 0 #111111;
}

.preview-download-btn {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	width: auto;
	min-width: 86px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 8px;
	color: #252525;
	background: transparent;
	border-width: 4px 4px 8px;
	border-style: solid;
	border-image-source: var(--ui-button-border);
	border-image-slice: 2 2 4 2 fill;
	border-image-repeat: stretch;
	border-radius: var(--radius-input);
	box-shadow: none;
}

.preview-download-btn:hover {
	background: transparent;
	border-image-source: var(--ui-button-hover-border);
}

.replace-preview {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	align-items: start;
}

.replace-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 10px;
	background: transparent;
	border: 8px solid transparent;
	border-image-source: var(--ui-container-border);
	border-image-slice: 4 4 4 4 fill;
	border-image-width: 8px;
	border-image-repeat: stretch;
	border-radius: var(--radius-input);
}

.replace-label {
	color: #eeeeee;
	font-size: 0.8rem;
	font-weight: 900;
	text-transform: uppercase;
}

.replace-preview .glyph-preview-img {
	width: 150px;
	height: 150px;
}

.detail-actions {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
	width: 100%;
	align-items: stretch;
}

.detail-actions .btn {
	min-width: 0;
	min-height: 46px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding-inline: 8px;
	text-align: center;
	white-space: normal;
	overflow-wrap: anywhere;
}

.detail-meta {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	border: none;
	padding-left: 0;
}

.detail-meta .list-group-item {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 8px;
	min-height: 58px;
	padding: 8px 10px;
	color: #eeeeee;
	background: transparent;
	border-width: 4px 3px;
	border-style: solid;
	border-image-source: var(--ui-input-border);
	border-image-slice: 2 1 2 1 fill;
	border-image-repeat: stretch;
	border-radius: var(--radius-input) !important;
	box-shadow: none;
}

.detail-meta .list-group-item .text-secondary {
	color: #cfcfcf !important;
	font-size: 0.75rem;
	font-weight: 900;
	text-transform: uppercase;
}

.detail-meta .fw-bold {
	color: #ffffff;
	font-size: 0.96rem;
}

.private-use-placeholder {
	font-family: "Segoe UI Symbol", "Arial Unicode MS", sans-serif;
	font-size: 1.2rem !important;
	line-height: 1;
}

.detail-field {
	cursor: pointer;
	transition: border-color var(--transition), background-color var(--transition);
}

.detail-field:hover {
	background: #686868;
	border-color: var(--accent);
}

.detail-value {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
	min-width: 0;
	white-space: nowrap;
}

.detail-copy-text {
	color: var(--gold);
	font-size: 0.72rem;
	font-weight: 900;
	opacity: 0.88;
}

.list-group-item {
	background: transparent;
	border-color: rgba(0, 0, 0, 0.2);
}

.vanilla-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
	gap: 8px;
	max-height: 480px;
	overflow-y: auto;
	padding: 6px;
	background: #777777;
	border: 8px solid transparent;
	border-image-source: var(--ui-container-border);
	border-image-slice: 4 4 4 4 fill;
	border-image-width: 8px;
	border-image-repeat: stretch;
	border-radius: var(--radius-input);
}

.vanilla-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	min-height: 96px;
	padding: 8px;
	color: #eeeeee;
	background: transparent;
	border: 2px solid transparent;
	border-image-source: var(--ui-cell-border);
	border-image-slice: 2 2 4 2 fill;
	border-image-repeat: stretch;
	border-radius: var(--radius-input);
	cursor: pointer;
	box-shadow: none;
	transition: transform var(--transition), border-color var(--transition), background-color var(--transition);
}

.vanilla-tile:hover {
	transform: translateY(-2px);
	background: transparent;
	border-image-source: var(--ui-cell-selected-border);
}

.vanilla-tile img {
	width: 48px;
	height: 48px;
	image-rendering: pixelated;
	object-fit: contain;
}

.vanilla-tile .vanilla-name {
	width: 100%;
	color: #eeeeee;
	font-size: 0.68rem;
	line-height: 1.2;
	text-align: center;
	word-break: break-word;
}

.vanilla-page-size .dropdown-toggle {
	min-height: 38px;
}

.vanilla-page-size .dropdown-menu {
	min-width: 140px;
}

#drawerRedirectPrompt.drawer-redirect-overlay,
.drawer-redirect-overlay {
	position: fixed;
	inset: 0;
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.68);
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--transition);
}

#drawerRedirectPrompt.drawer-redirect-overlay.visible,
.drawer-redirect-overlay.visible {
	opacity: 1;
	pointer-events: auto;
}

.drawer-redirect-card {
	width: min(430px, 100%);
	padding: 16px;
	color: #1f1f1f;
	background: transparent;
	border: 8px solid transparent;
	border-image-source: var(--ui-container-border);
	border-image-slice: 4 4 4 4 fill;
	border-image-width: 8px;
	border-image-repeat: stretch;
	border-radius: var(--radius-card);
	box-shadow: none;
}

.drawer-redirect-card .btn {
	min-height: 44px;
}

.badge.bg-light {
	background-color: #ececec !important;
	color: #1f1f1f !important;
	border: 2px solid #151515;
	border-radius: 0;
}

.badge.bg-warning {
	border: 2px solid #151515;
	border-radius: 0;
}

#glyphDetailModal .modal-dialog {
	max-width: 1100px;
	width: calc(100% - 2rem);
}

@media (max-width: 1023px) {
	.app-container {
		width: min(960px, calc(100% - 20px));
		padding: 10px;
	}

	.header-bar {
		min-height: 104px;
		padding-inline: 54px;
	}

	.title-text {
		font-size: 2.75rem;
	}

	.tool-deck {
		grid-template-columns: 1fr;
	}

	#glyph-output {
		--glyph-columns: 12;
		grid-template-columns: repeat(var(--glyph-columns), minmax(42px, 1fr));
	}

	.detail-actions {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	body {
		font-size: 15px;
		background-size: 112px 112px, 112px 112px;
	}

	.app-container {
		width: calc(100% - 10px);
		margin: 5px auto 12px;
		padding: 7px;
		border-width: 6px;
		border-image-width: 6px;
	}

	.header-bar {
		min-height: auto;
		place-items: start;
		padding: 12px 56px 12px 10px;
	}

	.title-container {
		text-align: left;
	}

	.title-text {
		font-size: 2.05rem;
		-webkit-text-stroke: 1px #171717;
		text-shadow:
			2px 2px 0 #1a1a1a,
			4px 4px 0 #4c4c4c;
	}

	.title-badge {
		margin-bottom: 4px;
		padding: 4px 6px 3px;
		font-size: 0.86rem;
		border-width: 2px;
	}

	.subtitle-text {
		font-size: 0.86rem;
	}

	.header-actions {
		top: 9px;
		right: 9px;
	}

	.tool-grid,
	.converter-grid,
	.preset-actions {
		grid-template-columns: 1fr;
	}

	.tool-grid {
		grid-template-rows: auto;
	}

	.hex-field,
	.upload-field {
		grid-column: 1;
	}

	.preset-actions {
		align-self: stretch;
	}

	.app-card,
	.atlas-card {
		padding: 9px;
		border-width: 6px;
		border-image-width: 6px;
	}

	.panel-heading h2,
	.atlas-title-group h2,
	.modal-title {
		font-size: 1.12rem;
	}

	.atlas-header,
	.atlas-title-group {
		align-items: stretch;
	}

	.atlas-header {
		flex-direction: column;
	}

	.atlas-title-group > *,
	.atlas-header .dropdown,
	.export-btn {
		width: 100%;
	}

	#glyph-output {
		--glyph-columns: 6;
		grid-template-columns: repeat(var(--glyph-columns), minmax(42px, 1fr));
		gap: 3px;
	}

	#glyph-output div {
		font-size: 0.95rem;
	}

	.footer-links {
		justify-content: stretch;
	}

	.footer-links a {
		flex: 1 1 100%;
	}

	.detail-meta,
	.detail-actions,
	.replace-preview {
		grid-template-columns: 1fr;
	}

	.detail-actions .btn {
		width: 100%;
	}

	.detail-preview {
		min-height: 260px;
	}

	.vanilla-grid {
		grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
		max-height: 52vh;
	}
}

@media (max-width: 390px) {
	.title-text {
		font-size: 1.75rem;
		gap: 8px;
	}

	#glyph-output {
		--glyph-columns: 4;
	}
}
