.book-tool {
	margin: 2.25rem 0;
	padding: 1.5rem;
	border: 1px solid #d7dde6;
	border-radius: 16px;
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
	font-size: 16px;
	line-height: 1.6;
	color: #172033;
}

.book-tool__title {
	margin-bottom: 1rem;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.01em;
	color: #0f172a;
}

.book-tool__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1.1rem;
	border: 0;
	border-radius: 10px;
	background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	cursor: pointer;
	text-decoration: none;
	transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
	box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.book-tool__button:hover,
.book-tool__button:focus-visible {
	transform: translateY(-1px);
	box-shadow: 0 10px 22px rgba(15, 23, 42, 0.22);
}

.book-tool__input,
.book-tool__textarea,
.book-tool__select {
	width: 100%;
	padding: 0.8rem 0.9rem;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.92);
	color: inherit;
	font-size: 16px;
	line-height: 1.6;
	box-sizing: border-box;
}

.book-tool__input:focus,
.book-tool__textarea:focus,
.book-tool__select:focus {
	border-color: #334155;
	outline: 2px solid rgba(51, 65, 85, 0.14);
	outline-offset: 0;
}

.book-tool__textarea {
	min-height: 8.5rem;
	resize: vertical;
}

.book-tool__result {
	margin-top: 1.25rem;
	padding: 1rem 1.1rem;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: rgba(248, 250, 252, 0.95);
	font-size: 16px;
	line-height: 1.6;
	color: #1e293b;
}

.book-tool__field {
	display: flex;
	flex-direction: column;
	margin-bottom: 1rem;
}

.book-tool__guide {
	margin: 0 0 1rem !important;
	color: #334155;
}

.book-tool__count {
	min-height: 3rem;
	margin-top: 0.75rem;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.04em;
	color: #0f172a;
}

.book-tool__stack {
	display: grid;
	gap: 0.75rem;
}

.book-tool [hidden],
.book-tools-root.book-tool [hidden] {
	display: none !important;
}

.book-tool__muted {
	font-size: 14px;
	line-height: 1.6;
	color: #475569;
}

.book-tool__result-heading,
.book-tools-root.book-tool .book-tool__result-heading {
	display: inline-block;
	margin-bottom: 1.5rem !important;
	padding-bottom: 0.18rem;
	border-bottom: 1px solid #0f172a;
	color: #0f172a;
	font-size: 1.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.3;
}

.book-tools-root.book-tool textarea.book-tool__textarea,
.book-tools-root.book-tool input.book-tool__input {
	padding: 5px 10px;
	margin-bottom: 1rem;
}

.book-tools-root.book-tool input.book-tool__input {
	height: auto;
}

.book-tools-root.book-tool .book-tool__result {
	margin-top: 1.5rem;
}

.book-tools-root.book-tool p {
	margin-bottom: 1.5rem !important;
}

.book-tools-root.book-tool p:last-child {
	margin-bottom: 0 !important;
}

.book-tools-root.book-tool ul {
	margin-bottom: 20px !important;
}

.book-tools-root.book-tool ul li,
.book-tools-root.book-tool ol li {
	margin-top: 4px !important;
	margin-bottom: 4px !important;
}

.book-tools-root.book-tool [class$="__actions"] {
	margin-top: 40px !important;
}

.book-tool__choices {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
}

@media (min-width: 640px) {
	.book-tool__choices {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.book-tool__button--block {
	width: 100%;
	min-height: 3.25rem;
	padding: 0.85rem 1rem;
}

.book-tool__button--block:disabled {
	cursor: default;
}

.book-tool__button:disabled {
	opacity: 0.72;
	cursor: default;
	transform: none;
	box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.book-tool__button.book-tool__button--selected {
	background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
	color: #0f172a;
	box-shadow: 0 0 0 2px #334155;
	transform: none;
}

.book-tool__button.book-tool__button--selected:hover,
.book-tool__button.book-tool__button--selected:focus-visible {
	background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
	color: #0f172a;
	box-shadow: 0 0 0 2px #334155;
	transform: none;
}

.book-tools-root.book-tool .book-tool__result [data-role="next"] {
	display: grid;
	gap: 0.75rem;
}

.book-tools-root.book-tool .book-tool__result .book-tool__input,
.book-tools-root.book-tool .book-tool__result .book-tool__button--block {
	display: block;
	width: 100%;
}

.book-tools-root.book-tool .book-tool__result .book-tool__stack + .book-tool__stack {
	margin-top: 0.75rem;
}

.book-tools-root.book-tool .book-tool__result [data-role="prompt"],
.book-tools-root.book-tool .book-tool__result [data-role="final"] {
	margin-top: 0.75rem !important;
}

.book-tools-root.book-tool .book-tool__result:empty {
	display: none;
}
