.brand-logo {
	content: url("./icon-toolzoo.png");
	width: clamp(126px, 17vw, 190px);
	height: auto
}

:root {
	color-scheme: dark;
	--bg: #070707;
	--text: #f6f6f6;
	--muted: #b0b0b0;
	--line: rgba(255, 255, 255, .15);
	--glass: rgba(20, 20, 20, .66);
}

* {
	box-sizing: border-box;
}

[hidden] {
	display: none !important;
}

body {
	margin: 0;
	min-height: 100vh;
	background: var(--bg);
	color: var(--text);
	font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", sans-serif;
	-webkit-font-smoothing: antialiased;
}

main {
	width: min(100% - 64px, 1080px);
	margin: 0 auto;
	padding-bottom: 76px;
}

.hero {
	isolation: isolate;
	position: relative;
	text-align: center;
	padding: clamp(29px, 4.5vw, 56px) 0 clamp(14px, 2vw, 24px);
	--grid: clamp(65px, 10vw, 120px);
}

.hero::before,
.hero::after {
	content: "";
	position: absolute;
	z-index: -1;
	pointer-events: none;
}

.hero::before {
	inset: 0 -24px -56px;
	background:
		repeating-linear-gradient(90deg, transparent 0 calc(var(--grid) - 1px), #ffffff17 calc(var(--grid) - 1px) var(--grid)),
		repeating-linear-gradient(0deg, transparent 0 calc(var(--grid) - 1px), #ffffff17 calc(var(--grid) - 1px) var(--grid));
	background-position: center;
	mask-image: radial-gradient(ellipse 74% 65% at 50% 52%, #000 27%, transparent 90%);
}

.hero::after {
	inset: 0 -24px -24px;
	background: radial-gradient(ellipse 44% 55% at 67% 40%, #ffffff24, transparent 76%),
		radial-gradient(ellipse 42% 52% at 39% 79%, #ffffff17, transparent 76%);
	filter: blur(24px);
}

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

.brand-logo {
	display: block;
	width: clamp(126px, 17vw, 190px);
	height: auto;
}

h1 {
	margin: 0;
	font-size: clamp(42px, 7.8vw, 98px);
	text-wrap: balance;
	line-height: .97;
	font-weight: 640;
	letter-spacing: -.065em;
}

h2 {
	margin: 0;
	font-size: clamp(20px, 2.4vw, 26px);
	line-height: 1.2;
	letter-spacing: -.032em;
}

p {
	margin: 8px 0;
	color: var(--muted);
}

.hero header p {
	margin: 20px auto 0;
	max-width: 38em;
	font-size: clamp(14px, 1.65vw, 18px);
}

#drop {
	display: flex;
	align-items: center;
	gap: 18px;
	width: min(100%, 850px);
	min-height: clamp(125px, 12vw, 145px);
	margin: clamp(18px, 3vw, 32px) auto 0;
	padding: 19px 21px;
	text-align: left;
	border: 1px dashed #ffffff65;
	border-radius: 25px;
	background: linear-gradient(115deg, #ffffff16, #ffffff07 64%), #15151599;
	backdrop-filter: blur(20px);
	box-shadow: 0 18px 60px #0008, inset 0 1px #ffffff0d;
	transition: border-color .2s, background-color .2s, box-shadow .2s;
}

#drop:hover,
#drop:focus-within {
	border-color: #ffffff70;
}

#drop.active {
	border-color: white;
	background-color: #383838;
	box-shadow: 0 18px 60px #0008, 0 0 30px #ffffff2b;
}

.drop-copy {
	min-width: 0;
	flex: 1;
}

.drop-copy h2 {
	font-size: clamp(16px, 2.4vw, 21px);
}

.drop-copy p {
	margin: 4px 0 0;
	font-size: 13px;
}

.ui-icon {
	display: inline-grid;
	place-items: center;
	width: 43px;
	height: 43px;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: linear-gradient(150deg, #292929, #171717);
	color: #f6f6f6;
	flex: 0 0 auto;
}

.ui-icon svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.panel,
.card {
	position: relative;
	background: linear-gradient(132deg, #ffffff08, transparent 60%), var(--glass);
	border: 1px solid var(--line);
	border-radius: 25px;
	padding: clamp(17px, 3.1vw, 32px);
	backdrop-filter: blur(16px);
	box-shadow: inset 0 1px #ffffff08;
}

.panel+.panel {
	margin-top: 18px;
}

.section-title {
	display: flex;
	align-items: center;
	gap: 12px;
}

.controls,
.results {
	display: grid;
	gap: 15px;
	margin-top: 22px;
}

.controls {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.controls>* {
	min-width: 0;
}

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

label {
	display: grid;
	gap: 6px;
	font-size: 14px;
	color: var(--muted);
}

.controls>div>label {
	margin-bottom: 6px;
}

button,
input,
select,
.button {
	font: inherit;
	color: var(--text);
	background: #171717;
	border: 1px solid var(--line);
	border-radius: 13px;
	padding: 9px 12px;
}

input,
select {
	width: 100%;
	min-width: 0;
	height: 44px;
	line-height: 22px;
}

select {
	-webkit-appearance: none;
	appearance: none;
	padding-inline-end: 33px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23e9e9e9' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 11px center;
	background-size: 14px;
}

input::placeholder {
	color: #9b9b9b;
}

button,
.button {
	border-radius: 999px;
	font-weight: 550;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
}

button:hover:not(:disabled),
.button:hover {
	border-color: #ffffff85;
}

:focus-visible {
	outline: 2px solid #ededed;
	outline-offset: 3px;
}

button:disabled {
	opacity: .42;
	cursor: default;
}

.primary,
#pick {
	background: #ededed;
	border-color: #ededed;
	color: #111;
}

#pick {
	white-space: nowrap;
}

.weight {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 9px;
	margin-top: 16px;
}

.input-clear {
	position: relative;
	display: block;
}

.input-clear input {
	padding-inline-end: 36px;
}

.input-clear input[type="number"] {
	appearance: textfield;
}

.input-clear input::-webkit-inner-spin-button,
.input-clear input::-webkit-outer-spin-button {
	appearance: none;
	margin: 0;
}

.icon-button {
	position: relative;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	padding: 0;
	color: var(--muted);
}

.icon-button::before,
.icon-button::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 13px;
	height: 1.5px;
	border-radius: 1px;
	background: currentColor;
	pointer-events: none;
}

.icon-button::before {
	transform: rotate(45deg);
}

.icon-button::after {
	transform: rotate(-45deg);
}

.input-clear .icon-button {
	position: absolute;
	inset-inline-end: 5px;
	top: 50%;
	transform: translateY(-50%);
	border-color: transparent;
	background: transparent;
}

.card-heading,
.result-heading {
	display: flex;
	gap: 12px;
	justify-content: space-between;
	align-items: flex-start;
}

.result-heading {
	flex-wrap: wrap;
}

.result-heading .actions {
	margin: 0;
}

.card {
	min-width: 0;
	border-radius: 19px;
	padding: 16px;
}

.card h2 {
	font-size: 19px;
	overflow-wrap: anywhere;
}

.card-heading .icon-button {
	flex: none;
}

.card img {
	display: block;
	width: 100%;
	height: 220px;
	object-fit: contain;
	border-radius: 11px;
	background: repeating-conic-gradient(#1e1e1e 0% 25%, #2c2c2c 0% 50%) 0/18px 18px;
}

.preview-trigger {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	margin: 13px 0 0;
	border-radius: 12px;
	overflow: hidden;
	cursor: pointer;
}

.preview-external {
	position: absolute;
	inset: 10px 10px auto auto;
	background: #111e;
	box-shadow: 0 3px 16px #0008;
}

@media (hover: hover) and (pointer: fine) {
	.preview-external {
		opacity: 0;
	}

	.preview-trigger:is(:hover, :focus-visible) .preview-external {
		opacity: 1;
	}
}

.small {
	font-size: 13px;
}

.warning {
	color: #e2e2e2;
}

.weight-decrease,
.weight-increase {
	color: #f4f4f4;
	font-weight: 700;
}

.weight-increase {
	text-decoration: underline;
	text-underline-offset: 3px;
}

#queue {
	margin: 12px 0;
	padding-left: 22px;
	color: var(--muted);
	overflow: auto;
	overflow-wrap: anywhere;
	max-height: 160px;
}

p:empty {
	display: none;
}

@media (max-width: 700px) {
	main {
		width: calc(100% - 36px);
	}

	.hero::before,
	.hero::after {
		inset-inline: -15px;
	}

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

	.results {
		grid-template-columns: 1fr;
	}

	#drop {
		gap: 11px;
	}
}

@media (max-width: 470px) {
	.hero {
		padding-top: 32px;
	}

	h1 {
		font-size: clamp(29px, 9vw, 44px);
	}

	#drop {
		display: grid;
		grid-template-columns: auto 1fr;
		border-radius: 21px;
	}

	#pick {
		grid-column: 1 / -1;
		justify-self: stretch;
	}

	.controls {
		grid-template-columns: 1fr;
	}

	.card img {
		height: 180px;
	}
}

@media (prefers-reduced-motion: no-preference) {
	@keyframes reveal {
		from {
			opacity: 0;
			transform: translateY(9px);
		}

		to {
			opacity: 1;
			transform: translateY(0);
		}
	}

	.hero header {
		animation: reveal .45s ease-out both;
	}

	#drop {
		animation: reveal .45s .07s ease-out both;
	}

	.panel,
	.card {
		animation: reveal .35s ease-out both;
	}

	.preview-external {
		transition: opacity .18s;
	}

	button,
	.button {
		transition: background-color .18s, border-color .18s, transform .18s;
	}

	button:active:not(:disabled),
	.button:active {
		transform: scale(.98);
	}

	.input-clear .icon-button:active:not(:disabled) {
		transform: translateY(-50%) scale(.98);
	}
}

@media (prefers-reduced-motion: reduce) {
	#drop {
		transition: none;
	}
}


.workspace {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px
}

.workspace .panel {
	margin: 0
}

.workspace .controls {
	grid-template-columns: repeat(2, minmax(0, 1fr))
}

.preview {
	background: #fff;
	border-radius: 14px;
	padding: 24px;
	min-height: 240px;
	display: grid;
	place-items: center;
	margin-top: 22px
}

.preview svg {
	width: 100%;
	height: auto;
	max-height: 300px
}

.brand-logo {
	font-size: 27px;
	font-weight: 750;
	letter-spacing: -.06em
}

.good {
	color: #8ed6a4
}

.bad {
	color: #ffaaaa
}

@media(max-width:700px) {
	.workspace {
		grid-template-columns: 1fr
	}
}

@media(max-width:470px) {
	.workspace .controls {
		grid-template-columns: 1fr
	}
}

.sliderpair {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 76px;
	gap: 8px;
	align-items: center
}

.sliderpair input[type=range] {
	appearance: none;
	padding: 0;
	border: 0;
	background: transparent;
	height: 32px;
	accent-color: #eee;
	cursor: pointer
}

.sliderpair input[type=range]::-webkit-slider-runnable-track {
	height: 4px;
	border-radius: 4px;
	background: #555
}

.sliderpair input[type=range]::-webkit-slider-thumb {
	appearance: none;
	width: 17px;
	height: 17px;
	border-radius: 50%;
	background: #eee;
	margin-top: -6px
}

.sliderpair input[type=range]::-moz-range-track {
	height: 4px;
	background: #555;
	border-radius: 4px
}

.sliderpair input[type=range]::-moz-range-thumb {
	width: 17px;
	height: 17px;
	border: 0;
	background: #eee;
	border-radius: 50%
}

.ticks {
	display: flex;
	justify-content: space-between;
	margin-right: 84px;
	font-size: 10px;
	color: var(--muted)
}

.ticks span {
	position: relative;
	text-align: center
}

.ticks span:before {
	content: '';
	display: block;
	width: 1px;
	height: 5px;
	background: #777;
	margin: 0 auto 2px
}

.colorpair {
	display: grid;
	grid-template-columns: 44px 1fr;
	gap: 8px
}

.colorpair input[type=color] {
	padding: 5px
}

.sliderpair input[type=number] {
	padding: 7px
}

.workspace .controls {
	gap: 20px 15px
}

.export-actions {
	display: grid;
	gap: 9px;
	margin-top: 16px
}

.export-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 44px;
	gap: 9px
}

.export-row button {
	min-height: 44px
}

.copy-format {
	display: grid;
	place-items: center;
	padding: 0
}

.check-row {
	display: flex;
	flex-wrap: wrap;
	gap: 9px
}

.check-row>* {
	flex: 1;
	text-align: center;
	font-size: 14px;
	white-space: normal
}

.setting-group {
	border-top: 1px solid var(--line);
	margin-top: 22px;
	padding-top: 18px
}

.setting-group h3 {
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 12px;
	color: var(--text)
}

.setting-group .controls {
	margin-top: 0
}

.font-choice {
	grid-column: 1/-1
}

.setting-group .font-choice select {
	width: 100%
}

.wide-label {
	grid-column: 1/-1
}


:root {
	color-scheme: dark;
	--bg: #070707;
	--panel: #111;
	--line: #393939;
	--text: #f6f6f6;
	--muted: #aaa
}

* {
	box-sizing: border-box
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 16px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif
}

main {
	max-width: 1320px;
	margin: auto;
	padding: 28px clamp(18px, 3vw, 50px) 60px
}

.topbar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px
}

.brand-logo {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 12px
}

.hero {
	text-align: center;
	padding: 34px 0 26px
}

.hero h1 {
	font-size: clamp(36px, 5vw, 64px);
	line-height: 1.04;
	letter-spacing: -.055em;
	margin: 0
}

.hero p {
	color: var(--muted);
	margin: 12px auto 0;
	max-width: 42em
}

.workspace {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(330px, .78fr);
	gap: 18px;
	align-items: start
}

.panel {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 20px;
	padding: 22px
}

.panel h2 {
	margin: 0;
	font-size: 21px
}

.group {
	border-top: 1px solid var(--line);
	padding-top: 16px;
	margin-top: 18px
}

.group h3 {
	font-size: 13px;
	color: #ccc;
	margin: 0 0 12px
}

.fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 13px
}

.field {
	display: grid;
	gap: 6px;
	color: #bbb;
	font-size: 13px;
	min-width: 0
}

.field.full {
	grid-column: 1/-1
}

input,
select,
textarea,
button {
	font: inherit;
	color: var(--text)
}

input:not([type=color]):not([type=range]),
select,
textarea {
	background: #191919;
	border: 1px solid #444;
	border-radius: 9px;
	padding: 10px 11px;
	width: 100%;
	min-width: 0
}

input[type=color] {
	width: 100%;
	height: 42px;
	padding: 4px;
	background: #191919;
	border: 1px solid #444;
	border-radius: 9px
}

.color-row {
	display: grid;
	grid-template-columns: 42px minmax(0, 1fr);
	gap: 8px;
	align-items: center
}

.slider-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 76px;
	gap: 10px;
	align-items: center
}

.slider-row input[type=range] {
	appearance: none;
	-webkit-appearance: none;
	padding: 0;
	border: 0;
	background: transparent;
	height: 30px;
	accent-color: #eee;
	cursor: pointer
}

.slider-row input[type=range]::-webkit-slider-runnable-track {
	height: 4px;
	border-radius: 4px;
	background: #555
}

.slider-row input[type=range]::-webkit-slider-thumb {
	appearance: none;
	-webkit-appearance: none;
	width: 17px;
	height: 17px;
	margin-top: -6.5px;
	border: 0;
	border-radius: 50%;
	background: #eee
}

.slider-row input[type=range]::-moz-range-track {
	height: 4px;
	border-radius: 4px;
	background: #555
}

.slider-row input[type=range]::-moz-range-thumb {
	width: 17px;
	height: 17px;
	border: 0;
	border-radius: 50%;
	background: #eee
}

.ticks {
	display: flex;
	justify-content: space-between;
	color: #777;
	font-size: 10px;
	margin: 0 85px 0 2px
}

.ticks span:before {
	content: "";
	display: block;
	height: 5px;
	width: 1px;
	background: #777;
	margin: 0 auto 3px
}

textarea {
	resize: vertical;
	min-height: 76px
}

.preset-list {
	display: flex;
	gap: 7px;
	flex-wrap: wrap
}

.preset {
	background: #222;
	border: 1px solid #444;
	border-radius: 12px;
	padding: 12px 18px;
	font-size: 13px;
	cursor: pointer;
	transition: background .15s, border-color .15s
}

.preset.selected {
	background: #f0f0f0;
	color: #111;
	border-color: #f0f0f0
}

.preview {
	display: grid;
	place-items: center;
	min-height: 340px;
	background: #1a1a1a;
	border: 1px solid #383838;
	border-radius: 16px;
	padding: 20px;
	overflow: hidden
}

.preview svg {
	display: block;
	width: min(100%, 340px);
	height: auto
}

.status {
	min-height: 24px;
	color: #bbb;
	font-size: 12px
}

.qr-page .actions {
	display: grid;
	gap: 8px;
	margin-top: 14px
}

.export-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 44px;
	gap: 8px
}

.export-row button,
.qr-page .actions>button {
	min-height: 52px;
	padding: 14px 20px;
	border: 1px solid #444;
	background: #222;
	border-radius: 14px;
	cursor: pointer
}

.export-row .copy {
	padding: 0;
	border-radius: 14px
}

.export-row .primary {
	background: #eee;
	color: #111;
	border-color: #eee
}

.copy {
	display: grid;
	place-items: center;
	padding: 0
}

.export-more {
	display: flex;
	gap: 7px;
	flex-wrap: wrap
}

.export-more button {
	flex: 1;
	min-width: 90px;
	padding: 9px 7px;
	border: 1px solid #444;
	background: #222;
	border-radius: 9px;
	cursor: pointer
}

.hint {
	font-size: 11px;
	color: #888;
	margin: 12px 0 0
}

.hidden {
	display: none
}

@media(max-width:860px) {
	.workspace {
		grid-template-columns: 1fr
	}

	.preview {
		min-height: 300px
	}
}

@media(max-width:520px) {
	.fields {
		grid-template-columns: 1fr
	}

	.field.full {
		grid-column: auto
	}

	.panel {
		padding: 16px
	}

	.hero {
		padding-top: 25px
	}
}

.type-fields {
	margin-top: 13px
}

.qr-page main {
	width: auto
}

body {
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr);
	min-height: 100vh
}

.tool-backdrop {
	position: fixed;
	inset: 0;
	background: #0009;
	z-index: 19;
}

body>.tool-sidebar {
	--menu-transition: 220ms ease;
	position: fixed;
	inset: 0 auto 0 0;
	width: 290px;
	padding: 16px 11px;
	background: #080808;
	border-right: 1px solid rgba(255, 255, 255, .15);
	z-index: 20;
	display: flex;
	flex-direction: column;
	gap: 16px;
	overflow-x: hidden;
	overflow-y: auto;
	transition: width var(--menu-transition), background-color var(--menu-transition), border-color var(--menu-transition);
}

.tool-sidebar .menu-logo {
	display: block;
	width: 190px;
	height: auto;
}

@media (width > 700px) {
	body .tool-sidebar .menu-logo-link {
		flex: none;
		width: 226px;
		min-height: 44px;
		margin-left: 4px;
		padding: 0;
		overflow: hidden;
		transition: width var(--menu-transition);
	}

	body .tool-sidebar .menu-logo-link:hover {
		background: transparent;
	}

	.sidebar-collapsed .tool-sidebar .menu-logo-link {
		width: 52px;
	}

	.tool-sidebar .menu-logo-link .menu-logo {
		flex: none;
		width: auto;
		height: 52px;
		max-width: none;
	}
}

.tool-sidebar .menu-title {
	font-size: 11px;
	font-weight: 650;
	letter-spacing: .12em;
	color: #999;
	text-transform: uppercase;
	padding: 0 10px;
	margin: 8px 0 3px
}

.tool-sidebar nav {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 5px;
	margin-top: 4px;
}

.tool-sidebar :is(.menu-title, .tool-label) {
	white-space: nowrap;
	transition: opacity var(--menu-transition);
}

.tool-sidebar a {
	display: flex;
	align-items: center;
	gap: 11px;
	min-height: 52px;
	padding: 9px 10px;
	border-radius: 12px;
	color: #b0b0b0;
	text-decoration: none;
	font: 550 14px/1.3 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif
}

.tool-sidebar a:hover {
	background: #1d1d1d;
	color: #fff
}

.tool-sidebar a.active {
	background: #242424;
	color: #fff;
	font-weight: 650
}

.tool-sidebar .tool-icon {
	width: 44px;
	height: 44px;
	flex: none;
	object-fit: cover;
	border-radius: 8px
}

.tool-sidebar .collapse {
	display: none;
	place-items: center;
	width: 44px;
	height: 44px;
	background: #191919;
	border: 1px solid #383838;
	color: #eee;
	border-radius: 99px;
	padding: 8px;
	font-size: 13px;
	cursor: pointer
}

.tool-sidebar~main {
	grid-column: 2;
	min-width: 0;
	width: 100%;
	margin: 0 auto;
	padding-left: clamp(18px, 3vw, 52px);
	padding-right: clamp(18px, 3vw, 52px)
}

.sidebar-collapsed>.tool-sidebar {
	width: 88px;
}

.sidebar-collapsed .tool-sidebar :is(.menu-title, .tool-label) {
	opacity: 0;
}

.tool-sidebar .collapse svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round
}



@media (prefers-reduced-motion: reduce) {
	body>.tool-sidebar {
		--menu-transition: 0s;
	}
}

.topbar>.brand-logo {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 12px
}

.tool-compressor .topbar>.brand-logo {
	content: url("./icon_compressor.png")
}

.tool-barcode .topbar>.brand-logo {
	content: url("./icon_barcode.png")
}

.tool-qr .topbar>.brand-logo {
	content: url("./icon_qr.png")
}

.tool-diff .topbar>.brand-logo {
	content: url("./icon_diff.png")
}

/* Shared component system */
body {
	--control-bg: #171717;
	--control-line: var(--line);
	--control-text: var(--text)
}

body :is(input:not([type=range]):not([type=color]):not([type=file]), select, textarea) {
 font: inherit;
 color: var(--control-text);
 background-color: var(--control-bg);
 /* border: 1px solid var(--control-line);
border-radius: 13px; */
 padding: 9px 12px;
 min-height: 44px;
 height: 44px;
 box-shadow: none
}

body textarea {
 height: auto;
 min-height: 88px;
	resize: vertical
}

body select {
 appearance: none;
 -webkit-appearance: none;
 padding-right: 36px;
 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23e9e9e9' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
 background-repeat: no-repeat;
 background-position: right 11px center;
 background-size: 14px
}

body input[type=color] {
	height: 44px;
	min-height: 44px;
	padding: 4px;
	border-radius: 13px;
	background: #171717;
	border: 1px solid var(--control-line)
}

body :is(button, .button) {
	font-family: inherit;
	font-size: 16px;
	font-weight: 550;
	line-height: 1.2;
	color: var(--text);
	background: #171717;
	border: 1px solid var(--line);
	border-radius: 999px;
	min-height: 44px;
	height: 44px;
	padding: 10px 22px;
	box-shadow: none;
	cursor: pointer;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center
}

body :is(button, .button):hover:not(:disabled) {
	background: #242424;
	border-color: #777;
	transform: translateY(-1px)
}

body :is(button, .button).primary,
body button.primary {
	background: #ededed;
	border-color: #ededed;
	color: #111
}

body .shape-icon {
	width: 68px;
	height: 64px;
	min-height: 64px;
	padding: 8px;
	border-radius: 15px
}

body .shape-icon.selected {
	background: #ededed;
	color: #111;
	border-color: #ededed;
	box-shadow: 0 0 0 2px #ededed
}

body .export-row .copy {
	width: 44px;
	min-width: 44px;
	height: 44px;
	min-height: 44px;
	padding: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--text)
}

body .preset {
	min-height: 44px;
	height: 44px;
	padding: 10px 22px
}

body :focus-visible {
	outline: 2px solid #ededed;
	outline-offset: 3px
}

body .preset.selected {
	background: #ededed;
	color: #111;
	border-color: #ededed
}

body #pick {
	background: #ededed;
	border-color: #ededed;
	color: #111
}

body input[type=file] {
	font: inherit;
	color: var(--control-text);
	background: #171717;
	border: 1px solid var(--line);
	border-radius: 13px;
	min-height: 44px;
	padding: 6px 9px
}

body.qr-page .field input:not([type=color]):not([type=range]),
body.qr-page .field select,
body.qr-page .field textarea {
	font: inherit;
	color: var(--control-text);
	background-color: var(--control-bg);
	border: 1px solid var(--control-line);
	border-radius: 13px;
	padding: 9px 12px;
	min-height: 44px;
	height: 44px;
	box-shadow: none
}

body.qr-page .field textarea {
	height: auto;
	min-height: 88px
}

body .panel,
body .card {
	position: relative;
	background: linear-gradient(132deg, #ffffff08, transparent 60%), var(--glass);
	border: 1px solid var(--line);
	border-radius: 25px;
	padding: clamp(17px, 3.1vw, 32px);
	backdrop-filter: blur(16px);
	box-shadow: inset 0 1px #ffffff08
}

body label,
body .field {
	display: grid;
	gap: 6px;
	color: var(--muted);
	font-size: 14px
}

body .hero {
	padding: clamp(29px, 4.5vw, 56px) 0 clamp(14px, 2vw, 24px)
}

body .hero h1 {
	font-size: clamp(42px, 7.8vw, 80px);
	line-height: .97;
	font-weight: 640;
	letter-spacing: -.03em
}

body .hero p {
	font-size: clamp(14px, 1.65vw, 18px);
	color: var(--muted)
}

body .panel h2 {
	font-size: clamp(20px, 2.4vw, 26px);
	line-height: 1.2;
	letter-spacing: -.032em;
}

.tool-qr .panel h2 
{
		margin-bottom: 12px
}

body .group h3,
body .setting-group h3 {
	font-size: 15px;
	font-weight: 600;
	color: var(--text)
}

body :is(.icon-button, .copy-format, .copy) {
	width: 44px;
	min-width: 44px;
	height: 44px;
	min-height: 44px;
	padding: 0;
	border-radius: 50%
}

body .icon-button {
	position: relative;
	display: grid;
	place-items: center
}

/* Compressor field fixes */
body .input-clear .icon-button {
	width: 32px;
	min-width: 32px;
	height: 32px;
	min-height: 32px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none
}

body .icon-button::before,
body .icon-button::after {
	width: 12px;
	height: 1.5px;
	border-radius: 0
}

body :is(button, .button).primary:hover:not(:disabled),
body #pick:hover:not(:disabled) {
	background: #d8d8d8;
	border-color: #d8d8d8;
	color: #111
}

body .weight {
	grid-template-columns: minmax(0, 1fr) 96px
}

body .weight #unit {
	width: 96px;
	min-width: 96px;
	padding-left: 10px;
	padding-right: 32px;
	background-position: right 8px center
}


@media (max-width: 700px) {
	body {
		display: block;
	}

	body .hero {
		padding-top: 0;
	}


	body>.tool-sidebar {
		width: min(290px, calc(100% - 48px));
		padding: 77px 16px 20px;
	}

	body.sidebar-collapsed>.tool-sidebar {
		width: 76px;
		background-color: transparent;
		border-color: transparent;
		pointer-events: none;
	}

	.tool-sidebar .menu-logo-link {
		display: block;
		width: fit-content;
	}

	.tool-sidebar :is(nav, .menu-logo-link) {
		transition: opacity var(--menu-transition), visibility var(--menu-transition);
	}

	body.sidebar-collapsed .tool-sidebar :is(nav, .menu-logo-link) {
		opacity: 0;
		visibility: hidden;
	}

	body .tool-sidebar .collapse {
		display: grid;
		position: fixed;
		top: 10px;
		left: 12px;
		right: auto;
		width: 44px;
		padding: 0;
		pointer-events: auto;
	}

	.tool-sidebar .menu-title {
		margin: 0;
	}

	.tool-sidebar nav {
		margin: 0;
	}

	.topbar>.brand-logo {
		width: 64px;
		height: 64px;
	}

	.topbar {
		padding-top: 0;
		margin-bottom: 24px;
	}
}

/* Home page */
body.home-page {
	position: relative;
	grid-template-columns: minmax(0, 1fr);
	min-height: 100vh;
	background: var(--bg);
}

body.home-page::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	--home-grid: clamp(65px, 8vw, 112px);
	background:
		radial-gradient(ellipse 47% 58% at 66% 41%, #ffffff20, transparent 76%),
		radial-gradient(ellipse 42% 55% at 38% 78%, #ffffff14, transparent 76%),
		repeating-linear-gradient(90deg, transparent 0 calc(var(--home-grid) - 1px), #ffffff17 calc(var(--home-grid) - 1px) var(--home-grid)),
		repeating-linear-gradient(0deg, transparent 0 calc(var(--home-grid) - 1px), #ffffff17 calc(var(--home-grid) - 1px) var(--home-grid));
	background-position: center;
	mask-image: radial-gradient(ellipse 84% 82% at 57% 50%, #000 20%, transparent 100%);
}

body.home-page>main {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	grid-column: 1;
	width: 100%;
	min-width: 0;
	min-height: 100vh;
	margin: 0 auto;
	padding: clamp(24px, 7vw, 64px) clamp(24px, 4vw, 64px);
}

.home-content {
	width: min(100%, 960px);
	margin: auto;
}

.home-header {
	margin-bottom: clamp(30px, 5vw, 54px);
	text-align: center;
}

.home-logo {
	display: block;
	width: clamp(142px, 17vw, 190px);
	height: auto;
	margin: 0 auto 12px;
}

.home-header h1 {
	font-size: clamp(34px, 7.8vw, 80px);
	letter-spacing: -.055em;
}

.home-header p {
	margin: 16px auto 0;
	font-size: clamp(15px, 1.7vw, 18px);
}

.tool-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.tool-card {
	position: relative;
	display: flex;
	min-height: 236px;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
	padding: clamp(20px, 2.4vw, 30px);
	border: 1px solid var(--line);
	border-radius: 22px;
	background: linear-gradient(145deg, #ffffff0c, transparent 64%), #111111c9;
	box-shadow: 0 18px 48px #0004, inset 0 1px #ffffff0a;
	color: var(--text);
	text-decoration: none;
	transition: transform .2s ease, border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.tool-card>img {
	width: 68px;
	height: 68px;
	border-radius: 17px;
	object-fit: cover;
	box-shadow: 0 8px 24px #0005;
}

.tool-card-copy {
	display: grid;
	gap: 9px;
	padding-right: 6px;
}

.tool-card-copy strong {
	font-size: clamp(17px, 1.65vw, 20px);
	line-height: 1.25;
	letter-spacing: -.025em;
}

.tool-card-copy>span {
	color: var(--muted);
	font-size: 14px;
	line-height: 1.55;
}

.tool-card-arrow {
	position: absolute;
	top: 24px;
	right: 24px;
	color: #888;
	font-size: 20px;
	transition: color .2s ease, transform .2s ease;
}

.tool-card:hover {
	transform: translateY(-4px);
	border-color: #ffffff50;
	background-color: #191919e8;
	box-shadow: 0 22px 56px #0007, inset 0 1px #ffffff14;
}

.tool-card:hover .tool-card-arrow {
	transform: translate(2px, -2px);
	color: #fff;
}

.tool-card:focus-visible {
	outline: 2px solid #f6f6f6;
	outline-offset: 4px;
}

.diff-menu-icon,.diff-card-icon{display:grid;place-items:center;background:#242424;color:#f4f4f4;border:1px solid #ffffff22;font:700 12px/1 ui-monospace,monospace;letter-spacing:-2px}
.diff-menu-icon{width:28px;height:28px;border-radius:8px;flex:none}
.diff-card-icon{width:68px;height:68px;border-radius:17px;font-size:21px;letter-spacing:-3px;box-shadow:0 8px 24px #0005}
.diff-hero{padding-bottom:8px}.diff-hero h1{font-size:clamp(38px,6vw,68px)}
.diff-toolbar,.diff-stats,.diff-editor-head{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line)}
.diff-toolbar{flex-wrap:wrap}.diff-modes,.diff-actions{display:flex;gap:6px}.diff-actions{margin-left:auto}
.diff-mode,.secondary,.file-button{border:1px solid #ffffff22;background:#191919;color:#ddd;border-radius:9px;padding:8px 11px;font:550 13px/1.3 inherit;cursor:pointer}.diff-mode.active{background:#eee;color:#111;border-color:#eee}
.diff-stats{justify-content:space-between;color:#aaa;font:12px ui-monospace,monospace}.diff-editors{display:grid;grid-template-columns:1fr 1fr;min-height:440px}.diff-editor{min-width:0}.diff-editor+.diff-editor{border-left:1px solid var(--line)}
.diff-editor-head{justify-content:space-between;height:48px;color:#ddd;font-size:13px}.file-button{padding:6px 9px;color:#bbb}.file-input{display:none}
.code-area{height:min(64vh,720px);min-height:390px;position:relative;display:grid;grid-template-columns:48px minmax(0,1fr);overflow:hidden;background:#0d0d0d;font:13px/1.65 ui-monospace,SFMono-Regular,Menlo,monospace;tab-size:4}
.code-gutter{grid-column:1;grid-row:1;z-index:2;padding:12px 8px;text-align:right;color:#666;background:#101010;border-right:1px solid #ffffff0c;overflow:hidden;user-select:none}.code-gutter span,.code-line{display:block;height:21.45px;white-space:pre}
.code-area textarea,.code-highlight{grid-column:2;grid-row:1;margin:0;padding:12px 14px;white-space:pre;overflow:auto;tab-size:4;font:inherit;line-height:1.65;letter-spacing:normal}.code-area textarea{z-index:1;resize:none;width:100%;height:100%;border:0;outline:0;background:transparent;color:transparent;caret-color:#fff;-webkit-text-fill-color:transparent;overflow:auto}.code-area textarea::selection{background:#ffffff44}.code-highlight{position:absolute;inset:0 0 0 48px;pointer-events:none;color:#ddd}.code-line.add{background:#163b2580}.code-line.del{background:#4a202580}.inline-change{background:#245b3780}.code-line.del .inline-change{background:#81393980}.tok-key{color:#c792ea}.tok-num{color:#f78c6c}.tok-str{color:#c3e88d}.tok-comment{color:#737b86;font-style:italic}
.unified-view{height:min(64vh,720px);min-height:390px;overflow:auto;background:#0d0d0d;padding:12px 0;font:13px/1.65 ui-monospace,SFMono-Regular,Menlo,monospace}.unified-line{display:grid;grid-template-columns:36px 1fr;padding:0 14px;min-height:21.45px}.unified-line>span{text-align:center;color:#777}.unified-line.add{background:#163b2580}.unified-line.add>span{color:#8fda9f}.unified-line.del{background:#4a202580}.unified-line.del>span{color:#f09a9a}.unified-line code{white-space:pre;color:#ddd;tab-size:4}.unified-empty{padding:16px;color:#777}
@media(max-width:850px){.diff-toolbar{align-items:flex-start}.diff-actions{margin-left:0}.diff-editors{grid-template-columns:1fr}.diff-editor+.diff-editor{border-left:0;border-top:1px solid var(--line)}.code-area{height:52vh}}
@media(max-width:520px){.diff-toolbar{gap:8px}.diff-stats{align-items:flex-start;flex-direction:column}.diff-actions{width:100%}.diff-actions button{flex:1}}
.diff-editors{min-height:0;padding:16px;gap:14px}.diff-editor+.diff-editor{border:0}.diff-editor{overflow:hidden;border:1px solid var(--line);border-radius:12px;background:#0d0d0d}
.diff-editor-head{height:48px}.diff-input{display:block;width:100%;height:260px;resize:vertical;margin:0;padding:14px;border:0;border-top:1px solid #ffffff12;border-radius:0;background:#0d0d0d;color:#ddd;outline:0;font:13px/1.65 ui-monospace,SFMono-Regular,Menlo,monospace;tab-size:4;white-space:pre;overflow:auto}
.diff-input:focus{box-shadow:inset 0 0 0 1px #ffffff3b}.diff-input::placeholder{color:#686868}
.result-heading{position:sticky;top:0;z-index:3;display:flex;align-items:center;flex-wrap:wrap;gap:8px 20px;padding:13px 16px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:#111;font-size:14px;color:#ddd}.result-heading strong{font-weight:650}.result-metrics{margin-left:auto;color:#aaa;font:12px ui-monospace,monospace;white-space:nowrap}
.split-result{max-height:68vh;min-height:240px;overflow:auto;background:#0d0d0d;font:13px/1.65 ui-monospace,SFMono-Regular,Menlo,monospace}
.split-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;min-width:600px;box-sizing:border-box}.split-column{min-width:0;overflow-x:auto;scrollbar-width:thin}.split-column+.split-column{border-left:1px solid #ffffff1c}
.result-content{width:max-content;min-width:100%}
.result-line{display:grid;grid-template-columns:48px 1fr;min-height:21.45px}.result-number{padding-right:10px;text-align:right;color:#666;background:#101010;border-right:1px solid #ffffff0c;user-select:none}.result-line code{display:block;padding:0 12px;white-space:pre;color:#ddd;font:inherit;tab-size:4}.result-line.add{background:#163b2580}.result-line.del{background:#4a202580}.result-line.same{background:transparent}
.inline-change.removed{background:#81393980}
@media(max-width:850px){.diff-editors{grid-template-columns:1fr}.diff-editor+.diff-editor{border:0}.diff-input{height:220px}.split-columns{min-width:520px}}

body .diff-editors .diff-editor{border:1px solid var(--line);border-radius:12px;background:#0d0d0d}
body .diff-editors .diff-editor+.diff-editor{border-left:1px solid var(--line)}
body .diff-editor .diff-input{box-sizing:border-box;height:420px;min-height:340px;padding:14px;border:0;border-top:1px solid #ffffff12;border-radius:0 0 11px 11px;background:#0d0d0d;color:#ddd;line-height:1.65;white-space:pre;overflow:auto}
@media(max-width:850px){body .diff-editors .diff-editor+.diff-editor{border:1px solid var(--line)}body .diff-editor .diff-input{height:340px;min-height:280px}}
body.tool-diff textarea.diff-input#left,body.tool-diff textarea.diff-input#right{height:420px;min-height:340px}
@media (max-width: 850px) {
	body.tool-diff textarea.diff-input#left,
	body.tool-diff textarea.diff-input#right { height: 220px; min-height: 180px; }
}

@media (max-width: 1050px) {
	.tool-cards {
		grid-template-columns: 1fr;
		max-width: 560px;
		margin-inline: auto;
	}

	.tool-card {
		min-height: 0;
		flex-direction: row;
		align-items: center;
		gap: 20px;
	}
}

@media (max-width: 700px) {
	body.home-page {
		min-height: 100vh;
	}

	body.home-page>main {
		grid-column: 1;
		min-height: 100svh;
		padding: 82px 20px 38px;
	}

	.home-logo {
		margin-bottom: 12px;
	}

	.tool-card {
		padding: 19px;
		border-radius: 18px;
	}

	.tool-card>img {
		width: 58px;
		height: 58px;
		border-radius: 15px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tool-card,
	.tool-card-arrow {
		transition: none;
	}
}



/* QR generator layout and controls */
body.qr-page .workspace { align-items: start; }
body.qr-page .workspace > .preview-panel { position: sticky; top: 16px; }
body.qr-page .fields { row-gap: 10px; }
body.qr-page .slider-row { min-height: 44px; }
body.qr-page .slider-row input[type=range] { align-self: center; margin: 0; }
body.qr-page .ticks { line-height: 1.2; }
body.qr-page .group { padding-top: 13px; margin-top: 15px; }
body.qr-page .group h3 { margin-bottom: 9px; }
body.qr-page .preview { margin-top: 14px; }
body.qr-page .preview svg { max-height: min(62vh, 560px); }
body.qr-page .preview.has-transparent-background > svg {
  background: repeating-conic-gradient(#fff 0% 25%, #ddd 0% 50%) 0 / 16px 16px;
}
body.qr-page .qr-preview-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}
body.qr-page .qr-contrast {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
body.qr-page .qr-contrast:not(.good) { color: #ffad66; }
body.qr-page .qr-export-size {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
body.qr-page .qr-export-size select { width: auto; min-width: 116px; }
.background-palette { position: relative; }
.background-palette summary {
  display: grid;
  width: 42px;
  height: 44px;
  padding: 4px;
  list-style: none;
  border: 1px solid var(--control-line);
  border-radius: 13px;
  background: var(--control-bg);
  cursor: pointer;
}
.background-palette summary::-webkit-details-marker { display: none; }
.background-palette-panel {
  position: absolute;
  z-index: 4;
  inset: calc(100% + 6px) auto auto 0;
  width: 228px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #191919;
  box-shadow: 0 8px 24px #0008;
}
.background-palette-colors {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}
.background-swatch {
  display: block;
  border-radius: 6px;
  background-color: #fff;
}
body.qr-page .background-palette-colors button {
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 6px;
  transform: none;
}
body.qr-page .background-palette-colors button:hover:not(:disabled) { transform: none; }
body.qr-page .background-palette-colors button[aria-pressed="true"] { box-shadow: 0 0 0 1px #fff; }
body.qr-page .background-swatch.is-transparent,
body.qr-page .background-swatch.is-transparent:hover {
  background: linear-gradient(135deg, transparent 46%, #f05353 47% 53%, transparent 54%),
    repeating-conic-gradient(#fff 0% 25%, #ddd 0% 50%) 0 / 10px 10px;
}
body.qr-page .background-custom-color {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 13px;
}
body.qr-page .background-custom-color input { width: 42px; }
body.qr-page .shape-grid {
  display: flex;
  flex-wrap: wrap;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}
body.qr-page .shape-grid .shape-choice { min-width: 0; gap: 8px; align-content: start; }
body.qr-page .shape-title {
  display: flex;
  line-height: 1.3;
}
body.qr-page .shape-icons {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  align-items: center;
}
body.qr-page .shape-grid .shape-icons[data-control="dotStyle"] {
  display: flex;
  flex-wrap: wrap;
}
body.qr-page .shape-icons .shape-icon,
body.qr-page .shape-icons .shape-icon:hover,
body.qr-page .shape-icons .shape-icon.selected,
body.qr-page .shape-icons .shape-icon.selected:hover {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 5px;
  border-radius: 10px;
  transform: none;
}
body.qr-page .shape-icons .shape-icon svg { width: 24px; height: 24px; fill: currentColor; }
body.qr-page .shape-icons .shape-icon svg rect[fill="none"],
body.qr-page .shape-icons .shape-icon svg circle[fill="none"] { fill: none; }
body.qr-page .shape-icons .shape-icon { display: grid; place-items: center; cursor: pointer; transition: background .16s, border-color .16s; }
body.qr-page .qr-style-group { container-type: inline-size; }
body.qr-page .preset-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 56px));
  gap: 8px;
}
@container (min-width: 504px) {
  body.qr-page .preset-list { grid-template-columns: repeat(8, 56px); }
}
body.qr-page .qr-style-button {
  width: 100%;
  height: 56px;
  min-height: 56px;
  padding: 4px;
  border-radius: 12px;
}
body.qr-page .qr-style-button img {
  width: min(100%, 46px);
  height: auto;
  border-radius: 7px;
}
body.qr-page .qr-style-button[aria-pressed="true"] { border-color: #ededed; }
body.qr-page .qr-fill-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 400px);
  gap: 8px;
  margin-bottom: 12px;
}
body.qr-page .qr-fill-modes button { padding-inline: 8px; }
body.qr-page .export-row { grid-template-columns: minmax(0, 1fr) 44px; }
body.qr-page .shape-select { display: none; }
body.qr-page .qr-geometry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 216px), 1fr));
  gap: 12px;
  margin-top: 16px;
}
body.qr-page #textOptions,
body.qr-page #logoOptions { margin-top: 12px; }
body.qr-page #logoOptions .field { grid-column: span 1; }
/* Keep active light controls light while hovered; all other buttons use the shared hover style. */
body.qr-page .preset.selected:hover:not(:disabled),
body.qr-page .shape-icon.selected:hover:not(:disabled),
body.tool-diff .diff-mode.active:hover:not(:disabled) {
  background: #ededed;
  border-color: #ededed;
  color: #111;
}
body.qr-page .export-row .primary:hover:not(:disabled),
body.qr-page .actions > .primary:hover:not(:disabled) {
  background: #d8d8d8;
  border-color: #d8d8d8;
  color: #111;
}
body.qr-page .export-row .copy { background: transparent; }
body.qr-page .export-row .copy:hover:not(:disabled) { background: #242424; }
body.tool-diff .diff-panel { display: block; min-height: 0; padding: 0; overflow: hidden; border-radius: 18px; }
@media (max-width: 1100px) {
  body.qr-page .shape-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  body.qr-page .workspace > .preview-panel { position: static; order: -1; }
}
@media (max-width: 520px) {
  body.qr-page .shape-grid { grid-template-columns: 1fr; }
}

/* Sidebar overlay and shared tools link */
body:not(.home-page) { grid-template-columns: 76px minmax(0, 1fr); }
body:not(.home-page) .tool-sidebar~main { grid-column: 2; }
body:not(.home-page) { position: relative; }
body:not(.home-page) .all-tools-link {
	position: absolute;
	top: 15px;
	right: 12px;
	z-index: 2;
	gap: 8px;
	padding: 9px 14px;
	font-size: 14px;
	white-space: nowrap;
}
@media (max-width: 700px) {
	body:not(.home-page) .all-tools-link {
		position: fixed;
		z-index: 26;
	}
}
@media (max-width: 520px) {
	body:not(.home-page) .all-tools-link { width: 44px; padding: 9px; }
	body:not(.home-page) .all-tools-link span { display: none; }
}

/* Clearer setting group hierarchy */
.panel-heading { display: block; }
body.qr-page .group {
  border-top-color: rgba(255,255,255,.22);
  padding-top: 20px;
  margin-top: 22px;
}
body.qr-page .group h3,
body.tool-barcode .setting-group h3 {
  display: block;
  color: #f2f2f2;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.3;
  margin-bottom: 14px;
}
body.tool-barcode .setting-group {
  border-top-color: rgba(255,255,255,.22);
  padding-top: 20px;
  margin-top: 22px;
}
body.tool-barcode .barcode-settings-header { justify-content: space-between; }
.all-tools-link .all-tools-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Keep the barcode preview beside the controls while settings scroll. */
body.tool-barcode .workspace { align-items: start; }
body.tool-barcode .workspace > .preview-panel { position: sticky; top: 16px; }
@media (max-width: 860px) {
  body.tool-barcode .workspace > .preview-panel { position: static; order: -1; }
}

/* Small live code preview on mobile; the full preview and export controls stay in the page. */
button.mobile-live-preview { display: none; }
@media (max-width: 860px) {
  body:is(.tool-qr, .tool-barcode) button.mobile-live-preview {
    position: fixed;
    top: 10px;
    inset-inline: 0;
    margin-inline: auto;
    z-index: 18;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: max-content;
    height: auto;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    line-height: 0;
    cursor: pointer;
  }
  body:is(.tool-qr, .tool-barcode) button.mobile-live-preview:is(:hover, :active):not(:disabled) {
    background: transparent;
    border-color: transparent;
    transform: none;
  }
  body:is(.tool-qr, .tool-barcode) button.mobile-live-preview:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
  }
  body:is(.tool-qr, .tool-barcode) .preview-panel { scroll-margin-top: 96px; }
  body:is(.tool-qr, .tool-barcode) .mobile-live-preview :is(svg, img) {
    display: block;
    box-sizing: content-box;
    width: auto;
    height: auto;
    max-width: 100px;
    max-height: 100px;
    padding: 5px;
    border: 1px solid #d5d5d5;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 3px 14px #0005;
  }
}
@media (max-width: 860px) and (prefers-reduced-motion: no-preference) {
  body:is(.tool-qr, .tool-barcode) button.mobile-live-preview:active:not(:disabled) {
    transform: scale(1.05);
  }
}

/* Monochrome iOS-style switches for QR settings. */
body.qr-page .switch-field {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  min-height: 44px;
}
body.qr-page .switch-field > .setting-heading { margin: 0; }
body.qr-page .switch-field > :is(.ios-switch, .shape-icons) {
  margin-inline-start: auto;
}
body.qr-page button.ios-switch {
  position: relative;
  display: block;
  flex: 0 0 50px;
  width: 50px;
  min-width: 50px;
  height: 28px;
  min-height: 28px;
  padding: 2px;
  border: 0;
  border-radius: 999px;
  background: #454545;
  cursor: pointer;
  transition: none;
}
body.qr-page button.ios-switch[aria-checked="true"] { background: #454545; }
body.qr-page button.ios-switch:hover:not(:disabled),
body.qr-page button.ios-switch[aria-checked="true"]:hover:not(:disabled) { background: #454545; border-color: transparent; transform: none; }
body.qr-page button.ios-switch:active:not(:disabled) { transform: none; }
body.qr-page .ios-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px #0005;
  transition: left .18s ease;
}
body.qr-page button.ios-switch[aria-checked="true"] .ios-switch-thumb { left: 24px; background: #fff; }
body.qr-page button.ios-switch:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* EAN-13 raster resolution choices. */
body.tool-barcode .dpi-field { grid-column: 1 / -1; }
body.tool-barcode .dpi-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
body.tool-barcode .dpi-option { min-width: 0; width: 100%; padding-inline: 10px; }
body.tool-barcode .dpi-option.selected,
body.tool-barcode .dpi-option[aria-pressed="true"] {
  color: #111;
  background: #ededed;
  border-color: #ededed;
}
body.tool-barcode .dpi-option.selected:hover:not(:disabled),
body.tool-barcode .dpi-option[aria-pressed="true"]:hover:not(:disabled) {
  color: #111;
  background: #d8d8d8;
  border-color: #d8d8d8;
}
body.tool-barcode .dpi-source { display: none; }

/* Compact one-line format and quality choices in the image compressor. */
body.tool-compressor .compress-settings-group + .compress-settings-group {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid rgba(255, 255, 255, .18);
}
body.tool-compressor .compress-settings-group > .controls {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 0;
	row-gap: 14px;
	margin-top: 0;
}
body.tool-compressor .compress-settings-group:first-child > .controls { margin-top: 18px; }
body.tool-compressor .compress-settings-group > .controls > * {
	padding-inline: 16px;
	border-left: 1px solid rgba(255, 255, 255, .16);
}
body.tool-compressor .compress-settings-group > .controls > *:nth-child(3n + 1) {
	padding-left: 0;
	border-left: 0;
}
body.tool-compressor .compress-settings-group > .controls > *:nth-child(3n) { padding-right: 0; }
body.tool-compressor .choice-source { display: none; }
body.tool-compressor .choice-setting {
	display: grid;
	gap: 6px;
	font-size: 14px;
	color: var(--muted);
}
body.tool-compressor .choice-buttons {
	display: flex;
	gap: 6px;
	width: 100%;
}
body.tool-compressor .choice-buttons button {
	flex: 1 1 0;
	min-width: 0;
	padding: 8px 7px;
	font-size: 13px;
	white-space: nowrap;
}
body.tool-compressor .choice-buttons button.selected,
body.tool-compressor .choice-buttons button[aria-pressed="true"] {
	color: #111;
	background: #ededed;
	border-color: #ededed;
}
body.tool-compressor .choice-buttons button.selected:hover:not(:disabled),
body.tool-compressor .choice-buttons button[aria-pressed="true"]:hover:not(:disabled) {
	color: #111;
	background: #d8d8d8;
	border-color: #d8d8d8;
}
@media (max-width: 700px) {
	body.tool-compressor .compress-settings-group > .controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	body.tool-compressor .compress-settings-group > .controls > * { padding-inline: 14px; }
	body.tool-compressor .compress-settings-group > .controls > *:nth-child(2n + 1) {
		padding-left: 0;
		border-left: 0;
	}
	body.tool-compressor .compress-settings-group > .controls > *:nth-child(2n) { padding-right: 0; }
}
@media (max-width: 470px) {
	body.tool-compressor .compress-settings-group > .controls {
		grid-template-columns: 1fr;
		gap: 14px;
	}
	body.tool-compressor .compress-settings-group > .controls > * {
		padding: 0;
		border-left: 0;
	}
}

/* Image converter */
body.tool-converter .topbar > .brand-logo { content: normal; }
.converter-panel {
	width: min(100%, 850px);
	margin-inline: auto;
}
.converter-formats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
	margin-top: 12px;
}
.converter-formats button {
	width: 100%;
	padding-inline: 8px;
}
.converter-formats button[aria-pressed="true"],
.converter-formats button[aria-pressed="true"]:hover:not(:disabled) {
	color: #111;
	background: #ededed;
	border-color: #ededed;
}
.converter-jpeg {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 12px;
}
.converter-jpeg input[type="color"] { width: 44px; }
.converter-queue-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	min-height: 57px;
	margin-top: 20px;
	padding-top: 12px;
	border-top: 1px solid var(--line);
}
body .converter-queue-header h2 { font-size: 16px; }
body #clear-files {
	margin-top: 6px;
	padding-inline: 8px;
	border: 0;
	background: transparent;
	color: var(--muted);
	font-size: 13px;
}
body #clear-files:hover:not(:disabled) {
	background: transparent;
	color: var(--text);
	text-decoration: underline;
	text-underline-offset: 3px;
	transform: none;
}
#converter-files {
	display: grid;
	gap: 6px;
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
}
.converter-file {
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr) 44px;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 6px 0;
}
.converter-file + .converter-file { border-top: 1px solid var(--line); }
.converter-thumbnail {
	width: 48px;
	height: 48px;
	border: 1px solid var(--line);
	border-radius: 9px;
	background: repeating-conic-gradient(#1e1e1e 0% 25%, #2c2c2c 0% 50%) 0/12px 12px;
}
.converter-file-info {
	grid-column: 2;
	display: grid;
	overflow-wrap: anywhere;
}
.converter-file-name { font-size: 14px; font-weight: 550; }
.converter-file .icon-button { justify-self: end; }
.converter-download-dock {
	position: fixed;
	inset-inline: 18px;
	left: max(18px, env(safe-area-inset-left));
	right: max(18px, env(safe-area-inset-right));
	bottom: calc(12px + env(safe-area-inset-bottom));
	z-index: 18;
}
@media (max-width: 700px) {
	body .converter-download-dock button {
		width: 100%;
		box-shadow: 0 6px 24px #0007;
	}
	body.tool-converter:has(.converter-download-dock:not([hidden])) > main {
		padding-bottom: calc(80px + env(safe-area-inset-bottom));
	}
}
@media (max-width: 470px) {
	.converter-formats button { font-size: 13px; }
}

/* Monochrome on/off switches for text comparison options. */
body.tool-diff .diff-toolbar .diff-toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	color: #bbb;
	font-size: 13px;
	line-height: 1.25;
	white-space: nowrap;
	cursor: pointer;
}
body.tool-diff .diff-options {
	display: flex;
	align-items: center;
	gap: 12px;
}
body.tool-diff .diff-toolbar .diff-toggle input[type="checkbox"] {
	position: absolute;
	width: 1px;
	min-width: 1px;
	max-width: 1px;
	height: 1px;
	min-height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	opacity: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
}
body.tool-diff .diff-switch-ui {
	position: relative;
	flex: 0 0 42px;
	width: 42px;
	height: 24px;
	border-radius: 999px;
	background: #454545;
	transition: background .16s ease;
}
body.tool-diff .diff-switch-ui > span {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px #0005;
	transition: left .18s ease;
}
body.tool-diff .diff-toggle input:checked + .diff-switch-ui > span { left: 20px; }
body.tool-diff .diff-toggle input:checked + .diff-switch-ui { background: #c8c8c8; }
body.tool-diff .diff-toggle input:checked ~ span:last-child { color: #fff; }
body.tool-diff .diff-toggle input:focus-visible + .diff-switch-ui {
	outline: 2px solid #fff;
	outline-offset: 3px;
}
body.tool-diff .diff-toggle:hover { color: #f4f4f4; }
body.tool-diff .diff-toggle:hover .diff-switch-ui { background: #505050; }
body.tool-diff .diff-toggle:hover input:checked + .diff-switch-ui { background: #d7d7d7; }
@media (max-width: 520px) {
	body.tool-diff .diff-toolbar {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
		align-items: stretch;
	}
	body.tool-diff .diff-toolbar .diff-modes {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		width: 100%;
		gap: 8px;
	}
	body.tool-diff .diff-toolbar .diff-mode { width: 100%; min-width: 0; padding-inline: 8px; }
	body.tool-diff .diff-options {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
		align-items: start;
	}
	body.tool-diff .diff-toolbar .diff-toggle {
		display: grid;
		grid-template-columns: 38px minmax(0, 1fr);
		gap: 7px;
		width: 100%;
		font-size: 11px;
		white-space: normal;
	}
	body.tool-diff .diff-switch-ui { flex-basis: 38px; width: 38px; }
	body.tool-diff .diff-toggle input:checked + .diff-switch-ui > span { left: 16px; }
	body.tool-diff .diff-toolbar .diff-actions { width: 100%; margin-left: 0; }
	body.tool-diff .diff-toolbar .diff-actions button { width: 100%; }
}
