@charset "UTF-8";
/* CSS Document */
/* 画画像のアニメGIF作成・GIF分解ツール */
/* みんなの知識 ちょっと便利帳 */
/* 2026-11-12 */

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

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

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

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

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

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

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

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

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

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

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

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

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

/* 追加：アニメGIFツール専用 */
.gif .gif-inline-field { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; }
.gif .gif-inline-field .gif-label { margin:0; }
.gif .gif-num { width:120px; }
.gif .gif-small { width:auto; padding:4px 8px; font-size:13px; }
.gif .gif-inline { display:inline-flex; flex-wrap:wrap; align-items:center; gap:6px; margin:0; font-size:14px; }
.gif .gif-color { width:64px; height:36px; padding:2px; border:1px solid #cbd5e1; border-radius:4px; background:#fff; cursor:pointer; }
.gif .gif-rangebox { display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; margin:12px 0 0; }
.gif .gif-frames { display:grid; grid-template-columns:repeat(auto-fill,minmax(112px,1fr)); gap:10px; margin:0 0 12px; max-height:520px; overflow:auto; padding:2px; }
.gif .gif-frame { border:1px solid var(--gif-line); border-radius:6px; background:#fff; padding:6px; }
.gif .gif-frame-img { position:relative; display:flex; align-items:center; justify-content:center; height:96px; border-radius:4px; overflow:hidden; 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:12px 12px; background-position:0 0,0 6px,6px -6px,-6px 0; }
.gif .gif-frame-img img { display:block; max-width:100%; max-height:100%; }
.gif .gif-frame-no { position:absolute; left:3px; top:3px; min-width:20px; padding:0 5px; border-radius:10px; background:rgba(15,23,42,.75); color:#fff; font-size:11px; line-height:18px; text-align:center; }
.gif .gif-frame-delay { display:flex; align-items:center; justify-content:center; gap:3px; margin:6px 0 4px; font-size:11px; color:var(--gif-sub); }
.gif .gif-frame-delay input { width:64px; padding:2px 4px; border:1px solid #cbd5e1; border-radius:3px; font-size:12px; font-family:inherit; text-align:right; }
.gif .gif-frame-bar { display:flex; justify-content:center; flex-wrap:wrap; gap:3px; }
.gif .gif-frame-bar button { min-width:26px; padding:1px 4px; border:1px solid #cbd5e1; border-radius:3px; background:#fff; color:var(--gif-sub); font-family:inherit; font-size:11px; line-height:1.6; cursor:pointer; }
.gif .gif-frame-bar button:hover { border-color:var(--gif-main); color:var(--gif-main-dark); }
.gif .gif-frame-bar .gif-del:hover { border-color:#e11d48; color:#e11d48; }
.gif .gif-pvwrap { text-align:center; margin:0 0 8px; }
.gif .gif-pvbox { display:inline-block; vertical-align:top; line-height:0; border:1px solid var(--gif-line); }
.gif .gif-pvbox canvas { display:block; max-width:100%; height:auto; }
.gif .gif-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; }
.gif .gif-bg-white { background:#fff; }
.gif .gif-bg-black { background:#000; }
.gif .gif-bg-blue { background:#2563eb; }
.gif .gif-pvbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; }
.gif .gif-pvbar .gif-range { flex:1 1 160px; min-width:120px; }
.gif .gif-btn-sm { padding:4px 14px; font-size:13px; }
.gif .gif-savebox { margin:0 0 16px; padding:12px 14px; border:1px solid var(--gif-line); border-radius:6px; background:#fafaf9; }
.gif .gif-sub .gif-val { margin-left:10px; }
.gif .gif-subhead { margin:0 0 6px; font-size:15px; font-weight:700; color:var(--gif-main-dark); }
