/* 2026-08-09: 設定枠の調整、2段表示、選択文字の中央配置 */

.bk-character-preset-band {
	padding-top: 4px;
	padding-bottom: 4px;
}

.bk-character-add-toggle,
.bk-character-layer-action {
	padding-right: 8px;
	padding-left: 8px;
}

.bk-character-controls-primary .bk-character-tool {
	padding-right: 10px;
	padding-left: 10px;
}

@media (max-width: 991px) {
	.bk-character-controls-primary .bk-character-tool {
		padding-right: 7px;
		padding-left: 7px;
	}
}

@media (min-width: 992px) {
  #main .image-wrapper {
    padding: 5px 50px;
  }

  #basearea:not(.bk-canvas-ready) {
    visibility: hidden;
  }
}

.bk-character-position-guide {
	display: flex;
	min-height: 44px;
	margin-top: 0;
	margin-bottom: 10px;
	padding-right: 0;
	padding-left: 0;
	align-items: center;
	gap: 8px;
}

.bk-character-position-guide-text {
	min-width: 0;
	flex: 1 1 auto;
}

.bk-character-position-guide .fa-solid {
	margin-right: 0;
}

.bk-character-center-position {
	min-height: 30px;
	padding: 3px 8px;
	flex: 0 0 auto;
	margin-left: auto;
	color: #245580;
	font-size: 12px;
	font-weight: 700;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.bk-character-center-position:disabled {
	color: #999;
}

.bk-character-grid-setting,
.bk-character-style-inheritance-setting,
.bk-character-view-setting,
.bk-character-output-setting {
	padding: 0;
	margin-bottom: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
}

.bk-character-grid-setting .bk-output-format,
.bk-character-style-inheritance-setting .bk-output-format,
.bk-character-view-setting .bk-output-format,
.bk-character-output-setting .bk-output-format {
	margin-bottom: 10px;
}

@media (max-width: 991px) {
	.bk-character-view-setting {
		display: none;
	}
}

.bk-character-grid-setting .bk-output-format-label {
	display: block;
	align-items: normal;
	gap: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	font-weight: 700;
	cursor: default;
}

#character_edit_text,
#character_font_toggle,
#character_size_toggle,
#character_color_toggle,
#character_shadow_toggle,
#character_outline_toggle,
#character_background_toggle {
	align-items: stretch;
	flex-direction: column;
	justify-content: center;
	gap: 0;
	min-height: 66px;
	padding-top: 6px;
	padding-bottom: 6px;
}

#character_edit_text .bk-character-tool-main,
#character_font_toggle .bk-character-tool-main,
#character_size_toggle .bk-character-tool-main,
#character_color_toggle .bk-character-tool-main,
#character_shadow_toggle .bk-character-tool-main,
#character_outline_toggle .bk-character-tool-main,
#character_background_toggle .bk-character-tool-main {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 3 1 0;
	width: 100%;
	padding: 0;
	border-bottom: 1px solid #ccc;
	color: #666;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

#character_edit_text .bk-character-tool-sub,
#character_font_toggle .bk-character-tool-sub,
#character_size_toggle .bk-character-tool-sub,
#character_color_toggle .bk-character-tool-sub,
#character_shadow_toggle .bk-character-tool-sub,
#character_outline_toggle .bk-character-tool-sub,
#character_background_toggle .bk-character-tool-sub {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 7 1 0;
	max-width: 100%;
	padding: 0;
	border-left: 0;
	font-size: 14px;
	line-height: 1.2;
}

#character_edit_text .bk-character-tool-sub {
	font-size: 16px;
}

.bk-character-current-color {
	display: block;
	box-sizing: border-box;
	width: 28px;
	height: 28px;
	border: 1px solid #888;
	border-radius: 2px;
	background: var(--bk-character-current-color, #333333);
	box-shadow: none;
}

.bk-character-current-color.is-disabled {
	position: relative;
	overflow: hidden;
	background: #fff;
}

.bk-character-current-color.is-disabled::after {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 140%;
	height: 2px;
	background: #999;
	content: "";
	transform: translate(-50%, -50%) rotate(-45deg);
}

.bk-character-controls-primary .bk-character-tool {
	min-height: 66px;
}

.bk-character-add-menu-backdrop {
	position: fixed;
	z-index: 1000;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
}

.bk-character-add-menu-backdrop[hidden] {
	display: none !important;
}

.bk-character-add-menu.is-open {
	z-index: 1001;
}

.bk-character-add-menu.is-open .bk-character-preset-list {
	z-index: 1002;
}

.bk-character-old-link-wrap {
	margin-bottom: 15px;
}

.bk-character-more-handle {
	top: -48px;
	left: 50%;
	width: 34px;
	height: 34px;
	margin-left: 5px;
	padding: 0;
}

.bk-character-overlay .bk-overlay-handle-delete {
	display: none;
}

.bk-character-text-edit-handle {
	margin-left: -39px;
}

.bk-character-action-menu {
	position: absolute;
	z-index: 12;
	top: -56px;
	left: 50%;
	box-sizing: border-box;
	width: min(280px, calc(100vw - 20px));
	min-width: min(260px, calc(100vw - 20px));
	padding: 5px;
	border: 1px solid #ccc;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
	transform: translate(-50%, -100%);
}

.bk-character-overlay.bk-overlay-is-active {
	z-index: 20;
}

.bk-character-overlay.bk-character-action-menu-open {
	z-index: 100;
}

.bk-character-action-menu.is-below {
	top: -6px;
	transform: translate(-50%, 0);
}

.bk-character-action-menu[hidden],
.bk-character-overlay.bk-overlay-is-inactive .bk-character-action-menu {
	display: none !important;
}

.bk-character-action-menu-main[hidden] {
	display: none !important;
}

.bk-character-action-menu-main,
.bk-character-style-slot-choices {
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	overscroll-behavior: contain;
}

.bk-character-action-menu-main {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.bk-character-action-menu::after {
	position: absolute;
	top: 100%;
	left: 50%;
	width: 10px;
	height: 10px;
	margin-top: -5px;
	border-right: 1px solid #ccc;
	border-bottom: 1px solid #ccc;
	background: #fff;
	content: "";
	transform: translateX(-50%) rotate(45deg);
}

.bk-character-action-menu.is-below::after {
	top: -5px;
	margin-top: 0;
	transform: translateX(-50%) rotate(225deg);
}

.bk-character-action-menu-item {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 9px;
	box-sizing: border-box;
	width: 100%;
	min-height: 42px;
	padding: 8px 11px;
	border: 1px solid #ccc;
	border-radius: 7px;
	background: #fff;
	color: #333;
	font-size: 15px;
	line-height: 1.2;
	text-align: left;
	white-space: nowrap;
}

.bk-character-action-menu-item:hover,
.bk-character-action-menu-item:focus {
	background: #f1f7fa;
	outline: 0;
}

.bk-character-action-menu-item + .bk-character-action-menu-item {
	border-top: 1px solid #ccc;
	border-radius: 7px;
}

.bk-character-action-menu-delete {
	margin-top: 2px;
	border-color: #e3b5b3 !important;
	color: #c9302c;
}

.bk-character-action-menu-delete:hover,
.bk-character-action-menu-delete:focus {
	background: #fff1f0;
	color: #a92622;
}

.bk-character-action-menu-item .fa-solid {
	width: 20px;
	font-size: 17px;
	text-align: center;
}

.bk-overlay-is-small .bk-character-more-handle {
	top: -34px;
	width: 24px;
	height: 24px;
	margin-left: 2px;
}

.bk-overlay-is-small .bk-character-text-edit-handle {
	margin-left: -26px;
}

.bk-overlay-handle-rotate {
	margin-left: -39px;
}

.bk-overlay-handle-move {
	margin-left: 5px;
}

.bk-overlay-is-small .bk-overlay-handle-rotate {
	margin-left: -26px;
}

.bk-overlay-is-small .bk-overlay-handle-move {
	margin-left: 2px;
}

.bk-character-style-slot-save {
	align-items: flex-start;
	flex-direction: column;
	gap: 3px;
	text-align: left;
}

.bk-character-style-slot-save-details {
	display: grid;
	grid-template-columns: 26px auto minmax(0, 1fr);
	align-items: center;
	gap: 7px;
	width: 100%;
	max-width: 100%;
	color: #777;
	font-size: 12px;
	line-height: 1.3;
}

.bk-character-style-slot-save-swatch {
	position: relative;
	display: block;
	box-sizing: border-box;
	width: 24px;
	height: 24px;
	border: 1px solid #888;
	border-radius: 3px;
	overflow: hidden;
	background: var(--bk-character-style-outline-color, #fff);
}

.bk-character-style-slot-save-swatch[hidden] {
	display: none !important;
}

.bk-character-style-slot-choices {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 5px;
	background: #fff;
}

.bk-character-style-slot-choices[hidden] {
	display: none !important;
}

.bk-character-style-slot-load {
	display: grid;
	grid-template-columns: auto 26px auto minmax(0, 1fr);
	align-items: center;
	gap: 7px;
	box-sizing: border-box;
	width: 100%;
	min-height: 38px;
	padding: 7px 8px;
	border: 1px solid #ccc;
	border-radius: 7px;
	background: #fff;
	color: #333;
	font-size: 13px;
	text-align: left;
}

.bk-character-style-slot-back {
	display: flex;
	align-items: center;
	gap: 9px;
	box-sizing: border-box;
	width: 100%;
	min-height: 42px;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 7px;
	background: #fff;
	color: #333;
	font-size: 14px;
	font-weight: 600;
	text-align: left;
	white-space: nowrap;
}

.bk-character-style-slot-back:hover,
.bk-character-style-slot-back:focus {
	background: #eaf5fa;
	outline: 0;
}

.bk-character-style-slot-back .fa-solid {
	width: 18px;
	text-align: center;
}

.bk-character-style-slot-load:hover,
.bk-character-style-slot-load:focus {
	background: #eaf5fa;
	outline: 0;
}

.bk-character-style-slot-load.is-empty {
	color: #777;
}

.bk-character-style-slot-size {
	white-space: nowrap;
}

.bk-character-style-slot-font {
	display: block;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bk-character-style-slot-swatch {
	position: relative;
	display: block;
	box-sizing: border-box;
	width: 24px;
	height: 24px;
	border: 1px solid #999;
	border-radius: 3px;
	overflow: hidden;
	background: var(--bk-character-style-outline-color, #fff);
}

.bk-character-style-slot-save-swatch::after,
.bk-character-style-slot-swatch::after {
	position: absolute;
	z-index: 2;
	inset: 5px;
	border: 1px solid rgba(0, 0, 0, 0.22);
	border-radius: 1px;
	background: var(--bk-character-style-text-color, #333);
	content: "";
}

.bk-character-style-slot-save-swatch.is-no-outline,
.bk-character-style-slot-swatch.is-no-outline {
	background: #fff;
}

.bk-character-style-slot-save-swatch.is-no-outline::before,
.bk-character-style-slot-swatch.is-no-outline::before {
	position: absolute;
	z-index: 1;
	left: 50%;
	top: 50%;
	width: 140%;
	height: 2px;
	background: #999;
	content: "";
	transform: translate(-50%, -50%) rotate(-45deg);
}

.bk-overlay-is-small .bk-character-action-menu {
	top: -42px;
}

.bk-character-old-link {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 72px;
	padding: 12px 16px;
	border: 1px solid #b9ddea;
	border-radius: 10px;
	background: #f3fbfe;
	box-shadow: 0 2px 7px rgba(41, 131, 166, 0.08);
	color: #286f91;
	text-align: left;
	text-decoration: none;
	transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.bk-character-old-link:hover,
.bk-character-old-link:focus {
	border-color: #7fc6df;
	background: #eaf8fd;
	box-shadow: 0 4px 12px rgba(41, 131, 166, 0.14);
	color: #1f688a;
	text-decoration: none;
}

.bk-character-old-link-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 42px;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: #dff3fa;
	color: #2688ad;
	font-size: 18px;
}

.bk-character-old-link-copy {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
	line-height: 1.4;
}

.bk-character-old-link-copy strong {
	font-size: 16px;
}

.bk-character-old-link-copy span {
	color: #627985;
	font-size: 12px;
}

.bk-character-old-link-arrow {
	flex: 0 0 auto;
	color: #4ca4c5;
}

.bk-character-preset-preview {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	border: 1px solid #aaa;
	border-radius: 4px;
	font-family: Arial, sans-serif;
	font-size: 18px;
	font-weight: 800;
	line-height: 1;
}

.bk-character-preset-preview-background {
	border-color: #8ebfce;
	background: #d9f0f7;
	color: #333;
}

.bk-character-preset-preview-outlined,
.bk-character-preset-preview-hollow {
	border-color: transparent;
	background: transparent;
}

.bk-character-preset-preview-outlined {
	color: #333;
	-webkit-text-stroke: 2px #7aaec0;
	paint-order: stroke fill;
}

.bk-character-preset-preview-hollow {
	color: #fff;
	-webkit-text-stroke: 1.5px #333;
	paint-order: stroke fill;
}

.bk-character-quick-guide {
	margin-bottom: 14px;
}

.bk-character-quick-guide-intro {
	display: flex;
	flex-direction: column;
	gap: 3px;
	margin-bottom: 12px;
	padding: 12px 14px;
	border-left: 4px solid #3fb1e4;
	border-radius: 6px;
	background: #eef9fd;
}

.bk-character-quick-guide-intro strong {
	color: #236d8d;
	font-size: 18px;
}

.bk-character-quick-guide-intro span {
	color: #60747d;
	font-size: 13px;
}

.bk-character-quick-steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

.bk-character-quick-steps li {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	min-width: 0;
	padding: 11px;
	border: 1px solid #cfe4ed;
	border-radius: 7px;
	background: #fff;
}

.bk-character-quick-steps li > span:last-child {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
}

.bk-character-quick-step-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 27px;
	width: 27px;
	height: 27px;
	border-radius: 50%;
	background: #3faed8;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
}

.bk-character-quick-steps strong {
	color: #334d59;
	font-size: 14px;
	line-height: 1.45;
}

.bk-character-quick-steps small {
	margin-top: 3px;
	color: #6a7c84;
	font-size: 12px;
	line-height: 1.45;
}

.bk-character-help-details,
.bk-character-faq-list details {
	margin: 0 0 8px;
	border: 1px solid #d5dfe4;
	border-radius: 7px;
	background: #fff;
}

.bk-character-help-details summary,
.bk-character-faq-list summary {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 11px 13px;
	color: #3d5966;
	font-weight: 700;
	line-height: 1.5;
	cursor: pointer;
	list-style: none;
}

.bk-character-help-details summary::-webkit-details-marker,
.bk-character-faq-list summary::-webkit-details-marker {
	display: none;
}

.bk-character-help-details summary::after,
.bk-character-faq-list summary::after {
	flex: 0 0 auto;
	margin-left: auto;
	color: #3998bd;
	font-size: 18px;
	font-weight: 400;
	content: "＋";
}

.bk-character-help-details[open] summary::after,
.bk-character-faq-list details[open] summary::after {
	content: "−";
}

.bk-character-help-details[open] summary,
.bk-character-faq-list details[open] summary {
	border-bottom: 1px solid #dce6ea;
	background: #f5fbfd;
}

.bk-character-help-details-body {
	padding: 4px 14px 8px;
}

.bk-character-help-details-body p {
	margin: 10px 0;
	line-height: 1.65;
}

.bk-character-faq-heading {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 18px 0 9px;
}

.bk-character-faq-heading strong {
	color: #765313;
	font-size: 16px;
}

.bk-character-faq-heading span {
	color: #777;
	font-size: 12px;
}

.bk-character-faq-list summary::before {
	flex: 0 0 auto;
	color: #c47c00;
	content: "Q.";
}

.bk-character-faq-list details p {
	margin: 0;
	padding: 11px 14px 13px 40px;
	color: #4e5d64;
	line-height: 1.7;
}
