.hcpdf {
	--hcpdf-accent: #1d6f42;
	--hcpdf-accent-2: #155a35;
	--hcpdf-pdf: #c62828;
	--hcpdf-border: #d5dbe1;
	--hcpdf-muted: #5f6b76;
	--hcpdf-bg: #fff;
	--hcpdf-soft: #f4f7f5;
	--hcpdf-error: #b3261e;
	max-width: 820px;
	margin: 1.5em auto;
	font-size: 16px;
	line-height: 1.5;
	box-sizing: border-box;
}
.hcpdf *, .hcpdf *::before, .hcpdf *::after { box-sizing: border-box; }
.hcpdf [hidden] { display: none !important; }
.hcpdf-title { margin: 0 0 .6em; }

.hcpdf-drop {
	border: 2px dashed var(--hcpdf-border); border-radius: 14px; background: var(--hcpdf-soft);
	padding: 2.4em 1em; text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.hcpdf-drop:hover, .hcpdf-drop:focus-visible, .hcpdf-drop.is-over { border-color: var(--hcpdf-accent); background: #e9f3ed; outline: none; }
.hcpdf-drop-icon { width: 44px; height: 44px; color: var(--hcpdf-accent); }
.hcpdf-drop-main { margin: .4em 0 .1em; font-weight: 600; font-size: 1.1em; }
.hcpdf-drop-sub { margin: 0; color: var(--hcpdf-muted); font-size: .9em; }
.hcpdf-cloud { display: flex; gap: .5em; justify-content: center; flex-wrap: wrap; margin-top: .8em; }

.hcpdf-list, .hcpdf-outputs { list-style: none; margin: 1em 0 0; padding: 0; }
.hcpdf-item, .hcpdf-out {
	display: flex; align-items: center; gap: .7em; padding: .55em .7em;
	border: 1px solid var(--hcpdf-border); border-radius: 10px; background: var(--hcpdf-bg); margin-bottom: .45em;
}
.hcpdf-item.has-error { border-color: var(--hcpdf-error); }
.hcpdf-ext { font-size: .7em; font-weight: 700; letter-spacing: .04em; background: var(--hcpdf-accent); color: #fff; border-radius: 5px; padding: .25em .45em; min-width: 3.4em; text-align: center; }
.hcpdf-ext.is-pdf { background: var(--hcpdf-pdf); }
.hcpdf-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hcpdf-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hcpdf-meta { font-size: .82em; color: var(--hcpdf-muted); }
.hcpdf-item.has-error .hcpdf-meta { color: var(--hcpdf-error); }
.hcpdf-item-btns { display: flex; gap: .25em; }
.hcpdf-icon { width: 2em; height: 2em; border-radius: 6px; padding: 0; border: 1px solid var(--hcpdf-border); background: var(--hcpdf-bg); color: inherit; cursor: pointer; font-size: .95em; line-height: 1; }
.hcpdf-icon:hover:not(:disabled) { border-color: var(--hcpdf-accent); color: var(--hcpdf-accent); }
.hcpdf-icon:disabled { opacity: .35; cursor: default; }

.hcpdf-options { margin: 1.1em 0 0; padding: 1em 1.1em; border: 1px solid var(--hcpdf-border); border-radius: 12px; min-width: 0; }
.hcpdf-options legend { font-weight: 700; padding: 0 .3em; }
.hcpdf-sheetlist { margin-bottom: .9em; font-size: .92em; }
.hcpdf-sheets { display: flex; flex-wrap: wrap; gap: .4em; margin-top: .35em; }
.hcpdf-sheet { display: inline-flex; align-items: center; gap: .4em; padding: .3em .6em; border: 1px solid var(--hcpdf-border); border-radius: 8px; cursor: pointer; }
.hcpdf-sheet:has(input:checked) { border-color: var(--hcpdf-accent); background: var(--hcpdf-soft); }
.hcpdf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8em; }
.hcpdf-grid > label { display: flex; flex-direction: column; gap: .25em; font-size: .88em; font-weight: 600; }
.hcpdf select { width: 100%; padding: .42em .5em; border: 1px solid var(--hcpdf-border); border-radius: 8px; background: var(--hcpdf-bg); color: inherit; font: inherit; font-weight: 400; }
.hcpdf-checks { display: grid; grid-template-columns: 1fr 1fr; gap: .35em 1em; margin-top: 1em; font-size: .92em; }
.hcpdf-checks label { cursor: pointer; }

.hcpdf-actions { display: flex; gap: .6em; flex-wrap: wrap; margin-top: 1.1em; }
.hcpdf-btn {
	appearance: none; display: inline-block; border: 1px solid var(--hcpdf-accent); background: var(--hcpdf-accent); color: #fff !important;
	padding: .65em 1.4em; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important; line-height: 1.3;
}
.hcpdf-btn:hover:not(:disabled) { background: var(--hcpdf-accent-2); border-color: var(--hcpdf-accent-2); }
.hcpdf-btn:disabled { opacity: .45; cursor: not-allowed; }
.hcpdf-btn-ghost { background: transparent; color: var(--hcpdf-accent) !important; }
.hcpdf-btn-ghost:hover:not(:disabled) { background: var(--hcpdf-soft); color: var(--hcpdf-accent-2) !important; }
.hcpdf-out .hcpdf-btn { padding: .45em 1em; font-size: .9em; }

.hcpdf-progress { margin-top: 1em; }
.hcpdf-bar { height: 8px; border-radius: 99px; background: #e3e8e5; overflow: hidden; }
.hcpdf-bar span { display: block; height: 100%; width: 0; background: var(--hcpdf-accent); transition: width .25s; }
.hcpdf-status { margin: .4em 0 0; font-size: .92em; }
.hcpdf-msg { margin-top: 1em; padding: .7em .9em; border-radius: 8px; background: var(--hcpdf-soft); font-size: .92em; }
.hcpdf-msg.is-error { background: #fdecea; color: var(--hcpdf-error); }
.hcpdf-msg.is-warn { background: #fff4de; color: #7a4a00; }

.hcpdf-result { margin-top: 1.4em; padding-top: 1.1em; border-top: 1px solid var(--hcpdf-border); }
.hcpdf-preview { margin-top: .8em; }
.hcpdf-frame { width: 100%; height: 70vh; min-height: 420px; border: 1px solid var(--hcpdf-border); border-radius: 10px; background: #f0f0f0; }

.hcpdf-privacy, .hcpdf-credit { margin: 1.2em 0 0; font-size: .82em; color: var(--hcpdf-muted); text-align: center; }
.hcpdf-credit { margin-top: .2em; }

@media (max-width: 640px) {
	.hcpdf-grid { grid-template-columns: 1fr 1fr; }
	.hcpdf-checks { grid-template-columns: 1fr; }
	.hcpdf-out { flex-wrap: wrap; }
	.hcpdf-frame { height: 60vh; }
}
@media (max-width: 420px) { .hcpdf-grid { grid-template-columns: 1fr; } }
