/* 新介面：沿用「流石 IG 貼文產生器」的設計語言（Inter／Noto Sans TC、淺灰底、白色面板、藍 #1B1BF5 主色、螢光黃 #e4fd63 點綴、
   頂部 64px 導覽列、分段切換、編號區塊標題）。全部規則都掛在 body.ig 下，拿掉 .ig 就是舊介面。 */
body.ig {
  --bg: #f8f9fa; --panel: #ffffff; --ink: #334155; --ink-2: #64748b; --line: #e2e8f0;
  --accent: #1B1BF5; --chip: #f1f5f9; --danger: #ef4444;
  --head: #0f172a; --blue: #1B1BF5; --lime: #e4fd63;
  font-family: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif;
  grid-template-columns: 380px 1fr 340px;
}

/* 側欄 */
body.ig aside { padding: 24px; box-shadow: 4px 0 24px rgba(0, 0, 0, .02); z-index: 10; }
body.ig aside.right { box-shadow: -4px 0 24px rgba(0, 0, 0, .02); }
body.ig main { background: #f0f2f5; }
body.ig aside.left { counter-reset: step; }
body.ig aside.left > .group { border-top: 0; padding: 0 0 28px; }
body.ig aside.left > .group > .label:first-child {
  font-size: 1rem; font-weight: 700; color: #1e293b; margin-bottom: 12px; gap: 8px; align-items: center; justify-content: flex-start; counter-increment: step;
}
body.ig aside.left > .group > .label:first-child::before {
  content: counter(step); width: 24px; height: 24px; border-radius: 4px; background: var(--blue); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; flex-shrink: 0;
}
body.ig aside.left > .group > .label:first-child b { margin-left: auto; font-size: .75rem; font-weight: 500; color: #94a3b8; }
body.ig aside.left > .group > .label:not(:first-child) { font-size: .75rem; font-weight: 600; color: #64748b; margin-top: 14px; }

/* 按鈕與選項 */
body.ig .chip { background: #f1f5f9; color: #475569; border-radius: 8px; font-weight: 500; }
body.ig .chip[aria-pressed="true"] { background: var(--blue); color: #fff; box-shadow: 0 1px 2px rgba(27, 27, 245, .25); }
@media (hover: hover) and (pointer: fine) { body.ig .chip:hover:not(:disabled):not([aria-pressed="true"]) { background: #e2e8f0; } }
body.ig .btn { border-radius: 8px; border-color: var(--line); background: #fff; color: #334155; font-weight: 500; }
body.ig .btn:hover { border-color: #cbd5e1; }
body.ig .btn.primary, body.ig #copyBom { background: var(--blue); border-color: var(--blue); color: #fff; }
body.ig .btn.primary:hover, body.ig #copyBom:hover { box-shadow: 0 10px 15px -3px rgba(17, 10, 255, .2); }
body.ig select { border-radius: 8px; border-color: var(--line); color: #334155; }
body.ig .bay-card { border-radius: 12px; border-color: var(--line); box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
body.ig .bay-card.active { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(27, 27, 245, .15); }
body.ig .swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--blue); }

body.ig .apply-row { flex-wrap: wrap; }

/* 視窗上方的分段按鈕：跟導覽列的分段切換同一個樣式 */
body.ig .seg { background: #f1f5f9; border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
body.ig .seg button { border-radius: 7px; font-weight: 600; font-size: 13px; color: #64748b; padding: 5px 12px; }
body.ig .seg button[aria-pressed="true"] { background: #fff; color: #0f172a; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
body.ig .pill { border-radius: 8px; background: rgba(255, 255, 255, .95); color: #475569; }
body.ig .icon-act { border-radius: 8px; }
body.ig .studio-panel .label { font-size: .75rem; font-weight: 600; color: #64748b; }
body.ig .studio-panel select { height: 32px; }
body.ig .ui-switch { width: auto; }

/* 右側與卡片 */
body.ig .sel-card { border-radius: 12px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
body.ig .acc { border-radius: 10px; }
body.ig .acc[aria-pressed="true"] { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
body.ig aside.right h2, body.ig aside.right h3 { color: #0f172a; font-weight: 700; }
body.ig th { text-transform: none; color: #94a3b8; font-weight: 600; }
body.ig td .code { color: #0f172a; }
body.ig .studio-panel { border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, .15); }
body.ig .toast { background: #0f172a; }
body.ig .tag.bay { background: #0f172a; border-color: #0f172a; }

@media (max-width: 1100px) {
  body.ig main { grid-row: 1; }
}
