/* 正本の.device内の規則をig-名にして限定適用する。外枠は移さない。 */
.ig-editor {
  --ink: #111; --muted: #5E6A70; --line: #E3E9EC;
  --navy: #123A4C; --navy-tint: #E6EEF1; --dark: #0E2B39;
  --accent: #12BFC7; --accent-on-dark: #7FE3E8; --tint: #EAF7F8;
  --radius: 12px;
 position:relative; min-width:0; display:flex; flex-direction:column; background:#F4F6F7; color:var(--ink); font-family:"Zen Kaku Gothic New",system-ui,sans-serif; font-size:16px; font-weight:400; line-height:1.7; letter-spacing:.02em; }

.ig-editor, .ig-editor * { box-sizing:border-box; }

.ig-editor a { display:inline; padding:0; border:0; min-height:0; font:inherit; background:transparent; }

.ig-editor button { display:inline-block; margin:0; padding:2px 6px; min-height:0; min-width:0; width:auto; height:auto; font:inherit; box-shadow:none; letter-spacing:normal; }

.ig-editor p { font-size:inherit; line-height:inherit; }

.ig-editor img { height:auto; max-width:100%; }


/* 正本移植開始 */
.ig-editor .ig-scroll { flex: 1; overflow-y: auto; padding-bottom: 24px; }
.ig-editor .ig-appbar { display: flex; align-items: center; gap: 10px; padding: 16px 16px 4px; }
.ig-editor .ig-appbar h1 { font-size: 20px; margin: 0; flex: 1; }
.ig-editor .ig-appbar .ig-back { color: var(--navy); font-size: 22px; text-decoration: none; line-height: 1; }
.ig-editor .ig-test-pill { font-size: 11px; font-weight: 700; color: #6B4E1E; background: #F6EDDD; border-radius: 999px; padding: 2px 10px; }
.ig-editor .ig-free { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--navy); background: var(--tint); border-radius: 999px; padding: 3px 10px; }
.ig-editor .ig-free::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.ig-editor .ig-lead { margin: 4px 16px 0; font-size: 13px; color: var(--muted); }
.ig-editor .ig-section-title { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 16px 10px; }
.ig-editor .ig-section-title h2 { font-size: 16px; margin: 0; }
.ig-editor .ig-section-title small { font-size: 12px; color: var(--muted); }
.ig-editor .ig-post-card { display: block; margin: 0 16px 14px; background: #fff; border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.ig-editor .ig-post-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 3px; background: #fff; }
.ig-editor .ig-post-strip img { width: 100%; min-width: 0; aspect-ratio: 3/4; object-fit: cover; display: block; border-radius: 6px; }
.ig-editor .ig-post-strip .ig-more { width: 100%; min-width: 0; aspect-ratio: 3/4; border-radius: 6px; background: var(--navy-tint); color: var(--navy); display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.ig-editor .ig-post-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px 12px; }
.ig-editor .ig-post-meta b { font-size: 15px; display: block; }
.ig-editor .ig-post-meta span { font-size: 12px; color: var(--muted); }
.ig-editor .ig-post-meta .ig-go { color: var(--navy); font-size: 13px; font-weight: 700; white-space: nowrap; }
.ig-editor .ig-kind { display: inline-block; font-size: 11px; font-weight: 700; color: var(--navy); border: 1px solid #C8D6DC; border-radius: 6px; padding: 0 6px; margin-right: 6px; }
.ig-editor .ig-next-box { margin: 16px 16px 0; background: #fff; border-radius: 16px; padding: 14px 14px 12px; border: 1.5px solid #CDEFF1; }
.ig-editor .ig-next-box h2 { font-size: 15px; margin: 0 0 10px; }
.ig-editor .ig-next-item + .ig-next-item { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.ig-editor .ig-next-head { display: flex; justify-content: space-between; align-items: baseline; }
.ig-editor .ig-next-head b { font-size: 14px; }
.ig-editor .ig-next-head small { font-size: 12px; color: var(--muted); }
.ig-editor .ig-next-progress { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.ig-editor .ig-slots { display: flex; gap: 4px; flex: 0 0 auto; }
.ig-editor .ig-slots img, .ig-editor .ig-slots i { width: 36px; aspect-ratio: 3/4; border-radius: 5px; object-fit: cover; display: block; }
.ig-editor .ig-slots i { border: 1.5px dashed #9FB3BC; color: #7A9099; font-style: normal; font-size: 16px; display: grid; place-items: center; }
.ig-editor .ig-next-progress p, .ig-editor .ig-next-text { margin: 0; font-size: 13px; line-height: 1.6; }
.ig-editor .ig-next-progress strong, .ig-editor .ig-next-text strong { color: var(--navy); }
.ig-editor .ig-next-progress strong { font-size: 16px; }
.ig-editor .ig-next-progress span { font-size: 12px; color: var(--muted); }
.ig-editor .ig-next-text { margin-top: 6px; }
.ig-editor .ig-next-link { display: block; text-align: right; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--navy); text-decoration: none; }
.ig-editor .ig-empty-note { margin: 0 16px; padding: 14px; border-radius: 12px; background: #fff; font-size: 13px; color: var(--muted); }
.ig-editor .ig-frame { margin: 12px 16px 0; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.ig-editor .ig-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 13px; }
.ig-editor .ig-head i { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #12BFC7, #7FE3E8); }
.ig-editor .ig-head b { flex: 1; }
.ig-editor .ig-head .ig-count { font-size: 12px; color: #fff; background: rgba(0,0,0,.55); border-radius: 999px; padding: 1px 8px; }
.ig-editor .ig-slider { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.ig-editor .ig-slider::-webkit-scrollbar { display: none; }
.ig-editor .ig-slider img { flex: 0 0 100%; width: 100%; aspect-ratio: 3/4; object-fit: cover; scroll-snap-align: start; display: block; }
.ig-editor .ig-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 0; padding: 2px 8px; }
.ig-editor .ig-dots button { flex: 0 0 44px; width: 44px; height: 44px; min-width: 44px; min-height: 44px; display: grid; place-items: center; border: 0; padding: 0; background: transparent; cursor: pointer; border-radius: 50%; }
.ig-editor .ig-dots button::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #CBD5DA; }
.ig-editor .ig-dots button.ig-on::after { background: var(--accent); }
.ig-editor .ig-actions { display: grid; gap: 10px; margin: 16px 16px 0; }
.ig-editor .ig-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: var(--radius); font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; border: 1.5px solid var(--navy); }
.ig-editor .ig-btn.ig-primary { background: var(--navy); color: #fff; }
.ig-editor .ig-btn.ig-secondary { background: #fff; color: var(--navy); }
.ig-editor .ig-btn.ig-small { min-height: 40px; font-size: 13px; }
.ig-editor .ig-hint { margin: 6px 16px 0; font-size: 12px; color: var(--muted); text-align: center; }
.ig-editor .ig-caption-box { margin: 18px 16px 0; background: #fff; border-radius: 16px; padding: 14px; }
.ig-editor .ig-caption-box h3 { font-size: 14px; margin: 0 0 8px; }
.ig-editor .ig-caption-box textarea { width: 100%; min-height: 120px; border: 1px solid #C8D3D8; border-radius: 10px; padding: 10px; font: inherit; font-size: 14px; resize: vertical; }
.ig-editor .ig-caption-box .ig-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; color: var(--muted); }
.ig-editor .ig-thumbs-save { display: flex; gap: 8px; overflow-x: auto; margin: 14px 16px 0; padding-bottom: 4px; }
.ig-editor .ig-thumbs-save a { flex: 0 0 72px; text-decoration: none; color: var(--navy); font-size: 11px; font-weight: 700; text-align: center; }
.ig-editor .ig-thumbs-save img { width: 72px; aspect-ratio: 3/4; object-fit: cover; border-radius: 8px; display: block; margin-bottom: 4px; }
.ig-editor .ig-link-row { display: flex; justify-content: center; gap: 22px; margin: 18px 16px 0; font-size: 13px; }
.ig-editor .ig-link-row a { color: var(--navy); font-weight: 700; }
.ig-editor .ig-link-row a.ig-danger { color: #9B2C2C; }
.ig-editor .ig-order-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 6px; }
.ig-editor .ig-order-item { flex: 0 0 84px; position: relative; }
.ig-editor .ig-order-item img { width: 84px; aspect-ratio: 3/4; object-fit: cover; border-radius: 8px; display: block; }
.ig-editor .ig-order-item .ig-num { position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.ig-editor .ig-order-item .ig-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; display: grid; place-items: center; border: 0; cursor: pointer; }
.ig-editor .ig-order-item .ig-move { display: flex; justify-content: space-between; margin-top: 4px; }
.ig-editor .ig-order-item .ig-move button { width: 38px; height: 30px; border-radius: 8px; border: 1px solid #C8D3D8; background: #fff; color: var(--navy); font-size: 14px; cursor: pointer; }
.ig-editor .ig-order-item .ig-move button:disabled { color: #C0C8CC; }
.ig-editor .ig-date-head { margin: 16px 16px 6px; font-size: 13px; font-weight: 700; color: #3B4A51; }
.ig-editor .ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 0 16px; }
.ig-editor .ig-tile { position: relative; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 6px; overflow: hidden; }
.ig-editor .ig-tile img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.ig-editor .ig-tile .ig-badge { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.25); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.ig-editor .ig-tile.ig-on .ig-badge { background: var(--accent); }
.ig-editor .ig-tile.ig-on img { opacity: .78; }
.ig-editor .ig-tile.ig-on::after { content: ""; position: absolute; inset: 0; border: 3px solid var(--accent); border-radius: 6px; pointer-events: none; }
.ig-editor .ig-bottom-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 12px 16px 18px; background: #fff; border-top: 1px solid var(--line); }
.ig-editor .ig-bottom-bar span { flex: 1; font-size: 14px; font-weight: 700; }
.ig-editor .ig-bottom-bar .ig-btn { min-height: 44px; padding: 0 22px; }
.ig-editor .ig-pad-bottom { height: 84px; }



/* 正本移植終了 */
/* 実アプリの表示領域。下のバーだけを画面の下端に固定する。 */
.ig-editor .ig-scroll { min-width:0; }

.ig-editor .ig-appbar h1, .ig-editor .ig-post-meta > div { min-width:0; overflow-wrap:anywhere; }

.ig-editor .ig-tile { min-width:0; min-height:0; font-weight:400; }


.ig-editor .ig-bottom-bar { position:fixed; left:var(--ig-bar-left,0px); right:var(--ig-bar-right,0px); z-index:30; }

.ig-editor .ig-bottom-bar .ig-btn:disabled { opacity:.5; cursor:default; }

.ig-editor .ig-btn[hidden] { display:none; }

.ig-editor .ig-slider img { min-width:100%; }

.ig-editor-route .topbar { display:none; }

.ig-editor-route:has(.ig-detail) .mobile-nav, .ig-editor-route:has(.ig-editing) .mobile-nav { display:none; }

@media(max-width:760px) {
 .ig-editor-route .workspace { padding:0 0 calc(92px + env(safe-area-inset-bottom)); }

}

.ig-te-preview { margin: 12px 16px 0; }
.ig-te-preview img { width: 46%; display: block; margin: 0 auto; aspect-ratio: 3/4; object-fit: cover; border-radius: 10px; box-shadow: 0 6px 18px rgba(14,43,57,.18); }
.ig-te-list { margin: 12px 16px 0; background: #fff; border-radius: 16px; overflow: hidden; }
.ig-te-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ig-te-row:first-child { border-top: 0; }
.ig-te-row.open { display: block; background: #FAFCFC; }
.ig-te-head { display: flex; align-items: center; gap: 10px; }
.ig-te-kind { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--muted); background: #F1F4F5; border-radius: 6px; padding: 1px 7px; }
.ig-te-row b, .ig-te-head b { flex: 1; font-size: 15px; }
.ig-te-go { font-size: 13px; font-weight: 700; color: var(--navy); }
.ig-te-options { display: grid; gap: 6px; margin-top: 10px; }
.ig-te-opt { display: grid; grid-template-columns: 20px 1fr; column-gap: 8px; align-items: start; padding: 10px; border: 1.5px solid var(--line); border-radius: 10px; font-weight: 700; font-size: 14px; background: #fff; }
.ig-te-opt i { grid-row: span 2; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #9FB3BC; margin-top: 2px; }
.ig-te-opt.on { border-color: var(--accent); }
.ig-te-opt.on i { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 45%, transparent 50%); }
.ig-te-opt small { font-weight: 400; font-size: 12px; color: var(--muted); }
.ig-te-remove { margin-top: 4px; min-height: 40px; border: 0; background: none; color: #9B2C2C; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.ig-te-row summary { display:flex; align-items:center; gap:10px; cursor:pointer; list-style:none; width:100%; }
.ig-te-row[open] { display:block; background:#FAFCFC; }
.ig-te-opt input { grid-row:span 2; accent-color:var(--accent); width:18px; height:18px; }
.ig-te-remove:disabled { opacity:.4; cursor:default; }
.ig-age-options { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.ig-preferences { display:grid; gap:8px; }
.ig-preferences small { color:var(--muted); }
.ig-preferences input,.ig-preferences select,.ig-slide-choice select { min-height:44px; border:1px solid var(--line); border-radius:8px; background:white; color:var(--navy); padding:8px; }
.ig-slide-choice { display:flex; gap:8px; align-items:center; margin:12px 16px; }

.ig-te-opt:has(input:checked) { border-color:var(--accent); }

.ig-editor img { background:#EDF0F2; }
.ig-editor img.ig-loading { color:transparent; }

/* 枚数で画像を拡大せず、広い画面の内容も中央に収める。 */
@media(min-width:761px) {
 .ig-editor { width:100%; max-width:720px; margin-inline:auto; }
 .ig-editor .ig-bottom-bar { max-width:720px; margin-inline:auto; }
 .ig-editor.ig-detail .ig-frame {
  width:calc(100% - 32px);
  max-width:min(480px, calc((100vh - 160px) * 3 / 4));
  max-width:min(480px, calc((100dvh - 160px) * 3 / 4));
  margin-inline:auto;
 }
}

/* 写真の横スクロールを保ち、ボタンと点でも同じ位置へ移動する。 */
.ig-editor .ig-slider-wrap { position: relative; }
.ig-editor .ig-slide-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; min-width: 48px; min-height: 48px; border: 0; border-radius: 50%; padding: 0; color: #fff; background: rgba(14,43,57,.65); font: inherit; line-height: 1; cursor: pointer; }
.ig-editor .ig-slide-prev { left: 8px; }
.ig-editor .ig-slide-next { right: 8px; }
.ig-editor .ig-slide-nav:disabled { opacity: .3; cursor: default; }
.ig-editor .ig-slide-nav:focus-visible, .ig-editor .ig-dot:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.ig-editor .ig-slide-nav svg { display:block; width:20px; height:20px; }
@media (min-width:761px) {
 .ig-editor.ig-detail .ig-frame { overflow:visible; }
 .ig-editor .ig-slide-prev { left:-60px; }
 .ig-editor .ig-slide-next { right:-60px; }
}

.ig-cover-status{padding:12px 0;color:#46504b}.ig-cover-status p{margin:0 0 8px}.ig-cover-list-note{display:block;font-size:11px;color:#5e6d64;margin-top:4px}

.ig-preparing { margin: 8px 16px; color: #46504b; font-size: 12px; }
.ig-cover-busy { width: fit-content; padding: 2px 6px; border-radius: 4px; background: #eaf3ed; color: #284636; }
