@charset "UTF-8";
/* CSS Document */
/* 画像の背景を透明にするツール */
/* みんなの知識 ちょっと便利帳 */
/* 2026-11-10 */

/* ルート：全体を囲むボーダー（3px / 角丸4px / 上下マージン20px・左右0） */
.bgt {
    --bgt-main: #0e7490;
    --bgt-main-dark: #164e63;
    --bgt-main-soft: #ecfeff;
    --bgt-frame: #06b6d4;
    --bgt-text: #1e293b;
    --bgt-sub: #64748b;
    --bgt-line: #e2e8f0;
    --bgt-bg: #f8fafc;
    --bgt-danger: #e11d48;

    display: block;
    box-sizing: border-box;
    max-width: 100%;
    margin: 20px 0;
    padding: 16px;
    border: 3px solid var(--bgt-frame);
    border-radius: 4px;
    background: #fff;
    color: var(--bgt-text);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.6;
    text-align: left;
}
.bgt *,
.bgt *::before,
.bgt *::after {
    box-sizing: border-box;
}
.bgt .bgt-hidden {
    display: none !important;
}

/* タイトル（中央寄せ） */
.bgt .bgt-header {
    margin: 0 0 20px;
    text-align: center;
}
.bgt .bgt-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--bgt-main-dark);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: normal;
    text-align: center;
}
.bgt .bgt-title::before,
.bgt .bgt-title::after,
.bgt .bgt-heading::before,
.bgt .bgt-heading::after {
    content: none;
}
.bgt .bgt-title svg {
    flex: none;
    width: 32px;
    height: 32px;
}
.bgt .bgt-lead {
    margin: 4px 0 0;
    color: var(--bgt-sub);
    font-size: 14px;
    text-align: center;
}

/* セクション */
.bgt .bgt-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.bgt .bgt-section {
    margin: 0;
    padding: 20px;
    border: 1px solid var(--bgt-line);
    border-radius: 4px;
    background: #fff;
}
.bgt .bgt-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--bgt-text);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: normal;
}
.bgt .bgt-step {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bgt-main);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

/* ドロップゾーン */
.bgt .bgt-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px 16px;
    border: 2px dashed #67e8f9;
    border-radius: 4px;
    background: var(--bgt-main-soft);
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}
.bgt .bgt-drop:hover,
.bgt .bgt-drop:focus-visible,
.bgt .bgt-drop.bgt-dragover {
    border-color: var(--bgt-main);
    background: #cffafe;
    outline: none;
}
.bgt .bgt-drop svg {
    width: 48px;
    height: 48px;
    color: var(--bgt-main);
}
.bgt .bgt-drop-main {
    margin: 0;
    font-weight: 600;
}
.bgt .bgt-drop-sub {
    margin: 0;
    color: var(--bgt-sub);
    font-size: 14px;
}
.bgt .bgt-link {
    color: var(--bgt-main);
    font-weight: 600;
    text-decoration: underline;
}
.bgt .bgt-hint {
    margin: 8px 0 0;
    color: var(--bgt-sub);
    font-size: 12px;
}
.bgt .bgt-fileinfo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 4px;
    background: var(--bgt-main-soft);
    color: var(--bgt-main-dark);
    font-size: 14px;
    font-weight: 600;
    word-break: break-all;
}

/* 作業エリア（左：プレビュー／右：設定） */
.bgt .bgt-work {
    display: block;
}
.bgt .bgt-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px 28px;
    margin-top: 20px;
    align-items: start;
}
.bgt .bgt-controls .bgt-wide {
    grid-column: 1 / -1;
}
.bgt .bgt-controls .bgt-group + .bgt-group {
    margin-top: 0;
}
.bgt .bgt-stage {
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
}
.bgt .bgt-section.bgt-section-wide {
    padding: 14px;
}
.bgt .bgt-compare {
    position: relative;
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    line-height: 0;
    background: #fff;
    cursor: ew-resize;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}
.bgt .bgt-compare canvas {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    margin: 0;
}
.bgt .bgt-compare #bgt-view {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
}
.bgt .bgt-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .35);
    pointer-events: none;
}
.bgt .bgt-badge {
    position: absolute;
    top: 8px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: 12px;
    line-height: 1.5;
    pointer-events: none;
}
.bgt .bgt-badge-l { left: 8px; }
.bgt .bgt-badge-r { right: 8px; }
.bgt .bgt-cmp-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--bgt-sub);
}
.bgt .bgt-cmp-row span { flex: none; }
.bgt .bgt-working {
    margin: 8px 0 0;
    color: var(--bgt-sub);
    font-size: 12px;
    text-align: center;
    min-height: 18px;
}

/* 読み込んだ画像の一覧 */
.bgt .bgt-thumbs-wrap {
    margin: 0 0 16px;
}
.bgt .bgt-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.bgt .bgt-adddrop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    margin: 10px 0 0;
    padding: 10px 12px;
    border: 2px dashed #67e8f9;
    border-radius: 4px;
    background: var(--bgt-main-soft);
    color: var(--bgt-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}
.bgt .bgt-adddrop small {
    color: var(--bgt-sub);
    font-size: 12px;
    font-weight: 400;
}
.bgt .bgt-adddrop:hover,
.bgt .bgt-adddrop.bgt-dragover {
    border-color: var(--bgt-main);
    background: #cffafe;
}
.bgt .bgt-thumb {
    position: relative;
    width: 72px;
    height: 72px;
    border: 2px solid var(--bgt-line);
    border-radius: 4px;
    background: #fff;
}
.bgt .bgt-thumb.bgt-thumb-on {
    border-color: var(--bgt-main);
    box-shadow: 0 0 0 2px #a5f3fc;
}
.bgt .bgt-thumb-pick {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 2px;
    overflow: hidden;
    background: #f1f5f9;
    cursor: pointer;
}
.bgt .bgt-thumb-pick img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
}
.bgt .bgt-thumb-del {
    position: absolute;
    top: -8px;
    right: -8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    background: #fff;
    color: #475569;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}
.bgt .bgt-thumb-del:hover {
    border-color: var(--bgt-danger);
    color: var(--bgt-danger);
}

/* 設定 */
.bgt .bgt-sub {
    margin: 0 0 10px;
    padding: 0 0 4px;
    border-bottom: 1px solid var(--bgt-line);
    color: var(--bgt-main-dark);
    font-size: 14px;
    font-weight: 700;
}
.bgt .bgt-group + .bgt-group {
    margin-top: 20px;
}
.bgt .bgt-field + .bgt-field {
    margin-top: 12px;
}
.bgt .bgt-two > .bgt-field + .bgt-field {
    margin-top: 0;
}
.bgt .bgt-drop.bgt-compact {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 12px;
    padding: 12px 16px;
}
.bgt .bgt-drop.bgt-compact svg {
    width: 28px;
    height: 28px;
}
.bgt .bgt-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin: 0 0 4px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}
.bgt .bgt-val {
    color: var(--bgt-sub);
    font-size: 13px;
    font-weight: 500;
}
.bgt .bgt-input {
    display: block;
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    box-shadow: none;
    color: var(--bgt-text);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
}
.bgt .bgt-input:focus {
    border-color: var(--bgt-main);
    outline: 2px solid #a5f3fc;
    outline-offset: 0;
}
.bgt .bgt-range {
    display: block;
    width: 100%;
    margin: 0;
    accent-color: var(--bgt-main);
}
.bgt .bgt-ends {
    display: flex;
    justify-content: space-between;
    margin: 0;
    color: #94a3b8;
    font-size: 11px;
}
.bgt .bgt-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.bgt .bgt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.bgt .bgt-chip {
    margin: 0;
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    background: #fff;
    color: var(--bgt-text);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}
.bgt .bgt-chip:hover {
    border-color: var(--bgt-main);
    background: var(--bgt-main-soft);
}
.bgt .bgt-chip.bgt-chip-on {
    border-color: var(--bgt-main);
    background: var(--bgt-main);
    color: #fff;
}

/* ボタン */
.bgt .bgt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.bgt .bgt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 4px;
    box-shadow: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, border-color .15s;
}
.bgt .bgt-btn svg {
    flex: none;
    width: 18px;
    height: 18px;
}
.bgt .bgt-btn:disabled {
    opacity: .6;
    cursor: wait;
}
.bgt .bgt-btn-primary {
    background: var(--bgt-main);
    color: #fff;
}
.bgt .bgt-btn-primary:hover:not(:disabled) {
    background: var(--bgt-main-dark);
}
.bgt .bgt-btn-plain {
    border-color: #cbd5e1;
    background: #fff;
    color: var(--bgt-text);
}
.bgt .bgt-btn-plain:hover:not(:disabled) {
    background: #f1f5f9;
}
.bgt .bgt-btn-danger {
    background: #fff1f2;
    color: var(--bgt-danger);
}
.bgt .bgt-btn-danger:hover {
    background: #ffe4e6;
}
.bgt .bgt-status {
    margin: 10px 0 0;
    color: var(--bgt-sub);
    font-size: 14px;
}
.bgt .bgt-status.bgt-error {
    color: var(--bgt-danger);
    font-weight: 600;
}
.bgt .bgt-note {
    margin: 20px 0 0;
    color: #94a3b8;
    font-size: 12px;
    text-align: center;
}

/* ===== ツール下の解説文（検索エンジン向けの本文を兼ねる） ===== */
.bgt-article {
    --bgt-main-dark: #164e63;
    --bgt-frame: #06b6d4;
    --bgt-text: #1e293b;
    --bgt-sub: #64748b;
    --bgt-line: #e2e8f0;

    display: block;
    box-sizing: border-box;
    max-width: 100%;
    margin: 20px 0;
    padding: 20px;
    border: 3px solid var(--bgt-frame);
    border-radius: 4px;
    background: #fff;
    color: var(--bgt-text);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.8;
    text-align: left;
}
.bgt-article *,
.bgt-article *::before,
.bgt-article *::after {
    box-sizing: border-box;
}
.bgt-article .bgt-a-h2 {
    margin: 36px 0 14px;
    padding: 2px 0 6px 12px;
    border: 0;
    border-left: 4px solid var(--bgt-frame);
    border-bottom: 1px solid var(--bgt-line);
    background: none;
    color: var(--bgt-text);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: normal;
}
.bgt-article .bgt-a-h2:first-child {
    margin-top: 0;
}
.bgt-article .bgt-a-h3 {
    margin: 22px 0 6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--bgt-main-dark);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: normal;
}
.bgt-article .bgt-a-h2::before,
.bgt-article .bgt-a-h2::after,
.bgt-article .bgt-a-h3::before,
.bgt-article .bgt-a-h3::after {
    content: none;
}
.bgt-article .bgt-a-p {
    margin: 0 0 12px;
    padding: 0;
}
.bgt-article .bgt-a-ul,
.bgt-article .bgt-a-ol {
    margin: 0 0 12px;
    padding: 0 0 0 1.6em;
}
.bgt-article .bgt-a-ul { list-style: disc outside; }
.bgt-article .bgt-a-ol { list-style: decimal outside; }
.bgt-article .bgt-a-ul li,
.bgt-article .bgt-a-ol li {
    display: list-item;
    margin: 0 0 6px;
    padding: 0;
}
.bgt-article .bgt-a-scroll {
    margin: 0 0 12px;
    overflow-x: auto;
}
.bgt-article .bgt-a-table {
    width: 100%;
    min-width: 620px;
    margin: 0;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.6;
}
.bgt-article .bgt-a-table th,
.bgt-article .bgt-a-table td {
    padding: 8px 10px;
    border: 1px solid var(--bgt-line);
    text-align: left;
    vertical-align: top;
}
.bgt-article .bgt-a-table th {
    background: #ecfeff;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .bgt {
        padding: 16px;
    }
    .bgt .bgt-section {
        padding: 14px;
    }
    .bgt .bgt-title {
        font-size: 20px;
    }
}

/* 追加：見比べの背景（透明な画像用の市松）・ヒストグラム・グループのリセット */
.bgt .bgt-compare {
    background-color: #fff;
    background-image:
        linear-gradient(45deg, #e7e5e4 25%, transparent 25%),
        linear-gradient(-45deg, #e7e5e4 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e7e5e4 75%),
        linear-gradient(-45deg, transparent 75%, #e7e5e4 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.bgt .bgt-grp-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 10px;
    padding: 0 0 4px;
    border-bottom: 1px solid var(--bgt-line);
}
.bgt .bgt-grp-head .bgt-sub {
    margin: 0;
    padding: 0;
    border: 0;
}
.bgt .bgt-mini {
    margin: 0;
    padding: 2px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    color: var(--bgt-sub);
    font-family: inherit;
    font-size: 12px;
    line-height: 1.5;
    cursor: pointer;
}
.bgt .bgt-mini:hover {
    border-color: var(--bgt-main);
    color: var(--bgt-main-dark);
}
.bgt .bgt-histo-wrap {
    padding: 10px 12px;
    border: 1px solid var(--bgt-line);
    border-radius: 4px;
    background: #fafaf9;
}
.bgt .bgt-histo {
    display: block;
    width: 100%;
    height: 84px;
    margin: 0;
    border-radius: 2px;
}
.bgt .bgt-histo-note {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2px 12px;
    margin: 6px 0 0;
    color: var(--bgt-sub);
    font-size: 12px;
}
.bgt .bgt-fname-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 0;
    padding: 0;
    border: 0;
}
.bgt .bgt-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.bgt .bgt-radio input {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--bgt-main);
}
.bgt .bgt-center-range {
    background: linear-gradient(90deg, transparent calc(50% - 1px), #cbd5e1 calc(50% - 1px), #cbd5e1 calc(50% + 1px), transparent calc(50% + 1px)) center / 100% 10px no-repeat;
}

/* 追加：透明化ツール専用 */
.bgt .bgt-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 16px; margin:0 0 6px; }
.bgt .bgt-tools { margin:0; }
.bgt .bgt-toolbtns { display:flex; flex-wrap:wrap; gap:6px; }
.bgt .bgt-mini:disabled { opacity:.45; cursor:default; }
.bgt .bgt-toolhint { margin:0 0 8px; }
.bgt .bgt-scroll { width:100%; max-height:640px; overflow:auto; border:1px solid var(--bgt-line); border-radius:4px; background:#f5f5f4; text-align:center; }
.bgt .bgt-canvasbox { position:relative; display:inline-block; vertical-align:top; line-height:0; margin:0 auto; }
.bgt .bgt-canvasbox canvas { display:block; width:100%; height:100%; touch-action:pinch-zoom; cursor:crosshair; }
.bgt .bgt-view-brush { touch-action:none !important; cursor:none !important; }
.bgt .bgt-bg-checker { background-color:#fff; background-image:linear-gradient(45deg,#d6d3d1 25%,transparent 25%),linear-gradient(-45deg,#d6d3d1 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#d6d3d1 75%),linear-gradient(-45deg,transparent 75%,#d6d3d1 75%); background-size:16px 16px; background-position:0 0,0 8px,8px -8px,-8px 0; }
.bgt .bgt-bg-white { background:#fff; }
.bgt .bgt-bg-black { background:#000; }
.bgt .bgt-bg-red { background:#e11d48; }
.bgt .bgt-bg-green { background:#16a34a; }
.bgt .bgt-bg-blue { background:#2563eb; }
.bgt .bgt-cursor { position:absolute; z-index:3; border:1.5px solid #fff; box-shadow:0 0 0 1px #000; border-radius:50%; transform:translate(-50%,-50%); pointer-events:none; }
.bgt .bgt-viewrow { display:flex; flex-wrap:wrap; align-items:center; gap:8px 20px; margin:10px 0 0; }
.bgt .bgt-inline { display:inline-flex; align-items:center; gap:8px; margin:0; font-size:13px; }
.bgt .bgt-input.bgt-small { width:auto; padding:4px 8px; font-size:13px; }
.bgt .bgt-bginfo { margin:6px 0 0; }
.bgt .bgt-bginfo.bgt-bginfo-on::before { content:""; display:inline-block; width:12px; height:12px; margin-right:6px; vertical-align:-1px; border:1px solid #78716c; background:var(--bgt-bgc, #fff); }
.bgt .bgt-methods { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:8px; }
.bgt .bgt-method { display:flex; align-items:flex-start; gap:8px; margin:0; padding:8px 10px; border:1px solid var(--bgt-line); border-radius:4px; background:#fff; cursor:pointer; font-size:14px; }
.bgt .bgt-method:has(input:checked) { border-color:var(--bgt-main); background:var(--bgt-main-soft); }
.bgt .bgt-method input { flex:none; width:18px; height:18px; margin:2px 0 0; accent-color:var(--bgt-main); }
.bgt .bgt-method b { display:block; font-weight:700; }
.bgt .bgt-method small { display:block; margin-top:2px; color:var(--bgt-sub); font-size:12px; line-height:1.5; }
.bgt .bgt-swatches { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 8px; }
.bgt .bgt-swatch { position:relative; width:34px; height:34px; padding:0; border:2px solid #fff; border-radius:50%; box-shadow:0 0 0 1px #78716c; cursor:pointer; }
.bgt .bgt-swatch span { position:absolute; right:-6px; top:-8px; width:16px; height:16px; border-radius:50%; background:#1c1917; color:#fff; font-size:11px; line-height:16px; }
