.tbr-wrapper {
	max-width: 880px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #1f2430;
}

.tbr-h1 {
	font-size: 1.9rem;
	margin: 0 0 0.6rem;
}

.tbr-intro-text {
	font-size: 1.02rem;
	line-height: 1.6;
	color: #4a5060;
	margin-bottom: 1.8rem;
}

.tbr-tool {
	border: 1px solid #e2e5ec;
	border-radius: 14px;
	padding: 1.5rem;
	background: #fafbfc;
	margin-bottom: 2.2rem;
}

.tbr-dropzone {
	border: 2px dashed #c7cdda;
	border-radius: 12px;
	padding: 2.5rem 1.5rem;
	text-align: center;
	cursor: pointer;
	background: #fff;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.tbr-dropzone:hover,
.tbr-dropzone.is-dragover {
	border-color: #3b82f6;
	background: #f5f9ff;
}

.tbr-dropzone-content svg {
	color: #7c86a1;
	margin-bottom: 0.5rem;
}

.tbr-dropzone-content p {
	margin: 0.3rem 0;
}

.tbr-hint {
	font-size: 0.85rem;
	color: #8a91a4;
}

.tbr-canvases {
	display: flex;
	gap: 1.2rem;
	flex-wrap: wrap;
	margin-bottom: 1.4rem;
}

.tbr-canvas-box {
	flex: 1 1 260px;
	position: relative;
	background:
		linear-gradient(45deg, #e9ebf0 25%, transparent 25%),
		linear-gradient(-45deg, #e9ebf0 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, #e9ebf0 75%),
		linear-gradient(-45deg, transparent 75%, #e9ebf0 75%);
	background-size: 16px 16px;
	background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
	background-color: #fff;
	border-radius: 10px;
	border: 1px solid #e2e5ec;
	min-height: 220px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.tbr-canvas-label {
	position: absolute;
	top: 8px;
	left: 10px;
	font-size: 0.75rem;
	font-weight: 600;
	color: #56607a;
	background: rgba(255,255,255,0.85);
	padding: 2px 8px;
	border-radius: 6px;
	z-index: 2;
}

.tbr-canvas-box img,
.tbr-canvas-box canvas {
	max-width: 100%;
	max-height: 320px;
	display: block;
	object-fit: contain;
}

.tbr-loading {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.7rem;
	background: rgba(255,255,255,0.85);
	z-index: 3;
}

.tbr-spinner {
	width: 34px;
	height: 34px;
	border: 3px solid #dbe1ee;
	border-top-color: #3b82f6;
	border-radius: 50%;
	animation: tbr-spin 0.8s linear infinite;
}

@keyframes tbr-spin {
	to { transform: rotate(360deg); }
}

.tbr-control-group {
	margin-bottom: 1.2rem;
}

.tbr-control-label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.5rem;
	font-size: 0.92rem;
}

.tbr-bg-choices {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.tbr-bg-choice {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	border: 1px solid #d7dbe6;
	background: #fff;
	border-radius: 999px;
	padding: 0.4rem 0.9rem 0.4rem 0.5rem;
	font-size: 0.85rem;
	cursor: pointer;
	color: #333;
}

.tbr-bg-choice.is-active {
	border-color: #3b82f6;
	background: #eff5ff;
	color: #1c4ed8;
}

.tbr-swatch {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 1px solid #d0d5e0;
	display: inline-block;
}

.tbr-swatch-transparent {
	background:
		linear-gradient(45deg, #ccc 25%, transparent 25%),
		linear-gradient(-45deg, #ccc 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, #ccc 75%),
		linear-gradient(-45deg, transparent 75%, #ccc 75%);
	background-size: 6px 6px;
	background-position: 0 0, 0 3px, 3px -3px, -3px 0px;
}

.tbr-bg-custom input[type="color"] {
	width: 20px;
	height: 20px;
	border: none;
	padding: 0;
	background: none;
	cursor: pointer;
}

.tbr-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem;
}

.tbr-btn {
	border: none;
	border-radius: 8px;
	padding: 0.65rem 1.3rem;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
}

.tbr-btn-primary {
	background: #3b82f6;
	color: #fff;
}

.tbr-btn-primary:hover {
	background: #2f6fe0;
}

.tbr-btn-secondary {
	background: #16a34a;
	color: #fff;
}

.tbr-btn-secondary:hover {
	background: #128a3e;
}

.tbr-btn-ghost {
	background: transparent;
	color: #56607a;
	border: 1px solid #d7dbe6;
}

.tbr-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.tbr-error {
	color: #c0392b;
	font-size: 0.9rem;
	margin-top: 0.8rem;
}

.tbr-guide, .tbr-faq {
	margin-bottom: 2rem;
}

.tbr-guide h2, .tbr-faq h2 {
	font-size: 1.35rem;
	margin-bottom: 0.8rem;
}

.tbr-guide ol {
	padding-left: 1.3rem;
	line-height: 1.7;
}

.tbr-faq-item {
	border-bottom: 1px solid #e6e8ee;
	padding: 0.8rem 0;
}

.tbr-faq-item summary {
	font-weight: 600;
	cursor: pointer;
}

.tbr-faq-item p {
	margin: 0.6rem 0 0;
	color: #4a5060;
	line-height: 1.6;
}

@media (max-width: 560px) {
	.tbr-canvases {
		flex-direction: column;
	}
}
