@charset "UTF-8";
/* CSS Document */
/* 画像の台形補正ツール */
/* みんなの知識 ちょっと便利帳 */
/* 2026-11-12 */

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

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

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

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

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

/* 作業エリア（左：プレビュー／右：設定） */
.psp .psp-work {
    display: block;
}
.psp .psp-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px 28px;
    margin-top: 20px;
    align-items: start;
}
.psp .psp-controls .psp-wide {
    grid-column: 1 / -1;
}
.psp .psp-controls .psp-group + .psp-group {
    margin-top: 0;
}
.psp .psp-stage {
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
}
.psp .psp-section.psp-section-wide {
    padding: 14px;
}
.psp .psp-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;
}
.psp .psp-compare canvas {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    margin: 0;
}
.psp .psp-compare #psp-view {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
}
.psp .psp-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;
}
.psp .psp-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;
}
.psp .psp-badge-l { left: 8px; }
.psp .psp-badge-r { right: 8px; }
.psp .psp-cmp-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--psp-sub);
}
.psp .psp-cmp-row span { flex: none; }
.psp .psp-working {
    margin: 8px 0 0;
    color: var(--psp-sub);
    font-size: 12px;
    text-align: center;
    min-height: 18px;
}

/* 読み込んだ画像の一覧 */
.psp .psp-thumbs-wrap {
    margin: 0 0 16px;
}
.psp .psp-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.psp .psp-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 #e879f9;
    border-radius: 4px;
    background: var(--psp-main-soft);
    color: var(--psp-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}
.psp .psp-adddrop small {
    color: var(--psp-sub);
    font-size: 12px;
    font-weight: 400;
}
.psp .psp-adddrop:hover,
.psp .psp-adddrop.psp-dragover {
    border-color: var(--psp-main);
    background: #fae8ff;
}
.psp .psp-thumb {
    position: relative;
    width: 72px;
    height: 72px;
    border: 2px solid var(--psp-line);
    border-radius: 4px;
    background: #fff;
}
.psp .psp-thumb.psp-thumb-on {
    border-color: var(--psp-main);
    box-shadow: 0 0 0 2px #f5d0fe;
}
.psp .psp-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;
}
.psp .psp-thumb-pick img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
}
.psp .psp-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;
}
.psp .psp-thumb-del:hover {
    border-color: var(--psp-danger);
    color: var(--psp-danger);
}

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

/* ボタン */
.psp .psp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.psp .psp-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;
}
.psp .psp-btn svg {
    flex: none;
    width: 18px;
    height: 18px;
}
.psp .psp-btn:disabled {
    opacity: .6;
    cursor: wait;
}
.psp .psp-btn-primary {
    background: var(--psp-main);
    color: #fff;
}
.psp .psp-btn-primary:hover:not(:disabled) {
    background: var(--psp-main-dark);
}
.psp .psp-btn-plain {
    border-color: #cbd5e1;
    background: #fff;
    color: var(--psp-text);
}
.psp .psp-btn-plain:hover:not(:disabled) {
    background: #f1f5f9;
}
.psp .psp-btn-danger {
    background: #fff1f2;
    color: var(--psp-danger);
}
.psp .psp-btn-danger:hover {
    background: #ffe4e6;
}
.psp .psp-status {
    margin: 10px 0 0;
    color: var(--psp-sub);
    font-size: 14px;
}
.psp .psp-status.psp-error {
    color: var(--psp-danger);
    font-weight: 600;
}
.psp .psp-note {
    margin: 20px 0 0;
    color: #94a3b8;
    font-size: 12px;
    text-align: center;
}

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

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

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

/* 追加：見比べの背景（透明な画像用の市松）・ヒストグラム・グループのリセット */
.psp .psp-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;
}
.psp .psp-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(--psp-line);
}
.psp .psp-grp-head .psp-sub {
    margin: 0;
    padding: 0;
    border: 0;
}
.psp .psp-mini {
    margin: 0;
    padding: 2px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    color: var(--psp-sub);
    font-family: inherit;
    font-size: 12px;
    line-height: 1.5;
    cursor: pointer;
}
.psp .psp-mini:hover {
    border-color: var(--psp-main);
    color: var(--psp-main-dark);
}
.psp .psp-histo-wrap {
    padding: 10px 12px;
    border: 1px solid var(--psp-line);
    border-radius: 4px;
    background: #fafaf9;
}
.psp .psp-histo {
    display: block;
    width: 100%;
    height: 84px;
    margin: 0;
    border-radius: 2px;
}
.psp .psp-histo-note {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2px 12px;
    margin: 6px 0 0;
    color: var(--psp-sub);
    font-size: 12px;
}
.psp .psp-fname-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 0;
    padding: 0;
    border: 0;
}
.psp .psp-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.psp .psp-radio input {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--psp-main);
}
.psp .psp-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;
}

/* 追加：台形補正ツール専用 */
.psp .psp-inline-field { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.psp .psp-small { width:auto; padding:6px 10px; font-size:14px; }
.psp .psp-mini { margin:0; padding:3px 10px; border:1px solid #cbd5e1; border-radius:12px; background:#fff; color:var(--psp-sub); font-family:inherit; font-size:12px; line-height:1.5; cursor:pointer; }
.psp .psp-mini:hover { border-color:var(--psp-main); color:var(--psp-main-dark); }
.psp .psp-work { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin:12px 0 0; align-items:start; }
@media (max-width: 760px) { .psp .psp-work { grid-template-columns:1fr; } }
.psp .psp-stage { padding:0; }
.psp .psp-box { position:relative; width:100%; line-height:0; border:1px solid var(--psp-line); background:#f5f5f4; user-select:none; -webkit-user-select:none; }
.psp .psp-box canvas#psp-src { display:block; width:100%; height:100%; }
.psp .psp-quad { position:absolute; left:0; top:0; width:100%; height:100%; pointer-events:none; }
.psp .psp-quad polygon { fill:rgba(192,38,211,.12); stroke:#c026d3; stroke-width:2; vector-effect:non-scaling-stroke; }
.psp .psp-quad polygon.psp-poly-bad { fill:rgba(225,29,72,.15); stroke:#e11d48; }
.psp .psp-handle { position:absolute; z-index:2; width:34px; height:34px; margin:0; padding:0; transform:translate(-50%,-50%); border:3px solid #fff; border-radius:50%; background:#a21caf; color:#fff; font-family:inherit; font-size:13px; font-weight:700; line-height:28px; text-align:center; box-shadow:0 0 0 1px #701a75, 0 2px 6px rgba(0,0,0,.4); cursor:grab; touch-action:none; }
.psp .psp-handle:focus-visible { outline:3px solid #f0abfc; outline-offset:2px; }
.psp .psp-loupe { position:absolute; z-index:3; width:120px; height:120px; border:3px solid #fff; border-radius:50%; overflow:hidden; box-shadow:0 0 0 1px #701a75, 0 4px 12px rgba(0,0,0,.4); pointer-events:none; }
.psp .psp-loupe canvas { display:block; width:100%; height:100%; }
.psp .psp-resbox { line-height:0; border:1px solid var(--psp-line); text-align:center; 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; min-height:60px; }
.psp .psp-resbox canvas { display:block; max-width:100%; height:auto; margin:0 auto; }
.psp .psp-warn { color:#e11d48; font-weight:700; }
