:root {
  color-scheme: light;
  --paper: #f5f2eb;
  --paper-strong: #fffdf8;
  --ink: #20201d;
  --muted: #706d65;
  --line: #d9d3c7;
  --accent: #d75a3f;
  --accent-dark: #9f3826;
  --accent-soft: #f7ddd4;
  --indigo: #425b78;
  --indigo-soft: #dfe8f1;
  --green: #3e725c;
  --green-soft: #deede5;
  --hard: #a62d25;
  --warning: #a55e00;
  --info: #315e7a;
  --shadow: 0 16px 40px rgba(43, 35, 25, .12);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { font-size: 16px; background: var(--paper); }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 0, rgba(215, 90, 63, .1), transparent 30rem),
    linear-gradient(180deg, #faf7f0 0, var(--paper) 24rem);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", sans-serif;
  line-height: 1.55;
}
button, input, textarea { font: inherit; font-size: 16px; }
button { color: inherit; }
.skip-link { position: fixed; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: white; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 8px; }
.app-shell { width: min(100%, 760px); min-height: 100dvh; margin: 0 auto; position: relative; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 68px; padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
  background: rgba(250, 247, 240, .92); border-bottom: 1px solid rgba(217, 211, 199, .85);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; min-height: 48px; border: 0; background: transparent; padding: 0; text-align: left; cursor: pointer; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px 12px 12px 3px; background: var(--ink); color: #fffaf0; font: 800 19px/1 Georgia, serif; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: .86rem; letter-spacing: .03em; }
.brand small { font-size: .68rem; color: var(--muted); }
.step-meter { flex: none; max-width: 44%; font-size: .72rem; color: var(--muted); text-align: right; }
.meter-dots { display: flex; justify-content: flex-end; gap: 4px; margin-top: 5px; }
.meter-dot { width: 16px; height: 4px; border-radius: 99px; background: var(--line); }
.meter-dot.is-active, .meter-dot.is-done { background: var(--accent); }
main { padding: 20px 16px calc(188px + env(safe-area-inset-bottom)); outline: none; }
.hero { padding: 22px 2px 8px; }
.eyebrow { margin: 0 0 8px; color: var(--accent-dark); font-weight: 800; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-family: Georgia, "Yu Mincho", serif; font-size: clamp(2rem, 9vw, 3.25rem); line-height: 1.07; letter-spacing: -.03em; }
.hero-copy { margin: 16px 0 0; max-width: 36rem; color: var(--muted); font-size: .94rem; }
.entry-grid { display: grid; gap: 12px; margin-top: 24px; }
.entry-card {
  position: relative; display: grid; grid-template-columns: 54px minmax(0, 1fr) 24px; align-items: center; gap: 13px;
  width: 100%; min-height: 94px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper-strong); box-shadow: 0 6px 20px rgba(43, 35, 25, .05); text-align: left; cursor: pointer;
}
.entry-card:hover { border-color: #b8ae9e; transform: translateY(-1px); }
.entry-card:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(66, 91, 120, .35); outline-offset: 2px; }
.entry-number { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 15px; background: var(--accent-soft); color: var(--accent-dark); font: 700 1.25rem/1 Georgia, serif; }
.entry-card:nth-child(2) .entry-number { background: var(--indigo-soft); color: var(--indigo); }
.entry-card:nth-child(3) .entry-number { background: var(--green-soft); color: var(--green); }
.entry-card:nth-child(4) .entry-number { background: #efe2f0; color: #6d3f73; }
.entry-card strong, .entry-card small { display: block; }
.entry-card strong { font-size: 1rem; }
.entry-card small { margin-top: 3px; color: var(--muted); font-size: .78rem; }
.entry-arrow { font-size: 1.4rem; color: var(--muted); }
.resume-card { margin-top: 14px; padding: 14px; border: 1px dashed var(--indigo); border-radius: 16px; background: rgba(223, 232, 241, .45); }
.resume-card p { margin: 0 0 10px; font-size: .83rem; color: var(--indigo); }
.resume-actions { display: flex; gap: 8px; }
.section-heading { margin-bottom: 18px; }
.section-heading h1 { font-size: 1.8rem; }
.section-heading p { margin: 7px 0 0; color: var(--muted); font-size: .88rem; }
.structure-strip { margin: 0 0 16px; padding: 12px 14px; border-left: 4px solid var(--accent); border-radius: 4px 14px 14px 4px; background: var(--paper-strong); box-shadow: 0 4px 16px rgba(43, 35, 25, .05); }
.structure-strip small { display: block; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .08em; }
.structure-strip p { margin: 3px 0 0; font-size: .83rem; font-weight: 700; }
.design-card { margin-bottom: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 253, 248, .88); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.card-head h2 { margin: 0; font-size: .98rem; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: .74rem; }
.count-pill { flex: none; padding: 4px 9px; border-radius: 99px; background: var(--indigo-soft); color: var(--indigo); font-size: .7rem; font-weight: 800; }
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; max-width: 100%; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: #4e4b45; font-weight: 700; font-size: .82rem; cursor: pointer;
}
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); box-shadow: inset 0 0 0 1px var(--accent); }
.chip:disabled { color: #aaa49a; background: #eeeae2; text-decoration: line-through; cursor: not-allowed; }
.chip-note { width: 100%; margin: 4px 2px 0; color: var(--muted); font-size: .72rem; }
.detail-toggle { min-height: 44px; margin-top: 10px; padding: 8px 0; border: 0; background: transparent; color: var(--indigo); font-weight: 800; cursor: pointer; }
.subsection { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.subsection h3 { margin: 0 0 9px; font-size: .82rem; }
.hint { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--green-soft); color: #2f604c; font-size: .76rem; }
.preset-list { display: grid; gap: 10px; }
.preset-filters { display: flex; gap: 8px; margin: 0 -16px 10px; padding: 2px 16px 8px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.collection-filters { display: flex; gap: 8px; margin: 0 -16px 10px; padding: 2px 16px 8px; overflow-x: auto; scrollbar-width: thin; }
.collection-filter { flex: 0 0 auto; min-height: 44px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .76rem; font-weight: 800; cursor: pointer; white-space: nowrap; }
.collection-filter b { color: var(--muted); font-size: .7rem; }
.collection-filter[aria-pressed="true"] { border-color: var(--indigo); background: var(--indigo-soft); color: var(--indigo); box-shadow: inset 0 0 0 1px var(--indigo); }
.collection-filter[aria-pressed="true"] b { color: var(--indigo); }
.relationship-filters { margin: 0 0 12px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper-strong); }
.family-filter-block { margin: 0 0 10px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper-strong); }
.family-filter-block > small { display: block; margin-bottom: 6px; color: var(--muted); font-weight: 800; }
.family-filters b { margin-left: 3px; font-size: .68rem; }
.relationship-filter-row + .relationship-filter-row { margin-top: 10px; }
.relationship-filter-row > small { display: block; margin-bottom: 5px; color: var(--muted); font-weight: 800; }
.tag-filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: thin; }
.tag-filters button { flex: 0 0 auto; min-height: 40px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .7rem; font-weight: 800; white-space: nowrap; cursor: pointer; }
.tag-filters button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); box-shadow: inset 0 0 0 1px var(--accent); }
.preset-filter { flex: 0 0 auto; min-width: 104px; min-height: 58px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 13px; background: #fff; text-align: left; cursor: pointer; }
.preset-filter span, .preset-filter small { display: block; white-space: nowrap; }
.preset-filter span { font-size: .78rem; font-weight: 800; }
.preset-filter b { color: var(--muted); font-size: .72rem; }
.preset-filter small { margin-top: 2px; color: var(--muted); font-size: .65rem; }
.preset-filter[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); box-shadow: inset 0 0 0 1px var(--accent); }
.preset-filter[aria-pressed="true"] b, .preset-filter[aria-pressed="true"] small { color: var(--accent-dark); }
.preset-filter-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 10px; margin-bottom: 12px; color: var(--muted); font-size: .7rem; }
.selected-filters { flex: 1 1 180px; overflow-wrap: anywhere; }
.preset-filter-tools .btn { min-height: 38px; padding: 7px 10px; }
.restraint-notice { margin: 0; padding: 10px 12px; border: 1px solid #c9a96a; border-radius: 12px; background: #fff8e9; color: #694f20; font-size: .78rem; font-weight: 800; line-height: 1.6; }
.restraint-difficulty { display: flex; gap: 7px; align-items: center; overflow-x: auto; margin-top: 10px; padding: 8px 0 3px; color: var(--muted); font-size: .72rem; white-space: nowrap; scrollbar-width: thin; }
.restraint-difficulty strong { flex: 0 0 auto; color: var(--ink); }
.restraint-difficulty span { flex: 0 0 auto; padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-strong); }
.restraint-level { margin: 8px 0 0; padding: 8px 10px; border-left: 3px solid var(--accent); border-radius: 8px; background: var(--paper-strong); color: var(--ink); font-size: .76rem; font-weight: 800; line-height: 1.55; }
.restraint-level--warning { border-left-color: #a45e16; background: #fff4e4; color: #75400d; }
.expression-group:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.viewer-only-filter { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .74rem; font-weight: 800; cursor: pointer; }
.viewer-only-filter[aria-pressed="true"] { border-color: var(--indigo); background: var(--indigo-soft); color: var(--indigo); box-shadow: inset 0 0 0 1px var(--indigo); }
.preset-card { width: 100%; min-height: 72px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: left; cursor: pointer; }
.preset-card strong, .preset-card small { display: block; }
.preset-card small { margin-top: 4px; color: var(--muted); font-size: .74rem; }
.preset-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.preset-tag { padding: 3px 7px; border-radius: 999px; background: var(--indigo-soft); color: var(--indigo); font-size: .62rem; font-weight: 800; }
.preset-empty { margin: 8px 0 18px; color: var(--muted); font-size: .8rem; }
.issue-list { display: grid; gap: 10px; }
.issue-card { padding: 14px; border: 1px solid var(--line); border-left-width: 5px; border-radius: 14px; background: #fff; }
.issue-card--hard { border-left-color: var(--hard); }
.issue-card--warning { border-left-color: var(--warning); }
.issue-card--info { border-left-color: var(--info); }
.issue-card.is-ignored { opacity: .58; }
.issue-label { font-size: .68rem; font-weight: 900; letter-spacing: .08em; }
.issue-card--hard .issue-label { color: var(--hard); }
.issue-card--warning .issue-label { color: var(--warning); }
.issue-card--info .issue-label { color: var(--info); }
.issue-card h3 { margin: 3px 0 4px; font-size: .9rem; }
.issue-card p { margin: 0; color: var(--muted); font-size: .78rem; }
.issue-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.btn { min-height: 44px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-weight: 800; font-size: .79rem; cursor: pointer; }
.btn--primary { border-color: var(--ink); background: var(--ink); color: white; }
.btn--accent { border-color: var(--accent); background: var(--accent); color: white; }
.btn--quiet { background: transparent; }
.btn--danger { color: var(--hard); border-color: rgba(166, 45, 37, .3); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.output-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: #e9e4da; }
.output-tab { flex: 1; min-height: 44px; padding: 8px 5px; border: 0; border-radius: 10px; background: transparent; font-size: .72rem; font-weight: 800; cursor: pointer; }
.output-tab[aria-selected="true"] { background: var(--paper-strong); box-shadow: 0 2px 8px rgba(43, 35, 25, .1); }
.output-box { min-height: 150px; margin: 12px 0; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #24231f; color: #f8f3e8; font: 500 .84rem/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.output-box--negative { min-height: 88px; background: #3a312f; }
.complete-banner { margin-bottom: 12px; padding: 12px 14px; border-radius: 14px; background: var(--green-soft); color: #2f604c; font-size: .8rem; font-weight: 800; }
.complete-banner.is-incomplete { background: var(--accent-soft); color: var(--accent-dark); }
label.field-label { display: block; margin-bottom: 7px; font-size: .78rem; font-weight: 800; }
input[type="text"], input[type="search"], textarea { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: #fff; color: var(--ink); }
textarea { min-height: 88px; resize: vertical; }
.sticky-summary {
  position: fixed; left: 50%; bottom: calc(61px + env(safe-area-inset-bottom)); z-index: 25;
  width: min(calc(100% - 20px), 740px); transform: translateX(-50%); padding: 10px 11px;
  border: 1px solid rgba(217, 211, 199, .95); border-radius: 16px; background: rgba(255, 253, 248, .97); box-shadow: var(--shadow); backdrop-filter: blur(14px);
}
.summary-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.summary-copy { min-width: 0; }
.summary-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .76rem; }
.summary-copy small { color: var(--muted); font-size: .68rem; }
.warning-count { color: var(--warning); }
.bottom-nav {
  position: fixed; left: 50%; bottom: 0; z-index: 24; transform: translateX(-50%);
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: min(100%, 760px);
  padding: 7px 12px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(245, 242, 235, .97); backdrop-filter: blur(14px);
}
.bottom-nav .btn { width: 100%; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(32, 32, 29, .45); }
.bottom-sheet {
  position: fixed; left: 50%; bottom: 0; z-index: 51; width: min(100%, 760px); max-height: min(82dvh, 760px); overflow: auto;
  transform: translateX(-50%); padding: 9px 16px calc(22px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: var(--paper-strong); box-shadow: 0 -20px 60px rgba(32, 32, 29, .2);
}
.sheet-grab { width: 42px; height: 4px; margin: 0 auto 14px; border-radius: 99px; background: var(--line); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sheet-head h2 { margin: 0; font-size: 1.05rem; }
.sheet-head p { margin: 3px 0 0; color: var(--muted); font-size: .7rem; }
.icon-btn { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 99px; background: #fff; cursor: pointer; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.user-preset { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.user-preset button:first-child { text-align: left; }
.toast { position: fixed; left: 50%; top: calc(76px + env(safe-area-inset-top)); z-index: 80; transform: translate(-50%, -12px); max-width: calc(100% - 32px); padding: 9px 14px; border-radius: 99px; background: var(--ink); color: white; font-size: .78rem; opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
[hidden] { display: none !important; }

/* ---- 出力先・二人用ポーズ（2026-10-27） ---- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.target-switch { position: sticky; top: calc(68px + env(safe-area-inset-top)); z-index: 20; margin: 0 -16px 14px; padding: 6px 16px 6px; background: rgba(245, 242, 235, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.target-switch__row { display: flex; align-items: center; gap: 8px; }
.target-switch__label { flex: none; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .04em; writing-mode: horizontal-tb; }
.target-switch__buttons { flex: 1 1 auto; display: flex; gap: 4px; padding: 3px; border-radius: 13px; background: #e9e4da; }
.target-switch__buttons button { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 6px 4px; border: 0; border-radius: 10px; background: transparent; font-size: .76rem; font-weight: 800; cursor: pointer; }
.target-switch__buttons button[aria-pressed="true"] { background: var(--ink); color: #fffaf0; box-shadow: 0 2px 8px rgba(43, 35, 25, .18); }
.target-switch__note { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .66rem; }
#pairOutput, #outputBox { scroll-margin-top: calc(160px + env(safe-area-inset-top)); }
.btn--nowrap { white-space: nowrap; }
.btn--small { min-height: 40px; margin-left: auto; padding: 6px 12px; font-size: .74rem; }
.segmented { display: flex; align-items: center; gap: 4px; margin-top: 8px; padding: 4px; border-radius: 14px; background: #e9e4da; }
.segmented button { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 6px 6px; border: 0; border-radius: 10px; background: transparent; font-size: .78rem; font-weight: 800; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--paper-strong); color: var(--accent-dark); box-shadow: 0 2px 8px rgba(43, 35, 25, .12), inset 0 0 0 1px var(--accent); }
.segmented button b { color: var(--muted); font-size: .7rem; }
.segmented__label { flex: none; margin: 0 4px; }
.segmented--plain { margin-top: 0; }
.count-tabs { margin: 0 0 10px; }
#presetSearch, #pairSearch { margin-bottom: 10px; }
.role-badge { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: #fff; font: 800 .9rem/1 Georgia, serif; }
.role-badge--b, .role-row--b .role-badge, .nai-block--b .role-badge { background: var(--indigo); }
.role-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 11px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.role-row--a { border-left: 4px solid var(--accent); }
.role-row--b { border-left: 4px solid var(--indigo); }
.role-row strong { display: block; font-size: .84rem; }
.role-row p { margin: 2px 0 0; color: #4e4b45; font-size: .78rem; }
.relation-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.relation-chips span { padding: 5px 9px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: .74rem; font-weight: 800; }
.relation-chips small { margin-right: 5px; color: var(--muted); font-size: .66rem; }
.contact-list { margin: 0; padding-left: 1.1em; font-size: .78rem; color: #4e4b45; }
.contact-list li + li { margin-top: 3px; }
.mini-label { display: block; color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .06em; }
.pair-selected { border-color: var(--accent); }
.pair-selected .card-head { margin-bottom: 0; }
.pair-pose-list { display: grid; gap: 8px; margin-top: 10px; }
.pair-pose-card { width: 100%; min-height: 68px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: left; cursor: pointer; }
.pair-pose-card strong, .pair-pose-card small { display: block; }
.pair-pose-card small { margin-top: 3px; color: var(--muted); font-size: .74rem; }
.pair-pose-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: #fff8f5; }
.pair-family-filters { margin-top: 2px; }
.chip--recommended { border-color: #c9a96a; }
.chip--recommended span[aria-hidden] { margin-right: 3px; color: #a3741c; }
.blocked-note { margin-top: 8px; font-size: .72rem; color: var(--muted); }
.blocked-note summary { min-height: 36px; display: flex; align-items: center; cursor: pointer; font-weight: 800; }
.blocked-note ul { margin: 2px 0 0; padding-left: 1.1em; }
.subsection--first { margin-top: 0; padding-top: 0; border-top: 0; }
details.fold > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; cursor: pointer; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: '＋'; flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 99px; background: var(--paper); color: var(--muted); font-weight: 800; }
details.fold[open] > summary::after { content: '－'; }
details.fold > summary strong { display: block; font-size: .94rem; }
details.fold > summary small { display: block; color: var(--muted); font-size: .72rem; }
.fold-body { margin-top: 12px; }
.fold--inline { margin-top: 6px; }
.fold--inline > summary strong { font-size: .8rem; }
.output-box--short { min-height: 64px; margin: 8px 0; }
.output-box--ja { min-height: 0; background: #fffdf8; color: var(--ink); font-family: inherit; }
.nai-block { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.nai-block:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.nai-head { display: flex; align-items: center; gap: 8px; }
.nai-head small { color: var(--muted); font-size: .7rem; }
.nai-head .role-badge { width: 26px; height: 26px; font-size: .8rem; }
.output-note { margin: 0 0 8px; padding: 9px 11px; border-radius: 10px; font-size: .74rem; }
.output-note--info { background: var(--indigo-soft); color: var(--info); }
.output-note--warning { background: #fff4e4; color: #75400d; }
.model-opts { margin: 4px 0 2px; }
.pair-actions { margin-top: 14px; }
.target-pill { display: inline-block; padding: 1px 7px; border-radius: 99px; background: var(--ink); color: #fffaf0; font-size: .62rem; font-weight: 800; vertical-align: 1px; }
.live-preview { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .64rem; }
.live-preview--line { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.sticky-summary .summary-copy small .live-preview { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.summary-actions { display: flex; gap: 6px; }
.summary-actions .btn { padding-inline: 11px; }
@media (max-width: 360px) { .summary-actions .btn:first-child { display: none; } }
@media (min-width: 620px) {
  main { padding-inline: 28px; }
  .entry-grid { grid-template-columns: repeat(2, 1fr); }
  .entry-card { grid-template-columns: 1fr; min-height: 185px; align-content: space-between; }
  .entry-arrow { position: absolute; right: 16px; top: 15px; }
  .preset-list { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; }
}

/* ---- 人物A・Bの外見・服装入力（2026-10-28） ---- */
.person-card .card-head { margin-bottom: 6px; }
.person-roles { margin: 0 0 10px; }
.person-fold { margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.person-fold--a { border-left: 4px solid var(--accent); }
.person-fold--b { border-left: 4px solid var(--indigo); }
.person-fold > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; cursor: pointer; }
.person-fold > summary::-webkit-details-marker { display: none; }
.person-fold > summary::after { content: '＋'; flex: none; margin-left: auto; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 99px; background: var(--paper); color: var(--muted); font-weight: 800; }
.person-fold[open] > summary::after { content: '－'; }
.person-fold__title { min-width: 0; }
.person-fold__title strong { display: block; font-size: .86rem; }
.person-fold__title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .7rem; }
.person-fold__body { padding: 0 12px 12px; }
.person-placement { margin: 0 0 6px; padding: 8px 10px; border-radius: 10px; background: var(--paper); color: #4e4b45; font-size: .78rem; }
.person-placement span { display: block; color: var(--muted); font-size: .66rem; font-weight: 800; }
.person-fold .segmented { margin: 8px 0 10px; }
.person-fold .segmented__label { font-size: .7rem; font-weight: 800; color: var(--muted); }
textarea.person-prompt { min-height: 104px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 16px; line-height: 1.5; }
.person-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; margin-top: 4px; color: var(--muted); font-size: .68rem; }
.person-where { flex: 1 1 200px; text-align: right; }
.person-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.person-sets { margin-top: 8px; font-size: .76rem; }
.person-sets > summary { min-height: 40px; display: flex; align-items: center; cursor: pointer; color: var(--indigo); font-weight: 800; }
.person-set-list { margin: 0; padding: 0; list-style: none; }
.person-set-list li { display: flex; gap: 6px; align-items: center; padding: 4px 0; border-top: 1px dashed var(--line); }
.person-set-list li button:first-child { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.btn--small-plain { min-height: 40px; padding: 6px 10px; font-size: .74rem; }
.nai-howto { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--indigo-soft); color: #2e4560; font-size: .76rem; }
.nai-howto summary { min-height: 36px; display: flex; align-items: center; cursor: pointer; font-weight: 800; }
.nai-howto ol { margin: 6px 0 6px; padding-left: 1.3em; }
.nai-howto p { margin: 0; font-weight: 800; }
.reset-options { display: grid; gap: 10px; }
.reset-option { width: 100%; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: left; cursor: pointer; }
.reset-option strong, .reset-option small { display: block; }
.reset-option small { margin-top: 4px; color: var(--muted); font-size: .74rem; line-height: 1.6; }
.reset-option--danger strong { color: var(--hard); }

/* ---- 人物A・B別の表情（2026-10-28） ---- */
.person-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; }
.expr-fold { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-strong); }
.expr-fold > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 12px; cursor: pointer; }
.expr-fold > summary::-webkit-details-marker { display: none; }
.expr-fold > summary strong { flex: none; font-size: .82rem; }
.expr-fold > summary small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .72rem; }
.expr-fold > summary::after { content: '＋'; flex: none; margin-left: auto; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 99px; background: var(--paper); color: var(--muted); font-weight: 800; }
.expr-fold[open] > summary::after { content: '－'; }
.expr-body { padding: 0 12px 10px; }
.expr-body input[type="search"] { margin-bottom: 4px; }
.expr-row { margin-top: 8px; }
.expr-row h4 { margin: 0 0 4px; font-size: .74rem; color: var(--muted); }
.expr-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; overscroll-behavior-inline: contain; }
.expr-chip { flex: 0 0 auto; min-height: 40px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .76rem; font-weight: 800; white-space: nowrap; cursor: pointer; }
.expr-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); box-shadow: inset 0 0 0 1px var(--accent); }
.expr-chip:disabled { color: #aaa49a; background: #eeeae2; text-decoration: line-through; cursor: not-allowed; }
.expr-blocked { margin-top: 2px; }

/* ---- 棒人間の模式図（2026-10-29） ---- */
.pose-figure { display: block; width: 100%; height: auto; overflow: hidden; }
.pose-figure .pf-limb, .pose-figure .pf-torso { fill: none; stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.pose-figure .pf-shoulder { stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; }
.pose-figure .pf-far { stroke: #9a958a; }
.pose-figure .pf-hidden { stroke-dasharray: 2.5 3; stroke: #9a958a; }
.pose-figure .pf-toward { stroke-width: 4; }
.pose-figure .pf-hand { fill: var(--ink); stroke: none; }
.pose-figure .pf-hand.pf-hidden { fill: #9a958a; }
.pose-figure .pf-hand--toward { fill: var(--paper-strong); stroke: var(--ink); stroke-width: 2; }
.pose-figure .pf-bound { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 2 1.6; }
.pose-figure .pf-head { fill: var(--paper-strong); stroke: var(--ink); stroke-width: 2.6; }
.pose-figure .pf-head--back { fill: #e6e1d6; }
.pose-figure .pf-eye { fill: var(--ink); }
.pose-figure .pf-nose { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.pose-figure .pf-hair { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.pose-figure .pf-ground { stroke: #c9c2b4; stroke-width: 1.4; stroke-linecap: round; }
.pose-figure .pf-prop { fill: #ebe6dc; stroke: #cfc8ba; stroke-width: 1; }
.pose-figure .pf-heel { stroke-width: 2; }
.pose-figure .pf-outside { fill: var(--paper); opacity: .72; }
.pose-figure .pf-crop { fill: none; stroke: var(--indigo); stroke-width: 1.4; stroke-dasharray: 4 3; }
.pose-figure .pf-camera rect, .pose-figure .pf-camera path { fill: var(--indigo); }
.pose-figure .pf-label { fill: var(--muted); font-size: 8px; font-weight: 700; }
.pose-figure .pf-empty { fill: var(--muted); font-size: 8px; }
/* モード系の補助線：肩・骨盤の線（角度差）、いちばん手前の印、胸郭の回り込み */
.pose-figure .pf-axis { stroke: var(--accent); stroke-width: 1.3; stroke-dasharray: 3 2.4; stroke-linecap: round; opacity: .9; }
.pose-figure .pf-near { fill: none; stroke: var(--accent); stroke-width: 1.6; }
.pose-figure .pf-twist { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* 図で選ぶ（プリセット） */
.display-tabs { margin: 10px 0 12px; }
.figure-note { margin-top: 4px !important; }
.figure-note { margin: 0 0 10px; color: var(--muted); font-size: .72rem; line-height: 1.6; }
.preset-list--figure { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.preset-card--figure { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-height: 0; padding: 8px 8px 10px; }
.preset-card--figure .figure-frame { display: block; border-radius: 10px; background: var(--paper); overflow: hidden; }
.preset-card--figure strong { font-size: .8rem; line-height: 1.35; }
.preset-card.is-selected { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); background: var(--paper-strong); }
.selected-badge { display: inline-block; padding: 1px 7px; border-radius: 99px; background: var(--accent); color: #fff; font-size: .66rem; font-weight: 800; vertical-align: 1px; }
.preset-card--figure .selected-badge { position: absolute; top: 12px; left: 12px; }
@media (min-width: 620px) { .preset-list--figure { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* 編集中の図（現在の構造） */
.structure-strip--figure { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: center; }
.strip-figure { border-radius: 10px; background: var(--paper); overflow: hidden; }
.strip-note { margin-top: 4px; font-weight: 600 !important; letter-spacing: 0 !important; line-height: 1.5; }

/* モード系の身体配置 */
.preset-card .preset-shot { color: var(--indigo); font-weight: 700; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.preset-card--figure .preset-shot { display: block; margin-top: 2px; }
.editorial-note { margin: 10px 0 0; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.editorial-note b { display: block; }
.editorial-note span { color: var(--muted); font-size: 12px; }
/* 舞踊的な上半身：曲線の腕と肘の印 */
.pose-figure .pf-curve { fill: none; }
.pose-figure .pf-joint { fill: var(--paper-strong); stroke: var(--ink); stroke-width: 1.2; }
.pose-figure .pf-joint.pf-hidden { stroke: #9a958a; }
/* プリクラ系：手の形の記号（V・猫の手・手のひら・L字・グー）と、両手で作るハート */
.pose-figure .pf-handshape { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.pose-figure .pf-handshape--fist { fill: var(--accent); stroke: none; opacity: .9; }
.pose-figure .pf-heart { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; }
.editorial-note .purikura-fallback { display: block; margin-top: 6px; color: var(--ink); }
.pair-fallback { margin-top: 10px; }
.pair-fallback p { margin: 0 0 8px; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.pair-source { margin-top: 10px; color: var(--muted); font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.pair-source small { display: block; line-height: 1.6; }
.pair-source .pair-fallback p { color: var(--ink); font-weight: 400; }
