.ogp-container {
    /* ダークテーマ用プレミアム変数 */
    --bg: #0f172a;
    /* 深いスレート */
    --card: rgba(30, 41, 59, 0.7);
    /* 半透明のスレート */
    --subcard: rgba(15, 23, 42, 0.8);
    --text: #f8fafc;
    /* 明るい文字 */
    --muted: #94a3b8;
    /* 補助的な文字 */
    --accent: #38bdf8;
    /* スカイブルー */
    --accent-glow: rgba(56, 189, 248, 0.4);
    --border: rgba(255, 255, 255, 0.1);
    --danger: #ef4444;
    --ok: #22c55e;

    font-family: 'Noto Sans JP', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    max-width: 1000px;
    margin: 24px auto;
    padding: 10px 16px;
    line-height: 1.6;
}


/* ヘッダー */
.ogp-container h5 {
    margin: 10px;
    color: var(--text);
}

/* 汎用 */
.ogp-container * {
    box-sizing: border-box;
}

.ogp-container .hidden {
    display: none !important;
}

/* カード */
.ogp-container .card {
    background: var(--card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.ogp-container .subcard {
    background: var(--subcard);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin: 16px 0 24px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ラベル：タグ作成ツールと共通の「黒バッジ」スタイル */
.ogp-container .label {
    display: inline-block;
    background: #000000;
    color: #ffffff;
    padding: 0.2rem 0.7rem;
    border-radius: 0.3rem;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    border-left: 3px solid var(--accent);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 入力要素 */
.ogp-container input[type="text"],
.ogp-container input[type="url"],
.ogp-container textarea,
.ogp-container select {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    /* ダーク背景 */
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 14px;
    border-radius: 10px;
    outline: none;
    transition: all 0.2s ease;
}

.ogp-container textarea {
    resize: none;
    overflow-y: hidden;
    min-height: 0 !important;
    line-height: 1.5;
}

.ogp-container input[type="text"]:focus,
.ogp-container input[type="url"]:focus,
.ogp-container textarea:focus,
.ogp-container select:focus {
    border-color: var(--accent);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* トグルスイッチ */
.ogp-container .toggle-row,
.ogp-container .radio-row {
    gap: 20px;
    align-items: center;
    padding: 8px 0;
}

.ogp-container .toggle-row {
    display: flex;
}

.ogp-container .toggle-row input[type="checkbox"][role="switch"] {
    width: 48px;
    height: 28px;
    appearance: none;
    background: #e2e8f0;
    border: 1px solid var(--border);
    border-radius: 9999px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ogp-container .toggle-row input[type="checkbox"][role="switch"]::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    top: 2px;
    left: 2px;
    border-radius: 50%;
    background: #94a3b8;
    transition: transform 0.2s ease;
}

.ogp-container .toggle-row input[type="checkbox"][role="switch"]:checked {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.ogp-container .toggle-row input[type="checkbox"][role="switch"]:checked::after {
    transform: translateX(20px);
    background: #fff;
}

/* キャンバス */
.ogp-container .canvas-wrap {
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    background: #f8fafc;
}

.ogp-container #ogpCanvas {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

/* プレビュー（オリジナル画像用） */
.ogp-container .preview {
    aspect-ratio: 1.91 / 1;
    width: 100%;
    max-width: 600px;
    margin: 16px auto;
    border: 2px dashed var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.4);
    overflow: hidden;
    position: relative;
    font-size: 0.9rem;
    text-align: center;
    padding: 20px;
}

.ogp-container .preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* グリッド */
.ogp-container .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    align-items: start;
}

.ogp-container .field-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* アクションボタン */
.ogp-container .actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 16px;
}

.ogp-container .btn {
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(30, 41, 59, 0.8);
    color: var(--text);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ogp-container .btn:hover:not(:disabled) {
    background: rgba(51, 65, 85, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.ogp-container .btn.primary {
    background: linear-gradient(135deg, var(--accent), #1d4ed8);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.ogp-container .btn.primary:hover:not(:disabled) {
    box-shadow: 0 8px 16px var(--accent-glow);
    filter: brightness(1.1);
}

.ogp-container .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* サマリー・結果 */
.ogp-container .summary,
.ogp-container .result {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    margin-top: 12px;
    color: var(--muted);
}

.ogp-container .summary ul {
    margin: 0;
    padding-left: 18px;
}

.ogp-container.ogp-container .summary li {
    margin: 4px 0;
}

/* リンク */
.ogp-container a {
    color: var(--accent);
    text-decoration: none;
}

.ogp-container a:hover {
    text-decoration: underline;
}




/* フォントサイズ調整用スライダー */
.font-size-ctrl {
    margin-top: 12px;
    background: rgba(15, 23, 42, 0.6);
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.font-size-ctrl label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0;
}

.font-size-ctrl input[type="range"] {
    flex: 1;
    height: 6px;
    cursor: pointer;
    accent-color: var(--accent);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    appearance: none;
}

.font-size-ctrl input[type="range"]::-webkit-slider-runnable-track {
    background: transparent;
}

.font-size-ctrl span {
    min-width: 3em;
    font-family: monospace;
    font-size: 1rem;
    font-weight: bold;
    color: var(--accent);
    text-align: right;
    text-shadow: 0 0 8px var(--accent-glow);
}