/* OBS配信エフェクト（v_stream-effects）
 * デザインは doc/デザイン.html（salary-calculator の配色 ＋ base.css）に合わせる。
 * 色は base.css の --primary-color（青）・--accent-yellow・--accent-pink などを使う。
 */
:root {
    --vso-line: #e9eef3;
    --vso-card-border: rgba(15, 23, 42, .07);
    --vso-shadow-card: 0 8px 24px rgba(15, 35, 65, .06), 0 1px 2px rgba(15, 35, 65, .04);
    --vso-shadow-result: 0 4px 12px rgba(0, 174, 239, .14);
    --vso-safe: #2c7a7b;
    --vso-warning-bg: #fffaf0;
    --vso-warning: #c05621;
    --vso-warning-line: #fbd38d;
    --vso-danger-bg: #fff5f5;
    --vso-danger: #c53030;
    --vso-danger-line: #feb2b2;
    --vso-stage: #171a2b;
}

body { background: var(--bg-body, #fff); color: var(--text-main, #333); }
.vso-page { padding-bottom: 24px; }
.vso-page :is(button, a, summary, input, select):focus-visible { outline: 3px solid var(--primary-color); outline-offset: 2px; }

/* ---- 作業エリア（淡いクールトーン背景で白カードの立体感を際立たせる） ---- */
.vso-workspace {
    background: linear-gradient(180deg, #f3f9fd 0%, #f8fbfe 72%, #ffffff 100%);
    border-bottom: 1px solid var(--vso-line);
    padding-bottom: 12px;
    margin-bottom: 20px;
}

/* ---- ヒーロー ---- */
.vso-intro { width: min(1240px, calc(100vw - 32px)); margin: 0 auto; padding: 26px 0 18px; }
.vso-intro-heading { display: flex; align-items: center; gap: clamp(8px, 1.2vw, 12px); }
.vso-intro-icon { flex: none; width: clamp(32px, 5.2vw, 56px); height: auto; border-radius: 20%; }
.vso-intro h1 { font-size: clamp(28px, 4.2vw, 40px); font-weight: 800; line-height: 1.3; letter-spacing: .02em; margin: 0; }
.vso-intro-copy { margin-top: 10px; }
.vso-tagline { margin: 0 0 4px; font-size: 17px; font-weight: 700; }
.vso-intro-copy > p:not(.vso-tagline) { margin: 0; color: var(--text-sub, #666); font-size: 14.5px; line-height: 1.85; }
.vso-intro .phrase { display: inline-block; }

/* ---- ツール本体（PCは左プレビュー追従・右に設定＋URLで1画面動線） ---- */
.vso-app {
    width: min(1240px, calc(100vw - 32px));
    margin: 0 auto 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 410px;
    gap: 22px;
    align-items: start;
}
@media (min-width: 1001px) and (min-height: 700px) {
    /* 画面より高いときは app.js が --vso-stick-top を負にして、下端が見える位置で止める */
    .vso-main-col { position: sticky; top: var(--vso-stick-top, 92px); }
}
@media (max-width: 1000px) { .vso-app { grid-template-columns: minmax(0, 1fr); } }

.vso-card {
    background: #fff; border: 1px solid var(--vso-card-border); border-radius: 16px;
    padding: 22px; box-shadow: var(--vso-shadow-card);
}
.vso-card + .vso-card { margin-top: 18px; }
.vso-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.vso-card-head .vso-card-title { margin-bottom: 0; }
.vso-card-title { display: flex; align-items: center; gap: 10px; font-size: 17.5px; font-weight: 800; margin: 0 0 16px; }
.vso-card-title i { color: var(--primary-color); }

/* テキストボタン・チップボタン */
.vso-text-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 8px; border: 0; border-radius: 8px; background: transparent;
    color: var(--text-sub, #666); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.vso-text-btn:hover { background: var(--bg-light, #f4f9fc); color: var(--primary-color); }
.vso-chip-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 10px; border: 1px solid #d5e2ec; border-radius: 8px;
    background: #fff; color: var(--text-main, #333);
    font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.vso-chip-btn:hover:not(:disabled) { border-color: var(--primary-color); color: var(--primary-color); background: #f4fbff; }
.vso-chip-btn:disabled { opacity: .5; cursor: not-allowed; }
.vso-chip-btn--primary { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.vso-chip-btn--primary:hover:not(:disabled) { background: var(--primary-hover, #0095cd); color: #fff; }
.vso-chip-btn[hidden] { display: none; }

/* ---- プレビュー ---- */
.vso-stage-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.vso-label { font-size: 13px; font-weight: 700; color: var(--text-sub, #666); }
.vso-preview {
    position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
    background: var(--vso-stage); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
    touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.vso-preview canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 2; }
.vso-preview[data-bg="dark"] { background: linear-gradient(160deg, #1d2036 0%, #232038 55%, #15131f 100%); }
.vso-preview[data-bg="light"] { background: linear-gradient(135deg, #f4f9fc 0%, #fdf0f3 55%, #f3f0fb 100%); }
.vso-preview[data-bg="scene"] {
    background:
        radial-gradient(ellipse at 78% 18%, rgba(255, 196, 214, .22), transparent 55%),
        radial-gradient(ellipse at 12% 85%, rgba(171, 159, 227, .25), transparent 60%),
        linear-gradient(150deg, #2b2546 0%, #3a2f5c 48%, #1f2338 100%);
}
.vso-preview[data-bg="green"] { background: #00b140; }
.vso-preview[data-bg="custom"] { background: repeating-conic-gradient(#262a3d 0% 25%, #1f2233 0% 50%) 50% / 24px 24px; }
.vso-preview.is-drop-over { box-shadow: inset 0 0 0 3px var(--primary-color); }

/* 自分の画像プレビュー */
.vso-user-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; pointer-events: none; z-index: 1; }
.vso-preview[data-bg="custom"] .vso-user-bg:not([hidden]) { display: block; }

/* 雑談画面の例（立ち絵とコメントはプレビューだけ。OBSには出さない） */
.vso-scene { position: absolute; inset: 0; display: none; container-type: inline-size; pointer-events: none; z-index: 1; }
.vso-preview[data-bg="scene"] .vso-scene { display: block; }
.vso-scene-chara { position: absolute; left: 36%; top: 8%; height: 100%; width: auto; max-width: none; user-select: none; transition: left .2s ease, transform .2s ease; }
.vso-scene-chat {
    position: absolute; left: 3%; bottom: 7%; width: 30%; margin: 0; padding: 1.6cqw;
    display: flex; flex-direction: column; gap: .8cqw; list-style: none;
    background: rgba(15, 14, 28, .55); border-radius: 1.4cqw;
    color: #fff; font-size: 11px; font-size: clamp(6px, 1.5cqw, 16px); line-height: 1.45;
    transition: left .2s ease, right .2s ease;
}
.vso-scene-chat b { display: block; font-size: .8em; font-weight: 700; color: #c9b8ff; }
.vso-scene-chat .is-super { padding: .7cqw 1cqw; border-radius: .9cqw; background: linear-gradient(90deg, #ff8a3d, #ffb347); color: #3a1d00; }
.vso-scene-chat .is-super b { color: #6b3500; }
/* 立ち絵：左配置 */
.vso-preview[data-chara-side="left"] .vso-scene-chara { left: 4%; transform: scaleX(-1); }
.vso-preview[data-chara-side="left"] .vso-scene-chat { left: auto; right: 3%; }
/* 粒の重なり：後ろ（立ち絵をキャンバスより手前に出して奥行き演出を体験） */
.vso-preview[data-bg="scene"][data-layer-order="back"] .vso-scene { z-index: 3; }

/* 表示範囲（安全エリア）の可視化ガイド */
.vso-area-guide {
    position: absolute; z-index: 4; pointer-events: none;
    display: grid; place-items: center;
    border: 2px dashed rgba(255, 255, 255, .85); border-radius: 10px;
    background: rgba(0, 174, 239, .18); color: #fff;
    font-size: 12px; font-weight: 800; text-shadow: 0 1px 4px rgba(0, 0, 0, .7);
    animation: vso-guide-fade 1.8s ease forwards;
}
.vso-area-guide[hidden] { display: none; }
.vso-area-guide[data-area="edges"] { left: 20%; right: 20%; top: 6%; bottom: 6%; }
.vso-area-guide[data-area="top"] { left: 4%; right: 4%; top: 48%; bottom: 4%; }
@keyframes vso-guide-fade {
    0% { opacity: 0; }
    12% { opacity: 1; }
    78% { opacity: 1; }
    100% { opacity: 0; }
}

/* 季節試し見中のオーバーレイバッジ */
.vso-probe-pill {
    position: absolute; left: 10px; top: 10px; z-index: 5;
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 10px; border-radius: 999px;
    background: rgba(15, 18, 34, .82); color: #fff; font-size: 12px; font-weight: 700;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.vso-probe-pill[hidden] { display: none; }
.vso-probe-pill i { color: var(--accent-yellow); }
.vso-probe-pill button {
    border: 0; border-radius: 999px; padding: 2px 8px;
    background: var(--primary-color); color: #fff; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer;
}

/* 照準・トースト・ドロップ案内 */
.vso-aim { position: absolute; left: 50%; top: 45%; width: 48px; height: 48px; margin: -24px 0 0 -24px; z-index: 6; pointer-events: none; filter: drop-shadow(0 0 1.5px rgba(0, 0, 0, .85)) drop-shadow(0 1px 3px rgba(0, 0, 0, .5)); animation: vso-aim-in .25s ease-out; }
.vso-aim svg { display: block; width: 100%; height: 100%; fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; }
.vso-aim .vso-aim-dot { fill: #ff6fa5; stroke: #fff; stroke-width: 1.5; }
.vso-aim.is-dragging svg { transform: scale(1.15); }
@keyframes vso-aim-in { from { opacity: 0; transform: scale(1.6); } to { opacity: 1; transform: scale(1); } }
.vso-toast {
    position: absolute; left: 50%; top: 12px; z-index: 6; transform: translateX(-50%); margin: 0; max-width: calc(100% - 20px);
    display: flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px;
    background: rgba(20, 18, 34, .84); color: #fff; font-size: 12.5px; font-weight: 700; line-height: 1.4; white-space: nowrap;
    pointer-events: none; animation: vso-toast-in .25s ease-out;
}
.vso-drop-hint {
    position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    background: rgba(15, 22, 42, .78); color: #fff; font-size: 14px; font-weight: 700; pointer-events: none;
}
.vso-drop-hint i { font-size: 28px; color: var(--primary-color); }
.vso-aim[hidden], .vso-toast[hidden], .vso-drop-hint[hidden] { display: none; }
@keyframes vso-toast-in { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translateX(-50%); } }
.vso-bg-note {
    position: absolute; left: 50%; top: 50%; z-index: 6; transform: translate(-50%, -50%); margin: 0;
    width: max-content; max-width: min(440px, calc(100% - 32px)); padding: 10px 18px; border-radius: 14px;
    background: rgba(20, 18, 34, .86); color: #fff; font-size: 13.5px; font-weight: 700; line-height: 1.6; text-align: center;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .28); pointer-events: none; opacity: 0;
}
.vso-bg-note[hidden] { display: none; }
.vso-bg-note.is-show { animation: vso-bg-note 4s ease-in-out forwards; }
@keyframes vso-bg-note {
    0% { opacity: 0; transform: translate(-50%, calc(-50% + 8px)); }
    12.5%, 87.5% { opacity: 1; transform: translate(-50%, -50%); }
    100% { opacity: 0; transform: translate(-50%, -50%); }
}
@media (max-width: 480px) { .vso-bg-note { font-size: 12px; padding: 8px 12px; } }
@media (max-width: 480px) { .vso-toast { font-size: 11px; padding: 4px 10px; white-space: normal; text-align: center; } }

/* プレビュー直下の静的バー＆サブ切替 */
.vso-stage-bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
    margin-top: 10px; padding: 8px 12px; border-radius: 10px;
    background: var(--bg-light, #f4f9fc); font-size: 12px; color: var(--text-sub, #666);
}
.vso-stage-tip { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #475569; }
.vso-stage-tip i { color: var(--primary-color); }
.vso-stage-meta { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vso-pos-pill {
    padding: 3px 9px; border-radius: 999px; background: #fff; border: 1px solid #d5e2ec;
    font-size: 11.5px; font-weight: 700; color: var(--text-main, #333); font-variant-numeric: tabular-nums;
}
.vso-stage-sub {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
    margin-top: 8px; padding: 8px 12px; border-radius: 10px;
    background: #f8fafc; border: 1px solid var(--vso-line); font-size: 12px;
}
.vso-stage-sub[hidden] { display: none; }
.vso-stage-sub-note { color: var(--text-sub, #666); font-size: 11.5px; }
.vso-stage-sub-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vso-sub-label { font-size: 11.5px; font-weight: 700; color: var(--text-sub, #666); }
.vso-mini-tabs { display: inline-flex; background: #e8eef4; border-radius: 8px; padding: 2px; gap: 2px; }
.vso-mini-tab {
    border: 0; background: transparent; padding: 4px 10px; border-radius: 6px;
    font: inherit; font-size: 11.5px; font-weight: 700; color: var(--text-sub, #666); cursor: pointer;
}
.vso-mini-tab[aria-pressed="true"] { background: #fff; color: var(--primary-color); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }

/* ロード中 */
.vso-loading { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #fff; transition: opacity .3s ease; }
.vso-loading.is-done { opacity: 0; pointer-events: none; }
.vso-loading strong { font-size: 15px; }
.vso-loading-bars { display: flex; justify-content: center; align-items: center; width: 100px; height: 80px; gap: 6px; }
.vso-loading-bars span { width: 4px; height: 50px; border-radius: 999px; background: var(--primary-color); animation: vso-loading-wave .9s ease-in-out infinite; }
.vso-loading-bars span:nth-child(2) { background: var(--accent-pink, #FF6B6B); animation-delay: -.8s; }
.vso-loading-bars span:nth-child(3) { background: var(--accent-yellow); animation-delay: -.7s; }
.vso-loading-bars span:nth-child(4) { background: var(--accent-pink, #FF6B6B); animation-delay: -.6s; }
.vso-loading-bars span:nth-child(5) { background: var(--primary-color); animation-delay: -.5s; }
@keyframes vso-loading-wave { 0%, 40%, 100% { transform: scaleY(.05); } 20% { transform: scaleY(1); } }

/* ---- 演出パッド（プレビュー直下・色分け対応） ---- */
.vso-pad { margin-top: 16px; }
.vso-pad-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 10px; }
.vso-pad h2 { display: flex; align-items: baseline; gap: 8px; font-size: 16.5px; font-weight: 800; margin: 0; }
.vso-pad h2 i { color: var(--primary-color); }
.vso-pad-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.vso-pad-sub { margin: 0; font-size: 12px; font-weight: 400; color: var(--text-sub, #666); }
.vso-pad-legend { font-size: 11.5px; color: var(--text-sub, #666); }

/* 押し込める物理キーのような見た目。色は押した瞬間のアイコンだけに使う */
/* 上：キー1〜8のショートカット（4列×2段）、下：残りの演出の一覧。ドラッグで入れ替え */
/* 演出パッドを初めて押したときだけ出る案内（画面下・8秒） */
.vso-pad-toast {
    position: fixed; left: 50%; bottom: 20px; z-index: 900; transform: translateX(-50%);
    display: flex; align-items: flex-start; gap: 10px; width: max-content; max-width: min(560px, calc(100vw - 32px));
    padding: 12px 10px 12px 16px; border-radius: 14px;
    background: rgba(20, 18, 34, .92); color: #fff; box-shadow: 0 10px 28px rgba(0, 0, 0, .25);
    font-size: 13px; line-height: 1.65; animation: vso-pad-toast-in .3s ease-out;
}
.vso-pad-toast[hidden] { display: none; }
.vso-pad-toast > i { margin-top: 4px; color: var(--primary-color); font-size: 15px; }
.vso-pad-toast p { margin: 0; }
.vso-pad-toast a { color: #7fd6ff; font-weight: 800; }
.vso-pad-toast-close {
    flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; margin: -3px 0 0; padding: 0;
    border: 0; border-radius: 50%; background: transparent; color: #c9cdd9; font-size: 14px; cursor: pointer;
}
@media (hover: hover) { .vso-pad-toast-close:hover { background: rgba(255, 255, 255, .12); color: #fff; } }
.vso-pad-toast.is-leaving { animation: vso-pad-toast-out .25s ease-in forwards; }
@keyframes vso-pad-toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes vso-pad-toast-out { to { opacity: 0; transform: translate(-50%, 8px); } }
.vso-pad-caption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 0 0 6px; font-size: 12.5px; font-weight: 800; color: #2b3440; }
.vso-pad-caption small { font-size: 11.5px; font-weight: 400; color: var(--text-sub, #666); }
.vso-pad-pool + .vso-alert { margin-top: 8px; }
.vso-pad-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.vso-pad-pool {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px;
    min-height: 58px; padding: 8px; border-radius: 10px; background: #f3f6f9;
    transition: background-color .15s ease, box-shadow .15s ease;
}
.vso-pad-pool:empty::before { content: 'すべての演出がショートカットに入っています'; grid-column: 1 / -1; align-self: center; text-align: center; font-size: 12px; color: var(--text-sub, #666); }
.vso-pad-pool.is-over { background: #eaf4fb; box-shadow: inset 0 0 0 2px var(--primary-color); }
.vso-pad-tile { position: relative; display: flex; min-width: 0; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.vso-pad-tile > .vso-pad-btn { flex: 1; }
.vso-pad-tile.is-dragging { opacity: .35; }
.vso-pad-tile.is-over > .vso-pad-btn, .vso-pad-slot.is-over { border-color: var(--primary-color); box-shadow: 0 0 0 2px var(--primary-color); }
.vso-pad-tile--pool > .vso-pad-btn { min-height: 58px; padding: 10px 4px 7px; gap: 5px; font-size: 11.5px; box-shadow: 0 1px 0 #d3dce5; }
.vso-pad-tile--pool > .vso-pad-btn i { font-size: 16px; }
.vso-pad-slot {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    min-height: 76px; border: 1.5px dashed #c5d0db; border-radius: 10px;
    color: #9aa7b4; font-size: 11px; font-weight: 700; transition: border-color .15s ease, box-shadow .15s ease;
}
.vso-pad-slot kbd { font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
/* 左上の小さな −（外す）／＋（入れる） */
.vso-pad-mini {
    position: absolute; top: 4px; left: 4px; z-index: 1;
    display: grid; place-items: center; width: 20px; height: 20px; padding: 0;
    border: 0; border-radius: 50%; background: #e7edf2; color: #64748b;
    font-size: 10px; cursor: pointer; transition: background-color .15s ease, color .15s ease;
}
.vso-pad-mini::before { content: ''; position: absolute; inset: -6px; }
@media (hover: hover) {
    .vso-pad-mini:hover { background: var(--primary-color); color: #fff; }
}
.vso-pad-mini:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 1px; }
.vso-pad-ghost {
    position: fixed; top: 0; left: 0; z-index: 1000; margin: 0; pointer-events: none;
    opacity: .92; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .18));
}
.vso-pad-ghost > .vso-pad-btn { transform: scale(1.06); }
.vso-pad-dragging, .vso-pad-dragging * { cursor: grabbing !important; }
.vso-pad-opts { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--vso-line); }
.vso-pad-btn {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
    min-width: 0; min-height: 76px; padding: 14px 8px 10px;
    border: 1px solid #d3dce5; border-radius: 10px;
    background: #fff; color: #2b3440; box-shadow: 0 2px 0 #d3dce5;
    font: inherit; font-size: 12.5px; font-weight: 700; line-height: 1.3; cursor: pointer;
    transition: transform .08s ease, box-shadow .08s ease, border-color .15s ease, background-color .15s ease;
}
.vso-pad-btn i { font-size: 20px; color: #3d4b5a; transition: color .15s ease; }
.vso-pad-btn span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vso-pad-btn kbd {
    position: absolute; top: 5px; right: 7px;
    color: #9aa7b4; font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (hover: hover) {
    .vso-pad-btn:hover { border-color: #b4c2cf; background: #fafcfd; box-shadow: 0 2px 0 #b4c2cf; }
    .vso-pad-btn:hover i { color: var(--pad-tint, var(--primary-color)); }
}
.vso-pad-btn:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.vso-pad-btn:active { transform: translateY(2px); box-shadow: 0 0 0 #d3dce5; }
.vso-pad-btn.is-played { animation: vso-key-press .6s ease-out; }
.vso-pad-btn.is-played i { animation: vso-key-light .6s ease-out; }
@keyframes vso-key-press {
    0% { background: #f2f6f9; }
    100% { background: #fff; }
}
@keyframes vso-key-light {
    0%, 40% { color: var(--pad-tint, var(--primary-color)); transform: scale(1.18); }
    100% { transform: scale(1); }
}
@media (max-width: 480px) {
    .vso-pad-grid { gap: 6px; }
    .vso-pad-btn { min-height: 66px; padding: 12px 3px 8px; font-size: 11.5px; }
    .vso-pad-slot { min-height: 66px; }
    .vso-pad-btn i { font-size: 18px; }
    .vso-pad-pool { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); padding: 6px; }
}

.vso-help { font-size: 12px; color: var(--text-sub, #666); margin: 8px 0 0; line-height: 1.75; }

/* ---- 設定 ---- */
.vso-field { margin-bottom: 18px; }
.vso-field-label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13.5px; font-weight: 700; margin-bottom: 9px; }
.vso-field-sub { font-size: 11.5px; font-weight: 400; color: var(--text-sub, #666); }

/* 自動演出ステータス＆試し見ボックス */
.vso-auto-box {
    margin: -6px 0 16px; padding: 12px 14px; border-radius: 12px;
    background: #f4f9fc; border: 1px solid #ddecfa;
}
.vso-auto-box[hidden] { display: none; }
.vso-auto-status { font-size: 12.5px; line-height: 1.6; color: #334155; margin-bottom: 10px; }
.vso-auto-status strong { color: var(--primary-hover, #0095cd); font-weight: 800; }
.vso-auto-next { display: block; margin-top: 2px; font-size: 11.5px; color: var(--text-sub, #666); }
.vso-probe-row { display: flex; align-items: center; gap: 8px; }
.vso-probe-row label { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: #475569; }
.vso-select { flex: 1; min-width: 0; height: 36px; padding: 0 10px; font-size: 12.5px; background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; }

/* 推し色スウォッチ */
.vso-swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.vso-swatch {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px; border: 1.5px solid #e2e8f0; border-radius: 999px;
    background: #fff; color: var(--text-main, #333); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.vso-swatch-dot {
    width: 14px; height: 14px; border-radius: 50%; flex: 0 0 14px;
    border: 1px solid rgba(15, 23, 42, .16);
}
.vso-swatch-dot--default { background: conic-gradient(#ff6fa5, #f4c542, #9b6bff, #5b7fff, #ff6fa5); }
.vso-swatch:hover { transform: translateY(-1px); border-color: var(--primary-color); }
.vso-swatch[aria-pressed="true"] { border-color: var(--primary-color); background: #eff9ff; box-shadow: 0 0 0 3px rgba(0, 174, 239, .14); color: var(--primary-hover, #0095cd); }

/* 切り替えボタン */
.vso-tabs { display: flex; background: #edf2f7; border-radius: 12px; padding: 4px; gap: 4px; }
.vso-tab {
    flex: 1; min-width: 0; border: 0; background: transparent; text-align: center;
    padding: 9px 6px; border-radius: 9px; cursor: pointer;
    font: inherit; font-weight: 700; color: var(--text-sub, #666); font-size: 12.5px;
    transition: transform .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.vso-tab[aria-pressed="true"] { background: #fff; color: var(--primary-color); box-shadow: 0 2px 6px rgba(15, 35, 65, .1); animation: vso-preset-bounce .28s cubic-bezier(.4, 0, .2, 1); }
@media (hover: hover) { .vso-tab:hover { transform: scale(1.02); } }
.vso-tab:active { transform: scale(.96); animation: none; }
@keyframes vso-preset-bounce { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.vso-tabs--sm { flex: 1 1 360px; }
.vso-tabs--sm .vso-tab { padding: 6px 5px; font-size: 12px; }
.vso-tabs--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.vso-tabs--grid .vso-tab { padding: 7px 5px; font-size: 11.5px; line-height: 1.35; }

/* リアクションの位置（カスタム数値） */
.vso-pos-custom { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 10px; }
.vso-pos-num { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 13px; }
.vso-pos-num input { width: 6em; height: 36px; padding: 0 8px; font-variant-numeric: tabular-nums; }
.vso-pos-unit { font-size: 11.5px; color: var(--text-sub, #666); }
.vso-pos-custom[hidden] { display: none; }

/* スライダー */
.vso-bpm { margin-top: 12px; padding: 12px 12px 2px; border-radius: 10px; background: var(--bg-light, #f4f9fc); }
.vso-bpm[hidden], .vso-range[hidden] { display: none; }
.vso-bpm .vso-range { margin-bottom: 6px; }
.vso-bpm .vso-help { margin: 0 0 10px; }
.vso-bpm-num { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; color: var(--primary-color); font-size: 12.5px; font-weight: 700; }
.vso-bpm-num input { width: 4.6em; height: 34px; padding: 0 6px; text-align: right; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vso-range { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.vso-range .vso-field-label { margin: 0; flex: 0 0 auto; min-width: 4.5em; }
.vso-range output { color: var(--primary-color); font-size: 13.5px; font-weight: 700; min-width: 3.4em; text-align: right; font-variant-numeric: tabular-nums; }
.vso-range input[type=range] {
    flex: 1; min-width: 0; appearance: none; -webkit-appearance: none; height: 30px; margin: 0; background: transparent; cursor: grab;
    --range-progress: 50%; --handle-scale: 1; --handle-motion: transform .42s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s ease;
}
.vso-range input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(to right, var(--primary-color) 0 var(--range-progress), #d8e1ea var(--range-progress) 100%); }
.vso-range input[type=range]::-moz-range-track { height: 6px; border-radius: 999px; background: linear-gradient(to right, var(--primary-color) 0 var(--range-progress), #d8e1ea var(--range-progress) 100%); }
.vso-range input[type=range]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 19px; height: 19px; margin-top: -6.5px; border: 0; border-radius: 50%; background: var(--primary-color); transform: scale(var(--handle-scale)); transition: var(--handle-motion); box-shadow: 0 2px 5px rgba(0, 0, 0, .14); }
.vso-range input[type=range]::-moz-range-thumb { width: 19px; height: 19px; border: 0; border-radius: 50%; background: var(--primary-color); transform: scale(var(--handle-scale)); transition: var(--handle-motion); box-shadow: 0 2px 5px rgba(0, 0, 0, .14); }
@media (hover: hover) { .vso-range input[type=range]:hover { --handle-scale: 1.06; } }
.vso-range input[type=range].is-grabbing { cursor: grabbing; --handle-scale: 1.32; --handle-motion: transform .16s ease-out, box-shadow .2s ease; }

/* チェックボックス */
.vso-check-row { position: relative; display: flex; align-items: center; gap: 9px; margin: 10px 0; font-size: 13.5px; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.vso-check-row input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.vso-checkbox { position: relative; display: inline-block; flex: 0 0 20px; width: 20px; height: 20px; border-radius: 6px; transition: transform .2s ease; }
.vso-checkbox-bg { position: absolute; inset: 0; border: 2px solid var(--primary-color); border-radius: 6px; background: #fff; transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease; }
.vso-checkbox-icon { position: absolute; inset: 0; margin: auto; width: 80%; height: 80%; color: #fff; transform: scale(0); transition: transform .2s ease; }
.vso-check-path { stroke-dasharray: 40; stroke-dashoffset: 40; transition: stroke-dashoffset .3s ease .1s; }
.vso-check-row input:checked + .vso-checkbox .vso-checkbox-bg { background: var(--primary-color); border-color: var(--primary-color); }
.vso-check-row input:checked + .vso-checkbox .vso-checkbox-icon { transform: scale(1); }
.vso-check-row input:checked + .vso-checkbox .vso-check-path { stroke-dashoffset: 0; }
.vso-check-row input:checked + .vso-checkbox { animation: vso-checkbox-bounce .3s cubic-bezier(.4, 0, .2, 1); }
.vso-check-row input:focus-visible + .vso-checkbox .vso-checkbox-bg { outline: 2px solid var(--primary-color); outline-offset: 2px; box-shadow: 0 0 0 4px var(--input-focus-ring); }
@media (hover: hover) { .vso-check-row:hover .vso-checkbox { transform: scale(1.05); } }
.vso-check-row:active .vso-checkbox { transform: scale(.95); }
@keyframes vso-checkbox-bounce { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.vso-check-row i { color: var(--pad-tint, var(--primary-color)); width: 1.1em; text-align: center; margin-right: 3px; }

/* スイッチ */
.vso-toggle-row { display: flex; align-items: center; gap: 12px; min-height: 38px; font-size: 13.5px; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.vso-toggle { position: relative; display: inline-block; flex: 0 0 48px; width: 48px; height: 24px; }
.vso-toggle input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.vso-toggle-bg { position: absolute; inset: 0; border-radius: 999px; background: var(--input-border, #d8e1ea); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .06); transition: background-color .3s ease, box-shadow .3s ease; }
.vso-toggle-handle { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .2); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.vso-toggle input:checked + .vso-toggle-bg { background: var(--primary-color); box-shadow: inset 0 0 0 2px var(--primary-hover, #0095cd); }
.vso-toggle input:checked + .vso-toggle-bg .vso-toggle-handle { transform: translateX(24px); }
@media (hover: hover) { .vso-toggle-row:hover .vso-toggle-bg { box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .06), 0 0 0 4px var(--input-focus-ring); } }
.vso-toggle input:focus-visible + .vso-toggle-bg { outline: 2px solid var(--primary-color); outline-offset: 2px; box-shadow: 0 0 0 4px var(--input-focus-ring); }

/* 積雪コンテキスト案内・インライン操作 */
.vso-context-note {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
    margin-bottom: 12px; padding: 10px 12px; border-radius: 10px;
    background: var(--vso-warning-bg); border: 1px solid var(--vso-warning-line);
    color: var(--vso-warning); font-size: 12px; line-height: 1.6;
}
.vso-context-note[hidden] { display: none; }
.vso-inline-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* 折りたたみ */
.vso-details { border-top: 1px solid var(--vso-line); padding-top: 13px; margin-top: 14px; }
.vso-details > summary { display: flex; align-items: center; cursor: pointer; list-style: none; font-weight: 700; font-size: 14px; padding: 4px 0; }
.vso-details > summary::-webkit-details-marker { display: none; }
.vso-details > summary::after { content: ''; width: 12px; height: 12px; margin-left: auto; flex-shrink: 0; background: linear-gradient(#666, #666) center/12px 2px no-repeat, linear-gradient(#666, #666) center/2px 12px no-repeat; }
.vso-details[open] > summary::after { background: linear-gradient(#666, #666) center/12px 2px no-repeat; }
.vso-details[open] > summary { margin-bottom: 12px; color: var(--primary-color); }

.vso-page .btn { transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease, color .2s ease; }
.vso-page .btn:hover { transform: translateY(-1px); }
.vso-page .btn:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
.vso-page .btn i { margin-right: 7px; }
.vso-page .btn:disabled { background: #eee; color: #888; border-color: #eee; cursor: not-allowed; transform: none; box-shadow: none; }

/* 通知 */
.vso-alert { display: flex; align-items: flex-start; gap: 10px; border: 1px solid; padding: 11px 13px; border-radius: 8px; font-size: 12.5px; line-height: 1.75; margin: 10px 0 0; }
.vso-alert[hidden] { display: none; }
.vso-alert--warning { background: var(--vso-warning-bg); color: var(--vso-warning); border-color: var(--vso-warning-line); }
.vso-alert--danger { background: var(--vso-danger-bg); color: var(--vso-danger); border-color: var(--vso-danger-line); }

/* ---- OBS用URL ---- */
.vso-use-lead { margin: -4px 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--bg-light, #f4f9fc); font-size: 12.5px; line-height: 1.75; color: var(--text-sub, #666); }
.vso-url-block { margin-bottom: 4px; }
.vso-url-block[hidden] { display: none; }
.vso-url-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; margin-bottom: 7px; }
.vso-url-head .vso-field-label { margin-bottom: 0; }
.vso-dirty {
    padding: 2px 8px; border-radius: 999px;
    background: #fff3cd; border: 1px solid #f6c945; color: #8a5300;
    font-size: 11px; font-weight: 800;
}
.vso-dirty[hidden] { display: none; }
.vso-link-btn {
    display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 6px 0;
    border: 0; background: none; color: var(--primary-color); font: inherit; font-size: 13px; font-weight: 700;
    text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.vso-link-btn[hidden], .vso-steps li[hidden] { display: none; }
.vso-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-yellow); font-size: 12px; font-weight: 800; }
.vso-url { height: 42px; padding: 0 11px; font-size: 12.5px; color: var(--text-sub, #666); }
.vso-copy { width: 100%; margin-top: 8px; min-height: 44px; font-size: 14px; padding: 10px 18px; }
.vso-dock-actions { display: flex; gap: 8px; align-items: stretch; margin-top: 8px; }
.vso-dock-actions .vso-copy { margin-top: 0; flex: 1; }
.vso-guide-link {
    display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 12px 14px;
    border: 2px solid var(--primary-color); border-radius: 12px; background: #eef8fd;
    color: var(--text-main, #333); text-decoration: none; transition: background-color .15s ease, transform .15s ease;
}
.vso-guide-link > i:first-child { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 10px; background: var(--primary-color); color: #fff; font-size: 17px; }
.vso-guide-link-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.vso-guide-link-body strong { font-size: 14.5px; font-weight: 800; color: var(--primary-color); }
.vso-guide-link-body small { font-size: 12px; color: var(--text-sub, #666); line-height: 1.5; }
.vso-guide-link-arrow { color: var(--primary-color); font-size: 15px; }
@media (hover: hover) { .vso-guide-link:hover { background: #e0f3fc; transform: translateY(-1px); } }
.vso-guide-link:focus-visible { outline: 3px solid var(--primary-color); outline-offset: 2px; }
.vso-copied { min-height: 1.5em; margin: 5px 0 10px; font-size: 12.5px; font-weight: 700; color: var(--vso-safe); }
.vso-copy.is-copied { animation: vso-flash-btn .8s ease-out; }
@keyframes vso-flash-btn { 0% { box-shadow: 0 0 0 0 rgba(0, 174, 239, .42); } 45% { box-shadow: 0 0 0 8px rgba(0, 174, 239, .16); } 100% { box-shadow: none; } }
.vso-card .ad-area { margin: 4px 0 16px; }

/* URL復元（インポート） */
.vso-import-row { display: flex; gap: 8px; margin-top: 8px; }
.vso-import-input { flex: 1; min-width: 0; height: 38px; padding: 0 10px; font-size: 12px; }
.vso-import-msg { min-height: 1.4em; margin: 6px 0 0; font-size: 12px; font-weight: 700; color: var(--vso-safe); }
.vso-import-msg.is-error { color: var(--vso-danger); }

/* 使い方（黄色い番号のリスト） */
.vso-steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.vso-steps li { counter-increment: step; display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--vso-line); align-items: flex-start; }
.vso-steps li:last-child { border: 0; }
.vso-steps li::before { content: counter(step, decimal-leading-zero); display: grid; place-items: center; flex: 0 0 32px; height: 32px; background: var(--accent-yellow); border-radius: 50%; font-size: 12px; font-weight: 800; }
.vso-steps strong { font-size: 14px; }
.vso-steps p { font-size: 13px; color: var(--text-sub, #666); margin: 4px 0 0; line-height: 1.75; }
.vso-steps--compact { border-top: 1px solid var(--vso-line); }
.vso-steps--compact li { padding: 11px 0; gap: 11px; }
.vso-steps--compact li::before { flex-basis: 26px; height: 26px; font-size: 11px; }
/* 本文の「OBSのドックに置く手順」（画像つき） */
#vsoDockGuide { scroll-margin-top: 96px; font-size: 22px; font-weight: 800; }
.vso-steps p a { color: var(--primary-color); font-weight: 700; }
.vso-steps--guide li > div { flex: 1; min-width: 0; }
.vso-steps--guide strong { font-size: 15px; }
.vso-steps--guide p { font-size: 14px; }
.vso-guide-fig { margin: 10px 0 2px; }
.vso-guide-fig img { display: block; width: 100%; max-width: 640px; height: auto; border-radius: 8px; border: 1px solid var(--vso-line); }
.vso-steps--compact strong { font-size: 13px; }
.vso-steps--compact p { font-size: 12px; }

/* ---- 説明・FAQ ---- */
.vso-info { width: min(1000px, calc(100vw - 32px)); margin: 0 auto 32px; }
/* 右ペイン広告（rail-ad.css）で2カラムになったときは本文カラムの幅に合わせる */
@media (min-width: 1100px) { .has-rail .vso-info { width: auto; } }
.vso-info h2 { font-size: 25px; font-weight: 800; margin: 0 0 16px; }
.vso-info h3 { font-size: 18px; font-weight: 700; margin: 26px 0 10px; }
.vso-info p, .vso-info li { line-height: 1.9; font-size: 15px; }
.vso-table-wrap { overflow-x: auto; border: 1px solid var(--vso-line); border-radius: 12px; }
.vso-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.vso-table th, .vso-table td { border-bottom: 1px solid var(--vso-line); padding: 12px 14px; text-align: left; }
.vso-table tr:last-child td { border-bottom: 0; }
.vso-table th { background: var(--bg-light, #f4f9fc); white-space: nowrap; }
.vso-faq { border: 1px solid var(--vso-line); border-radius: 16px; overflow: hidden; background: #fff; }
.vso-faq details { border-bottom: 1px solid var(--vso-line); }
.vso-faq details:last-child { border: 0; }
.vso-faq summary { display: flex; align-items: center; gap: 14px; padding: 19px 22px; cursor: pointer; list-style: none; font-size: 15px; font-weight: 700; }
.vso-faq summary::-webkit-details-marker { display: none; }
.vso-faq summary .q { color: var(--primary-color); font-size: 18px; }
.vso-faq summary::after { content: ''; width: 12px; height: 12px; margin-left: auto; flex-shrink: 0; background: linear-gradient(#666, #666) center/12px 2px no-repeat, linear-gradient(#666, #666) center/2px 12px no-repeat; }
.vso-faq details[open] { background: var(--bg-light, #f4f9fc); }
.vso-faq details[open] summary::after { background: linear-gradient(#666, #666) center/12px 2px no-repeat; }
.vso-faq details p { margin: 0 22px 20px 54px; font-size: 14px; line-height: 1.9; color: var(--text-sub, #666); }

@media (max-width: 760px) {
    .vso-card { padding: 16px; }
    .vso-info h2 { font-size: 22px; }
    #vsoDockGuide { font-size: 20px; }
    .vso-faq summary { padding: 16px; }
    .vso-faq details p { margin-left: 42px; margin-right: 16px; }
    .vso-tagline { font-size: 16px; }
    .vso-tabs--sm .vso-tab { padding: 6px 2px; font-size: 11px; }
    .vso-dock-actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .vso-page *, .vso-page *::before { animation: none !important; transition: none !important; }
    .vso-loading-bars span { transform: scaleY(.45); }
}

