/* トレーシングペーパー（下地）、カッティングマットの緑（自分の操作・自分のタグ）、
   チャコペンの黄（フォーカス）。画像が主役なので、ほかは静かに。
   日本語はシステムの書体、英語のラベルだけ Oswald。 */
@font-face { font-family: "STUDIO Oswald"; src: url(fonts/Oswald.ttf) format("truetype"); font-weight: 200 700; font-display: swap; }
:root {
  --paper: #edeff1;
  --sheet: #ffffff;
  --ink: #1c1f24;
  --sub: #565c66;
  --line: #c9cdd3;
  --mat: #2f6b4f;
  --mat-deep: #24563f;
  --mat-pale: #dfeae4;
  --chalk: #f2c94c;
  --ai: #8a929e;
  --danger: #8a2a2a;
  --r: 6px;
  --font: system-ui, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  --en: "STUDIO Oswald", "Oswald", var(--font);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--paper); color: var(--ink); font: 14px/1.6 var(--font); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
[hidden] { display: none !important; }

/* 英語のラベル。Oswald は縦長で字間が詰まりやすいので、少し開けて揃える */
.en, .en button { font-family: var(--en); letter-spacing: .05em; font-feature-settings: "kern" 1; }

.app { display: grid; grid-template-columns: 220px 1fr; min-height: 100%; }

/* ---------- 左のレール ---------- */
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 14px;
  padding: 20px 14px; border-right: 1px solid var(--line); background: var(--paper); }
.mark { font-size: 19px; font-weight: 600; line-height: 1.05; letter-spacing: .07em; padding: 0 6px; }
.mark img { display: block; max-width: 100%; max-height: 56px; }
.boards { flex: 1; overflow: auto; display: grid; align-content: start; gap: 2px; }
.boards .item { display: flex; align-items: center; gap: 2px; position: relative; }
.boards .item > button:first-child { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; padding: 7px 8px;
  border: 0; border-radius: var(--r); background: transparent; text-align: left; cursor: pointer; }
.boards .item > button:first-child:hover { background: rgba(28, 31, 36, .06); }
.boards .item > button[aria-current=true] { background: var(--sheet); box-shadow: inset 3px 0 0 var(--mat); }
.boards .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.boards .vibes .name { font-family: var(--en); letter-spacing: .05em; }
.boards .n { color: var(--sub); font-size: 12px; font-variant-numeric: tabular-nums; }
.boards .roomtag { flex: none; color: var(--sub); border: 1px solid var(--line); border-radius: 99px; padding: 0 5px; font-size: 9px; letter-spacing: .06em; line-height: 1.7; }
.boards .more { width: 26px; height: 30px; flex: none; border: 0; border-radius: var(--r); background: transparent; color: var(--sub); cursor: pointer; }
.boards .more:hover { background: rgba(28, 31, 36, .06); }
.boards .divider { height: 1px; background: var(--line); margin: 6px 8px; }
.menu { position: absolute; right: 0; top: 100%; z-index: 10; display: grid; min-width: 150px; padding: 4px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--sheet); box-shadow: 0 6px 20px rgba(28, 31, 36, .15); }
.menu button { padding: 7px 10px; border: 0; background: none; text-align: left; cursor: pointer; border-radius: 4px; }
.menu button:hover { background: var(--paper); }
.menu .danger { color: var(--danger); }
.boards .rename { width: 100%; padding: 5px 8px; border: 1px solid var(--chalk); border-radius: var(--r); background: var(--sheet); }
.newboard { display: flex; gap: 4px; }
.newboard input { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); }
.newboard button { width: 32px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); cursor: pointer; }
.rail-foot { display: grid; gap: 2px; }
.foot { padding: 6px 8px; border: 0; border-radius: var(--r); background: none; text-align: left; font-size: 16px; cursor: pointer; color: var(--sub); }
.foot:hover { color: var(--ink); background: rgba(28, 31, 36, .06); }
.foot[aria-current=true] { color: var(--ink); background: var(--sheet); box-shadow: inset 3px 0 0 var(--mat); }

/* ---------- 上部 ---------- */
.main { min-width: 0; padding: 22px 28px 60px; }
.top { display: grid; justify-items: start; gap: 2px; margin-bottom: 18px; }
.board-title { margin: 0; font-size: 26px; font-weight: 700; }
.board-title.en { font-weight: 600; letter-spacing: .06em; }
.board-meta { color: var(--sub); font-size: 13px; }
.steps { display: flex; margin: 10px 0 0; padding: 0; list-style: none;
  border: 1px solid var(--line); border-radius: 999px; background: var(--sheet); overflow: hidden; }
.steps button { display: flex; align-items: center; gap: 8px; padding: 8px 18px; border: 0; background: transparent; cursor: pointer; font-size: 16px; }
.steps b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid var(--line); font-size: 11px; font-weight: 500; letter-spacing: 0; }
.steps button[aria-current=true] { background: var(--ink); color: #fff; }
.steps button[aria-current=true] b { border-color: #fff; }

/* ---------- 共通部品 ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--sheet); cursor: pointer; white-space: nowrap; }
.btn.en { font-size: 15px; padding: 6px 16px; }
.btn:hover { border-color: var(--ink); }
.btn:disabled { opacity: .45; cursor: default; border-color: var(--line); }
.btn.primary { background: var(--mat); border-color: var(--mat); color: var(--on-mat, #fff); font-weight: 600; }
.btn.primary.en { font-weight: 500; }
.btn.primary:hover:not(:disabled) { background: var(--mat-deep); }
.btn.danger { color: var(--danger); }
.link { border: 0; background: none; padding: 0; color: var(--sub); text-decoration: underline; cursor: pointer; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.spacer { flex: 1; }
.sub { color: var(--sub); font-size: 13px; }
.count { color: var(--sub); font-size: 13px; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 12px; }
.toolbar input[type=search] { width: min(320px, 100%); padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); }
.progress { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin: 10px 0; }
.progress span { display: block; height: 100%; width: 0; background: var(--mat); transition: width .2s; }
.empty { padding: 40px 0; color: var(--sub); }
h2, h3 { font-weight: 700; }

/* ---------- 画像の一覧 ---------- */
.grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.card { position: relative; border-radius: var(--r); overflow: hidden; background: var(--sheet); aspect-ratio: 3 / 4; }
.card .open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card:hover { outline: 2px solid var(--ink); outline-offset: -2px; }
.card .pick { position: absolute; top: 6px; left: 6px; width: 20px; height: 20px; accent-color: var(--mat); cursor: pointer;
  opacity: 0; transition: opacity .12s; }
.card:hover .pick, .card .pick:checked, .card .pick:focus-visible, .selecting .card .pick { opacity: 1; }
.card.picked { outline: 3px solid var(--mat); outline-offset: -3px; }
.selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* ---------- 取り込み・読み取り ---------- */
.drop { padding: 22px; border: 2px dashed var(--line); border-radius: 10px; background: rgba(255, 255, 255, .5); }
.drop p { margin: 0 0 6px; }
.drop .row { margin-top: 10px; }
.drop.over { border-color: var(--mat); background: var(--mat-pale); }
.lookbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }

/* ---------- タグ ---------- */
.tags-group { margin: 10px 0; }
.tags-group h4 { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--sub); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 9px; border-radius: 999px; font-size: 13px; }
.chip.ai { border: 1px dashed var(--ai); color: #3d434c; background: transparent; }
.chip.user { border: 1px solid var(--mat); background: var(--mat); color: var(--on-mat, #fff); }
.chip.filter { border: 1px solid var(--ink); background: var(--ink); color: #fff; }
.chip .v { border: 0; background: none; padding: 0; cursor: text; color: inherit; }
.chip .x { border: 0; background: none; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; color: inherit; opacity: .7; }
.chip .x:hover { opacity: 1; }
.chip input { width: 9em; border: 0; background: transparent; padding: 0; color: inherit; }
.tag-add { display: flex; gap: 4px; margin-top: 12px; }
.tag-add select, .tag-add input { padding: 5px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); }
.tag-add input { flex: 1; min-width: 0; }
.legend { display: flex; gap: 12px; align-items: center; font-size: 12px; color: var(--sub); margin-top: 6px; }

/* ---------- Look up ---------- */
.lenstabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.lenstabs button { padding: 8px 18px; border: 0; border-bottom: 3px solid transparent; background: none; cursor: pointer;
  color: var(--sub); font-size: 18px; font-weight: 500; letter-spacing: .08em; }
.lenstabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--ink); }
.tabhint { margin: 8px 0 0; }
.tabbody { display: grid; gap: 30px; margin-top: 20px; }
.tabbody h2 { margin: 0 0 12px; font-size: 17px; }
.cols { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.moods { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.mood { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--sheet);
  text-align: left; cursor: pointer; }
.mood:hover { border-color: var(--ink); }
.mood.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.mood h3 { margin: 0; font-size: 17px; line-height: 1.35; }
.mood p { margin: 0; color: var(--sub); font-size: 13px; }
.mood .thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.mood .thumbs img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 3px; display: block; }
.mood .n { font-size: 12px; color: var(--sub); }

/* ランキング：10位ずつ左右にめくる */
.rank-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rank-head h2 { margin: 0; flex: 1; }
.pager { display: inline-flex; align-items: center; gap: 4px; }
.pager button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); cursor: pointer; font-family: var(--en); }
.pager button:disabled { opacity: .35; cursor: default; }
.pager span { min-width: 6.5em; text-align: center; color: var(--sub); font-size: 12px; font-variant-numeric: tabular-nums; }
.rank { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.rank .fl > button:first-child, .color-items .fl > button:first-child { width: 100%; }
.rank button { display: grid; grid-template-columns: 2em 1fr 3.5em; gap: 8px; align-items: center; width: 100%;
  padding: 5px 4px; border: 0; background: transparent; text-align: left; cursor: pointer; border-radius: 4px; }
.rank button:hover { background: rgba(28, 31, 36, .05); }
.rank button.on { background: var(--ink); color: #fff; }
.rank button.on .i, .rank button.on .c { color: #fff; }
.rank .i { color: var(--sub); font-variant-numeric: tabular-nums; text-align: right; }
.rank .bar { position: relative; height: 22px; display: flex; align-items: center; }
.rank .bar::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: var(--w); background: var(--mat-pale); border-radius: 2px; }
.rank button.on .bar::before { background: rgba(255, 255, 255, .2); }
.rank .bar span { position: relative; padding-left: 6px; }
.rank .c { text-align: right; color: var(--sub); font-variant-numeric: tabular-nums; }

/* アイテム：スカート 30 ／ ・ミニ 5 */
.items { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.items h3 { margin: 0 0 6px; font-size: 15px; }
.items ul { margin: 0; padding: 0; list-style: none; }
.items .it { display: flex; justify-content: space-between; width: 100%; padding: 4px 4px; border: 0; border-top: 1px solid var(--line);
  background: none; cursor: pointer; text-align: left; font-weight: 600; border-radius: 0; }
.items .sub-it { display: flex; justify-content: space-between; width: 100%; padding: 1px 4px 1px 18px; border: 0; background: none;
  cursor: pointer; text-align: left; font-size: 13px; color: var(--sub); }
.items .sub-it::before { content: "・"; margin-left: -12px; width: 12px; }
.items .sub-it .lab { flex: 1; }
.items .grp { padding: 4px 4px 0 18px; font-size: 11px; color: var(--ai); }
.items .it:hover, .items .sub-it:hover { color: var(--mat); }
.items .on { background: var(--ink); color: #fff !important; border-radius: 3px; }
.items .count { font-weight: 400; }
.items .on .count { color: #fff; }
.items .none { color: var(--sub); font-size: 13px; }
.items .more-items { margin-top: 6px; }

/* 色 */
.palette { display: flex; height: 56px; margin-top: 34px; }
.swatch { position: relative; min-width: 14px; display: flex; }
.swatch:first-child .bar-btn { border-radius: 6px 0 0 6px; }
.swatch:last-child .bar-btn { border-radius: 0 6px 6px 0; }
.bar-btn { flex: 1; border: 0; padding: 0; cursor: pointer; transition: transform .12s; }
.swatch.hl .bar-btn, .swatch.on .bar-btn { transform: scaleY(1.18); box-shadow: 0 0 0 2px var(--sheet), 0 0 0 3px var(--ink); position: relative; z-index: 1; }
.tip { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); z-index: 3; display: none; align-items: center; gap: 6px;
  padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; white-space: nowrap; }
.tip::after { content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--ink); }
.tip::before { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
.swatch:hover .tip, .swatch:focus-within .tip { display: inline-flex; }
.tip-add { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--ink); font: 500 13px/1 var(--en); cursor: pointer; }
.tip-add.on { background: var(--mat); color: var(--on-mat, #fff); }
.color-items .fl.hl > button:first-child { background: var(--mat-pale); }
.color-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 4px 12px; margin-top: 10px; font-size: 13px; }
.color-items button { display: flex; align-items: center; gap: 6px; padding: 2px 4px; border: 0; background: none; cursor: pointer; text-align: left; border-radius: 3px; }
.color-items button.on { background: var(--ink); color: #fff; }
.color-items i { width: 12px; height: 12px; border-radius: 2px; flex: none; border: 1px solid rgba(0, 0, 0, .1); }

/* 掛け合わせの絞り込み */
.picked { margin-bottom: 26px; padding: 14px 16px; border-radius: 10px; background: var(--sheet); border: 1px solid var(--line); }
.strip { height: 318px; overflow: auto; overscroll-behavior: contain; }
.strip.open { height: auto; min-height: 318px; overflow: visible; }
.strip-more { margin-top: 8px; }
.saved { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.saved:empty { display: none; }
.saved .lab { color: var(--sub); font-size: 12px; margin-right: 2px; }
.saved .sv { position: relative; display: inline-flex; }
.saved .sv > button:first-child { padding: 3px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer; font-size: 13px; }
.saved .sv > button:first-child:hover { border-color: var(--ink); }
.saved .sv.on > button:first-child { background: var(--mat); border-color: var(--mat); color: var(--on-mat, #fff); }
.saved .sv .only { font-size: 11px; opacity: .75; margin-left: 4px; }
.saved .sv .del { position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; border: 1px solid var(--line); border-radius: 50%;
  background: var(--sheet); font-size: 11px; line-height: 1; cursor: pointer; visibility: hidden; }
.saved .sv:hover .del, .saved .sv:focus-within .del { visibility: visible; }
.savefilter { display: flex; gap: 6px; }
.savefilter input { padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r); width: 16em; }

/* クリックで「それだけ」、＋で「足す」 */
.fl { display: flex; align-items: center; gap: 2px; }
.fl > :first-child { flex: 1; min-width: 0; }
.fl > .lane, .fl > .add { flex: none; display: inline-grid; place-items: center; grid-template-columns: none; width: 22px; height: 22px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: var(--sheet); color: var(--ink); font: 500 14px/1 var(--en);
  text-align: center; cursor: pointer; visibility: hidden; }
.fl > .lane:hover, .fl > .add:hover { border-color: var(--ink); }
.fl > .lane.on, .fl > .add.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.fl:hover > .lane, .fl:focus-within > .lane, .fl > .lane.on,
.fl:hover > .add, .fl:focus-within > .add, .fl > .add.on { visibility: visible; }
/* ◫ が主役、＋ は控えめに */
.fl > .lane { font-size: 13px; border-color: var(--ink); }
.fl > .add { width: 18px; height: 18px; font-size: 12px; opacity: .7; }
.fl > .add:hover, .fl > .add.on { opacity: 1; }
.fl.over { position: relative; display: block; }
.fl.over > .lane { position: absolute; top: 8px; right: 32px; }
.fl.over > .add { position: absolute; top: 10px; right: 10px; }
.fl.mini { position: relative; display: inline-flex; }
.fl.mini > .lane { position: absolute; top: -9px; right: 10px; width: 18px; height: 18px; font-size: 11px; }
.fl.mini > .add { position: absolute; top: -8px; right: -8px; width: 16px; height: 16px; font-size: 11px; }

/* ITEM：5つずつめくる。内訳は横一列のチップ */
.item-head { display: flex; justify-content: flex-end; }
.cat-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cat-head h3 { margin: 0; flex: 1; }
.items .it .no { color: var(--sub); font-weight: 400; width: 1.6em; display: inline-block; font-variant-numeric: tabular-nums; }
.items .it .nm { flex: 1; }
.subline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 2px 4px 2px 24px; }
.subline .grp { font-size: 11px; color: var(--ai); padding: 0; width: 4.5em; }
.subchip { padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: 12px; cursor: pointer; }
.subchip:hover { border-color: var(--ink); }
.subchip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.items li { padding-bottom: 4px; }
.picked-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.picked-head h2 { margin: 0; font-size: 17px; }

/* ---------- me ---------- */
.lens { display: grid; gap: 32px; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); }
.lensform { display: grid; gap: 12px; }
.lensform .lead { margin: 0 0 6px; color: var(--sub); }
.lensform label { display: grid; gap: 4px; font-weight: 600; font-size: 13px; }
.lensform label span { font-weight: 400; color: var(--sub); }
.lensform input, .lensform textarea, .settings input, .settings textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); font-weight: 400; }
.lensboard h3 { margin: 0 0 4px; font-size: 20px; font-weight: 600; }
.lensboard .btn { margin: 4px 0 12px; }
.lensboard img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; display: block; }

/* ---------- setting ---------- */
.settings { max-width: 640px; display: grid; gap: 18px; }
.settings fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: grid; gap: 10px; background: rgba(255, 255, 255, .5); }
.settings legend { font-weight: 600; padding: 0 4px; }
.settings label { display: grid; gap: 4px; font-size: 13px; }
.settings .sub { margin: 0; }

/* ---------- 拡大表示 ---------- */
.sheet { width: min(1100px, 94vw); max-height: 92vh; padding: 0; border: 0; border-radius: 12px; background: var(--paper); color: var(--ink); }
.sheet::backdrop { background: rgba(28, 31, 36, .55); }
.detail { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); max-height: 92vh; }
.detail-img { position: relative; margin: 0; display: grid; place-items: center; background: #dfe2e6; min-height: 300px; overflow: hidden; }
.detail-img img { max-width: 100%; max-height: 92vh; display: block; }
.detail-side { padding: 20px; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.detail-side .row { margin-top: auto; padding-top: 12px; }
.caption { margin: 0; font-size: 15px; }
.source { margin: 0; font-size: 12px; color: var(--sub); word-break: break-all; }
.source a { color: var(--sub); }
.detail-items { margin: 0; padding: 0; list-style: none; font-size: 13px; display: grid; gap: 4px; }
.detail-items li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.detail-items i { width: 11px; height: 11px; border-radius: 2px; border: 1px solid rgba(0, 0, 0, .1); }
.detail-items .meta { color: var(--sub); }
.nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 60px; border: 0; border-radius: var(--r);
  background: rgba(255, 255, 255, .85); color: var(--ink); font: 500 20px/1 var(--en); cursor: pointer; }
.nav:hover { background: #fff; }
.nav:disabled { opacity: .25; cursor: default; }
.nav.prev { left: 10px; }
.nav.next { right: 10px; }
.pos { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 2px 8px; border-radius: 3px;
  background: rgba(255, 255, 255, .85); font-size: 12px; font-variant-numeric: tabular-nums; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 8px; z-index: 9999; max-width: 90vw; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; }
  .lens, .detail { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* MOOD：ランキング3つを横一列。狭いときは折り返す */
.cols3 { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.versions { display: flex; align-items: center; gap: 8px; }
.versions select { padding: 5px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); }

/* setting：モデル選びのコツ */
.tips { border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); padding: 0 12px; }
.tips summary { padding: 8px 0; cursor: pointer; font-size: 13px; color: var(--ink); list-style: none; display: flex; align-items: center; gap: 6px; }
.tips summary::-webkit-details-marker { display: none; }
.tips summary::before { content: "?"; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid var(--sub); font: 500 11px/1 var(--en); color: var(--sub); }
.tips[open] summary { border-bottom: 1px solid var(--line); }
.tips p { margin: 10px 0; font-size: 13px; line-height: 1.7; }
.sheet:not([open]) { display: none; }

/* 年代感の根拠 */
.era-notes { padding: 10px 12px; border-radius: var(--r); background: var(--sheet); border: 1px solid var(--line); }
.era-notes h4 { margin: 0 0 4px; font-size: 12px; color: var(--sub); font-weight: 600; }
.era-notes ul { margin: 0; padding: 0; list-style: none; font-size: 13px; display: grid; gap: 2px; }
.era-notes .sub { margin: 6px 0 0; font-size: 11px; }

/* 部屋の切り替え */
.rooms { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 999px; background: var(--sheet); overflow: hidden; }
.rooms button { padding: 7px 0; border: 0; background: none; cursor: pointer; font-size: 14px; letter-spacing: .08em; color: var(--sub); }
.rooms button[aria-selected=true] { background: var(--ink); color: #fff; }
.board-title .room-tag { display: inline-block; margin-left: 10px; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px;
  font: 500 12px/1.6 var(--en); letter-spacing: .08em; color: var(--sub); vertical-align: middle; }

/* アーカイブ */
.card.archived img { filter: grayscale(.6); opacity: .75; }
.archive-note { margin: 0 0 10px; }

/* ボードの設定 */
.small-sheet { width: min(560px, 94vw); }
.board-settings { padding: 20px; display: grid; gap: 12px; }
.board-settings h2 { margin: 0; font-size: 18px; }
.board-settings label { display: grid; gap: 4px; font-weight: 600; font-size: 13px; }
.board-settings label .sub { font-weight: 400; }
.board-settings textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); font-weight: 400; }
.settings label .en { font-size: 14px; letter-spacing: .08em; }

/* 右上：今日の気分と、me・setting・言語のメニュー */
.main { position: relative; }
.account { position: fixed; top: 20px; right: 28px; display: flex; align-items: center; gap: 10px; z-index: 20; }
.acct-wrap { position: relative; }
.acct { width: 54px; height: 54px; padding: 0; overflow: hidden; position: relative; display: block; flex: none; border: 1px solid var(--line); border-radius: 50%;
  background: var(--sheet); color: var(--ink); cursor: pointer; }
.acct:hover, .acct[aria-expanded=true] { border-color: var(--ink); }
.acct-menu { right: 0; left: auto; top: calc(100% + 6px); min-width: 170px; }
.acct-menu .en { font-size: 15px; letter-spacing: .06em; }
.menu-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.menu-lab { padding: 4px 10px 2px; font-size: 11px; color: var(--sub); }
.acct-menu [aria-checked=true]::after { content: "✓"; float: right; color: var(--mat); }
/* .today（今日のボードの丸）は使わなくなったため撤去（v0.1.30） */
.boards .star { width: 22px; height: 30px; flex: none; border: 0; background: none; color: var(--line); cursor: pointer; font-size: 14px; padding: 0; visibility: hidden; }
.boards .item:hover .star, .boards .star.on { visibility: visible; }
.boards .star.on { color: var(--mat); }

/* 大カテゴリを選んだとき：小分類ごとの段、横に流れる一列 */
.strip.grouped { height: auto; overflow: visible; }
.grp-row { margin-bottom: 12px; }
.grp-row h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.grp-row h3 .count { margin-left: 6px; font-weight: 400; }
.grp-line { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; overscroll-behavior-x: contain; }
.grp-line .card { flex: none; width: 110px; }
.cat-head .catbtn { flex: 1; min-width: 0; padding: 2px 4px; border: 0; border-radius: 4px; background: none; text-align: left; cursor: pointer; font: inherit; }
.cat-head .catbtn h3 { margin: 0; }
.cat-head .catbtn:hover { background: rgba(28, 31, 36, .05); }
.cat-head .catbtn.on { background: var(--ink); color: #fff; }
.cat-head .fl { flex: 1; min-width: 0; }
.item-head { gap: 8px; }

/* ---------- MOOD・ITEM・DETAIL：重なったファイルの耳 ---------- */
.lenstabs { gap: 0; border-bottom: 0; padding-left: 6px; position: relative; z-index: 1; }
.lenstabs button { position: relative; margin-right: -10px; padding: 10px 30px 9px; border: 1px solid var(--line); border-bottom: 0;
  border-radius: 12px 12px 0 0; background: var(--tab-back); color: var(--sub); font-size: 18px; letter-spacing: .1em;
  box-shadow: inset 0 -6px 8px -8px rgba(28, 31, 36, .25); }
.lenstabs button:nth-child(1) { z-index: 3; }
.lenstabs button:nth-child(2) { z-index: 2; }
.lenstabs button:nth-child(3) { z-index: 1; }
.lenstabs button:hover { color: var(--ink); }
.lenstabs button[aria-selected=true] { z-index: 5; background: var(--tab-front); color: var(--ink); padding-bottom: 10px; margin-bottom: -1px; box-shadow: none; }
#view-read .tabhint { margin: 0; padding: 14px 20px 0; background: var(--tab-front); border: 1px solid var(--line); border-bottom: 0; border-radius: 0 10px 0 0; }
#tabBody { padding: 4px 20px 24px; background: var(--tab-front); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; }
:root { --tab-front: #f7f8f9; --tab-back: #dde0e4; }

/* ---------- 大カテゴリの一覧：小分類の見出しで区切る ---------- */
.grid .sec-head { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; margin: 8px 0 -2px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.grid .sec-head:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.grid .sec-head .count { font-weight: 400; }

/* ---------- MOODの部屋は黒 ---------- */
body.room-mood {
  --paper: #121314; --sheet: #1d1f22; --ink: #eceef1; --sub: #9aa1ab; --line: #34383d;
  --mat: #4f9a76; --mat-deep: #3f8463; --mat-pale: #23392f; --ai: #7c848f;
  --tab-front: #1d1f22; --tab-back: #141517;
}
body.room-mood .card, body.room-mood .detail-img { background: #26292d; }
body.room-mood .chip.ai { color: #c9ced5; }
body.room-mood .steps button[aria-current=true], body.room-mood .rooms button[aria-selected=true] { background: var(--ink); color: #121314; }
body.room-mood .steps button[aria-current=true] b { border-color: #121314; }
body.room-mood .rank button.on, body.room-mood .items .on, body.room-mood .chip.filter, body.room-mood .seg button[aria-pressed=true],
body.room-mood .cat-head .catbtn.on, body.room-mood .color-items button.on { background: var(--ink); color: #121314 !important; }
body.room-mood .rank button.on .i, body.room-mood .rank button.on .c, body.room-mood .items .on .count { color: #121314; }
body.room-mood .fl > .add.on { background: var(--ink); border-color: var(--ink); color: #121314; }
body.room-mood .toast, body.room-mood .tip { background: #eceef1; color: #121314; }
body.room-mood .tip::after { border-top-color: #eceef1; }
body.room-mood .sheet::backdrop { background: rgba(0, 0, 0, .7); }
body.room-mood .drop { background: rgba(255, 255, 255, .03); }
body.room-mood input, body.room-mood select, body.room-mood textarea { color: var(--ink); }
body.room-mood .nav, body.room-mood .pos { background: rgba(29, 31, 34, .85); color: var(--ink); }
body, .rail { transition: background-color .2s; }

/* 並べて見る：2〜3列 */
.lanes { display: grid; grid-template-columns: repeat(var(--lanes, 2), minmax(0, 1fr)); gap: 14px; }
.lane-col { min-width: 0; padding-left: 14px; border-left: 1px solid var(--line); }
.lane-col:first-child { padding-left: 0; border-left: 0; }
.lane-head { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 0 0 8px; background: var(--sheet); }
.lanes .grid.small { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
.tip-lane { margin-right: -2px; }
.cat-line { padding-left: 4px; margin: -2px 0 6px; }
/* 大カテゴリの見出しは1行。長いときは「…」 */
.cat-head .catbtn h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-head .fl { overflow: visible; }
.cat-head .catbtn { overflow: hidden; }

/* 保存の帯：スクロールしても見えている */
.savebar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 12px; justify-content: flex-end;
  margin: -6px 0 16px; padding: 10px 0; background: var(--paper); border-bottom: 1px solid var(--line); }
.savebar-msg { flex: 1; color: var(--sub); font-size: 13px; }
.savebar .btn.primary { opacity: .45; }
.savebar.dirty .btn.primary { opacity: 1; }
.savebar.dirty .savebar-msg { color: var(--ink); font-weight: 600; }
.settings fieldset textarea { width: 100%; }

/* タブの説明の行：右端にボタン */
#view-read .tabhint { display: flex; align-items: center; gap: 12px; padding-bottom: 6px; }
#view-read .tabhint > span { flex: 1; }
.tab-actions { display: flex; gap: 8px; }
.tab-actions .btn { padding: 5px 12px; font-size: 13px; }
.tabbody { margin-top: 12px; }

/* 大カテゴリの札：見出しと、カテゴリ全体の丈・シルエットを一枚に */
.cat-card { padding: 8px 10px 10px; margin-bottom: 8px; border-radius: 8px; background: var(--tab-back); }
.cat-card .cat-head { margin-bottom: 4px; }
.cat-row { display: grid; grid-template-columns: 5.2em 1fr; align-items: start; gap: 6px; padding: 4px 0; border-top: 1px solid var(--line); }
.cat-row .grp { font-size: 11px; color: var(--sub); padding-top: 3px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.subchip.solid { background: var(--sheet); border-color: transparent; font-weight: 600; }
.subchip.solid:hover { border-color: var(--ink); }
.subchip.solid.on { background: var(--ink); color: var(--paper); }

/* 大カテゴリの札：枚数はマウスを乗せたときだけ。チップを詰めて横一列に */
.cat-row { grid-template-columns: 4.4em 1fr; }
.cat-row .grp { font-size: 10.5px; white-space: nowrap; }
.cat-chips { gap: 4px 6px; }
.cat-chips .subchip.solid { padding: 1px 7px; font-size: 11.5px; letter-spacing: 0; white-space: nowrap; }

/* ================= Line up ================= */
.lu-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--sheet); }
.lu-tabs { display: flex; gap: 2px; }
.lu-tabs:empty { display: none; }
.lu-tabs button { padding: 5px 14px; border: 1px solid var(--line); border-radius: 999px; background: none; cursor: pointer; }
.lu-tabs button[aria-selected=true] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.lu-season { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--sub); }
.lu-season input { width: 7em; padding: 5px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); font-family: var(--en); letter-spacing: .05em; }
.lu-total { font-family: var(--en); font-size: 17px; letter-spacing: .04em; }
.lu-toggle { display: flex; align-items: center; gap: 4px; font-size: 13px; cursor: pointer; }
.lu-toggle input { accent-color: var(--mat); }
.lu-view button { font-size: 13px; padding: 5px 10px; }
.lu-hint { margin: 10px 2px 4px; }
.lu-rows { display: grid; gap: 10px; margin-top: 8px; }
.lu-row { display: grid; grid-template-columns: 150px 1fr; border: 1px solid var(--line); border-radius: 10px; background: var(--sheet); min-height: 170px; }
.lu-row.over { box-shadow: inset 0 0 0 2px var(--mat); }
.lu-rowhead { padding: 12px; border-right: 1px solid var(--line); background: var(--tab-back); border-radius: 10px 0 0 10px; display: grid; align-content: start; gap: 4px; }
.lu-rowhead h3 { margin: 0; font-size: 15px; }
.lu-rowhead .num { font-family: var(--en); font-size: 14px; letter-spacing: .03em; color: var(--sub); }
.lu-rowhead .code { font-family: var(--en); font-size: 12px; color: var(--sub); }
.lu-cells { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 10px; padding: 12px; }
.lu-cell { position: relative; width: 132px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); cursor: grab; overflow: hidden; }
.lu-cell:hover { border-color: var(--ink); }
.lu-cell.dragging { opacity: .35; }
.lu-cell.drop-before { box-shadow: -4px 0 0 var(--chalk); }
.lu-cell .pic { display: grid; place-items: center; height: 150px; background: #fff; }
.lu-cell .pic img { max-width: 100%; max-height: 150px; object-fit: contain; display: block; }
.lu-cell .pic .none { font-size: 11px; color: #9aa1ab; padding: 8px; text-align: center; }
.lu-cell .meta { display: flex; align-items: center; gap: 3px; padding: 5px 6px; min-height: 26px; border-top: 1px solid var(--line); }
.lu-cell .win { width: 12px; height: 12px; border-radius: 2px; border: 1px solid rgba(0, 0, 0, .15); }
.lu-cell .sku { margin-left: auto; font-family: var(--en); font-size: 11px; color: var(--sub); letter-spacing: .03em; }
.lu-cell .memo-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--mat); }
.lu-cell .layers { position: absolute; top: 5px; left: 6px; font: 500 10px/1 var(--en); color: #565c66; background: rgba(255, 255, 255, .85); padding: 2px 4px; border-radius: 3px; }
.lu-ghost { display: flex; flex-direction: column; justify-content: center; gap: 4px; width: 132px; min-height: 120px; padding: 10px; border: 1px dashed var(--line); border-radius: 8px;
  background: none; color: var(--sub); text-align: left; cursor: pointer; font-size: 12px; }
.lu-ghost:hover { border-color: var(--mat); color: var(--ink); }
.lu-ghost b { font-size: 13px; color: var(--ink); font-weight: 600; }
.lu-ghost .gimg { width: 100%; height: 62px; object-fit: cover; border-radius: 4px; opacity: .45; filter: saturate(.6); margin-bottom: 2px; }
.lu-ghost:hover .gimg { opacity: .75; }
.lu-ghost.more { align-items: flex-start; }
.lu-empty { padding: 14px; color: var(--sub); font-size: 13px; }
.card .got { position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: 3px; background: var(--mat); color: var(--on-mat, #fff); font: 500 10px/1.6 var(--en); letter-spacing: .05em; }
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; }
.codes label { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.codes label span { flex: 1; }
.codes input { width: 4.5em; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--r); font-family: var(--en); text-transform: uppercase; letter-spacing: .08em; }

/* キャプチャ */
.cap-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.cap-bar .btn.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.cap-to { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.cap-to select { padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); }
.cap-layer { position: absolute; inset: 0; cursor: crosshair; z-index: 4; }
.cap-rect { position: absolute; border: 2px solid var(--chalk); box-shadow: 0 0 0 9999px rgba(28, 31, 36, .4); }
.cap-panel { position: absolute; z-index: 6; width: 250px; padding: 12px; border-radius: 10px; background: var(--sheet); color: var(--ink); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); display: grid; gap: 8px; }
.cap-title { font-size: 13px; font-weight: 600; }
.cap-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.cap-cats button { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer; font-size: 13px; }
.cap-cats button:hover { border-color: var(--ink); }
.cap-cats button.hint { border-color: var(--mat); background: var(--mat-pale); }
.cap-cats button kbd { font: 500 10px/1 var(--en); color: var(--sub); margin-right: 4px; }
.cap-panel input { padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.cap-foot .sub { font-size: 11px; }

/* マスの中身 */
.slot { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); max-height: 92vh; }
.slot-main { display: flex; flex-direction: column; min-height: 520px; background: #dfe2e6; }
.slot-tabs { display: flex; gap: 2px; padding: 10px 10px 0; }
.slot-tabs button { padding: 7px 14px; border: 0; border-radius: 8px 8px 0 0; background: rgba(255, 255, 255, .5); cursor: pointer; font-size: 13px; color: #565c66; }
.slot-tabs button[aria-selected=true] { background: #fff; color: #1c1f24; font-weight: 600; }
.slot-tabs button .has { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--mat); margin-left: 5px; vertical-align: middle; }
.slot-stage { flex: 1; margin: 0 10px 10px; background: #fff; border-radius: 0 8px 8px 8px; display: grid; place-items: center; overflow: auto; position: relative; outline: none; color: #1c1f24; }
.slot-stage.over { box-shadow: inset 0 0 0 3px var(--mat); }
.slot-stage img.big { max-width: 100%; max-height: 70vh; object-fit: contain; display: block; }
.slot-drop { text-align: center; color: #565c66; font-size: 13px; padding: 30px; line-height: 1.9; }
.slot-drop b { display: block; font-size: 15px; color: #1c1f24; }
.stage-tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; }
.stage-tools .btn { padding: 4px 10px; font-size: 12px; background: #fff; color: #1c1f24; }
.docs { width: 100%; height: 100%; display: grid; grid-template-rows: auto 1fr; gap: 10px; padding: 14px; align-content: start; }
.docs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.docs-grid .doc { position: relative; border: 1px solid #c9cdd3; border-radius: 6px; background: #f7f8f9; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.docs-grid .doc img { max-width: 100%; max-height: 100%; object-fit: contain; }
.docs-grid .doc button { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); cursor: pointer; }
.docs-grid .add-doc { border-style: dashed; color: #565c66; font-size: 12px; text-align: center; padding: 8px; }
.docs textarea { width: 100%; min-height: 140px; padding: 10px; border: 1px solid #c9cdd3; border-radius: 6px; font: inherit; color: #1c1f24; background: #fff; }
.slot-side { padding: 18px; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.slot-side label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.slot-side select { padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); font-weight: 400; }
.slot-code { font-family: var(--en); font-size: 20px; letter-spacing: .06em; }
.slot-code:empty { display: none; }
.slot-lab { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.win-list { display: grid; gap: 4px; margin-bottom: 8px; }
.win-list .w { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.win-list .w i { width: 22px; height: 22px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, .15); }
.win-list .w span { flex: 1; }
.win-list .w button { border: 0; background: none; cursor: pointer; color: var(--sub); }
.win-list .none { font-size: 12px; color: var(--sub); }
.win-palette { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.win-palette button { width: 24px; height: 24px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, .15); cursor: pointer; padding: 0; }
.win-palette button:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
.win-add { display: flex; gap: 6px; align-items: center; }
.win-add input[type=color] { width: 36px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: none; }
.win-add input:not([type]) { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); }
.slot-actions { margin-top: auto; }
@media (max-width: 900px) { .slot { grid-template-columns: 1fr; } .lu-row { grid-template-columns: 1fr; } .lu-rowhead { border-right: 0; border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; } }

/* キャプチャ中も、左右の矢印は押せるように */
.detail-img .nav { z-index: 5; }
.detail-img .pos { z-index: 5; }

/* ---------- v1.4 ---------- */
/* 保存ボタンは帯の左 */
.savebar { justify-content: flex-start; }
.savebar .btn { order: -1; }

/* Pick up → Look up → Line up：独立したボタンを矢印でつなぐ */
.steps { border: 0; background: none; overflow: visible; gap: 0; align-items: center; margin-top: 14px; }
.steps li { display: flex; align-items: center; }
.steps li + li::before { content: "→"; margin: 0 12px; color: var(--sub); font: 400 18px/1 var(--en); }
.steps button { padding: 11px 30px; border: 1px solid var(--line); border-radius: 999px; background: var(--sheet); font-size: 19px; letter-spacing: .06em; }
.steps button:hover { border-color: var(--ink); }
.steps button[aria-current=true] { border-color: var(--ink); }
.steps b { width: 22px; height: 22px; font-size: 12px; }

/* MOOD・ITEM・DETAIL は少し小さく */
.lenstabs button { font-size: 15px; padding: 9px 26px 8px; }

/* 読み取り中の帯 */
.busybar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; margin: -22px -28px 14px; padding: 9px 28px;
  background: var(--mat); color: var(--on-mat, #fff); font-size: 13px; font-weight: 600; overflow: hidden; }
.busybar::after { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: 38%;
  background: rgba(255, 255, 255, .75); border-radius: 2px; animation: busyflow 1.15s ease-in-out infinite alternate; }
@keyframes busyflow { from { left: 0; } to { left: 62%; } }
.busy-dot { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; background: none; animation: busyspin .7s linear infinite; }
@keyframes busyspin { to { transform: rotate(360deg); } }
.busy-note { margin-left: auto; opacity: .85; }
@media (prefers-reduced-motion: reduce) { .busy-dot, .busybar::after { animation: none; } }
.recat-status { margin: 4px 0 0; }

/* Line up：名前の変わったマスの段 */
.lu-row.other { border-color: var(--chalk); }
.lu-row.other .lu-rowhead { background: rgba(242, 201, 76, .18); }
.lu-row.other .note { font-size: 11px; color: var(--ink); line-height: 1.5; }
/* マスを消す×（マウスを乗せたとき） */
.lu-cell .rm { position: absolute; top: 4px; right: 4px; z-index: 2; width: 22px; height: 22px; border: 0; border-radius: 50%;
  background: rgba(28, 31, 36, .75); color: #fff; font-size: 13px; line-height: 22px; cursor: pointer; visibility: hidden; }
.lu-cell:hover .rm, .lu-cell:focus-within .rm { visibility: visible; }
.lu-cell .memo-dot { right: auto; left: auto; top: auto; bottom: 34px; right: 6px; }
/* 資料の表示：3×3 */
.lu-cell .pic .docgrid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 2px; width: 100%; height: 100%; padding: 4px; }
.lu-cell .pic .docgrid img { width: 100%; height: 100%; object-fit: cover; max-height: none; border-radius: 2px; }
.docs-grid { grid-template-columns: repeat(3, 1fr); }
.docs-note { font-size: 12px; color: #565c66; }

/* 元に戻す */
.toast .undo { margin-left: 14px; padding: 2px 10px; border: 1px solid rgba(255, 255, 255, .6); border-radius: 999px; background: none; color: inherit; cursor: pointer; font: inherit; }

/* 色の窓：色と名前をその場で直す */
.win-list .w input[type=color] { width: 26px; height: 26px; padding: 0; border: 1px solid rgba(0, 0, 0, .15); border-radius: 4px; background: none; cursor: pointer; }
.win-list .w input.wname { flex: 1; min-width: 0; padding: 3px 6px; border: 1px solid transparent; border-radius: 4px; background: none; font: inherit; }
.win-list .w input.wname:hover, .win-list .w input.wname:focus { border-color: var(--line); background: var(--sheet); }
.win-sec { font-size: 11px; color: var(--sub); margin: 2px 0 4px; }
.slot-memo textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); font: inherit; font-weight: 400; resize: vertical; }

/* ---------- v1.4.1 ---------- */
/* Line up：画像・ラフ絵・資料・FIXデザインもファイルの耳 */
.lu-filetabs { display: flex; padding-left: 6px; margin-top: 16px; position: relative; z-index: 1; }
.lu-filetabs button { position: relative; margin-right: -10px; padding: 9px 26px 8px; border: 1px solid var(--line); border-bottom: 0;
  border-radius: 12px 12px 0 0; background: var(--tab-back); color: var(--sub); font-size: 14px; cursor: pointer;
  box-shadow: inset 0 -6px 8px -8px rgba(28, 31, 36, .25); }
.lu-filetabs button:nth-child(1) { z-index: 4; }
.lu-filetabs button:nth-child(2) { z-index: 3; }
.lu-filetabs button:nth-child(3) { z-index: 2; }
.lu-filetabs button:nth-child(4) { z-index: 1; }
.lu-filetabs button:hover { color: var(--ink); }
.lu-filetabs button[aria-selected=true] { z-index: 5; background: var(--tab-front); color: var(--ink); padding-bottom: 9px; margin-bottom: -1px; box-shadow: none; font-weight: 600; }
.lu-sheet { padding: 6px 14px 16px; background: var(--tab-front); border: 1px solid var(--line); border-radius: 0 10px 10px 10px; }
.lu-sheet .lu-hint { margin-top: 8px; }
/* 資料：常に3×3の9枠。入っているところだけ埋まる */
.lu-cell .pic .docgrid { grid-template-rows: repeat(3, 1fr); gap: 3px; padding: 6px; }
.lu-cell .pic .docgrid .dg { background: #eef0f2; border-radius: 2px; overflow: hidden; min-height: 0; }
.lu-cell .pic .docgrid .dg img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- v1.5 ---------- */
/* 資料は横3×上下2 */
.lu-cell .pic .docgrid { grid-template-rows: repeat(2, 1fr); }
/* 欄 */
.lu-cell .flds { padding: 4px 6px; border-top: 1px solid var(--line); display: grid; gap: 1px; font-size: 11px; line-height: 1.35; }
.lu-cell .flds div { display: flex; gap: 4px; min-width: 0; }
.lu-cell .flds b { font-weight: 400; color: var(--sub); flex: none; }
.lu-cell .flds span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-fields { display: grid; gap: 8px; }
.slot-fields:empty { display: none; }
.slot-fields label { display: grid; gap: 3px; font-size: 13px; font-weight: 600; }
.slot-fields input { padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); font: inherit; font-weight: 400; }
.fields-list { display: grid; gap: 6px; }
.fields-list .f { display: flex; gap: 6px; align-items: center; }
.fields-list .f input { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); }
.fields-list .f select, .fields-add select { padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); }
.fields-add { display: flex; gap: 6px; }
.fields-add input { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); }
/* 表 */
.lu-table-wrap { overflow-x: auto; }
.lu-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--sheet); }
.lu-table th, .lu-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
.lu-table th { position: sticky; top: 0; background: var(--tab-back); font-weight: 600; font-size: 12px; cursor: pointer; user-select: none; }
.lu-table th .dir { color: var(--sub); margin-left: 4px; }
.lu-table td.pic img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 4px; display: block; cursor: pointer; }
.lu-table td input { width: 100%; min-width: 7em; padding: 4px 6px; border: 1px solid transparent; border-radius: 4px; background: none; font: inherit; color: inherit; }
.lu-table td input:hover, .lu-table td input:focus { border-color: var(--line); background: var(--paper); }
.lu-table td input[type=number] { text-align: right; min-width: 6em; }
.lu-table .code { font-family: var(--en); letter-spacing: .04em; }
.lu-table .wins { display: flex; gap: 3px; align-items: center; }
.lu-table .wins i { width: 12px; height: 12px; border-radius: 2px; border: 1px solid rgba(0, 0, 0, .15); }
.lu-table tfoot td { font-weight: 600; background: var(--tab-back); }
.lu-table tfoot td.num { text-align: right; }
/* ムードの★ */
.mood-wrap { position: relative; }
.mood-star { position: absolute; top: 8px; left: 8px; z-index: 2; width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--sheet);
  color: var(--line); font-size: 16px; line-height: 26px; cursor: pointer; visibility: hidden; box-shadow: 0 0 0 1px var(--line); }
.mood-wrap:hover .mood-star, .mood-star.on { visibility: visible; }
.mood-star.on { color: var(--chalk); box-shadow: 0 0 0 1px var(--chalk); }
.mood-wrap .mood h3 { padding-left: 30px; }

/* ---------- v1.6 ---------- */
/* タブは帯の上。ラインシートは少し離す */
.lu-filetabs { margin-top: 10px; }
.lu-filetabs button.apart { margin-left: 34px; }
.lu-sheet { padding: 12px 14px 16px; }
.lu-sheet .lu-bar { border: 0; padding: 0 0 12px; border-bottom: 1px solid var(--line); border-radius: 0; background: none; }
/* マスの高さを固定して、情報の行を段の見出しとそろえる */
.lu-cell .pic { height: 150px; }
.lu-cell .meta { height: 28px; min-height: 28px; box-sizing: border-box; }
.lu-cell .flds { padding: 0; gap: 0; }
.lu-cell .flds .fv { height: 24px; box-sizing: border-box; border-top: 1px solid var(--line); padding: 0 6px; display: flex; align-items: center;
  font-size: 12px; cursor: text; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lu-cell .flds .fv:hover { background: var(--mat-pale); }
.lu-cell .flds .fv.empty { color: var(--line); }
.lu-cell .flds input { width: 100%; height: 22px; border: 1px solid var(--mat); border-radius: 3px; padding: 0 4px; font: inherit; font-size: 12px; background: #fff; color: #1c1f24; }
.lu-rowhead { position: relative; }
.lu-flabels { position: absolute; left: 0; right: 0; top: calc(12px + 1px + 150px + 28px); }
.lu-flabels div { height: 24px; box-sizing: border-box; border-top: 1px solid var(--line); padding: 0 12px; display: flex; align-items: center; font-size: 12px; color: var(--sub); }
.lu-rowhead { min-height: calc(12px + 1px + 150px + 28px + var(--frows, 0) * 24px + 14px); }
/* ラインシート：色を縦にそろえる、並べ替えの矢印 */
.lu-table th.cw, .lu-table td.cw { width: 20px; min-width: 20px; padding: 6px 2px; text-align: center; }
.lu-table th.cw i, .lu-table td.cw i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .15); vertical-align: middle; }
.lu-table th.cw { cursor: default; }
.lu-table th .dir { margin-left: 4px; color: var(--line); font-family: var(--en); }
.lu-table th .dir.on { color: var(--mat); font-weight: 700; font-size: 14px; }
.lu-table th:hover .dir { color: var(--sub); }
.lu-table th:hover .dir.on { color: var(--mat); }
.lu-table td.ncol { color: var(--sub); text-align: right; }

/* ---------- v1.7 ---------- */
/* 絵のすぐ下に、品番・カラー・情報の行。項目名は段の左に右寄せ */
.lu-flabels { top: calc(12px + 1px + 150px); }
.lu-flabels div { justify-content: flex-end; text-align: right; }
.lu-rowhead { min-height: calc(12px + 1px + 150px + var(--frows, 0) * 24px + 14px); }
.lu-cell .flds { border-top: 0; }
.lu-cell .flds .fv.code { font-family: var(--en); letter-spacing: .04em; cursor: default; }
.lu-cell .flds .fv.code:hover { background: none; }
.lu-cell .flds .fv.wins { gap: 3px; cursor: pointer; }
.lu-cell .flds .fv.wins i { width: 13px; height: 13px; border-radius: 2px; border: 1px solid rgba(0, 0, 0, .15); flex: none; }

/* ================= Make map ================= */
.mu { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.mu-side { position: sticky; top: 10px; display: grid; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--sheet); max-height: calc(100vh - 30px); overflow: auto; }
.mu-maps { display: flex; flex-wrap: wrap; gap: 4px; }
.mu-maps button { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: none; cursor: pointer; font-size: 13px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mu-maps button[aria-selected=true] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.mu-maps .del { border-style: dashed; color: var(--sub); }
.mu-lab { font-size: 12px; font-weight: 600; color: var(--sub); margin-bottom: 6px; }
.mu-group .seg button[aria-pressed=true] { background: var(--ink); color: var(--paper); }
.mu-list, .mu-items { display: grid; gap: 4px; max-height: 220px; overflow: auto; }
.mu-list label, .mu-items label { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.mu-list input, .mu-items input { accent-color: var(--mat); }
.mu-items img { width: 30px; height: 30px; object-fit: contain; background: #fff; border-radius: 3px; border: 1px solid var(--line); }
.mu-items .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mu-colors { display: grid; gap: 4px; margin-bottom: 6px; }
.mu-colors .c { display: flex; align-items: center; gap: 6px; }
.mu-colors .c i { width: 20px; height: 20px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .15); flex: none; }
.mu-colors .c input { flex: 1; min-width: 0; padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); font-size: 12px; }
.mu-colors .c button { border: 0; background: none; color: var(--sub); cursor: pointer; }
.mu-palette { display: flex; flex-wrap: wrap; gap: 4px; }
.mu-palette button { width: 20px; height: 20px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .15); padding: 0; cursor: pointer; }
.mu-palette button.on { outline: 2px solid var(--ink); outline-offset: 1px; }
.mu-main { min-width: 0; }
.mu-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.mu-stage { position: relative; background: #d9dce0; border-radius: 10px; padding: 18px; display: grid; place-items: center; min-height: 300px; }
.mu-stage .empty { color: #565c66; font-size: 14px; text-align: center; line-height: 1.9; }
.mu-stage svg { width: 100%; height: auto; background: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, .12); display: block; user-select: none; }
.mu-stage svg [data-el] { cursor: move; }
.mu-stage svg .sel-box { fill: none; stroke: var(--mat); stroke-width: 3; pointer-events: none; }
.mu-stage svg .sel-handle { fill: var(--mat); cursor: nwse-resize; }
.mu-edit { position: absolute; z-index: 5; border: 2px solid var(--mat); background: rgba(255, 255, 255, .96); color: #1c1f24; padding: 4px; resize: none; font-family: system-ui, "Hiragino Sans", "Noto Sans JP", sans-serif; line-height: 1.35; }
.mu-help { margin-top: 8px; }
@media (max-width: 1000px) { .mu { grid-template-columns: 1fr; } .mu-side { position: static; max-height: none; } }

/* ---------- Make map v1.9 ---------- */
.mu-side { width: auto; }
.mu-maps .tab { position: relative; display: inline-flex; }
.mu-maps .tab .x { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--danger); color: #fff;
  font-size: 11px; line-height: 18px; padding: 0; cursor: pointer; visibility: hidden; }
.mu-maps .tab:hover .x, .mu-maps .tab:focus-within .x { visibility: visible; }
.mu-maps .new { border-style: dashed; font-family: var(--en); letter-spacing: .06em; }
.mu-designs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mu-designs button { display: grid; gap: 4px; justify-items: start; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); cursor: pointer; font-size: 13px; text-align: left; }
.mu-designs button small { font-size: 11px; color: var(--sub); }
.mu-designs button[aria-pressed=true] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pv { display: grid; width: 100%; height: 54px; background: #fff; border-radius: 3px; padding: 4px; gap: 3px; border: 1px solid var(--line); }
.pv i { display: block; background: #c9cdd3; border-radius: 1px; }
.pv-ed { grid-template-columns: 1.4fr 1fr 1fr; grid-template-rows: 8px 1fr 1fr; }
.pv-ed b { grid-column: 1 / -1; grid-row: 1; background: #1c1f24; height: 4px; align-self: center; width: 60%; }
.pv-ed i:nth-child(1) { grid-row: 2 / 4; }
.pv-co { grid-template-columns: repeat(5, 1fr); padding: 0; gap: 0; position: relative; overflow: hidden; }
.pv-co i { background: #b9a99a; border-right: 1px solid #fff; }
.pv-co b { position: absolute; left: 20%; right: 20%; top: 44%; height: 6px; background: #fff; }
.mu-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mu-bgs { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.mu-bgs button { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .2); padding: 0; cursor: pointer; }
.mu-bgs button.on { outline: 2px solid var(--ink); outline-offset: 2px; }
.mu-bgs input[type=color] { width: 26px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: none; }
.mu-moods { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mu-mood { position: relative; display: grid; gap: 4px; padding: 7px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); text-align: left; cursor: pointer; }
.mu-mood.on { border-color: var(--mat); box-shadow: inset 0 0 0 1px var(--mat); background: var(--mat-pale); }
.mu-mood b { font-size: 12px; line-height: 1.3; padding-right: 14px; }
.mu-mood p { margin: 0; font-size: 10.5px; color: var(--sub); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mu-mood .th { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.mu-mood .th img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 2px; display: block; }
.mu-mood .n { font-size: 10px; color: var(--sub); }
.mu-mood .st { position: absolute; top: 5px; right: 6px; color: var(--chalk); font-size: 13px; }
.mu-auto { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; margin-bottom: 4px; }
.mu-auto input { accent-color: var(--mat); }
.mu-picks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; }
.mu-picks .sep { grid-column: 1 / -1; font-size: 11px; color: var(--sub); padding: 6px 0 2px; border-top: 1px solid var(--line); margin-top: 4px; }
.mu-picks .sep:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.mu-picks button { position: relative; padding: 0; border: 2px solid transparent; border-radius: 4px; background: #fff; cursor: pointer; aspect-ratio: 3 / 4; overflow: hidden; }
.mu-picks button img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .45; }
.mu-picks button.on { border-color: var(--mat); }
.mu-picks button.on img { opacity: 1; }
.mu-picks button.on::after { content: "✓"; position: absolute; top: 2px; right: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--mat); color: var(--on-mat, #fff); font-size: 10px; line-height: 14px; text-align: center; }

/* ---------- Make map v1.10：作ったあとに整えるものはボードの上 ---------- */
.mu-note { margin: 6px 0 0; font-size: 11px; color: var(--danger); }
.mu-adjust { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: flex-start; padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--sheet); }
.mu-adjust[hidden] { display: none; }
.mu-adj { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mu-adj .mu-lab { margin: 0; }
.mu-adj-colors { flex: 1 1 360px; }
.mu-adj .mu-colors { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.mu-adj .mu-colors .c { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.mu-adj .mu-colors .c i { width: 18px; height: 18px; border-radius: 50%; }
.mu-adj .mu-colors .c input { width: 7em; border: 0; background: none; padding: 2px; font-size: 12px; }
.mu-adj .mu-palette { flex-basis: 100%; }
.mu-adj .mu-auto { margin: 0; font-size: 12px; }
.mu-bgs button.auto { position: relative; }
.mu-bgs button.auto::after { content: "A"; position: absolute; inset: 0; display: grid; place-items: center; font: 600 10px/1 var(--en); color: #1c1f24; }

/* ---------- Make map v1.11：色のチャート ---------- */
.mu-side .mu-colors { display: grid; gap: 4px; margin: 6px 0; }
.mu-side .mu-colors .c { display: flex; align-items: center; gap: 6px; }
.mu-side .mu-colors .c i { width: 20px; height: 20px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .15); flex: none; cursor: pointer; }
.mu-side .mu-colors .c input { flex: 1; min-width: 0; padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); font-size: 12px; }
.mu-side .mu-colors .c button { border: 0; background: none; color: var(--sub); cursor: pointer; }
.mu-bgwin { width: 34px; height: 24px; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; padding: 0; }
.mu-bgwin:hover { border-color: var(--ink); }
.chart-pop { position: fixed; z-index: 60; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--sheet); box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.chart-pop .ttl { font-size: 12px; font-weight: 600; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.chart-pop .grid-c { display: grid; grid-template-columns: repeat(12, 22px); gap: 3px; }
.chart-pop .grid-c button { width: 22px; height: 22px; border: 1px solid rgba(0, 0, 0, .1); border-radius: 3px; padding: 0; cursor: pointer; }
.chart-pop .grid-c button:hover { outline: 2px solid var(--ink); outline-offset: 1px; position: relative; z-index: 1; }
.chart-pop .row-g { display: grid; grid-template-columns: repeat(12, 22px); gap: 3px; margin-top: 6px; }
.chart-pop .row-g button { width: 22px; height: 22px; border: 1px solid rgba(0, 0, 0, .1); border-radius: 3px; padding: 0; cursor: pointer; }
.chart-pop .foot { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 12px; }
.chart-pop .foot input[type=color] { width: 30px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 4px; }
.mu-mood .st { cursor: pointer; color: var(--line); font-size: 15px; }
.mu-mood .st.on { color: var(--chalk); }
.mu-moods .sep { grid-column: 1 / -1; font-size: 11px; color: var(--sub); margin-top: 4px; }

/* マスの中：品番は少し小さく、そのすぐ下にアイテム名 */
.slot-code { font-size: 15px; letter-spacing: .06em; color: var(--sub); margin-bottom: -8px; }
.slot-name { width: 100%; padding: 6px 8px; margin: 0; border: 1px solid transparent; border-radius: var(--r); background: none; font: inherit; font-size: 18px; font-weight: 600; color: var(--ink); }
.slot-name:hover, .slot-name:focus { border-color: var(--line); background: var(--sheet); }

/* ---------- v1.12 ---------- */
.fields-list .f input.hidden-f { color: var(--sub); text-decoration: line-through; }
.tpl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tpl select { padding: 5px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); max-width: 260px; }
/* マスの中：アイテム名は品番と同じ大きさ */
.slot-name { font-size: 15px; font-weight: 400; padding: 4px 6px; margin-left: -6px; }
.slot-code { margin-bottom: -10px; }

.mu-picker { width: 34px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: none; cursor: pointer; }
.mu-addcolor { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--sub); cursor: pointer; }
.mu-addcolor input { width: 26px; height: 22px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: none; cursor: pointer; }
.mu-side .mu-colors .c input[type=color] { flex: none; width: 22px; height: 22px; padding: 0; border: 1px solid rgba(0, 0, 0, .15); border-radius: 3px; background: none; cursor: pointer; }
.mu-tools .link { align-self: center; }

/* ---------- v1.13：テーマ候補／テーマ・自分で登録するテーマ ---------- */
.mood-wrap .theme-badge { justify-self: start; margin-left: 30px; padding: 1px 8px; border: 1px dashed var(--ai); border-radius: 999px; color: var(--sub); font-size: 11px; line-height: 1.6; }
.mood-wrap .theme-badge.on { border: 1px solid var(--chalk); color: var(--ink); background: rgba(242, 201, 76, .16); }
.mood-wrap .theme-badge.mine { border: 1px solid var(--mat); background: var(--mat); color: var(--on-mat, #fff); }
.mood-wrap.mine .mood-star { visibility: visible; }
.mood-edit { position: absolute; top: 8px; right: 8px; z-index: 2; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--sheet); color: var(--sub); font-size: 12px; cursor: pointer; }
.mood-edit:hover { color: var(--ink); border-color: var(--ink); }
.mood.mood-add { align-content: center; justify-items: center; min-height: 180px; border: 2px dashed var(--line); background: transparent; text-align: center; color: var(--sub); }
.mood.mood-add:hover, .mood.mood-add.over { border-color: var(--mat); color: var(--ink); background: var(--mat-pale); }
.mood.mood-add .plus { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 26px; line-height: 1; }
.mood.mood-add h3 { padding: 0 !important; color: var(--ink); }
.mood.mood-add p { max-width: 24em; }

.theme-form input:not([type]), .theme-form input[type=text] { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); font-weight: 400; }
.theme-drop { display: grid; justify-items: center; gap: 8px; padding: 18px; border: 2px dashed var(--line); border-radius: 10px; text-align: center; color: var(--sub); }
.theme-drop p { margin: 0; }
.theme-drop.over { border-color: var(--mat); background: var(--mat-pale); color: var(--ink); }
.theme-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; margin-top: 8px; }
.theme-thumbs:empty { display: none; }
.theme-thumbs .tt { position: relative; }
.theme-thumbs img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; display: block; }
.theme-thumbs .x { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(28, 31, 36, .75); color: #fff; font-size: 12px; line-height: 20px; cursor: pointer; }
.theme-error { margin: 0; min-height: 1.2em; color: var(--danger); font-size: 13px; }
body.room-mood .theme-error { color: #e08a8a; }

/* ---------- v1.13：MOOD と FASHION のつなぎ ---------- */
.link-band { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0 4px; padding: 6px 12px; border: 1px solid var(--line); border-left: 3px solid var(--chalk); border-radius: 0; background: var(--sheet); font-size: 13px; }
.link-band .lk-lab { font-size: 12px; color: var(--sub); }
.link-band .lk-name { font-weight: 600; color: var(--ink); }
.link-band button.lk-name { text-decoration: none; }
.link-list { display: grid; gap: 4px; max-height: 50vh; overflow: auto; }
.lk-row { display: flex !important; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--r); font-weight: 400 !important; cursor: pointer; }
.lk-row:hover { background: var(--sheet); }
.lk-row input { accent-color: var(--mat); }

/* ---------- v1.13：Make map の左 ---------- */
.mu-hint { margin: 0; padding: 8px 10px; border-radius: var(--r); background: var(--paper); color: var(--sub); font-size: 12px; line-height: 1.6; }
.mu-persona { display: flex; align-items: center; gap: 8px; }
.mu-persona select { flex: 1; min-width: 0; padding: 5px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.mu-link { padding-top: 10px; border-top: 1px dashed var(--line); }
.mu-mood.mine b::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--mat); vertical-align: 2px; }

/* ---------- v1.13：persona ---------- */
.persona-head { display: grid; gap: 10px; margin-bottom: 18px; }
.persona-head .lead { margin: 0; color: var(--sub); max-width: 46em; }
.persona-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.persona-tabs button { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--sheet); cursor: pointer; font-size: 13px; }
.persona-tabs button[aria-selected=true] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.persona-tabs .new { border-style: dashed; color: var(--sub); }
.mood-wrap .theme-badge ~ h3 { padding-left: 0; }
.mood-wrap > .fl.over { height: 100%; }
.mood-wrap .mood { width: 100%; height: 100%; align-content: start; }
.mood-wrap .mood.mood-add { align-content: center; }
.mood-edit { top: auto; bottom: 10px; right: 10px; }

/* ---------- v1.14：Make map の左を整理 ---------- */
.mu-side > .mu-group { padding-top: 14px; border-top: 1px solid var(--line); }
.mu-side > .mu-group.mu-link { border-top-style: solid; }
.mu-lab { font-size: 13px; color: var(--ink); }
.mu-lead { margin: -2px 0 8px; font-size: 11.5px; color: var(--sub); }
.mu-sublab { margin: 10px 0 4px; font-size: 11.5px; font-weight: 600; color: var(--sub); }
.tog { padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); color: var(--sub); font-size: 12.5px; cursor: pointer; }
.tog:hover { border-color: var(--ink); color: var(--ink); }
.tog.on { background: var(--mat); border-color: var(--mat); color: var(--on-mat, #fff); font-weight: 600; }
.tog.on::before { content: "✓ "; }
.mu-btns { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.mu-btns .btn { padding: 6px 12px; font-size: 12.5px; }

/* テーマのカード：選ばれているものは色とチェック、候補は点線 */
.mu-mood { padding-bottom: 8px; }
.mu-mood .ck { position: absolute; bottom: 6px; right: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--mat); color: var(--on-mat, #fff); font-size: 10px; line-height: 16px; text-align: center; }
.mu-mood.cand { border-style: dashed; background: transparent; }
.mu-mood.cand b { color: var(--sub); }
.mu-mood .n { padding-right: 18px; }
.mu-mood.mu-add { align-content: center; justify-items: center; min-height: 70px; border: 1.5px dashed var(--line); background: transparent; color: var(--sub); text-align: center; }
.mu-mood.mu-add:hover { border-color: var(--mat); color: var(--ink); background: var(--mat-pale); }
.mu-mood.mu-add .plus { font-size: 20px; line-height: 1; }
.mu-mood.mu-add b { padding: 0; }
.mu-mood.mu-add p { -webkit-line-clamp: 2; }

/* 写真：載る枚数と、載る写真の帯 */
.mu-count { margin: 0; font-size: 15px; font-weight: 600; }
.mu-break { margin: 0 0 6px; font-size: 11.5px; }
.mu-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; }
.mu-strip:empty { display: none; }
.mu-strip .sp { position: relative; aspect-ratio: 3 / 4; border-radius: 3px; overflow: hidden; background: var(--paper); }
.mu-strip .sp img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mu-strip .sp.pin { outline: 2px solid #7f77dd; outline-offset: -2px; }
.mu-strip .sp.more { display: grid; place-items: center; font-size: 11px; color: var(--sub); border: 1px solid var(--line); }
.mu-max { display: flex; align-items: center; gap: 6px; }
.mu-max .seg button[aria-pressed=true] { background: var(--ink); color: var(--paper); }
.mu-max input { width: 64px; padding: 4px 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.mu-note { margin: 4px 0 0; }
.mu-note:empty { display: none; }

/* 写真の一覧（ポップアップ） */
.photo-sheet { width: min(1200px, 96vw); }
.photo-pick { padding: 0 22px 22px; }
.photo-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 18px 0 10px; background: var(--paper); }
.photo-top h2 { margin: 0; font-size: 18px; }
.photo-pick > .sub { margin: 0 0 6px; }
.ph-sec { margin: 18px 0 8px; font-size: 13px; color: var(--sub); }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ph { position: relative; padding: 0; border: 3px solid transparent; border-radius: 8px; background: var(--sheet); overflow: hidden; aspect-ratio: 3 / 4; cursor: pointer; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .5; transition: opacity .15s; }
.ph:hover img { opacity: .85; }
.ph.on, .ph.pin { border-color: var(--mat); }
.ph.pin { border-color: #7f77dd; }
.ph.on img, .ph.pin img { opacity: 1; }
.ph.over { border: 3px dashed var(--line); }
.ph.over img { opacity: .75; }
.ph.out img { opacity: .25; }
.ph .tag { position: absolute; left: 6px; bottom: 6px; right: 6px; padding: 2px 6px; border-radius: 4px; background: rgba(28, 31, 36, .78); color: #fff; font-size: 11px; text-align: left; }
.ph.on .tag { background: var(--mat); }
.ph.pin .tag { background: #534ab7; }

/* 使い方のヒント */
.help-list { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 4px 0 8px; font-size: 13.5px; }
.help-list dt { font-weight: 600; }
.help-list dd { margin: 0; color: var(--sub); }

/* ---------- v1.15 ---------- */
/* 切り替えボタン（.seg）の地と文字。黒い部屋でも読めるように、色は部屋の変数から取る（②） */
.seg { display: inline-flex; }
.seg button { padding: 5px 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; font-size: 13px; }
.seg button + button { border-left: 0; }
.seg button:first-child { border-radius: var(--r) 0 0 var(--r); }
.seg button:last-child { border-radius: 0 var(--r) var(--r) 0; }
.seg button:hover { border-color: var(--ink); }
.seg button[aria-pressed=true] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
#muMaxNote { color: var(--sub); font-size: 11.5px; }
.mu-mood.mu-add, .mu-mood.mu-add b { color: var(--ink); }
.mu-mood.mu-add p { color: var(--sub); }
body.room-mood .mu-mood.on { background: var(--mat-pale); }
body.room-mood .ph { background: #26292d; }
body.room-mood .help-list dd { color: var(--sub); }
body.room-mood .mu-strip .sp.pin, body.room-mood .ph.pin { outline-color: #a59ff0; border-color: #a59ff0; }

/* マウスを乗せると出る解説（④⑤⑪⑫） */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 8px); z-index: 50; width: max-content; max-width: 340px;
  padding: 9px 12px; border-radius: 8px; background: #1c1f24; color: #f4f2ee; font: 400 12.5px/1.65 var(--font); letter-spacing: 0;
  white-space: pre-line; text-align: left; box-shadow: 0 6px 18px rgba(0, 0, 0, .22); pointer-events: none; }
body.room-mood [data-tip]:hover::after { background: #eceef1; color: #121314; }
.readall [data-tip]:hover::after { left: auto; right: 0; }

/* 全部読み直す：Look up の右上に、目立たせすぎずに置く（⑤） */
.readall { display: flex; justify-content: flex-end; margin: -6px 0 8px; }
.btn.quiet { padding: 5px 12px; font-size: 12.5px; color: var(--sub); background: transparent; }
.btn.quiet:hover { color: var(--ink); }

/* ★テーマの段（⑦）と、テーマ候補をもっと出す（⑥） */
.star-shelf { padding: 14px; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--sheet); }
.star-shelf .rank-head { flex-wrap: wrap; }
.star-shelf .rank-head h2 { flex: 0 0 auto; }
.star-shelf .rank-head .sub { flex: 1; }
.mood-wrap .theme-badge.old { border: 1px solid var(--line); background: var(--paper); color: var(--sub); }
.mood-wrap.starred .mood-star { visibility: visible; }
.more-row { margin-top: 12px; }
.btn.more-themes { border-style: dashed; }
.mu-mood .old-tag { justify-self: start; padding: 0 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 10px; color: var(--sub); }

/* 過去ログ（③） */
.history { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; padding-bottom: 6px; }
.hs { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--sheet); }
.hs-pv svg { width: 100%; height: auto; display: block; background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .12); }
.hs-meta { display: grid; gap: 4px; justify-items: start; }
.hs-meta b { font-size: 14px; }

/* レイアウトの切り替えを上の帯の右端に（⑬） */
.mu-adj-type { order: 9; margin-left: auto; }

/* お知らせ：Line up に保存したときは、目に入るように */
.toast.strong { padding: 12px 22px; font-size: 15px; font-weight: 600; background: var(--mat); color: var(--on-mat, #fff); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
dialog .toast { z-index: 100; }

/* ---------- v1.16 ---------- */
/* テーマ候補の×：カーソルを当てると右上の角に出る（⑲） */
.mood-del { position: absolute; top: -8px; right: -8px; z-index: 3; width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 50%;
  background: var(--sheet); color: var(--sub); font-size: 14px; line-height: 22px; text-align: center; cursor: pointer; visibility: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.mood-wrap:hover .mood-del, .mood-del:focus-visible { visibility: visible; }
.mood-del:hover { background: var(--danger); border-color: var(--danger); color: #fff; }

/* ★テーマ：最初は見出しの行だけ。押すと開く（⑯） */
.star-shelf { padding: 0; }
.star-shelf .moods { padding: 4px 14px 14px; }
.shelf-head { display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 12px 14px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; border-radius: 12px; }
.shelf-head:hover { background: var(--paper); }
.shelf-head h2 { margin: 0; font-size: 16px; }
.shelf-head .chev { width: 1em; color: var(--sub); }
.shelf-head .cnt { padding: 0 8px; border-radius: 999px; background: var(--chalk); color: #1c1f24; font-size: 12px; font-weight: 600; }
.shelf-head .sub { flex: 1; }
.shelf-head .open-label { color: var(--sub); font-size: 12px; text-decoration: underline; }
.cand-sec .rank-head { flex-wrap: wrap; gap: 4px 14px; }
.cand-sec .rank-head .sub { flex: 1; }

/* もっと出す：テーマ候補の並びの最後に、点線の枠で（⑮） */
.mood.mood-more { min-height: 220px; }

/* ボード名の横の 🔗（⑰） */
.board-title .link-chip { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; padding: 2px 10px 2px 4px; border: 1px solid var(--line); border-radius: 999px;
  font: 400 13px/1.4 var(--font); letter-spacing: 0; vertical-align: 6px; background: var(--sheet); }
.board-title .link-chip.empty { border-style: dashed; background: transparent; opacity: .75; }
.board-title .link-chip.empty:hover { opacity: 1; }
.link-chip .lk-icon { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--mat); cursor: pointer; }
.link-chip .lk-icon:hover { background: var(--mat-pale); }
.link-chip .lk-icon svg { width: 15px; height: 15px; }
.link-chip .lk-room { color: var(--sub); font-family: var(--en, inherit); }
.link-chip .lk-text { padding: 0; border: 0; background: none; color: var(--mat); font: inherit; cursor: pointer; }
.link-chip .lk-text:hover { text-decoration: underline; }
.link-chip.empty .lk-text { color: var(--sub); }
.link-chip .lk-sep { color: var(--sub); }
.link-chip[data-tip]:hover::after { top: calc(100% + 6px); }
body.room-mood .link-chip .lk-icon, body.room-mood .link-chip .lk-text { color: var(--mat); }

/* ---------- v1.17 ---------- */
/* 「？」：説明はここにまとめる。乗せると開く、押しても開く（㉘） */
.help { position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; width: 24px; height: 24px; margin-left: 6px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: var(--sheet); color: var(--sub); font: 600 13px/1 var(--font); cursor: help; vertical-align: middle; }
.help:hover, .help.open, .help:focus-visible { color: var(--ink); border-color: var(--ink); }
.help[data-tip]::after { display: none; }
.help[data-tip]:hover::after, .help[data-tip].open::after, .help[data-tip]:focus-visible::after {
  display: block; content: attr(data-tip); position: absolute; top: calc(100% + 8px); right: 0; left: auto; z-index: 60; width: max-content; max-width: 340px;
  padding: 10px 13px; border-radius: 8px; background: #1c1f24; color: #f4f2ee; font: 400 12.5px/1.7 var(--font); white-space: pre-line; text-align: left;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22); pointer-events: none; }
.help.wide[data-tip]:hover::after, .help.wide.open::after { max-width: 460px; }
body.room-mood .help[data-tip]:hover::after, body.room-mood .help.open::after { background: #eceef1; color: #121314; }
legend .help { margin-left: 8px; }
.drop .help { margin-left: 8px; }
.drop .help[data-tip]:hover::after, .drop .help.open::after { left: 0; right: auto; }
.page-help { margin-right: auto; }
.savebar .page-help[data-tip]:hover::after, .savebar .page-help.open::after { left: 0; right: auto; }
.tabhint { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.tabhint .spacer { flex: 1; }
.lu-bar .help { align-self: center; }
.lu-hint[hidden] { display: none; }

/* ★テーマの見出し：▸ を大きく、そこで開け閉め（㉘） */
.shelf-head { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; }
.shelf-head:hover { background: none; }
.shelf-toggle { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border: 0; border-radius: 10px; background: none; color: inherit; cursor: pointer; }
.shelf-toggle:hover { background: var(--paper); }
.shelf-toggle .chev { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 18px; line-height: 1; }
.shelf-toggle h2 { margin: 0; font-size: 16px; }
.shelf-head .spacer, .cand-sec .rank-head .spacer { flex: 1; }

/* 画像の帯：見出しの横でも開け閉め（㉙） */
.strip-toggle { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: 4px; padding: 0; border: 1px solid var(--line); border-radius: 50%;
  background: var(--sheet); color: var(--ink); font-size: 13px; cursor: pointer; }
.strip-toggle:hover { border-color: var(--ink); }

/* Pick up の選択バー：整理 ▾（㉔） */
.sel-menu { position: relative; display: inline-block; }
.sel-menu .menu { right: auto; left: 0; top: calc(100% + 4px); min-width: 180px; }
.sel-menu .menu[hidden] { display: none; }
.selbar #selDelete { margin-left: 10px; }

/* Make map の2行（㉗） */
.mu-tools { align-items: center; gap: 8px; }
.mu-tools .btn { padding: 6px 14px; }
.mu-tools .sel-menu .menu { left: auto; right: 0; min-width: 160px; }
.mu-tools .help { width: 30px; height: 30px; font-size: 14px; }
.mu-adjust { align-items: center; }
.mu-vsep { width: 1px; height: 22px; background: var(--line); }
.btn.small { padding: 3px 9px; font-size: 12px; }
#muBgState { font-size: 12px; }

/* DETAIL：配色・ディテール × アイテム（㉚） */
.pair-sw { display: inline-flex; margin-right: 6px; vertical-align: -2px; }
.pair-sw i { width: 12px; height: 12px; border: 1px solid rgba(0, 0, 0, .12); }
.pair-sw i:first-child { border-radius: 3px 0 0 3px; }
.pair-sw i:last-child { border-radius: 0 3px 3px 0; border-left: 0; }
.ditem-sec { margin-bottom: 18px; }
.rank.ditems li { display: grid; gap: 4px; margin-bottom: 6px; }
.ditem-chips { display: flex; flex-wrap: wrap; gap: 4px; padding-left: 26px; }
.ditem-chips .chip { padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--sheet); font-size: 12px; cursor: pointer; }
.ditem-chips .chip:hover { border-color: var(--ink); }
.ditem-chips .fl { display: inline-flex; }

.link-chip .lk-name { color: var(--ink); }
.mu-adj [hidden], .mu-tools [hidden], .selbar [hidden] { display: none !important; }
.ditem-chips .fl { display: inline-flex; flex: none; width: auto; }
.ditem-chips .fl > button.chip { flex: none; width: auto; min-width: 0; white-space: nowrap; border-radius: 999px; height: auto; line-height: 1.6; }
.ditem-chips .fl > :not(button.chip) { display: none; }
.ditem-chips .fl:has(> button.chip.on) > :not(button.chip), .ditem-chips .fl:has(> button.chip[aria-pressed=true]) > :not(button.chip) { display: inline-grid; }
.rank .bar .pair-label { display: inline-flex; align-items: center; gap: 8px; }
.rank .bar .pair-sw { display: inline-flex; padding: 0; flex: none; }
.pair-sw b { display: block; width: 14px; height: 14px; border: 1px solid rgba(0, 0, 0, .15); }
.pair-sw b:first-child { border-radius: 3px 0 0 3px; }
.pair-sw b:last-child { border-radius: 0 3px 3px 0; border-left: 0; }

.ph.on .tag { color: var(--on-mat, #fff); }

/* ---------- v1.18 ---------- */
/* ディテール：4つを横に（㉜） */
.cols4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-bottom: 18px; }
@media (max-width: 1200px) { .cols4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cols4 .rank button { grid-template-columns: 1.6em 1fr 3em; gap: 6px; }

/* タブはカタカナ（㉝） */
.lenstabs button { font-family: var(--font); letter-spacing: .04em; font-weight: 600; }

/* ★テーマ：帯のどこを押しても開け閉め（㉞） */
.shelf-head { cursor: pointer; border-radius: 12px; }
.shelf-head:hover { background: var(--paper); }
.shelf-head:hover .shelf-toggle { background: none; }

/* ▲TOP（㊲） */
.to-top { position: fixed; right: 24px; bottom: 24px; z-index: 40; display: grid; place-items: center; gap: 0; width: 52px; height: 52px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: var(--sheet); color: var(--ink); font: 600 10px/1 var(--en); letter-spacing: .08em;
  cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .14); }
.to-top span { font-size: 12px; line-height: 1; }
.to-top:hover { border-color: var(--ink); }
.to-top[hidden] { display: none; }

/* ペルソナの丸（㊳） */
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; background: var(--mat); color: var(--on-mat, #fff);
  font: 600 18px/1 var(--en); width: 100%; height: 100%; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.mini { width: 20px; height: 20px; font-size: 10px; margin-right: 6px; vertical-align: -5px; }
.avatar.big { width: 88px; height: 88px; font-size: 34px; }
/* 右上の丸の中のアイコン。以前は「top」というクラス名で、見出しの .top（余白つき）の指定まで効いてずれていた */
.acct .avatar.acct-av { position: absolute; inset: 0; width: auto; height: auto; display: grid; place-items: center; line-height: 1; font-size: 20px; }
.persona-tabs button { display: inline-flex; align-items: center; }

/* ペルソナの見た目の欄（㊳㊵） */
.persona-look { display: grid; gap: 16px; padding: 16px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--sheet); }
.pl-row { display: flex; align-items: center; gap: 16px; }
.pl-text { display: grid; gap: 4px; justify-items: start; }
.pl-text b { font-size: 14px; }
.avatar-drop { width: 92px; height: 92px; padding: 0; border: 2px dashed var(--line); border-radius: 50%; background: var(--paper); cursor: pointer; display: grid; place-items: center; }
.avatar-drop.over, .avatar-drop:hover { border-color: var(--mat); }
.side-drop { width: 92px; height: 120px; padding: 0; border: 2px dashed var(--line); border-radius: 10px; background: var(--paper); cursor: pointer; overflow: hidden; }
.side-drop span { display: grid; place-items: center; width: 100%; height: 100%; background-size: cover; background-position: center; color: var(--sub); font-size: 22px; }
.side-drop.over, .side-drop:hover { border-color: var(--mat); }
.accent-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.accent-presets .sw { width: 26px; height: 26px; padding: 0; border: 2px solid transparent; border-radius: 50%; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.accent-presets .sw.on { border-color: var(--ink); }
.accent-own { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.accent-own input[type=color] { width: 40px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; }
.pl-text .link[hidden] { display: none; }

/* 左の欄の背景：薄いベールをかけて文字を読めるように（㊵） */
.rail.has-bg { background-image: linear-gradient(rgba(237, 239, 241, .84), rgba(237, 239, 241, .84)), var(--rail-bg); background-size: cover; background-position: center; }
body.room-mood .rail.has-bg { background-image: linear-gradient(rgba(18, 19, 20, .8), rgba(18, 19, 20, .8)), var(--rail-bg); }
/* 右上の丸の指定は .acct／.acct .avatar.top の単一ルールに統一（v0.1.30で競合ルールを全廃） */
.readall { align-items: center; gap: 12px; }
.readall-bar { margin: 0 0 12px; }
body.is-busy .account { top: 56px; transition: top .15s; }

/* ---------- v1.19 ---------- */
/* Line up のタブ：資料・ラインシートは少し離す（①②） */
.slot-tabs .apart { margin-left: 18px; }

/* マスの中の右側：表のように（③）、ゴミ箱は右上（⑦） */
.slot-head { display: flex; align-items: center; margin: -6px 0 -6px; }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--sub); cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { border-color: var(--line); background: var(--paper); }
.icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); }
.slot-table { display: grid; border-top: 1px solid var(--line); }
.slot-table .st-row, .slot-side label.st-row { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); align-items: start; gap: 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.st-lab { display: flex; align-items: center; gap: 4px; padding: 10px 10px 10px 0; border-right: 1px solid var(--line); color: var(--sub); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.st-val { padding: 8px 0 8px 12px; min-width: 0; }
.st-val input, .st-val textarea { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); font: inherit; }
.st-val .slot-name { font-size: 16px; }
.st-val.slot-code { font-family: var(--en); font-size: 20px; letter-spacing: .06em; padding-top: 6px; }
.st-val.slot-code:empty::before { content: "—"; color: var(--sub); font-family: var(--font); font-size: 14px; }
.slot-fields { display: contents; }
.slot-colors2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; }
.slot-colors2 .win-list { margin: 0; align-content: start; }
.slot-colors2 .win-list .none { color: var(--sub); font-size: 12px; }
.win-side { display: grid; gap: 8px; align-content: start; padding-left: 12px; border-left: 1px dashed var(--line); }
.win-side .win-add { display: flex; gap: 4px; }
.win-side .win-add input#winName { min-width: 0; flex: 1; }
.slot-actions { margin-top: auto; }
.st-lab .help { width: 18px; height: 18px; font-size: 11px; margin-left: 2px; }

/* 右上の×と、ラフ絵 ⇄ FIXデザイン（④⑤） */
.stage-tools { align-items: center; }
.x-corner { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: #1c1f24; font-size: 16px; line-height: 1; cursor: pointer; }
.x-corner:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.doc { position: relative; }
.doc .x-corner { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; font-size: 13px; }

/* メモのマーク：画像の右下に、とても小さく（⑥） */
.lu-cell .pic { position: relative; }
.memo-mark { position: absolute; right: 5px; bottom: 5px; z-index: 2; width: 16px; height: 16px; border-radius: 50%; background: rgba(255, 255, 255, .9); box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); cursor: help; }
.memo-mark::before { content: ""; position: absolute; left: 4px; top: 4px; width: 8px; height: 8px; border-radius: 1px; background:
  linear-gradient(var(--ink), var(--ink)) 1px 2px / 6px 1px no-repeat, linear-gradient(var(--ink), var(--ink)) 1px 4px / 6px 1px no-repeat, linear-gradient(var(--ink), var(--ink)) 1px 6px / 4px 1px no-repeat; }
.memo-mark[data-tip]:hover::after { white-space: pre-wrap; min-width: 160px; }

/* 読めなかった画像の印（⑩） */
.failed-mark { position: absolute; left: 6px; bottom: 6px; z-index: 2; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; }
.link.warn { color: var(--danger); }

/* 全部のボードから探す（⑪） */
.rail-search { display: flex; align-items: center; gap: 6px; margin: 2px 0 10px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--sheet); }
.rail-search:focus-within { border-color: var(--mat); }
.rail-search svg { width: 15px; height: 15px; flex: none; color: var(--sub); }
.rail-search input { flex: 1; min-width: 0; padding: 7px 0; border: 0; background: none; font-size: 13px; outline: none; }
.search-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.search-head h2 { margin: 0; font-size: 20px; }
.search-head .spacer { flex: 1; }
.sr-group { padding: 12px 0 16px; border-top: 1px solid var(--line); }
.sr-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.sr-head .spacer { flex: 1; }
.sr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.sr-item { position: relative; }
.sr-img { display: block; width: 100%; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: var(--paper); cursor: zoom-in; aspect-ratio: 3 / 4; }
.sr-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sr-copy, .sr-here { position: absolute; left: 4px; right: 4px; bottom: 4px; padding: 3px 4px; border: 0; border-radius: 4px; font-size: 11px; text-align: center; visibility: hidden; }
.sr-copy { background: var(--mat); color: var(--on-mat, #fff); cursor: pointer; }
.sr-here { background: rgba(28, 31, 36, .7); color: #fff; }
.sr-item:hover .sr-copy, .sr-item:hover .sr-here, .sr-copy:focus-visible { visibility: visible; }
.sr-more { aspect-ratio: 3 / 4; border: 1px dashed var(--line); border-radius: 6px; background: none; color: var(--sub); cursor: pointer; }

/* 使い方（⑭） */
.rail-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.rail-foot .link { font-size: 13px; }
.manual-sheet { width: min(860px, 94vw); }
.manual h3 { margin: 18px 0 6px; font-size: 15px; }
.manual .help-list { grid-template-columns: 11em 1fr; }

/* 吹き出しの向き（⑮） */
[data-tip-x=l][data-tip]:hover::after, .help[data-tip-x=l].open::after { left: 0 !important; right: auto !important; transform: none !important; }
[data-tip-x=r][data-tip]:hover::after, .help[data-tip-x=r].open::after { right: 0 !important; left: auto !important; transform: none !important; }
[data-tip-x=c][data-tip]:hover::after, .help[data-tip-x=c].open::after { left: 50% !important; right: auto !important; transform: translateX(-50%) !important; }
[data-tip-y=u][data-tip]:hover::after, .help[data-tip-y=u].open::after { top: auto !important; bottom: calc(100% + 8px) !important; }

/* オン／オフのスイッチ（⑯）：オンはアクセントの色、オフは薄いグレー。中に ON／OFF */
.tog { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; }
.tog.on::before { content: none; }
.tog .sw, input.switch { position: relative; flex: none; width: 46px; height: 24px; border-radius: 999px; background: #d4d6da; transition: background .15s; }
.tog .sw::before, input.switch::before { content: "OFF"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font: 700 9px/1 var(--font); color: #6b7079; letter-spacing: .04em; }
.tog .sw::after, input.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: left .15s; }
.tog.on .sw, input.switch:checked { background: var(--mat); }
.tog.on .sw::before, input.switch:checked::before { content: "ON"; left: 7px; right: auto; color: var(--on-mat, #fff); }
.tog.on .sw::after, input.switch:checked::after { left: 25px; }
.tog.on { background: var(--paper); border-color: var(--line); color: var(--ink); font-weight: 600; }
input.switch { appearance: none; -webkit-appearance: none; margin: 0; cursor: pointer; vertical-align: middle; }
.switch-label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
body.room-mood .tog .sw, body.room-mood input.switch { background: #3a3d42; }
body.room-mood .tog.on .sw, body.room-mood input.switch:checked { background: var(--mat); }
body.room-mood .tog.on { background: #1f2124; }

.slot-colors2 > .win-add { grid-column: 1 / -1; display: flex; gap: 6px; padding-top: 8px; border-top: 1px dashed var(--line); }
.slot-colors2 > .win-add #winName { flex: 1; min-width: 0; }
.slot-colors2 > .win-add input[type=color] { width: 36px; padding: 2px; flex: none; }

/* v1.20：設定の画面は自動保存（②） */
.savebar [data-save] { display: none; }
.savebar { min-height: 0; }

/* ---------- v1.20 ---------- */
/* 設定の画面の「← 戻る」（③） */
.page-back { justify-self: start; margin-bottom: 4px; padding: 4px 12px 4px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--sheet); color: var(--ink); font-size: 13px; cursor: pointer; }
.page-back:hover { border-color: var(--ink); }
.page-back[hidden] { display: none; }

/* ペルソナ：このボードで使う（①）、アクセントカラー（⑮） */
.persona-use { display: flex; align-items: center; gap: 10px; }
.persona-use .in-use { padding: 6px 12px; border-radius: 999px; background: var(--mat-pale); color: var(--mat-deep); font-size: 13px; font-weight: 600; }
.persona-use [hidden] { display: none; }
.pl-head { display: inline-flex; align-items: center; gap: 4px; }
.accent-own { align-items: center; gap: 12px; margin-top: 8px; }
.accent-own input.accent-big { width: 120px; height: 64px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--sheet); cursor: pointer; }
.accent-own input.accent-big::-webkit-color-swatch-wrapper { padding: 0; }
.accent-own input.accent-big::-webkit-color-swatch { border: 0; border-radius: 8px; }
#pAccentHex { font-family: var(--en); letter-spacing: .06em; }

/* ラインシートの色展開（⑤） */
.lu-table td.cw-all { white-space: nowrap; }
.lu-table td.cw-all i { display: inline-block; width: 16px; height: 16px; margin-right: 4px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .12); vertical-align: middle; }

/* Make map：テーマ候補を開く帯（⑦） */
.cand-toggle { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.cand-toggle:hover { border-color: var(--ink); }
.cand-toggle .tri { font-size: 12px; color: var(--sub); }

/* Look up：画像の帯の開け閉め（⑧） */
.strip-toggle { width: auto; height: auto; padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; }

/* ペルソナ視点で再解釈（⑨） */
.btn.persona-lens { border-radius: 999px; padding: 7px 16px; font-weight: 600; }
.btn.persona-lens.flat { background: var(--sheet); border: 1px solid var(--ink); color: var(--ink); }

/* Make map のいちばん上：ペルソナの札（⑪） */
.persona-chip { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 14px 6px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--sheet); color: var(--ink); font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
.persona-chip:hover { border-color: var(--mat); }
.avatar.chip { width: 32px; height: 32px; font-size: 14px; }

/* MAPを作る：大きく、中央ぞろえで、欄の下にいつも見える（⑬） */
.mu-make-wrap { position: sticky; bottom: 0; z-index: 3; margin: 0 -14px -14px; padding: 12px 14px 14px; background: linear-gradient(to top, var(--sheet) 75%, rgba(0, 0, 0, 0)); }
#muMake { width: 100%; padding: 16px 12px; border-radius: 12px; font-size: 18px; font-weight: 700; letter-spacing: .08em; text-align: center; justify-content: center; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); }
#muMake:disabled { opacity: .7; }

/* MAP の表示の大きさ（⑭） */
.mu-adj-zoom { order: 10; }
.mu-stage.zoom-100 { overflow: auto; place-items: start; max-height: calc(100vh - 160px); }
.mu-stage svg { max-width: none; }

/* ---------- v1.21 ---------- */
/* 今の視点をテキストで出して、その横にボタン */
.lens-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lens-state { padding: 6px 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: 13px; color: var(--sub); }
.lens-state.on { background: var(--mat-pale); border-color: var(--mat); color: var(--mat-deep); font-weight: 600; }
body.room-mood .lens-state.on { color: var(--ink); }

/* ラインシート：列の幅をドラッグで変える */
.lu-table.resizable { table-layout: fixed; width: auto; }
.lu-table.resizable th { position: relative; overflow: hidden; text-overflow: ellipsis; }
.lu-table.resizable td { overflow: hidden; text-overflow: ellipsis; }
.lu-table.resizable td input { width: 100%; min-width: 0; }
.col-grip { position: absolute; top: 0; right: -4px; z-index: 2; width: 9px; height: 100%; cursor: col-resize; }
.col-grip::after { content: ""; position: absolute; top: 20%; bottom: 20%; left: 4px; width: 1px; background: var(--line); }
.lu-table th:hover .col-grip::after, .col-grip:hover::after { background: var(--mat); width: 2px; }
body.col-resizing { cursor: col-resize; user-select: none; }

/* 今の視点は、色付きの文字だけで（枠なし） */
.lens-state, .lens-state.on { padding: 0; border: 0; border-radius: 0; background: none; color: var(--mat); font-size: 14px; font-weight: 700; }
body.room-mood .lens-state, body.room-mood .lens-state.on { color: var(--mat); }
.lens-wrap { display: grid; gap: 8px; }
.lens-mismatch { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--chalk); border-radius: 8px; background: rgba(242, 201, 76, .14); font-size: 13px; color: var(--ink); }

/* ---------- ボードの並び替え（ドラッグ）---------- */
.boards .item[draggable=true] > button:first-child { cursor: grab; }
.boards .item.dragging { opacity: .4; }
.boards .item.drop-before { box-shadow: 0 -2px 0 var(--mat); }
.boards .item.drop-after { box-shadow: 0 2px 0 var(--mat); }

/* ---------- Line up：段に画像を足す ---------- */
.lu-rowhead .lu-upload { justify-self: start; margin-top: 6px; padding: 3px 9px; font-size: 12px; }

/* ---------- STUDIO に質問（左のレールの丸ボタン）---------- */
.qa-fab { align-self: flex-start; display: grid; place-items: center; width: 42px; height: 42px; margin-left: 2px; padding: 0;
  border: 0; border-radius: 50%; background: var(--mat); color: #fff; cursor: pointer; box-shadow: 0 2px 6px rgba(28, 31, 36, .18); }
.qa-fab:hover { background: var(--mat-deep); }
.qa-fab[aria-expanded=true] { background: var(--ink); color: var(--sheet); }
.qa-panel { position: fixed; left: 232px; bottom: 20px; z-index: 50; width: min(360px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto;
  display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--sheet); color: var(--ink);
  box-shadow: 0 10px 30px rgba(28, 31, 36, .18); }
.qa-head { display: flex; align-items: center; justify-content: space-between; }
.qa-head h2 { margin: 0; font-size: 15px; }
.qa-head .x { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--sub); font-size: 18px; cursor: pointer; }
.qa-head .x:hover { background: rgba(28, 31, 36, .06); }
.qa-note { margin: 0; color: var(--sub); font-size: 12px; }
.qa-panel textarea { width: 100%; resize: vertical; padding: 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); line-height: 1.6; }
.qa-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qa-key { color: var(--sub); font-size: 11px; }
.qa-answer { padding: 10px 12px; border-radius: var(--r); background: var(--mat-pale); white-space: pre-wrap; line-height: 1.7; }
.qa-answer.no { background: rgba(242, 201, 76, .2); }
.qa-answer.err { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
.qa-want { justify-self: start; font-size: 13px; }
.qa-request { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.qa-request .btn { justify-self: start; }
@media (max-width: 900px) { .qa-panel { left: 16px; } }

/* 絞り込みの画像を保存（切り抜き／元のまま） */
.board-settings .opts { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); display: grid; gap: 8px; }
.board-settings .opts legend { padding: 0 6px; font-weight: 600; font-size: 13px; }
.board-settings .opt { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; cursor: pointer; }
.board-settings .opt input { margin-top: 3px; accent-color: var(--mat); }
.board-settings .opt small { display: block; margin-top: 2px; }
.board-settings .opt input:disabled + span { opacity: .5; }

/* 切り抜き中のアニメ（はさみが点線をチョキチョキ進む） */
.crop-anim { display: grid; gap: 4px; justify-items: center; padding: 10px 0 2px; }
.crop-anim p { margin: 0; font-weight: 600; font-size: 14px; color: var(--mat-deep); }
.crop-track { position: relative; width: min(320px, 90%); height: 38px; }
.crop-line { position: absolute; left: 0; top: 50%; height: 0; width: 0; border-top: 2px dashed var(--mat); animation: crop-line 2.4s linear infinite; }
.crop-scissors { position: absolute; left: 0; top: 50%; margin: -15px 0 0 -12px; font-size: 26px; line-height: 1; color: var(--mat-deep); transform-origin: 50% 50%; animation: crop-move 2.4s linear infinite, crop-snip .32s ease-in-out infinite alternate; }
.crop-spark { position: absolute; top: 0; font-size: 14px; color: var(--mat); opacity: 0; animation: crop-spark 2.4s ease-in-out infinite; }
.crop-spark.s1 { left: 30%; }
.crop-spark.s2 { left: 70%; animation-delay: 1.2s; }
@keyframes crop-line { 0% { width: 0; } 100% { width: 100%; } }
@keyframes crop-move { 0% { left: 0; } 100% { left: 100%; } }
@keyframes crop-snip { from { transform: rotate(-14deg) scale(1); } to { transform: rotate(10deg) scale(.88); } }
@keyframes crop-spark { 0%, 100% { opacity: 0; transform: translateY(6px) scale(.6); } 40% { opacity: 1; transform: translateY(-2px) scale(1.1); } 70% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .crop-line, .crop-scissors, .crop-spark { animation: none; } .crop-line { width: 100%; } .crop-scissors { left: 50%; } }

/* ================= 4 Dress up ================= */
.app.rail-off { grid-template-columns: 0 1fr; }
.app.rail-off .rail { visibility: hidden; padding: 0; border: 0; overflow: hidden; }
body.du-mode .main { padding-bottom: 0; }
body.du-mode { overflow: hidden; }
.du-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.du-bar .spacer { flex: 1; }
.du-railbtn { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.du-railbtn:hover { border-color: var(--ink); }
.du-railbtn svg { width: 16px; height: 16px; }
.du-seg { display: flex; border: 1px solid var(--ink); border-radius: 999px; overflow: hidden; }
.du-seg button { border: 0; background: var(--sheet); padding: 5px 14px; font-size: 13px; cursor: pointer; }
.du-seg button[aria-selected=true] { background: var(--ink); color: #fff; }
.du { display: flex; gap: 12px; min-height: 0; }
.du-panel { background: var(--sheet); border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; min-height: 0; }
.du-h { display: flex; align-items: center; gap: 10px; padding: 9px 12px; height: 44px; box-sizing: border-box; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--sub); flex: none; }
.du-h b { font-family: var(--en); font-weight: 500; letter-spacing: .08em; font-size: 14px; color: var(--ink); }
.du-h .r { margin-left: auto; }
.du-h .btn.r { padding: 5px 12px; font-size: 12px; }
.du-empty { font-size: 12px; color: var(--sub); line-height: 1.7; padding: 8px; }
/* 重ね順 */
.du-order { width: 136px; flex: none; }
.du-olist { flex: 1; overflow: auto; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.du-oi { border: 1px solid var(--line); border-radius: 8px; background: var(--paper); padding: 6px; cursor: grab; display: grid; grid-template-columns: minmax(0, 1fr); }
.du-oi.over { box-shadow: 0 -3px 0 var(--chalk); }
.du-oi.drag { opacity: .35; }
.du-oi .hd { display: flex; align-items: center; font: 500 11px/1 var(--en); color: var(--sub); letter-spacing: .04em; margin-bottom: 5px; gap: 5px; grid-column: 1 / -1; }
.du-oi .hd span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.du-oi .hd button { border: 0; background: none; cursor: pointer; color: var(--sub); padding: 0; display: grid; }
.du-oi .hd svg { width: 13px; height: 13px; }
.du-oi .du-th { position: relative; }
.du-oi .du-th > img { width: 100%; height: 90px; object-fit: contain; object-position: 50% 45%; background: #fff; border-radius: 4px; display: block; }
.du-oi .nm { font-size: 10.5px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.du-oi .adjbtn { margin-top: 5px; width: 100%; border: 1px solid var(--line); background: var(--sheet); border-radius: 4px; font-size: 10px; padding: 3px 0; cursor: pointer; color: var(--sub); }
.du-oi .adjbtn.on { border-color: var(--ink); color: var(--ink); }
.du-oi .adjbtn.chg { color: var(--mat-deep); }
.du-oi .adj { margin-top: 5px; display: grid; gap: 4px; font-size: 10px; color: var(--sub); grid-column: 1 / -1; }
.du-oi .adj label { display: grid; gap: 1px; }
.du-oi .adj input { width: 100%; accent-color: var(--mat); }
.du-oi .adj .link { font-size: 10px; justify-self: start; }
.du-oi .adj .scrow { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.du-oi .adj .seg { display: inline-flex; gap: 2px; }
.du-oi .adj .seg button { font-size: 9px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--sub); cursor: pointer; }
.du-oi .adj .seg button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.du-oi .cw { position: absolute; left: 4px; bottom: 4px; display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px; margin: 0; padding: 3px; background: rgba(255, 255, 255, .85); border-radius: 4px; max-width: calc(100% - 8px); }
.du-oi .cw i { width: 15px; height: 15px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .15); cursor: pointer; position: relative; }
.du-oi .cw i.temp { outline: 1px dashed #9aa1ab; outline-offset: 1px; }
.du-oi .cw i.on { outline: 2px solid var(--ink); outline-offset: 1px; }
.du-oi .cw i.ok::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--mat); border: 1px solid #fff; }
.du-oi .cw .cwadd { width: 17px; height: 17px; padding: 0; border-radius: 3px; border: 1px dashed #9aa1ab; background: none; color: var(--sub); font-size: 12px; line-height: 1; cursor: pointer; }
.du-oi .cwedit { grid-column: 1 / -1; display: grid; gap: 4px; margin-top: 2px; padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.du-oi .cwrow { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.du-oi .cwrow i { width: 13px; height: 13px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .15); flex: none; }
.du-oi .cwrow span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.du-oi .cwaddrow { display: flex; align-items: center; gap: 6px; margin-top: 2px; flex-wrap: wrap; }
.du-oi .cwaddrow input[type="color"] { width: 30px; height: 22px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: none; }
.du-oi .cwaddrow .sub { font-size: 9.5px; }
.du-oi .cwaddrow .cwbtn { height: 22px; padding: 0 10px; font-size: 11px; border-radius: 4px; }
.du-oi .hd button.off { opacity: .45; }
.du-oi.hid .du-th img, .du-oi.hid .nm { opacity: .4; }
.du-oi .cwrow .cwnm2 { cursor: pointer; }
.du-oi .cwrow .cwnm2:hover { text-decoration: underline; }
.du-oi .cwrow .cwnm { flex: 1; min-width: 0; font-size: 11px; padding: 2px 5px; border: 1px solid var(--line); border-radius: 4px; }
.du-legend { padding: 8px 10px; border-top: 1px solid var(--line); font-size: 9.5px; color: var(--sub); line-height: 1.7; flex: none; }
.du-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; vertical-align: -1px; margin-right: 3px; border: 1px solid rgba(0, 0, 0, .15); position: relative; }
.du-legend .lg-ok { background: #2e7d32; }
.du-legend .lg-ok::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 5px; height: 5px; border-radius: 50%; background: var(--mat); }
.du-legend .lg-tmp { background: #f2c4cc; outline: 1px dashed #9aa1ab; outline-offset: 1px; }
/* STYLE IMAGE */
.du-style { flex: none; }
.du-stagebox { padding: 10px; display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; overflow-y: auto; }
.du-faces { display: flex; gap: 6px; align-items: center; height: 38px; overflow-x: auto; flex: none; }
.du-faces .fc { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--sheet); border-radius: 999px; padding: 3px 10px 3px 3px; font-size: 11.5px; cursor: pointer; white-space: nowrap; }
.du-faces .fc i { width: 24px; height: 24px; border-radius: 50%; background-size: 600% auto; background-position: 50% 13%; display: block; }
.du-faces .fc.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.du-faces .add { border: 1px dashed var(--line); background: none; border-radius: 999px; padding: 5px 10px; font-size: 11.5px; color: var(--sub); cursor: pointer; white-space: nowrap; }
.du-stage { position: relative; background: #cbccc6; border-radius: 6px; overflow: hidden; isolation: isolate; flex: none; }
.du-stage > img, .du-stage > .du-tint { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.du-stage > .du-hands { z-index: 900; }
.du-stage > .du-hair { z-index: 880; }
.du-stage > .du-hair[hidden] { display: none; }
.du-stage.selmode { cursor: ns-resize; }
.du-stage > img.du-glow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.du-wm { position: absolute; top: 10px; right: 12px; z-index: 950; font: 500 11px/1 var(--en); letter-spacing: .12em; color: rgba(28, 31, 36, .45); }
.du-temp { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .94); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 11.5px; box-sizing: border-box; }
.du-temp .btn { padding: 3px 8px; font-size: 10.5px; margin-left: auto; white-space: nowrap; }
.du-note { font-size: 10.5px; color: var(--sub); line-height: 1.5; margin: 0; }
/* Line up */
.du-lu { flex: 1; min-width: 0; }
.du-tabs { display: flex; gap: 2px; margin-left: auto; }
.du-tabs button { border: 0; background: none; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; color: var(--sub); cursor: pointer; white-space: nowrap; }
.du-tabs button[aria-selected=true] { background: var(--tab-back); color: var(--ink); }
.du-scroll { overflow: auto; flex: 1; padding: 10px 12px 24px; }
.du-lu .lu-rows { margin-top: 0; }
.du-hideinfo { padding: 3px 9px; font-size: 11px; margin-left: 8px; }
.du-lu.noinfo .lu-flabels, .du-lu.noinfo .flds { display: none; }
.du-lu.noinfo .lu-rowhead { min-height: 0 !important; }
.du-lu .lu-row { grid-template-columns: 104px 1fr; min-height: 0; }
.du-lu .lu-rowhead { position: relative; padding: 10px; min-height: calc(10px + 1px + 128px + var(--frows, 0) * 24px + 12px) !important; }
.du-lu .lu-rowhead h3 { font-size: 13.5px; }
.du-lu .lu-cells { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 10px; }
.du-lu .lu-cell { width: auto; cursor: pointer; }
.du-lu .lu-cell .pic { height: 128px; }
.du-lu .lu-cell .pic img { max-height: 128px; }
.du-lu .lu-flabels { top: calc(10px + 1px + 128px) !important; }
.du-lu .lu-flabels div { padding: 0 10px; font-size: 11px; }
.du-lu .lu-cell .flds .fv { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.du-lu .lu-cell .flds .fv.code { font-family: var(--en); letter-spacing: .03em; }
.du-lu .lu-cell .flds .wins { gap: 3px; }
.du-lu .lu-cell .flds .wins i { width: 11px; height: 11px; border-radius: 2px; border: 1px solid rgba(0, 0, 0, .15); display: inline-block; }
.du-lu .lu-cell.on { border: 1.5px solid var(--ink); }
.du-lu .lu-cell .tag { position: absolute; top: 6px; left: 6px; z-index: 2; font-size: 9.5px; padding: 2px 6px; border-radius: 3px; background: var(--ink); color: #fff; }
.du-lu .lu-cell .tag.gen { background: rgba(255, 255, 255, .92); color: var(--sub); border: 1px solid var(--line); }
.du-lu .lu-cell .tag.mk { background: var(--chalk); color: var(--ink); }
/* 小窓 */
.du-dlg { border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; max-width: 520px; max-height: calc(100dvh - 32px); overflow-y: auto; }
.du-dlg h3 { margin: 0 0 8px; }
.du-dlg p { font-size: 13px; line-height: 1.7; }
.du-dlg label { display: grid; gap: 4px; font-size: 12px; margin: 10px 0; }
.du-dlg textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.du-dlg .du-ok { display: flex; gap: 6px; align-items: flex-start; }
.du-dlg-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.du-dlg-acts .du-mute { margin-right: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; cursor: pointer; }
.du-adjpop { position: fixed; z-index: 70; width: 232px; background: var(--sheet); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(20, 24, 20, .18); padding: 10px 12px; }
.du-adjpop .adj { display: grid; gap: 4px; font-size: 10px; color: var(--sub); }
.du-adjpop .adj .adjdiv { border-top: 1px solid var(--line); margin: 3px 0; }
.du-adjpop .adj label { display: grid; gap: 1px; }
.du-adjpop .adj input { width: 100%; accent-color: var(--mat); }
.du-adjpop .adj .link { font-size: 10px; justify-self: start; }
.du-adjpop .adj .scrow { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.du-adjpop .adj .seg { display: inline-flex; gap: 2px; }
.du-adjpop .adj .seg button { font-size: 9px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--sub); cursor: pointer; }
.du-adjpop .adj .seg button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.du-adjpop .adj b { font-size: 11px; color: var(--ink); font-weight: 600; }
.du-adjpop .adj .srow { display: flex; align-items: center; gap: 6px; }
.du-adjpop .adj .srow .snm { width: 44px; flex: none; }
.du-adjpop .adj .srow .snm2 { display: flex; flex-direction: column; gap: 2px; flex: none; }
.du-adjpop .adj .srow input[type=range] { flex: 1; min-width: 0; }
.du-adjpop .adj .srow input[type=range] { flex: 1; min-width: 0; }
.du-adjpop .adj .rst { border: 0; background: none; cursor: pointer; color: var(--sub); font-size: 13px; line-height: 1; padding: 0 1px; flex: none; }
.du-adjpop .adj .rst:hover { color: var(--ink); }
.du-adjpop .adjhead { cursor: move; }
.du-split { flex: none; width: 10px; margin: 0 -11px; cursor: col-resize; z-index: 6; border-radius: 4px; }
.du-split:hover { background: rgba(28, 31, 36, .12); }
.du-mask { max-width: 500px; }
.du-mask-h { display: flex; align-items: center; justify-content: space-between; }
.du-guides { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.du-guides .chip { cursor: pointer; }
.du-mask-h h3 { margin: 0; }
.du-mask-x { border: 0; background: none; cursor: pointer; font-size: 15px; color: var(--sub); padding: 2px 6px; }
.du-mask-x:hover { color: var(--ink); }
.du-mask-vpwrap { position: relative; }
.du-mask-vp { overflow: auto; max-height: calc(100dvh - 320px); border-radius: 6px; background: #e9e9e6; }
.du-mask-in { position: relative; width: fit-content; margin: 0 auto; }
.du-mask canvas { width: 100%; display: block; touch-action: none; cursor: none; }
.du-mask-ring { position: absolute; border: 1.5px solid rgba(255, 255, 255, .95); outline: 1px solid rgba(0, 0, 0, .45); border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%); z-index: 3; }
.du-mask-zoom { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 4px; z-index: 4; }
.du-mask-zoom button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .92); cursor: pointer; font-size: 15px; line-height: 1; color: var(--ink); }
.du-mask-ctl { display: flex; align-items: center; gap: 16px; margin-top: 10px; font-size: 12px; }
.du-mask-ctl .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.du-mask-ctl .seg button { border: 0; background: #fff; padding: 4px 14px; cursor: pointer; font-size: 12px; color: var(--ink); }
.du-mask-ctl .seg button.on { background: var(--ink); color: #fff; }
.du-mask-ctl label { display: flex; align-items: center; gap: 6px; margin: 0; }
.du-mask .du-dlg-acts { flex-wrap: wrap; justify-content: flex-start; }
.du-mask .du-dlg-acts #duMaskSave { margin-left: auto; }
.du-photo { max-width: 560px; }
.du-photo img { max-width: 100%; max-height: calc(100dvh - 210px); width: auto; height: auto; margin: 0 auto; border-radius: 6px; display: block; }
.du-looks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; min-width: 420px; }
.du-look .pic { border: 1px solid var(--line); border-radius: 6px; padding: 0; background: #cbccc6; cursor: pointer; overflow: hidden; display: block; width: 100%; }
.du-look img { width: 100%; display: block; }
.du-look .row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; margin-top: 4px; gap: 6px; }
.du-look .lk-name { cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.du-look .lk-name:hover { text-decoration: underline; }
.du-look .btn.mini { padding: 2px 8px; font-size: 10.5px; }
.du-look .row.acts { justify-content: flex-start; }
.du-look .iconbtn { margin-left: auto; border: 0; background: none; cursor: pointer; color: var(--sub); padding: 2px; display: grid; }
.du-look .iconbtn:hover { color: var(--ink); }
/* 全体の縮尺（Dress up と同じ詰め具合） */
.top { margin-bottom: 10px; padding-left: 42px; position: relative; }
.board-title { font-size: 20px; }
.board-meta { font-size: 12px; }
.steps { margin-top: 6px; }
.steps button { padding: 6px 20px; font-size: 15px; }
.steps li + li::before { margin: 0 8px; font-size: 15px; }
body.du-mode .board-meta { display: none; }
.rail-toggle { position: absolute; left: 0; top: 0; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.rail-toggle:hover { border-color: var(--ink); }
.rail-toggle svg { width: 16px; height: 16px; }
.rail-toggle[aria-pressed=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
/* 中身も少し小さく（ドラッグで位置を測る Make map と Dress up はそのまま） */
#view-collect, #view-read, #view-lineup, #view-me, #view-settings, #view-category, #view-search { zoom: .88; }

/* ---------- アイテムMAP（Look up からの分岐） ---------- */
/* ITEMタブの入口ピル。見出し行に収まる最小サイズにし、ページャは右端のままにする */
.cat-head .catbtn { flex: 0 1 auto; }
.cat-head .pager { margin-left: auto; }
.im-pill { flex: none; padding: 2px 10px; border: 1.5px solid var(--mat); border-radius: 999px; background: var(--sheet);
  color: var(--mat-deep); font-size: 11.5px; font-weight: 700; cursor: pointer; white-space: nowrap; line-height: 1.5; }
/* MAPボタンは列の外・右上にタブとして出す（列見出しの中だとカテゴリ名が隠れるため） */
.cat-wrap { position: relative; margin-top: 12px; }
.cat-wrap > .im-pill { position: absolute; top: -11px; right: 10px; z-index: 3; box-shadow: 0 1px 4px rgba(20, 24, 28, .18); }
.im-pill:hover { background: var(--mat-pale); }
.im-pill.done { background: var(--mat); color: #fff; }
.im-branch { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.im-branch-pill { padding: 4px 14px; border-radius: 999px; background: var(--mat); color: #fff; font-weight: 700; font-size: 13px; }
.im-branch .link { margin-left: 4px; }
.im { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.im-side { position: sticky; top: 10px; display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--sheet); max-height: calc(100vh - 30px); overflow: auto; }
.im-lab { font-size: 11.5px; font-weight: 700; color: var(--sub); margin-bottom: 4px; }
.im-cat-sel, .im-title-input { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); }
.im-title-input { font-weight: 700; }
.im-meta { margin: 0; color: var(--sub); font-size: 12.5px; }
.im-make, .im-suggest-btn { width: 100%; justify-content: center; padding: 10px 14px; font-weight: 700; }
.im-history-btn { width: 100%; justify-content: flex-start; }
.im-instruction { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); resize: vertical; }
.im-sep { height: 1px; background: var(--line); }
.im-hints { margin: 0; padding: 0; list-style: none; color: var(--sub); font-size: 12.5px; display: grid; gap: 2px; }
.im-hints li::before { content: "・"; }
.im-hints li.sub::before { content: ""; }
.im-main { min-width: 0; }
.im-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.im-tools .spacer { flex: 1; }
.im-seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--sheet); }
.im-seg button { padding: 7px 18px; border: 0; background: transparent; cursor: pointer; font-size: 13px; font-weight: 600; letter-spacing: .06em; color: var(--sub); }
.im-seg button[aria-pressed=true] { background: var(--mat); color: #fff; }
.im-seg button:disabled { opacity: .4; cursor: default; }
.im-pager { display: inline-flex; align-items: center; gap: 8px; }
.im-page-btn { width: 34px; height: 34px; border: 1.5px solid var(--mat); border-radius: 8px; background: var(--sheet); color: var(--mat-deep); font-size: 13px; cursor: pointer; }
.im-page-btn.go { background: var(--mat); color: #fff; }
.im-page-btn:disabled { opacity: .35; cursor: default; }
.im-page-num { width: 46px; height: 34px; padding: 0 4px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--sheet);
  text-align: center; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.im-page-total { font-size: 13px; color: var(--sub); font-variant-numeric: tabular-nums; }
.im-tools .sel-menu .menu { left: auto; right: 0; min-width: 210px; }
.im-stage { position: relative; background: #dfe3e6; border-radius: 10px; padding: 18px; min-height: 300px; }
.im-stage .empty { color: var(--sub); font-size: 14px; text-align: center; line-height: 1.9; padding: 60px 10px; }
/* ボードは A3横。中身の大きさはボード幅（cqw）で決める */
.im-board { container-type: inline-size; aspect-ratio: 420 / 297; background: #dde7ec; border-radius: 0;
  padding: 1.9%; box-shadow: 0 2px 12px rgba(0, 0, 0, .12); }
.im-panel { background: #fff; border-radius: 1.5cqw; height: 100%; padding: 2.1% 2.3%; display: flex; flex-direction: column; overflow: hidden; }
.im-b-head { display: flex; align-items: center; justify-content: space-between; gap: 1cqw; margin-bottom: 1.2cqw; }
.im-b-title { margin: 0; font-size: 2.3cqw; font-weight: 600; letter-spacing: .03em; color: #1d3557; cursor: text; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.im-b-pill { flex: none; padding: .35cqw 1.2cqw; border-radius: 999px; background: #1d3557; color: #fff; font-size: 1.15cqw; font-weight: 600; letter-spacing: .12em; }
.im-cols { flex: 1; display: flex; gap: 1.3cqw; min-height: 0; }
.im-col { flex: 1; display: flex; flex-direction: column; gap: 1.76cqw; min-width: 0; }
.im-grp-label { cursor: pointer; }
.im-more { margin-top: .5cqw; display: inline-block; align-self: flex-start; border: 1px solid var(--sub); border-radius: .5cqw; padding: .2cqw .7cqw; font-size: 1cqw; color: var(--sub); }
.im-grp { border-radius: .5cqw; }
.im-grp.drop-on { outline: 3px solid var(--chalk); outline-offset: 2px; }
.im-grp-label { display: flex; align-items: baseline; gap: .45cqw; padding: .45cqw .6cqw; border-radius: .45cqw; color: #fff; }
.im-grp-no { font-size: 1.15cqw; font-weight: 600; }
.im-grp-name { font-size: 1.15cqw; font-weight: 700; cursor: text; line-height: 1.3; }
.im-grp-n { font-size: 1.05cqw; white-space: nowrap; }
.im-grp-x { margin-left: auto; flex: none; border: 0; background: none; color: #fff; font-size: 1.3cqw; line-height: 1; cursor: pointer; padding: 0 .2cqw; opacity: .85; }
.im-grp-x:hover { opacity: 1; }
.im-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5cqw; margin-top: .5cqw; }
.im-thumbs img { width: 100%; object-fit: cover; display: block; border-radius: .3cqw; cursor: grab; background: #eceff1; }
.im-b-foot { margin-top: 1cqw; text-align: right; font-size: 1.15cqw; font-weight: 600; letter-spacing: .06em; }
.im-b-foot.left { text-align: left; }
/* FOCUS */
.im-f-head { text-align: right; margin-bottom: .6cqw; }
.im-f-title { font-size: 1.5cqw; font-weight: 600; letter-spacing: .04em; color: #1d3557; }
.im-f-sub { font-size: 1.3cqw; font-weight: 600; letter-spacing: .04em; color: #1d3557; }
.im-f-body { flex: 1; display: flex; gap: 2.5cqw; min-height: 0; }
.im-f-left { width: 27%; flex: none; min-width: 0; }
.im-f-no { font-size: 5.8cqw; font-weight: 600; line-height: 1; }
.im-f-name { margin: .8cqw 0 0; font-size: 1.9cqw; font-weight: 700; line-height: 1.35; cursor: text; }
.im-f-pointlab { margin-top: 1.6cqw; font-size: 1.15cqw; font-weight: 700; }
.im-f-point { margin: .5cqw 0 0; font-size: 1.2cqw; line-height: 1.75; cursor: text; }
.im-f-chips { display: flex; flex-wrap: wrap; gap: .5cqw; margin-top: 1.4cqw; }
.im-f-chip { padding: .35cqw .9cqw; border-radius: 999px; background: #f0f0ea; color: var(--sub); font-size: 1cqw; white-space: nowrap; }
.im-f-del { margin-top: 1.8cqw; padding: 0; border: 0; background: none; color: var(--danger); font-size: 1.1cqw; cursor: pointer; }
.im-f-del:hover { text-decoration: underline; }
.im-f-left .sub { font-size: .95cqw; }
.im-f-grid { flex: 1; display: grid; gap: .65cqw; min-height: 0; align-content: start; }
.im-f-img { position: relative; overflow: hidden; border-radius: .3cqw; background: #eceff1; aspect-ratio: var(--imfar, 3 / 4); }
.im-f-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.im-f-move { position: absolute; right: 6px; bottom: 6px; padding: 4px 10px; border: 0; border-radius: 999px;
  background: rgba(28, 31, 36, .78); color: #fff; font-size: 12px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.im-f-img:hover .im-f-move, .im-f-move:focus-visible { opacity: 1; }
/* 未分類トレイ */
.im-tray { margin-top: 12px; }
.im-tray-inner { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1.5px dashed var(--line); border-radius: 10px; background: var(--sheet); }
.im-tray-inner.drop-on { outline: 3px solid var(--chalk); outline-offset: 2px; }
.im-tray-lab { flex: none; font-size: 12.5px; font-weight: 700; color: var(--sub); }
.im-tray-thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.im-tray-thumbs img { width: 54px; height: 54px; object-fit: cover; border-radius: 4px; cursor: grab; display: block; }
/* その場編集・移動メニュー・ダイアログ */
.im-edit-inline { width: 100%; padding: 2px 6px; border: 1.5px solid var(--chalk); border-radius: 4px; background: #fff; color: var(--ink); font: inherit; }
.im-move-menu { position: fixed; z-index: 80; right: auto; top: auto; min-width: 170px; }
.im-dlg-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.im-pv-inst { margin-top: 0; }
.im-pv-lab { font-size: 11.5px; font-weight: 700; color: var(--sub); margin-bottom: 4px; }
.im-pv-group h3 { margin: 0 0 4px; }
.im-pv-group p { margin: 0 0 8px; }
.im-pv-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.im-pv-thumbs figure { margin: 0; }
.im-pv-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; display: block; }
.im-pv-thumbs figcaption { font-size: 11px; color: var(--sub); text-align: center; margin-top: 2px; }
.im-pv-del { margin-top: 14px; }
.im-pv-del p { margin: 2px 0; }
.im-hs { display: flex; align-items: flex-start; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.im-hs-meta { flex: 1; display: grid; gap: 4px; }
.im-hs-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.im-hs-chips .im-f-chip { font-size: 11px; padding: 2px 8px; }
@media (max-width: 1000px) { .im { grid-template-columns: 1fr; } .im-side { position: static; max-height: none; } }

/* ================= v0.1.30：ステップバーの分岐レイアウト ================= */
/* 本線（Pick up → Look up → Line up → Dress up）の下に、MAP作りの段（Item map／Make map） */
.steps { align-items: flex-start; margin-top: 10px; }
.steps li + li::before { content: none; }
.steps .sunit { display: flex; flex-direction: column; gap: 8px; }
.steps .sunit > button { height: 38px; padding: 0 22px; display: flex; align-items: center; justify-content: center; }
.steps .ssub { height: 30px; padding: 0 16px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 999px; background: var(--sheet); color: var(--ink);
  font-size: 13px; letter-spacing: .04em; cursor: pointer; }
.steps .ssub:hover { border-color: var(--ink); }
.steps .ssub-ph { display: block; height: 30px; }
.steps .slink { display: grid; place-items: center; height: 38px; padding: 0 2px; color: var(--sub); font: 400 15px/1 var(--en); }
.steps .slink.fork { display: block; height: 76px; }
.steps .slink.mood-only { display: none; }
body.room-mood .steps .slink.mood-only { display: grid; }
body.room-mood .steps .slink.fashion-only, body.room-mood .steps .slink.fork { display: none; }

/* ================= v0.1.30：アイテムMAPの表示切り替え・背景色 ================= */
.im-stage { overflow-x: auto; }
.im-bgctl { display: inline-flex; align-items: center; gap: 8px; }
.im-bgctl .im-lab { font-size: 13px; color: var(--sub); }
.im-bgwin { width: 36px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--sheet); cursor: pointer; }

/* ================= v0.1.31：ステップ群を右上へ＋矢印の統一 ================= */
.top { grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; padding-right: 88px; }
.top > #steps { grid-column: 2; grid-row: 1 / span 6; align-self: start; margin-top: 2px; }
@media (max-width: 1150px) {
  .top { grid-template-columns: minmax(0, 1fr); }
  .top > #steps { grid-column: 1; grid-row: auto; margin-top: 10px; }
}
.steps .sdrop { display: block; height: 14px; margin: -7px 0 -7px; font-size: 11px; line-height: 14px; text-align: center; color: var(--sub); }
.steps .sdrop[hidden] { display: none; }
.steps .slink { font-size: 16px; }

/* 有料アクションの ¥ バッジ（v0.1.31） */
/* （v0.1.35 で ¥ の印は廃止。お金がかかるボタンは琥珀色で塗る） */

/* ================= v0.1.33：ステップを左の欄へ（縦の流れ） ================= */
.top > #steps { display: none !important; }
.top { grid-template-columns: minmax(0, 1fr); }
.boards { min-height: 64px; overflow-x: hidden; }
.flow { flex: none; display: grid; gap: 2px; padding: 10px 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--sheet); }
.flow-h { display: flex; align-items: baseline; gap: 6px; padding: 0 6px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.flow-board { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 13px/1.3 var(--font); letter-spacing: 0; color: var(--ink); }
.flow-lab { flex: none; font: 500 10px/1 var(--en); letter-spacing: .14em; color: var(--sub); }
.flow button { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border: 1px solid transparent; border-radius: 999px; background: none; color: var(--ink); cursor: pointer; font-size: 15px; text-align: left; }
.flow button i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; flex: none; }
.flow button:hover { border-color: var(--line); background: var(--paper); }
.flow button[aria-current=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
.flow button.sub { margin-left: 22px; padding: 4px 10px 4px 14px; border-radius: 0 999px 999px 0; border-left: 1px solid var(--line); font-size: 13px; color: var(--sub); }
.flow button.sub i { display: none; }
.flow button.sub[aria-current=true] { color: #fff; border-left-color: var(--ink); }
body.room-mood .flow .fashion-only { display: none; }
/* MOOD の部屋には Line up がないので、Make map は本線に並べる */
body.room-mood .flow button.mm { margin-left: 0; padding: 6px 10px; border-radius: 999px; border-left: 1px solid transparent; font-size: 15px; color: var(--ink); }
body.room-mood .flow button.mm i { display: block; }
body.room-mood .flow button[aria-current=true] { color: #121314; }
/* 欄をたたんだとき：ステップだけを細い列に残す */
.app.rail-off { grid-template-columns: 50px 1fr; }
.app.rail-off .rail { visibility: visible; padding: 14px 8px; overflow: visible; border-right: 1px solid var(--line); align-items: center; }
.app.rail-off .rail > :not(#flow) { display: none !important; }
.app.rail-off .rail .flow { border: 0; background: none; padding: 4px 0 0; gap: 6px; justify-items: center; }
.app.rail-off .rail .flow-h { display: none; }
/* たたんだとき：名前をそのまま縦書き（案2） */
.app.rail-off .rail .flow button, .app.rail-off .rail .flow button.sub, body.room-mood .app.rail-off .rail .flow button.mm { margin: 0; width: 30px; height: auto; padding: 10px 0; justify-content: center; border: 0; border-radius: 999px; background: none;
  writing-mode: vertical-rl; text-transform: uppercase; font: 500 12.5px/1 var(--en); letter-spacing: .08em; color: var(--ink); white-space: nowrap; }
.app.rail-off .rail .flow button i { display: none; }
.app.rail-off .rail .flow button.sub { font-size: 10.5px; color: var(--sub); padding: 6px 0; }
.app.rail-off .rail .flow button:hover { background: var(--sheet); }
.app.rail-off .rail .flow button[aria-current=true] { background: var(--ink); color: #fff; }
body.room-mood .app.rail-off .rail .flow button[aria-current=true] { color: #121314; }

/* v0.1.34：アイテムMAPのページは数字を並べる */
.im-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.im-page-n { min-width: 30px; height: 30px; padding: 0 6px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--sheet); color: var(--ink); font: 500 13px/1 var(--en); cursor: pointer; }
.im-page-n:hover { border-color: var(--mat); }
.im-page-n.on { background: var(--mat); border-color: var(--mat); color: var(--on-mat, #fff); }
/* 左の欄：ステップのカードとボード一覧の区切り線 */
.rail-sep { flex: none; height: 1px; margin: 2px -14px; background: var(--line); }

/* ================= v0.1.35：ボタンの色分け =================
   お金がかかる（画像を作る）ボタン＝琥珀色で塗る。ペルソナの色に左右されない固定色。
   それ以外は白。大事なボタンは黒い枠線＋太字で目立たせる */
:root { --paid: #a87a1f; --paid-deep: #8a6416; }
.btn.primary { background: var(--sheet); border: 1.5px solid var(--ink); color: var(--ink); font-weight: 700; }
.btn.primary.en { font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: var(--paper); border-color: var(--ink); }
.btn.paid, .btn.primary.paid { background: var(--paid); border: 1.5px solid var(--paid); color: #fff; font-weight: 700; }
.btn.paid:hover:not(:disabled), .btn.primary.paid:hover:not(:disabled) { background: var(--paid-deep); border-color: var(--paid-deep); }
.paid-ic { color: var(--paid) !important; }
.paid-ic:hover { color: var(--paid-deep) !important; }
body.room-mood .btn.primary:not(.paid) { background: transparent; border-color: var(--ink); color: var(--ink); }
.im-page-n.on { background: var(--ink); border-color: var(--ink); color: var(--sheet); }

/* v0.1.35+：写真にするはステージの下へ／LOOKSの並べ替え */
.du-photo-row { display: flex; justify-content: flex-end; margin-top: 8px; }
.du-look { cursor: grab; position: relative; }
.du-look.dragging { opacity: .4; }
.du-look.drop-l::before, .du-look.drop-r::after { content: ''; position: absolute; top: 0; bottom: 0; width: 3px; border-radius: 2px; background: var(--ink); }
.du-look.drop-l::before { left: -7px; } .du-look.drop-r::after { right: -7px; }
.du-look .row .iconbtn + .iconbtn { margin-left: 0; }

/* ================= v0.1.37：Dress up の操作台 ================= */
.du-photo-row { display: none; }
.du-oi { cursor: pointer; }
.du-oi.sel { border: 2px solid var(--ink); background: var(--sheet); box-shadow: 0 2px 8px rgba(20,24,20,.12); padding: 5px; }
.du-op { margin-top: 0; height: 256px; border: 1.5px solid var(--ink); border-radius: 9px; background: var(--sheet); overflow: hidden; display: flex; flex-direction: column; flex: none; }
.du-op-in { display: flex; flex-direction: column; height: 100%; }
.du-op .op-empty { margin: auto; padding: 0 16px; font-size: 11.5px; color: var(--sub); text-align: center; }
.du-op .op-h { display: flex; align-items: center; gap: 7px; padding: 6px 8px 6px 10px; background: var(--paper); border-bottom: 1px solid var(--line); min-width: 0; }
.du-op .op-no { font-size: 10.5px; color: var(--sub); }
.du-op .op-h b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.du-op .op-cw { display: flex; gap: 5px; flex-wrap: nowrap; flex: none; }
.du-op .op-cw i { width: 15px; height: 15px; border-radius: 3px; border: 1px solid rgba(0,0,0,.15); cursor: pointer; position: relative; flex: none; }
.du-op .op-cw i.temp { outline: 1px dashed #9aa1ab; outline-offset: 1px; }
.du-op .op-cw i.on { outline: 2px solid var(--ink); outline-offset: 1px; }
.du-op .op-cw i.ok::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--mat); border: 1px solid #fff; }
.du-op .op-wand { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; font-size: 11px; }
.du-op .op-wand svg { width: 13px; height: 13px; }
.du-op .op-tabs { display: flex; border-bottom: 1px solid var(--line); }
.du-op .op-tabs button { flex: 1; border: 0; background: none; padding: 6px 0; font-size: 11.5px; color: var(--sub); cursor: pointer; }
.du-op .op-tabs button.on { color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px var(--ink); }
.du-op .op-body { flex: 1; overflow: auto; padding: 6px 10px 4px; display: flex; flex-direction: column; gap: 3px; }
.du-op .srow { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.du-op .srow .snm { width: 48px; flex: none; color: var(--ink); }
.du-op .srow input[type=range] { flex: 1; min-width: 0; accent-color: var(--ink); }
.du-op .srow .sv { width: 36px; text-align: right; font-size: 10px; color: var(--sub); flex: none; }
.du-op .srow .rst { border: 0; background: none; color: var(--sub); cursor: pointer; padding: 0 2px; }
.du-op .seg { display: inline-flex; gap: 3px; }
.du-op .seg button { font-size: 10px; padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--sub); cursor: pointer; }
.du-op .seg button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.du-op .op-hint { margin: 0; font-size: 10px; color: var(--sub); }
.du-op .op-sm { align-self: flex-start; padding: 4px 12px; font-size: 11px; }
.du-op .op-tabs .op-reset { flex: none; padding: 6px 8px; font-size: 10px; color: var(--sub); border-left: 1px solid var(--line); }
.du-op .op-tabs .op-reset:hover { color: var(--ink); }
.du-foot { display: flex; align-items: flex-end; gap: 10px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.du-foot .du-note { flex: 1; margin: 0; width: auto !important; }
.du-foot #duPhoto { flex: none; }
.du-style .du-h #duExport { margin-left: auto; }

/* v0.1.38：操作台の下段（切り抜き／アレンジ）、STYLE IMAGE 見出しのボタン */
.du-op .op-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px; border-top: 1px solid var(--line); }
.du-op .op-foot .op-sm { align-self: auto; }
.du-style .du-h { flex-wrap: wrap; row-gap: 6px; }
.du-style .du-h .du-h-acts { margin-left: auto; display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.du-style .du-h .du-h-acts .btn { padding: 5px 10px; font-size: 11.5px; }

/* v0.1.38：Make map をまとめ（ITEM／BOARD を字下げ） */
.flow button.mm-grp.grp-on { font-weight: 700; }
.flow button.mm-grp.grp-on i { background: var(--ink); }
.app.rail-off .rail .flow button.mm-grp.grp-on { font-weight: 700; }

/* v0.1.41：前の版 */
.du-op .op-h .op-ver { margin-left: auto; flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 2px 8px; font-size: 10px; color: var(--ink); cursor: pointer; white-space: nowrap; }
.du-op .op-h .op-ver:hover { border-color: var(--ink); }
.du-ver { width: min(560px, 92vw); }
.du-ver .du-ver-list { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow: auto; margin: 10px 0; }
.du-ver .du-ver-c { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 9px; padding: 8px; }
.du-ver .pic { width: 84px; height: 126px; flex: none; background: #e9eaec; border-radius: 6px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.du-ver .pic img { width: 100%; height: 100%; object-fit: contain; }
.du-ver .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.du-ver .meta p { margin: 0; font-size: 11.5px; color: var(--sub); }
.du-ver .meta .acts { display: flex; gap: 6px; margin-top: 4px; }
.du-ver .meta .tag { align-self: flex-start; font-size: 10px; background: var(--ink); color: #fff; border-radius: 4px; padding: 2px 6px; }
.du-ver .acts .btn { padding: 4px 12px; font-size: 11.5px; }

/* v0.1.42：切り抜きを調整は操作台の右上（緑）、選択中は黄色くはっきり */
.du-op .op-h .op-mask { margin-left: auto; flex: none; padding: 5px 11px; font-size: 12px; font-weight: 700; background: var(--mat); border: 1px solid var(--mat); color: var(--on-mat, #fff); border-radius: 7px; }
.du-op .op-h .op-mask:hover { background: var(--mat-deep); border-color: var(--mat-deep); }
.du-op .op-foot .op-ver { font-size: 11.5px; }
.du-oi.sel { border: 2px solid var(--chalk) !important; box-shadow: 0 0 0 3px rgba(242,201,76,.35), 0 0 14px rgba(242,201,76,.75) !important; background: #fffdf3 !important; }
.du-op .op-h b { min-width: 3em; }

/* v0.1.43：色は操作台の「カラー」の段に。カードはいまの色の丸だけ */
.du-legend[hidden] { display: none !important; }
.du-oi .cdot { position: absolute; left: 5px; bottom: 5px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.2); }
.du-oi .cdot.temp { box-shadow: 0 0 0 1px #9aa1ab; border-style: dashed; border-color: #9aa1ab; }
.du-op .op-color { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); min-height: 34px; }
.du-op .op-color .op-lab { font-size: 11px; color: var(--sub); flex: none; cursor: help; }
.du-op .op-color .op-cw { display: flex; gap: 7px; flex-wrap: nowrap; align-items: center; flex: 1; min-width: 0; overflow-x: auto; padding: 3px 2px; }
.du-op .op-color .op-cw i { flex: none; }
.du-op .op-color .op-cw i { width: 16px; height: 16px; }
.du-op .op-color .cwadd { width: 18px; height: 18px; padding: 0; border-radius: 3px; border: 1px dashed #9aa1ab; background: none; color: var(--sub); font-size: 12px; line-height: 1; cursor: pointer; }
.du-op .op-color .op-recolor { flex: none; padding: 4px 9px; font-size: 11px; }
.du-op .op-color .op-cnote { flex: none; font-size: 10px; color: var(--sub); }
.du-colordlg { width: min(420px, 92vw); }
.du-colordlg .cwedit { position: static; margin: 10px 0; }
.du-colordlg .cwedit { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.du-colordlg .cwrow { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.du-colordlg .cwrow i { width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgba(0,0,0,.15); flex: none; }
.du-colordlg .cwrow span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.du-colordlg .cwrow .cwnm2 { cursor: pointer; } .du-colordlg .cwrow .cwnm2:hover { text-decoration: underline; }
.du-colordlg .cwrow .cwnm { flex: 1; min-width: 0; font-size: 13px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px; }
.du-colordlg .cwaddrow { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.du-colordlg .cwaddrow input[type="color"] { width: 36px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: none; }
.du-colordlg .cwaddrow .cwbtn { height: 28px; padding: 0 12px; font-size: 12px; }
.du-colordlg .cwaddrow .sub { font-size: 11px; }
.du-op, .du-foot { align-self: flex-start; }
.du-op .op-color .op-cw { scrollbar-width: none; }
.du-op .op-color .op-cw::-webkit-scrollbar { display: none; }

/* v0.1.46：画像の詳細ウィンドウは大きさ固定。画像の方を枠に合わせて縮める（矢印の位置が動かない） */
#detail.sheet { width: min(1180px, 94vw); height: min(88vh, 900px); max-height: none; }
#detail .detail { height: 100%; max-height: none; grid-template-rows: 100%; }
#detail .detail-img { height: 100%; min-height: 0; }
#detail .detail-img img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; }
#detail .detail-side { min-height: 0; }
@media (max-width: 900px) { #detail .detail { grid-template-rows: 55% 45%; } }

/* ================= v0.1.47：スタイリング提案・LOOK のアイテム ================= */
.du-facesrow { display: flex; align-items: center; gap: 8px; flex: none; min-width: 0; }
.du-facesrow .du-faces { flex: 1; min-width: 0; }
.du-stylebtn { flex: none; padding: 6px 12px; font-size: 11.5px; font-weight: 700; border-radius: 999px; background: var(--mat); border: 1px solid var(--mat); color: var(--on-mat, #fff); white-space: nowrap; }
.du-stylebtn:hover, .du-stylebtn[aria-expanded="true"] { background: var(--mat-deep); border-color: var(--mat-deep); }
.du-stylepop { position: fixed; z-index: 60; width: 340px; max-height: calc(100vh - 140px); overflow: auto; background: var(--sheet); border: 1.5px solid var(--ink); border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.2); font-size: 12px; }
.du-stylepop[hidden] { display: none; }
.du-stylepop .sp-tabs { display: flex; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--sheet); z-index: 1; }
.du-stylepop .sp-tabs button { flex: 1; border: 0; background: none; padding: 9px 0; font-size: 12px; color: var(--sub); cursor: pointer; }
.du-stylepop .sp-tabs button.on { color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px var(--ink); }
.du-stylepop .sp-b { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.du-stylepop .sp-row { display: flex; gap: 8px; align-items: center; }
.du-stylepop .sp-big { flex: 1; padding: 10px 0; font-size: 13px; font-weight: 700; border: 1.5px solid var(--ink); }
.du-stylepop .sp-sm { padding: 9px 11px; font-size: 11.5px; }
.du-stylepop .sp-lab { width: 56px; flex: none; font-size: 10.5px; color: var(--sub); }
.du-stylepop .sp-lab2 { font-size: 10.5px; color: var(--sub); margin-bottom: 5px; }
.du-stylepop .sp-seg { display: flex; gap: 4px; }
.du-stylepop .sp-seg button, .du-stylepop .sp-themes button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 11px; color: var(--ink); cursor: pointer; }
.du-stylepop .sp-seg button.on, .du-stylepop .sp-themes button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.du-stylepop .sp-chk { font-size: 11.5px; cursor: pointer; }
.du-stylepop .sp-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.du-stylepop .sp-chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 2px 9px 2px 2px; font-size: 11px; cursor: pointer; }
.du-stylepop .sp-chip img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; background: #eee; }
.du-stylepop .sp-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.du-stylepop .sp-note { margin: 0; font-size: 10.5px; color: var(--sub); background: var(--paper); border-radius: 7px; padding: 7px 9px; }
.du-stylepop .sp-themes { display: flex; flex-wrap: wrap; gap: 5px; }
.du-stylepop .sp-props { display: flex; flex-direction: column; gap: 8px; }
.du-stylepop .sp-prop { display: flex; gap: 9px; align-items: center; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px; cursor: pointer; }
.du-stylepop .sp-prop:hover { border-color: var(--ink); }
.du-stylepop .sp-prop.on { border: 2px solid var(--chalk); box-shadow: 0 0 0 3px rgba(242,201,76,.3); background: #fffdf3; padding: 7px; }
.du-stylepop .sp-prop .th { display: flex; gap: 3px; flex: none; }
.du-stylepop .sp-prop .th img { width: 34px; height: 46px; object-fit: cover; border-radius: 4px; background: #eee; }
.du-stylepop .sp-prop .pt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.du-stylepop .sp-prop b { font-size: 12px; }
.du-stylepop .sp-prop .cm { font-size: 10.5px; color: #666; line-height: 1.4; }
.du-stylepop .sp-prop .need { align-self: flex-start; font-size: 10px; color: #fff; background: var(--paid); border-radius: 4px; padding: 1px 6px; margin-top: 2px; }
.du-stylepop .sp-prop .free { align-self: flex-start; font-size: 10px; color: #555; border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; margin-top: 2px; }
.du-oi .du-lockb { position: absolute; right: 5px; bottom: 26px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #fff; }
body:not(.du-styling) .du-oi .du-lockb { display: none; }
.du-oi { position: relative; }
.du-look .lk-items { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.du-look .lk-items span { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px 1px 2px; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.du-look .lk-items img { width: 14px; height: 14px; border-radius: 50%; object-fit: cover; flex: none; }
.du-lookview { width: min(1000px, 94vw); height: min(86vh, 860px); padding: 0; }
.du-lookview .lv { display: grid; grid-template-columns: 1fr 340px; height: 100%; }
.du-lookview .lv-pic { background: #e9e9e6; position: relative; min-height: 0; }
.du-lookview .lv-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.du-lookview .lv-side { display: flex; flex-direction: column; padding: 18px 18px 14px; min-height: 0; }
.du-lookview .lv-side h3 { margin: 0; font-size: 18px; }
.du-lookview .lv-side .sub { margin: 2px 0 10px; }
.du-lookview .lv-items { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.du-lookview .lv-it { display: flex; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.du-lookview .lv-it .th { width: 70px; height: 92px; flex: none; background: #f1f1ef; border-radius: 6px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.du-lookview .lv-it .th img { width: 100%; height: 100%; object-fit: contain; }
.du-lookview .lv-it .tx { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: #555; min-width: 0; }
.du-lookview .lv-it .tx b { font-size: 13px; color: var(--ink); }
.du-lookview .lv-it .kd { font-size: 10px; color: var(--sub); }
.du-lookview .lv-it .cl { display: inline-flex; align-items: center; gap: 5px; }
.du-lookview .lv-it .cl i { width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(0,0,0,.15); }
.du-lookview .lv-it .link { align-self: flex-start; font-size: 11px; margin-top: 3px; }
.du-lookview .lv-it .gone { font-size: 10.5px; color: var(--sub); }
.du-lookview .lv-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 10px; }
.du-lu .lu-cell.du-flash { box-shadow: 0 0 0 3px var(--chalk), 0 0 14px rgba(242,201,76,.8); transition: box-shadow .3s; }
dialog#duLookViewDlg.du-lookview { width: min(1000px, 94vw) !important; max-width: none !important; height: min(86vh, 860px) !important; max-height: none !important; padding: 0 !important; overflow: hidden; }
.du-stylepop .sp-big { justify-content: center; text-align: center; }

/* v0.1.51：ボタンを「組む・残す（上）／アイテム（操作台）／仕上げる（下）」に整理 */
.du-style .du-h .du-h-acts .du-stylebtn { padding: 5px 11px; font-size: 11.5px; }
.du-op { height: 214px !important; }
.du-op .op-h .op-mask { margin-left: auto; padding: 4px 10px; font-size: 11.5px; }
.du-op .op-h .op-wand { margin-left: 6px; flex: none; padding: 4px 10px; font-size: 11.5px; }
.du-op .op-color .op-ver { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 2px 8px; font-size: 10px; color: var(--ink); cursor: pointer; white-space: nowrap; }
.du-op .op-color .op-ver:hover { border-color: var(--ink); }
.du-foot #duExport { flex: none; padding: 8px 12px; font-size: 12px; }
.du-foot { flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }
.du-foot .du-note { flex: 1 1 100%; font-size: 10px; line-height: 1.45; }

/* ================= v0.1.51：Dress up は Line up の左の引き出し ================= */
#view-lineup:not([hidden]) { display: flex; align-items: flex-start; gap: 0; position: relative; }
#view-lineup .lu-main { flex: 1; min-width: 0; }
.lu-drawer { flex: none; width: 0; overflow: hidden; position: sticky; top: 12px; align-self: flex-start;
  transition: width .5s cubic-bezier(.22,.9,.24,1); }
.lu-drawer:not(.shown) .lu-drawer-in { visibility: hidden; }
.lu-drawer-in { width: max-content; padding-right: 16px; }
.lu-drawer.shown { box-shadow: 10px 0 18px -14px rgba(0,0,0,.35); margin-right: 14px; }
.lu-drawer .du-lu, .lu-drawer .du-split[data-sp="1"] ~ .du-lu { display: none !important; }
.lu-drawer .du { gap: 10px; }
.lu-drawer .du-bar { margin-bottom: 8px; }
.lu-dtab { position: absolute; left: -26px; top: 56px; z-index: 6; writing-mode: vertical-rl; background: var(--mat); color: var(--on-mat, #fff); border: 0;
  border-radius: 0 9px 9px 0; padding: 14px 6px; font-size: 11px; font-weight: 600; letter-spacing: .14em; cursor: pointer;
  box-shadow: 2px 2px 8px rgba(0,0,0,.18); transition: transform .2s; }
.lu-dtab:hover { transform: translateX(3px); }
#view-lineup.du-tabin .lu-dtab { position: sticky; left: auto; top: 56px; align-self: flex-start; margin-top: 56px; margin-left: -14px; margin-right: 6px; }
/* 開いているときは Line up を小さく */
#view-lineup.du-open .lu-cell { width: 104px; cursor: pointer; }
#view-lineup.du-open .lu-cell .pic { height: 118px; }
/* 開閉で Line up の高さが変わらないように、ツールバーは折り返さず横にスクロール（v0.1.52） */
#view-lineup .lu-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
#view-lineup .lu-bar::-webkit-scrollbar { display: none; }
#view-lineup .lu-bar > * { flex-shrink: 0; }
#view-lineup.du-open .lu-cells { gap: 8px; }
.lu-cell .lu-info, .lu-cell .du-badge { display: none; }
#view-lineup.du-open .lu-cell .lu-info { display: flex; position: absolute; right: 4px; top: 4px; width: 20px; height: 20px; border-radius: 50%; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: #fff; font: italic 700 11px/1 Georgia, serif; color: var(--ink); cursor: pointer; z-index: 2; padding: 0; }
#view-lineup.du-open .lu-cell .lu-info:hover { border-color: var(--ink); }
#view-lineup.du-open .lu-cell .rm { display: none; }
#view-lineup.du-open .lu-cell.du-on { border: 2px solid var(--ink); }
#view-lineup.du-open .lu-cell.du-on .du-badge { display: block; position: absolute; left: 4px; top: 4px; background: var(--ink); color: #fff; font-size: 9.5px; border-radius: 4px; padding: 1px 5px; z-index: 2; }
#luRows .lu-cell.du-flash { box-shadow: 0 0 0 3px var(--chalk), 0 0 14px rgba(242,201,76,.8); }

#flow button[data-view="dressup"] { display: none !important; }

/* ================= v0.1.53：ラフ絵を描く ================= */
.dp-dlg { width: min(1240px, 96vw); height: min(92vh, 900px); max-width: none; max-height: none; padding: 0; border: 0; border-radius: 14px; overflow: hidden;
  display: none; grid-template-columns: 76px 1fr 270px; grid-template-rows: 54px 1fr; }
.dp-dlg[open] { display: grid; }
.dp-dlg::backdrop { background: rgba(20,22,26,.5); }
.dp-top { grid-column: 1 / 4; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.dp-top h3 { margin: 0; font-size: 15px; }
.dp-top .dp-it { color: var(--sub); font-size: 12px; margin-left: 4px; }
.dp-top .dp-sp { flex: 1; }
.dp-top .btn { padding: 6px 12px; font-size: 12px; }
.dp-tools { border-right: 1px solid var(--line); background: #fafafa; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; overflow-y: auto; }
.dp-tl { width: 62px; border: 0; background: none; border-radius: 10px; padding: 7px 0 5px; font-size: 9.5px; line-height: 1.25; color: #555; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dp-tl:hover { background: #eee; }
.dp-tl.on { background: var(--ink); color: #fff; }
.dp-cv { background: #eceae5; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 14px; }
.dp-paper { position: relative; height: 100%; aspect-ratio: 848 / 1264; max-width: 100%; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.1); touch-action: none; }
.dp-paper > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.dp-under { object-fit: contain; pointer-events: none; filter: grayscale(.3); }
.dp-ink { pointer-events: none; }
.dp-live { touch-action: none; }
.dp-axis { left: 50% !important; width: 0 !important; border-left: 1px dashed rgba(192,57,43,.7); pointer-events: none; }
.dp-axis[hidden] { display: none; }
.dp-side { border-left: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; font-size: 12px; }
.dp-side h4 { margin: 0 0 7px; font-size: 11px; color: var(--sub); font-weight: 500; }
.dp-tog { display: flex; align-items: center; justify-content: space-between; border: 1.5px solid var(--ink); border-radius: 10px; padding: 9px 11px; font-weight: 700; cursor: pointer; }
.dp-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; cursor: pointer; }
.dp-side input[type=range] { width: 100%; accent-color: var(--ink); }
.dp-lab { font-size: 10.5px; color: var(--sub); margin-top: 8px; }
.dp-seg { display: flex; flex-wrap: wrap; gap: 5px; }
.dp-seg button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 11px; font-size: 11px; cursor: pointer; }
.dp-seg button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.dp-cols { display: flex; gap: 7px; align-items: center; }
.dp-cols button { width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); cursor: pointer; padding: 0; }
.dp-cols button.on { outline: 2px solid var(--ink); outline-offset: 2px; }
.dp-cols input[type=color] { width: 28px; height: 28px; border: 0; padding: 0; background: none; cursor: pointer; }
.dp-st { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.dp-st button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 4px 2px; cursor: pointer; display: flex; flex-direction: column; align-items: center; font-size: 9px; color: #555; line-height: 1.2; }
.dp-st button canvas { width: 32px; height: 32px; }
.dp-st button.on { border: 2px solid var(--ink); padding: 3px 1px; }
.dp-stamps[hidden] { display: none; }
.dp-note { margin: auto 0 0; font-size: 10.5px; color: var(--sub); background: var(--paper); border-radius: 8px; padding: 8px 10px; }
.slot-stage .dp-open, .dp-open { margin-top: 8px; }
.lu-cell .lu-pen { position: absolute; left: 4px; top: 4px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 12px; line-height: 1; cursor: pointer; z-index: 2; padding: 0; display: flex; align-items: center; justify-content: center; }
.lu-cell .lu-pen:hover { border-color: var(--ink); }
#view-lineup.du-open .lu-cell .lu-pen { top: 26px; }
.dp-refbox[hidden], .dp-refbtn[hidden] { display: none; }
.dp-refthumb { width: 100%; height: 150px; border: 1px solid var(--line); border-radius: 8px; background: #f4f4f2; padding: 4px; cursor: zoom-in; }
.dp-refthumb img { width: 100%; height: 100%; object-fit: contain; }
.dp-cv { position: relative; }
.dp-refbig { position: absolute; inset: 14px; z-index: 5; background: rgba(255,255,255,.97); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.dp-refbig[hidden] { display: none; }
.dp-refbig img { flex: 1; min-height: 0; max-width: 100%; object-fit: contain; }
.dp-under.photo { filter: none; }
.dp-uopbox[hidden] { display: none; }
/* v0.1.55：引き出しはゆっくり。Line up のカードも一緒にゆっくり縮む */
.lu-drawer { transition: width .7s cubic-bezier(.33,0,.15,1) !important; }
#view-lineup .lu-cell { transition: width .7s cubic-bezier(.33,0,.15,1); }
#view-lineup .lu-cell .pic { transition: height .7s cubic-bezier(.33,0,.15,1); }
.dp-lockref .dp-side > div:has(> .dp-seg) { display: none; }
.dp-lockref .dp-refbox { display: none; }
/* 左の欄の開閉もなめらかに（v0.1.56） */
.app { transition: grid-template-columns .6s cubic-bezier(.33,0,.15,1); }
.dp-acts { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

/* v0.1.57：色は Line up の色窓で選ぶ（引き出しが開いているとき） */
#view-lineup.du-open .lu-cell .wins i { cursor: pointer; width: 13px; height: 13px; position: relative; }
#view-lineup.du-open .lu-cell .wins i:not(.made) { outline: 1px dashed #9aa1ab; outline-offset: 1px; }
#view-lineup.du-open .lu-cell .wins i.cur { outline: 2px solid var(--ink); outline-offset: 1px; }
#view-lineup.du-open .lu-cell .wins i:hover { transform: scale(1.15); }
.du-op .op-color .op-cnote { flex: 1; }

/* v0.1.58：アイテムの削除は右下の列の左端に（右上は閉じる） */
.slot-actions .slot-del { background: #fff; border-color: rgba(138, 42, 42, .35); font-size: 12px; }
.slot-actions .slot-del:hover { border-color: var(--danger); background: #fbf3f3; }
/* v0.1.58：描く窓 — 線の太さの見本・スタンプ常時表示・テキスト指示欄 */
.dp-prevbox { height: 46px; border: 1px solid var(--line); border-radius: 8px; background: #fff; margin-bottom: 6px; }
.dp-prevbox.dark { background: #8a8f96; }
.dp-prev { display: block; width: 100%; height: 100%; }
.dp-sval, .dp-sub { font-weight: 400; color: var(--sub); font-size: 10px; margin-left: 4px; }
.dp-stamps.off .dp-st button.on { border: 1px solid var(--line); padding: 4px 2px; }
.dp-ask[hidden] { display: none; }
.dp-ask textarea { width: 100%; box-sizing: border-box; resize: vertical; font: inherit; font-size: 12.5px; line-height: 1.6; border: 1.5px solid var(--ink); border-radius: 8px; padding: 8px 10px; }
.dp-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.dp-chips button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 11px; cursor: pointer; color: var(--ink); }
.dp-chips button:hover { border-color: var(--ink); }

/* ================= v0.1.59 ================= */
/* Line up のタブ：最新｜画像・ラフ・FIX｜資料 …… ラインシート（右端） */
.lu-filetabs button.apart-s { margin-left: 16px; }
.lu-filetabs button.lu-right { margin-left: auto; margin-right: 6px; }
/* STYLE IMAGE の欄：中でスクロールしない・画像と操作台は真ん中 */
.du-stagebox { overflow-y: auto; align-items: center; }
.du-stagebox[hidden] { display: none; }
.du-stagebox > .du-facesrow { align-self: stretch; }
.du-op { height: 258px !important; }
.du-stagebox > .du-op, .du-stagebox > .du-foot, .du-stagebox > .du-temp, .du-stagebox > .du-stage { align-self: center; }
/* STYLE IMAGE｜LOOKS のタブ（Line up のタブと同じ形） */
.du-h.du-h-tabs { padding: 0 10px 0 6px; align-items: flex-end; height: 44px; flex-wrap: nowrap; }
.du-stabs { display: flex; align-self: flex-end; }
.du-stabs button { position: relative; margin-right: -8px; padding: 7px 16px 7px; border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0;
  background: var(--tab-back, #e6e7ea); color: var(--sub); cursor: pointer; display: inline-flex; align-items: baseline; gap: 6px; font-size: 11px;
  box-shadow: inset 0 -6px 8px -8px rgba(28, 31, 36, .25); white-space: nowrap; }
.du-stabs button b { font-size: 12.5px; letter-spacing: .04em; }
.du-stabs button:first-child { z-index: 2; }
.du-stabs button[aria-selected=true] { z-index: 3; background: var(--sheet); color: var(--ink); margin-bottom: -1px; padding-bottom: 8px; box-shadow: none; }
.du-style .du-h.du-h-tabs .du-h-acts { align-self: center; flex-wrap: nowrap; }
.du-style .du-h .du-h-acts .btn[hidden] { display: none; }
.du-lookspane { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px; }
.du-lookspane[hidden] { display: none; }
.du-lookspane .du-lookshint { margin: 0 0 8px; font-size: 11px; }
.du-lookspane .du-looks { min-width: 0; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.du-look .lk-wear { flex: none; padding: 2px 10px; font-size: 11px; }
/* 操作台のいちばん下：ラフにする／ラフで着せ直す／やり直し */
.du-op .op-foot2 { justify-content: center; gap: 6px; flex-wrap: wrap; padding: 7px 8px; }
.du-op .op-foot2 .op-sm { padding: 5px 12px; font-size: 11.5px; }
.du-op .op-new { position: relative; }
.du-op .op-dot { position: absolute; top: -4px; right: -4px; width: 9px; height: 9px; border-radius: 50%; background: #d9433a; border: 2px solid #fff; }
.du-op .op-newnote { margin: 0; padding: 4px 10px; font-size: 10.5px; color: #8a5a12; background: #fdf6e7; border-bottom: 1px solid var(--line); }
/* 切り替えのヌルッとスライド（slide.js） */
.has-slide { position: relative; isolation: isolate; }
.has-slide > .slide-pill { position: absolute; left: 0; top: 0; z-index: 0; background: var(--ink); pointer-events: none; opacity: 0;
  transition: transform .42s cubic-bezier(.22, .9, .24, 1), width .42s cubic-bezier(.22, .9, .24, 1), height .42s cubic-bezier(.22, .9, .24, 1), border-radius .42s, opacity .2s; }
.has-slide > .slide-pill.no-anim { transition: none; }
.has-slide button { position: relative; z-index: 1; transition: color .32s ease, border-color .32s ease; }
.has-slide button[aria-current=true], .has-slide button[aria-selected=true] { background: transparent !important; border-color: transparent !important; }
.du-seg.has-slide { background: var(--sheet); }
.du-seg.has-slide button { background: transparent; }
/* 画面の切り替えは、ふわっと出る */
@keyframes pnViewIn { from { opacity: 0; } to { opacity: 1; } }
.main > .view:not([hidden]) { animation: pnViewIn .32s ease both; }
/* 描く窓の拡大・縮小 */
.dp-cv { overflow: hidden; }
.dp-paper { transform-origin: 0 0; will-change: transform; }
.dp-cv.grab .dp-live, .dp-cv.grab { cursor: grab !important; }
.dp-cv.panning .dp-live, .dp-cv.panning { cursor: grabbing !important; }
.dp-zoom { position: absolute; right: 14px; bottom: 14px; z-index: 4; display: flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.12); overflow: hidden; }
.dp-zoom button { border: 0; background: none; padding: 5px 10px; font-size: 13px; cursor: pointer; color: var(--ink); }
.dp-zoom button:hover { background: var(--paper); }
.dp-zoom .dp-zv { font-size: 11px; min-width: 48px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }

/* ================= v0.1.60 ================= */
/* STYLE IMAGE｜LOOKS のタブは欄の上（WOMEN/MEN と同じ段＝Line up のタブと同じ高さ）に、フォルダ型で */
.du-style { position: relative; }
.du-style > .du-stabs { position: absolute; left: 10px; bottom: 100%; display: flex; z-index: 2; }
.du-style > .du-stabs button { position: relative; margin-right: -10px; padding: 9px 22px 8px; border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0;
  background: var(--tab-back); color: var(--sub); font-size: 14px; cursor: pointer; display: inline-flex; align-items: baseline; gap: 7px; white-space: nowrap;
  box-shadow: inset 0 -6px 8px -8px rgba(28, 31, 36, .25); }
.du-style > .du-stabs button .en { letter-spacing: .04em; }
.du-style > .du-stabs button small { font-size: 11px; color: var(--sub); }
.du-style > .du-stabs button:first-child { z-index: 2; }
.du-style > .du-stabs button[aria-selected=true] { z-index: 3; background: var(--sheet); color: var(--ink); font-weight: 600; margin-bottom: -1px; padding-bottom: 9px; box-shadow: none; }
.lu-drawer .du-bar { margin-bottom: 10px; min-height: 38px; }
.lu-drawer .du-style { border-top-left-radius: 0; }
/* 欄の上の段：顔＋スタイリング提案 */
.du-style .du-h.du-h-tabs { padding: 0 10px; align-items: center; gap: 8px; }
.du-style .du-h .du-facesrow { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.du-style .du-h .du-faces { flex-wrap: nowrap; }
.du-style .du-h .du-h-acts { flex: none; }
/* 画像の上に浮かぶ「＋コーデ保存」、ウォーターマークは右下 */
.du-savefloat { position: absolute; top: 10px; right: 10px; z-index: 960; border: 1px solid rgba(0,0,0,.08); background: rgba(255,255,255,.94); border-radius: 999px;
  padding: 6px 13px; font-size: 11.5px; font-weight: 600; color: var(--ink); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.14); pointer-events: auto; }
.du-savefloat:hover { background: #fff; box-shadow: 0 3px 12px rgba(0,0,0,.2); }
.du-savefloat[hidden] { display: none; }
.du-wm { top: auto; bottom: 10px; right: 12px; }
/* 画像と操作台のあいだの区切り（上下にドラッグ） */
.du-vsplit { align-self: stretch; height: 12px; margin: -4px 0; cursor: ns-resize; display: grid; place-items: center; flex: none; touch-action: none; }
.du-vsplit i { width: 44px; height: 4px; border-radius: 2px; background: #c9cbcf; transition: background .15s, width .15s; }
.du-vsplit:hover i, .du-vsplit.on i { background: var(--ink); width: 64px; }
/* 操作台と下の段は欄の横幅いっぱい */
.du-stagebox > .du-op, .du-stagebox > .du-foot { align-self: stretch !important; width: auto !important; }
.du-stagebox { padding: 10px 12px; }
/* 操作台：上の段は アイテム名＋マスク編集、下の段は ラフに追加 …… アレンジ・やり直し */
.du-op .op-h .op-mask2 { margin-left: auto; flex: none; padding: 4px 11px; font-size: 11.5px; background: #fff; }
.du-op .op-foot2 { justify-content: flex-start; }
.du-op .op-foot2 .op-sp { flex: 1; }
.du-op .op-foot2 .op-wand { display: inline-flex; align-items: center; gap: 4px; margin-left: 0; }
/* Line up：カラーチップをひとまわり大きく（押しやすく） */
.lu-cell .flds .fv.wins { gap: 4px; }
.lu-cell .flds .fv.wins i { width: 17px; height: 17px; border-radius: 3px; }
/* Line up：Dress up を開いているとき（画像の高さ 118px）も、左の項目名とカードの行の高さをそろえる */
#view-lineup.du-open .lu-flabels { top: calc(12px + 1px + 118px); }
#view-lineup.du-open .lu-rowhead { min-height: calc(12px + 1px + 118px + var(--frows, 0) * 24px + 14px); }
/* 着用中の太枠で中身が1px ずれないように、枠は外側に重ねる */
#view-lineup.du-open .lu-cell.du-on { border: 1px solid var(--ink); box-shadow: 0 0 0 1px var(--ink); }
/* 段に画像をドラッグしているとき */
.lu-row.ext-over { box-shadow: 0 0 0 2px var(--mat), 0 0 16px rgba(46, 107, 62, .25); border-radius: 10px; }
.lu-row.ext-over .lu-cells { background: rgba(46, 107, 62, .05); }
.lu-brand input { width: 64px; text-transform: uppercase; }
.lu-brand.need input { border-color: var(--mat); box-shadow: 0 0 0 3px rgba(46, 107, 62, .25); }
/* ================= v0.1.60：固定ヘッダー（ボード名・つなぐ・ステップ）／ペルソナの丸は左下 ================= */
.main { padding-top: 0; }
.top { position: sticky; top: 0; z-index: 40; display: flex !important; align-items: center; flex-wrap: wrap; gap: 8px 14px;
  margin: 0 -28px 12px; padding: 14px 28px 12px 74px !important; background: var(--paper); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.top.stuck { border-bottom-color: var(--line); box-shadow: 0 6px 14px -12px rgba(0, 0, 0, .35); }
.top .rail-toggle { left: 28px; top: 50%; transform: translateY(-50%); }
.top .board-meta { display: none !important; }
.top .link-band { order: 10; flex-basis: 100%; }
.top > .page-back { order: -1; }
/* ステップは横並び。選ばれているところの黒い札はヌルッとスライド */
.top > .flow { display: flex; flex-direction: row; align-items: center; gap: 2px; padding: 4px; margin-left: 10px; border-radius: 999px; flex-wrap: nowrap; }
.top > .flow .flow-h { display: none; }
.top > .flow button { padding: 5px 14px; font-size: 14px; white-space: nowrap; }
.top > .flow button i { width: 6px; height: 6px; }
.top > .flow button.sub, body.room-mood .top > .flow button.mm { margin-left: 0; padding: 4px 11px; border-radius: 999px; border-left: 0; font-size: 11.5px; letter-spacing: .06em; }
.top > .flow button.sub:first-of-type { margin-left: 0; }
.top > .flow button.mm-grp + button.sub { position: relative; margin-left: 6px; }
.top > .flow button.mm-grp + button.sub::before { content: ""; position: absolute; left: -4px; top: 6px; bottom: 6px; border-left: 1px solid var(--line); }
/* 欄をたたんだら、左の欄はまるごと隠す（ステップはヘッダーにあるので） */
.app.rail-off { grid-template-columns: 0 1fr !important; }
.app.rail-off .rail { visibility: hidden !important; padding: 0 !important; border: 0 !important; overflow: hidden !important; }
/* ペルソナの丸は左の欄のいちばん下、「使い方」の横 */
.rail-foot { display: flex !important; align-items: center; gap: 10px; }
.rail-foot .account { position: static !important; top: auto !important; right: auto !important; z-index: auto; }
.rail-foot .acct { width: 36px; height: 36px; }
.rail-foot .acct .avatar.acct-av { font-size: 14px; }
.rail-foot .acct-menu { top: auto; bottom: calc(100% + 6px); left: 0; right: auto; }
/* Dress up の引き出しは固定ヘッダーの下で止まる */
.lu-drawer { top: calc(var(--top-h, 60px) / .88 + 8px) !important; }
/* 情報の項目の窓（v0.1.60） */
.fx-dlg { width: min(520px, 94vw); }
.fx h2 { margin: 0; font-size: 17px; }
.fx > .sub { margin: 6px 0 14px; font-size: 12px; }
.fx-lab { margin: 12px 0 6px; font-size: 11px; color: var(--sub); }
.fx-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--sheet); }
.fx-row { display: flex; align-items: center; gap: 8px; padding: 0 10px; height: 42px; border-top: 1px solid var(--line); font-size: 13.5px; background: var(--sheet); }
.fx-row:first-child { border-top: 0; }
.fx-row.fixed { background: var(--paper); color: var(--sub); }
.fx-row .fx-h { width: 12px; align-self: stretch; cursor: grab; position: relative; flex: none; }
.fx-row .fx-h::before { content: "⋮⋮"; position: absolute; inset: 0; display: grid; place-items: center; color: #c4c6ca; font-size: 12px; letter-spacing: -3px; }
.fx-row.fixed .fx-h::before { content: none; }
.fx-row .fx-nm { flex: 1; min-width: 0; }
.fx-row input.fx-nm { border: 0; border-bottom: 1.5px solid transparent; background: none; font: inherit; font-size: 13.5px; padding: 3px 2px; color: var(--ink); border-radius: 0; }
.fx-row input.fx-nm:hover { border-bottom-color: var(--line); }
.fx-row input.fx-nm:focus { outline: 0; border-bottom-color: var(--ink); }
.fx-row.off input.fx-nm { color: var(--sub); text-decoration: line-through; }
.fx-row .fx-lock { font-size: 10.5px; color: var(--sub); }
.fx-type { font-size: 11px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; background: #fff; color: var(--ink); cursor: pointer; }
.fx-ic { width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--sub); display: grid; place-items: center; cursor: pointer; flex: none; padding: 0; }
.fx-ic:hover { background: var(--paper); color: var(--ink); }
.fx-ic svg { width: 16px; height: 16px; }
.fx-row.dragging { opacity: .4; }
.fx-row.drop-t { box-shadow: inset 0 2px 0 var(--ink); }
.fx-row.drop-b { box-shadow: inset 0 -2px 0 var(--ink); }
.fx-add { display: flex; align-items: center; gap: 8px; width: 100%; height: 42px; padding: 0 12px; border: 0; border-top: 1px dashed var(--line); background: none; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.fx-list > .fx-add:first-child { border-top: 0; }
.fx-add:hover { background: var(--paper); }
.fx-add small { color: var(--sub); font-size: 11px; }
.fx-new { background: #fffbea; }
.fx-ok { padding: 4px 14px; font-size: 12px; }
.fx-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.fx-chips .t { font-size: 11px; color: var(--sub); }
.fx-chip { font-size: 11.5px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; background: #fff; cursor: pointer; color: var(--ink); }
.fx-chip:hover { border-color: var(--ink); }
.fx-foot { display: flex; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.fx-foot .spacer { flex: 1; }
.fx-close { font-weight: 700; border: 1.5px solid var(--ink); padding: 7px 20px; }
.fx-tpl { position: relative; }
.fx-tpl summary { list-style: none; cursor: pointer; font-size: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; background: #fff; user-select: none; }
.fx-tpl summary::-webkit-details-marker { display: none; }
.fx-tplpop { position: absolute; left: 0; bottom: calc(100% + 6px); width: 300px; background: var(--sheet); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.16); padding: 8px; z-index: 5; }
.fx-tlab { margin: 2px 4px 6px; font-size: 10.5px; color: var(--sub); }
.fx-trow { display: flex; align-items: center; gap: 4px; }
.fx-tload { flex: 1; min-width: 0; display: grid; text-align: left; border: 0; background: none; border-radius: 6px; padding: 6px 8px; cursor: pointer; }
.fx-tload:hover { background: var(--paper); }
.fx-tload b { font-size: 12.5px; }
.fx-tload small { font-size: 10.5px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-tsep { border-top: 1px solid var(--line); margin: 6px 0; }
.fx-tsave { width: 100%; text-align: left; border: 0; background: none; border-radius: 6px; padding: 7px 8px; font-size: 12px; cursor: pointer; color: var(--ink); }
.fx-tsave:hover { background: var(--paper); }
/* 描く窓（v0.1.60）：左右の欄を広く、道具は段ごと、スタンプは左、左右対称は紙の右上 */
.dp-dlg { width: min(1360px, 97vw); grid-template-columns: 214px 1fr 300px; }
.dp-tools { align-items: stretch; padding: 12px 10px; gap: 10px; }
.dp-tg { display: grid; gap: 5px; }
.dp-tgl { font-size: 10.5px; color: var(--sub); padding: 0 2px; }
.dp-tgr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.dp-tools .dp-tl { width: auto; padding: 8px 0 6px; font-size: 9.5px; }
.dp-tsep { border-top: 1px solid var(--line); margin: 2px 0; }
.dp-tools .dp-stamps { display: grid; gap: 5px; }
.dp-tools .dp-st { grid-template-columns: repeat(3, 1fr); gap: 5px; }
.dp-tools .dp-st button { padding: 4px 1px; font-size: 9px; }
.dp-tools .dp-st button canvas { width: 30px; height: 30px; }
.dp-symf { position: absolute; top: 14px; right: 14px; z-index: 4; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); padding: 6px 10px; gap: 10px; font-size: 12px; border-width: 1px; }
.dp-side { padding: 16px; }
.fx-dlg { background: var(--sheet); padding: 0; border-radius: 14px; }
.fx { padding: 22px 24px 18px; }

/* ================= v0.1.61 ================= */
/* ヘッダーのステップ：1本のカプセルをやめて、独立したボタンを間隔をあけて並べる（黒い札はスライド） */
.top > .flow { border: 0; background: none; padding: 0; gap: 8px; margin-left: 14px; }
.top > .flow button { padding: 7px 18px; font-size: 16px; border: 1px solid var(--line) !important; background: var(--sheet); border-radius: 999px; }
.top > .flow button:hover { border-color: var(--ink) !important; background: var(--sheet); }
.top > .flow button[aria-current=true] { border-color: transparent !important; }
.top > .flow button.sub, body.room-mood .top > .flow button.mm { padding: 6px 13px; font-size: 13px; }
.top > .flow button.mm-grp + button.sub { margin-left: 0; }
.top > .flow button.mm-grp + button.sub::before { content: none; }
.top > .flow button.sub { margin-left: -4px; }
/* 右端の「使い方」 */
.top-help { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--sheet); border-radius: 999px; padding: 6px 14px 6px 8px; font-size: 13px; color: var(--ink); cursor: pointer; }
.top-help span { width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--sheet); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.top-help:hover { border-color: var(--ink); }
/* 左下：区切り線の下に、質問ボタンとペルソナの丸を横に並べる */
.rail-foot { gap: 10px; padding-top: 12px; }
.rail-foot .qa-fab { margin: 0; align-self: center; }
.rail-foot .acct { width: 42px; height: 42px; }
/* Line up：Dress up を開いて画像の枠が小さくなっても、画像は枠の中に収める（収まらない分は下を隠す） */
.lu-cell .pic { overflow: hidden; }
#view-lineup.du-open .lu-cell .pic img { max-height: 118px; }
/* Line up：カラーの色窓をさらに大きく（カラーの行は 28px。左の項目名もそろえる） */
.lu-cell .flds .fv.wins { height: 28px; gap: 4px; }
.lu-cell .flds .fv.wins i { width: 20px; height: 20px; border-radius: 4px; }
.lu-flabels div:nth-child(3) { height: 28px; }
.lu-rowhead { min-height: calc(12px + 1px + 150px + var(--frows, 0) * 24px + 4px + 14px); }
#view-lineup.du-open .lu-rowhead { min-height: calc(12px + 1px + 118px + var(--frows, 0) * 24px + 4px + 14px); }
/* v0.1.62：操作台の色窓 */
.du-op .op-color .op-cw { gap: 7px; padding: 3px 3px; }
.du-op .op-color .op-cw i { width: 18px; height: 18px; border-radius: 4px; }
/* v0.1.62：切り抜き（マスク）の微調整：拡大中の移動 */
.du-mask-vp.grab, .du-mask-vp.grab canvas { cursor: grab !important; }
.du-mask-vp.panning, .du-mask-vp.panning canvas { cursor: grabbing !important; }
.du-mask-hint { font-size: 10.5px; color: var(--sub); margin: 4px 0 0; }
.dp-extra[hidden] { display: none; }
.dp-extra { margin-top: auto; }
.dp-extra .btn { width: 100%; padding: 10px 12px; font-size: 13px; font-weight: 700; }
.dp-extra + .dp-note { margin-top: 10px; }

/* ================= v0.1.64：Pick up × Look up を1ページに ================= */
.btn.mat { background: var(--mat); border: 1px solid var(--mat); color: var(--on-mat, #fff); font-weight: 700; }
.btn.mat:hover { background: var(--mat-deep, var(--mat)); }
.btn.mat:disabled { opacity: .45; }
.ck-top { display: flex; gap: 14px; align-items: stretch; margin-bottom: 12px; }
.ck-top .drop { flex: 0 0 50%; padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.ck-top .drop p { margin: 0; flex: 1 1 auto; font-size: 12.5px; }
.ck-top .drop .row { margin: 0; }
.ck-top .drop .progress { flex-basis: 100%; }
.ck-top .lookbar { flex: 1; margin: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--sheet); flex-wrap: nowrap; }
.ck-top .lookbar #runRead { font-size: 15px; padding: 7px 18px; letter-spacing: .04em; }
.ck-top .lookbar #readStatus { flex: 1; font-size: 11.5px; line-height: 1.5; min-width: 0; }
.ck-top .lookbar #runReadAll { flex: none; font-size: 11.5px; padding: 4px 10px; }
.ck-split { display: grid; grid-template-columns: minmax(0, 1fr) 14px var(--lkw, 420px); align-items: start; }
.ck-main { min-width: 0; }
.ck-main .picked { margin: 0 0 8px; padding: 0; border: 0; background: none; }
.ck-main .picked-head { padding: 0; }
.ck-main .toolbar { margin-top: 0; }
.ck-sp { align-self: stretch; position: relative; cursor: col-resize; touch-action: none; }
.ck-sp i { position: sticky; top: 40vh; display: block; margin: 0 auto; width: 4px; height: 64px; border-radius: 2px; background: #c9cbcf; transition: background .15s, height .15s; }
.ck-sp:hover i, .ck-sp.on i { background: var(--ink); height: 90px; }
.lk-panel { position: sticky; top: calc(var(--top-h, 60px) / .88 + 6px); height: calc((100vh - var(--top-h, 60px) - 14px) / .88); overflow: auto; overscroll-behavior: contain;
  background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; container-type: inline-size; }
.lk-panel .lenstabs { position: sticky; top: 0; z-index: 3; display: flex; padding: 0; margin: 0; gap: 0; background: var(--sheet); border-bottom: 1px solid var(--line); }
.lk-panel .lenstabs button { flex: 1; margin: 0; padding: 11px 4px; font-size: 13px; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--sub); letter-spacing: 0; white-space: nowrap; }
.lk-panel .lenstabs button[aria-selected=true] { background: none; color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px var(--ink); padding-bottom: 11px; margin: 0; }
.lk-panel .lenstabs button[data-tab=mood] { color: var(--mat); }
.lk-panel .tabhint { margin: 0; padding: 10px 12px 0; background: none; border: 0; border-radius: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lk-panel .tabhint .tab-actions .btn { font-size: 11px; padding: 3px 9px; }
.lk-panel #tabBody { padding: 8px 12px 20px; background: none; border: 0; border-radius: 0; }
.lk-panel .tabbody { gap: 22px; margin-top: 6px; }
.lk-panel .tabbody h2 { font-size: 14px; margin-bottom: 8px; }
.lk-panel .cols3, .lk-panel .cols4, .lk-panel .cols { display: grid; grid-template-columns: 1fr; gap: 22px; }
.lk-panel .moods { grid-template-columns: 1fr; }
.lk-panel .items { grid-template-columns: 1fr; gap: 18px; }
@container (min-width: 640px) {
  .lk-panel .moods { grid-template-columns: repeat(2, 1fr); }
  .lk-panel .cols3, .lk-panel .cols4 { grid-template-columns: repeat(2, 1fr); }
  .lk-panel .items:not(.one) { grid-template-columns: repeat(2, 1fr); }
}
@container (min-width: 960px) {
  .lk-panel .moods { grid-template-columns: repeat(3, 1fr); }
  .lk-panel .cols3 { grid-template-columns: repeat(3, 1fr); }
  .lk-panel .cols4 { grid-template-columns: repeat(4, 1fr); }
  .lk-panel .items:not(.one) { grid-template-columns: repeat(3, 1fr); }
}
/* アイテムのタブ：カテゴリのチップ・▸ で開く */
.cat-chips-top { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.cat-chips-top .cct { border: 1px solid var(--line); background: var(--sheet); border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer; color: var(--ink); display: inline-flex; align-items: center; gap: 5px; }
.cat-chips-top .cct:hover { border-color: var(--ink); }
.cat-chips-top .cct.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.cat-chips-top .cct-ok { width: 6px; height: 6px; border-radius: 50%; background: var(--mat); }
.cat-chips-top .cct.on .cct-ok { background: #8fd19e; }
.lk-panel .items li { display: grid; grid-template-columns: 16px 1fr; align-items: center; column-gap: 2px; }
.lk-panel .items li > .subline { grid-column: 2; }
.lk-panel .items .it-tw { width: 16px; height: 22px; border: 0; background: none; color: var(--sub); font-size: 10px; cursor: pointer; padding: 0; }
.lk-panel .items .it-tw:hover { color: var(--ink); }
.lk-panel .items li.open { background: var(--paper); border-radius: 8px; padding: 2px 4px 8px 0; margin: 2px 0; }
/* テーマを作成 */
.theme-make { display: grid; justify-items: start; gap: 10px; padding: 14px; border: 1px dashed var(--line); border-radius: 10px; }
.theme-make p { margin: 0; font-size: 12.5px; color: var(--sub); }
.theme-make-btn { padding: 9px 22px; font-size: 14px; border-radius: 999px; }
/* 画像の大きさ：小・中・大 */
.ck-size { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--sheet); margin-right: 6px; }
.ck-size button { border: 0; background: none; padding: 4px 12px; font-size: 12px; cursor: pointer; color: var(--sub); }
.ck-size button[aria-selected=true] { background: var(--ink); color: #fff; }
#view-collect[data-size=s] #collectGrid, #view-collect[data-size=s] .lanes .grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
#view-collect[data-size=m] #collectGrid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
#view-collect[data-size=l] #collectGrid, #view-collect[data-size=l] .lanes .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
#collectGrid[hidden] { display: none; }
/* ヘッダーのカプセルは左右の余白を倍に */
.top > .flow button { padding: 7px 34px; }
.top > .flow button.sub, body.room-mood .top > .flow button.mm { padding: 6px 22px; }
.qa-note .qa-manual { margin-left: 6px; font-size: 12px; }
#ckSize.has-slide button[aria-selected=true] { background: transparent; }
/* 手より前に出した服（z 1000〜）より、ウォーターマークとコーデ保存は上に */
.du-stage > .du-wm { z-index: 2900; }
.du-stage > .du-savefloat { z-index: 3000; }

/* ================= v0.1.65 ================= */
/* テーマのタブ：文字だけのカード */
.th-sec { display: grid; gap: 8px; }
.th-sec h2 .cnt { display: inline-block; background: var(--chalk, #f2c94c); color: var(--ink); border-radius: 999px; padding: 0 8px; font-size: 10.5px; vertical-align: 2px; }
.tc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@container (min-width: 640px) { .tc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tc-list { display: grid; gap: 8px; }
.tc { position: relative; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--sheet); }
.tc.star { background: #fffdf3; padding-right: 30px; }
.tc.cand { padding-right: 56px; }
.tc.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.tc-main { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 0; cursor: pointer; color: var(--ink); font: inherit; }
.tc-main b { font-size: 12.5px; line-height: 1.45; margin-right: 6px; }
.tc.cand .tc-main b { font-size: 13px; }
.tc-main small { font-size: 10.5px; color: var(--sub); white-space: nowrap; }
.tc.star .tc-main small { display: block; margin-top: 2px; }
.tc-main:hover b { text-decoration: underline; text-underline-offset: 3px; }
.tc-acts { position: absolute; top: 6px; right: 6px; display: flex; align-items: center; gap: 2px; }
.tc-acts button { border: 0; background: none; cursor: pointer; padding: 2px 4px; line-height: 1; color: var(--sub); }
.tc-star { font-size: 16px; }
.tc-star.on { color: #e0a800; }
.tc-x { font-size: 14px; opacity: .7; }
.tc-x:hover, .tc-star:hover { color: var(--ink); opacity: 1; }
.tc-edit { font-size: 10.5px; text-decoration: underline; }
.tc-tw { display: block; border: 0; background: none; padding: 4px 0 0; font-size: 10.5px; color: var(--sub); cursor: pointer; }
.tc p { margin: 5px 0 0; font-size: 11.5px; color: #555; line-height: 1.6; }
body.room-mood .tc p { color: var(--sub); }
.tc p.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tc-add, .tc-more { justify-self: start; border: 1px dashed var(--line); background: none; border-radius: 999px; padding: 6px 14px; font-size: 12px; color: var(--ink); cursor: pointer; }
.tc-more { justify-self: stretch; text-align: center; border-radius: 10px; }
.tc-add.over { border-color: var(--mat); background: var(--mat-pale); }
body.room-mood .tc.star { background: var(--sheet); }
/* アイテムのタブ：カテゴリのたたみ・MAP は見出しの右の白いボタン */
.lk-panel .cat-wrap { position: relative; }
.lk-panel .cat-head { display: flex; align-items: center; gap: 4px; }
.lk-panel .cat-head .catbtn { flex: 1; text-align: left; }
.lk-panel .cat-tw { border: 0; background: none; cursor: pointer; color: var(--sub); font-size: 11px; width: 18px; padding: 0; }
.lk-panel .cat-tw:hover { color: var(--ink); }
.lk-panel .cat-head .im-pill { position: static; margin: 0; flex: none; background: var(--sheet) !important; color: var(--ink) !important; border: 1px solid var(--line) !important; border-radius: 999px; padding: 3px 11px; font-size: 10.5px; }
.lk-panel .cat-head .im-pill:hover { border-color: var(--ink) !important; }
.lk-panel .cat-head .im-pill.done { border-color: var(--ink) !important; }
.lk-panel .cat-wrap.shut .cat-card { padding-bottom: 6px; }
/* ヘッダーのステップ：画面のまん中に、点はなし、少し低く */
.top { padding-top: 10px !important; padding-bottom: 9px !important; min-height: 54px; }
.top > .flow { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; }
.top > .flow button { padding-top: 5px; padding-bottom: 5px; }
.top > .flow button i { display: none !important; }

/* ================= v0.1.65：ページ全体はスクロールしない（中の表だけスクロール） ================= */
html, body { height: 100%; overflow: hidden; }
.app { height: 100vh; min-height: 0; }
.main { height: 100vh; overflow: hidden; display: flex; flex-direction: column; padding-bottom: 0 !important; }
.main > .top { position: relative !important; flex: none; }
.main > .busybar { flex: none; }
#view-collect, #view-read, #view-lineup, #view-me, #view-settings, #view-category, #view-search, #view-makeup, #view-itemmap { zoom: .88; }
.main > .view:not([hidden]) { flex: none; height: calc((100vh - var(--top-h, 60px)) / .88); overflow: auto; overscroll-behavior: contain; padding-bottom: 14px; box-sizing: border-box; }
.to-top { display: none !important; }
/* Look up：上の段は固定、画像の一覧と右の欄がそれぞれ中でスクロール */
.main > #view-collect:not([hidden]) { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 12px; }
#view-collect .ck-top, #view-collect > .progress { flex: none; }
#view-collect .ck-split { flex: 1; min-height: 0; align-items: stretch; }
#view-collect .ck-main { overflow: auto; min-height: 0; padding-right: 4px; }
#view-collect .ck-main .toolbar { position: sticky; top: 0; z-index: 4; background: var(--paper); padding: 4px 0 8px; margin: 0; }
#view-collect .lk-panel { position: relative; top: auto; height: auto; min-height: 0; }
#view-collect .ck-sp i { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
/* Line up：タブと上の段は固定、段の並び（表）だけスクロール。Dress up の引き出しは高さいっぱい */
.main > #view-lineup:not([hidden]) { overflow: hidden; padding-bottom: 12px; align-items: stretch; }
#view-lineup .lu-main { display: flex; flex-direction: column; min-height: 0; height: 100%; }
#view-lineup .lu-filetabs { flex: none; }
#view-lineup .lu-sheet { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#view-lineup .lu-sheet > .lu-bar, #view-lineup .lu-sheet > .lu-hint { flex: none; }
#view-lineup #luRows { flex: 1; min-height: 0; overflow: auto; }
#view-lineup .lu-drawer { position: relative; top: auto !important; align-self: stretch; }
/* Make map／アイテムMAP：左の欄と、MAP の面がそれぞれ中でスクロール */
.main > #view-makeup:not([hidden]), .main > #view-itemmap:not([hidden]) { overflow: hidden; padding-bottom: 12px; }
#view-makeup .mu, #view-itemmap .im { height: 100%; align-items: stretch; min-height: 0; }
#view-makeup .mu-side { position: relative; top: auto; max-height: none; height: 100%; display: flex; flex-direction: column; padding: 0; gap: 0; overflow: hidden; }
#view-makeup .mu-side-sc { flex: 1; min-height: 0; overflow: auto; padding: 14px; display: grid; gap: 16px; align-content: start; }
#view-makeup .mu-make-wrap { flex: none; padding: 12px 14px; border-top: 1px solid var(--line); margin: 0; position: static; background: var(--sheet); }
#view-makeup .mu-make-wrap #muMake { width: 100%; background: var(--ink); color: var(--sheet); border-color: var(--ink); padding: 11px 0; font-size: 14px; font-weight: 700; }
#view-makeup .mu-main { display: flex; flex-direction: column; min-height: 0; gap: 8px; }
#view-makeup .mu-tools { flex: none; margin: 0; gap: 8px; }
#view-makeup .mu-stage { flex: 1; min-height: 0; overflow: auto; }
#view-itemmap .im-side { position: relative; top: auto; max-height: none; height: 100%; overflow: auto; }
#view-itemmap .im-main { display: flex; flex-direction: column; min-height: 0; }
#view-itemmap .im-tools { flex: none; }
#view-itemmap .im-stage { flex: 1; min-height: 0; overflow: auto; }
#view-itemmap .im-side .im-make { width: 100%; background: var(--ink); color: var(--sheet); border-color: var(--ink); padding: 10px 0; font-weight: 700; }
/* Make map の左の欄：見出しは小さく、テーマは文字とチェックだけ */
#view-makeup .mu-group { display: grid; gap: 6px; }
#view-makeup .mu-lab { font-size: 11px; color: var(--sub); font-weight: 500; }
#view-makeup .mu-look .mu-adj { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
#view-makeup .mu-look .mu-adj-font .seg { flex: 1; }
#view-makeup .mu-lab2 { font-size: 11.5px; color: var(--sub); width: 28px; }
#view-makeup .mu-moods { grid-template-columns: 1fr; gap: 0; }
#view-makeup .mu-mood { display: flex; align-items: center; gap: 8px; padding: 7px 4px 7px 30px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; min-height: 0; }
#view-makeup .mu-mood::before { content: ""; position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; border: 1.5px solid #c3c6cb; border-radius: 4px; background: var(--sheet); }
#view-makeup .mu-mood.on::before { background: var(--ink); border-color: var(--ink); }
#view-makeup .mu-mood.on::after { content: "✓"; position: absolute; left: 9px; top: 50%; transform: translateY(-52%); color: var(--sheet); font-size: 10px; }
#view-makeup .mu-mood .th, #view-makeup .mu-mood p, #view-makeup .mu-mood .ck { display: none !important; }
#view-makeup .mu-mood b { flex: 1; font-size: 12.5px; padding: 0; }
#view-makeup .mu-mood .n { font-size: 10.5px; padding: 0; white-space: nowrap; }
#view-makeup .mu-mood .st { position: static; order: 3; }
#view-makeup .mu-mood.cand b { color: var(--sub); }
#view-makeup .mu-mood.mu-add { padding-left: 4px; border-bottom: 0; }
#view-makeup .mu-mood.mu-add::before, #view-makeup .mu-mood.mu-add::after { content: none; }
#view-makeup .mu-mood.mu-add .plus { font-size: 13px; }
#view-makeup .mu-mood.mu-add b { font-size: 12px; font-weight: 400; }
#view-makeup .mu-designs button { border-radius: 10px; }

/* ================= v0.1.65：ボタンはカプセル型 ================= */
.btn, button.btn, label.btn, .btn.small, .lu-upload, .fx-close, .mu-tools .btn, .im-tools .btn, .du-dlg-acts .btn { border-radius: 999px !important; }
.btn { padding-left: 14px; padding-right: 14px; }
.seg, .du-seg, .lu-tabs, .rooms, .ck-size, .zoom-seg { border-radius: 999px !important; overflow: hidden; }
.seg button:first-child { border-radius: 999px 0 0 999px; }
.seg button:last-child { border-radius: 0 999px 999px 0; }
.mu-btns .btn, .mu-btns .tog { border-radius: 999px; }
.lu-cell .rm, .x-corner { border-radius: 50%; }
#view-lineup #luRows { align-content: start; grid-auto-rows: max-content; padding-bottom: 12px; }
#view-makeup .mu-mood.mu-add { justify-content: flex-start; text-align: left; }
#view-itemmap .im-side { align-content: start; }
#view-itemmap .im-tools .seg button[aria-pressed=true] { background: var(--ink) !important; color: #fff !important; border-color: var(--ink) !important; }
#view-itemmap .im-seg button[aria-pressed=true] { background: var(--ink) !important; color: #fff !important; border-color: var(--ink) !important; }
#view-itemmap .im-seg { border-radius: 999px; overflow: hidden; }

/* ===== v0.1.66 ===== */
/* Make map のテーマの行：枚数なし・四角の枠なし、選んだら ✓ だけ */
#view-makeup .mu-mood .n { display: none !important; }
#view-makeup .mu-mood { padding-left: 24px; }
#view-makeup .mu-mood::before { content: none !important; }
#view-makeup .mu-mood.on::after { content: "✓"; left: 6px; color: var(--ink); font-size: 13px; font-weight: 700; transform: translateY(-50%); }
body.room-mood #view-makeup .mu-mood.on::after { color: var(--ink); }
/* MOOD をつなぐ は、ヘッダーの右端 */
.top .board-title { position: static; }
.top .board-title .link-chip { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); margin-left: 0; z-index: 3; }
/* MAP の操作の帯 */
#view-makeup .mu-main { position: relative; }
.mu-bar { position: absolute; z-index: 20; display: flex; align-items: center; gap: 4px; padding: 5px 6px; background: var(--sheet); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 4px 16px rgba(0, 0, 0, .16); white-space: nowrap; }
.mu-bar[hidden] { display: none; }
.mu-bar .btn { padding: 5px 14px; font-size: 12px; }
.mu-bar .mb-ic { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border: 0; border-radius: 999px; background: none; color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; }
.mu-bar .mb-ic:hover { background: var(--mat-pale); }
.mu-bar .mb-ic[aria-pressed="true"] { background: var(--ink); color: var(--sheet); }
.mu-bar .mb-ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.mu-bar .mb-b { font-weight: 800; font-family: Georgia, serif; }
.mu-bar .mb-size { min-width: 30px; text-align: center; font-size: 12px; color: var(--sub); font-variant-numeric: tabular-nums; }
.mu-bar .mb-sep { width: 1px; height: 18px; background: var(--line); margin: 0 3px; }
.mu-bar .mb-color { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; }
.mu-bar .mb-color input { width: 22px; height: 22px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: none; cursor: pointer; }
.mu-bar .mb-color input::-webkit-color-swatch-wrapper { padding: 0; }
.mu-bar .mb-color input::-webkit-color-swatch { border: 0; border-radius: 50%; }
/* 画像を足す＋（ボードの右下） */
.mu-addimg { position: absolute; right: 22px; bottom: 18px; z-index: 15; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--ink); color: var(--sheet); font-size: 24px; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .22); }
.mu-addimg:hover { transform: scale(1.06); }
.mu-addimg[hidden] { display: none; }
/* 入れ替える先 */
.mu-stage svg .swap-box { fill: rgba(28, 31, 36, .18); stroke: var(--ink); stroke-width: 3; stroke-dasharray: 10 7; pointer-events: none; }
.mu-stage svg .swap-lab { fill: #fff; font-size: 22px; font-weight: 700; paint-order: stroke; stroke: rgba(0, 0, 0, .55); stroke-width: 4px; pointer-events: none; }
/* 画像を足すポップアップ */
#mapPickDialog .mp-tabs { margin: 4px 0 12px; }
#mapPickDialog .mp-ph img { opacity: 1; }
#mapPickDialog .mp-ph:hover { border-color: var(--ink); }
#view-makeup .mu-mood:not(.mu-add), #view-makeup .mu-mood.on, #view-makeup .mu-mood.cand { border: 0 !important; border-bottom: 1px solid var(--line) !important; box-shadow: none !important; background: none !important; border-radius: 0 !important; }
#view-makeup .mu-mood:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

/* ===== v0.1.67 ===== */
/* アイテムの中身：左に「元の画像を開く」、右に琥珀の「絵型にする」 */
.stage-tools.left { left: 8px; right: auto; }
/* DRESS UP のタブが Line up の外枠で切れないように（左へはみ出すぶんだけ見せる） */
.main > #view-lineup:not([hidden]) { overflow: clip; overflow-clip-margin: 34px; }
/* 左下（A案）：ペルソナの名前が見えるカプセル → いちばん下に「使い方・質問」 */
.rail-foot { display: flex !important; flex-direction: column; align-items: stretch !important; gap: 6px !important; }
.rail-foot .account, .rail-foot .acct-wrap { width: 100%; }
.rail-foot .acct { display: flex !important; align-items: center; gap: 9px; width: 100% !important; height: auto !important; padding: 5px 12px 5px 5px !important; border: 1px solid var(--line); border-radius: 999px !important; background: var(--sheet); overflow: visible; text-align: left; cursor: pointer; }
.rail-foot .acct:hover { border-color: var(--ink); }
.rail-foot .acct .avatar.acct-av { position: static; inset: auto; width: 32px; height: 32px; flex: none; font-size: 13px; }
.rail-foot .acct-txt { display: grid; min-width: 0; line-height: 1.25; }
.rail-foot .acct-k { font-size: 10.5px; color: var(--sub); }
.rail-foot .acct-n { font-size: 13px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-foot .acct-more { margin-left: auto; flex: none; font-size: 11.5px; color: var(--sub); }
.rail-foot .acct-menu { left: 0; right: auto; width: 100%; }
.rail-foot .qa-fab { display: flex !important; align-items: center; gap: 8px; width: auto !important; height: auto !important; margin: 0 !important; padding: 6px 8px !important; border: 0; border-radius: 999px; background: none !important; color: var(--sub) !important; font-size: 13px; box-shadow: none !important; align-self: flex-start !important; }
.rail-foot .qa-fab:hover, .rail-foot .qa-fab[aria-expanded=true] { color: var(--ink) !important; background: var(--mat-pale) !important; }
.rail-foot .qa-fab svg { width: 18px; height: 18px; }
/* 総点検：Dress up を開いて Line up が狭くなったとき、上の段のボタンが右で切れない（2段に折り返す）。タブの文字も1文字ずつ折れない */
#view-lineup.du-open .lu-bar { flex-wrap: wrap; overflow: visible; }
#view-lineup .lu-filetabs button { white-space: nowrap; }
#view-lineup.du-open .lu-filetabs button { padding-left: 14px; padding-right: 14px; font-size: 12px; }
#view-lineup.du-open .lu-filetabs { overflow-x: auto; scrollbar-width: none; }

/* ===== v0.1.68 ===== */
/* Map-ITEM の ALL IN ONE：段そろえ・文字と線の見出し・余白（紙の物差し 1587 を 100cqw として） */
.im-panel { padding: 3.781cqw !important; }
.im-board .im-b-head { height: 2.52cqw; margin-bottom: 2.142cqw; }
.im-rows { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.im-row { display: grid; align-items: start; }
.im-grp-label { background: none !important; color: #1c1f24 !important; min-height: var(--imlh); box-sizing: border-box; align-items: flex-start !important;
  padding: 0 0 .5cqw !important; border-radius: 0 !important; border-bottom: 1.5px solid #1c1f24; }
.im-grp-no { font-family: "STUDIO Oswald", sans-serif; }
.im-grp-n { margin-left: auto; color: #8a8f97; font-size: 1cqw !important; }
.im-grp-x { margin-left: .4cqw !important; color: #8a8f97 !important; }
.im-thumbs img { border-radius: .2cqw; }
.im-more { border: 0 !important; padding: 0 !important; margin-top: .6cqw !important; color: #8a8f97 !important; font-size: 1cqw !important; }
/* FOCUS：上下にも余白（重ならない） */
.im-f-grid { align-content: start; }
/* MAPを作る は緑（画像は作らず、AIが考えるボタン） */
#muMake, .im-make { background: var(--mat) !important; border-color: var(--mat) !important; color: var(--on-mat, #fff) !important; }
#muMake:hover:not(:disabled), .im-make:hover:not(:disabled) { background: var(--mat-deep, var(--mat)) !important; border-color: var(--mat-deep, var(--mat)) !important; }
/* Map-ITEM：［写真全体｜アイテムだけ］ */
.im-tools .im-cropseg { margin-left: 10px; }
.im-cropseg button.finding { background: var(--mat) !important; color: #fff !important; }
.im-tools { gap: 10px; }
.im-tools .im-seg button { padding: 7px 12px; }

/* ===== v0.1.69 ===== */
/* ラフを描く：左下に「白紙に戻す」 */
.dp-tools .dp-blank { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: grid; }
.dp-tools .dp-blank .btn { font-size: 12px; padding: 7px 10px; color: var(--danger, #b3261e); }
/* Dress up を開いているとき：右上は「着せる」（未生成＝琥珀、生成済み＝白、着ている＝白の「外す」）。クリックは中身の窓 */
.lu-cell .lu-wear { display: none; }
#view-lineup.du-open .lu-cell .lu-info { display: none !important; }
#view-lineup.du-open .lu-cell .lu-wear { display: block; position: absolute; right: 4px; top: 4px; z-index: 3; padding: 3px 10px; font-size: 11px; font-weight: 700; line-height: 1.4;
  background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: 0 1px 4px rgba(0,0,0,.15); }
#view-lineup.du-open .lu-cell .lu-wear.paid { background: var(--paid); border-color: var(--paid); color: #fff; }
#view-lineup.du-open .lu-cell .lu-wear:hover { filter: brightness(.95); }
#view-lineup.du-open .lu-cell.du-on .du-badge { right: auto; left: 4px; }
/* レイヤーのカード：目とゴミ箱は画像の左に縦に */
.du-oi .du-th2 { display: flex; gap: 6px; align-items: stretch; }
.du-oi .du-th2 > img { flex: 1; min-width: 0; }
.du-oi .du-oacts { display: flex; flex-direction: column; gap: 6px; flex: none; }
.du-oi .du-oacts button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer; padding: 0; }
.du-oi .du-oacts button:hover { border-color: var(--ink); }
.du-oi .du-oacts button.off { opacity: .5; }
.du-oi .du-oacts svg { width: 17px; height: 17px; }
/* 顔の選び方：画像の左上に、いまの顔だけ。乗せると下にほかの顔がぬるっと出る */
.du-facefloat { position: absolute; left: 12px; top: 12px; z-index: 30; display: flex !important; flex-direction: column; align-items: flex-start; gap: 0; height: auto !important; overflow: visible !important; }
.du-facefloat .fc { position: relative; display: block; width: 46px; height: 46px; padding: 0 !important; border: 2px solid #fff; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.2); cursor: pointer; }
.du-facefloat .fc i { width: 100% !important; height: 100% !important; border-radius: 50%; background-size: 600% auto; background-position: 50% 13%; display: block; }
.du-facefloat .fc i.plus { display: grid; place-items: center; background: #fff; color: var(--sub); font-size: 20px; font-style: normal; }
.du-facefloat > .fc { border-color: var(--ink); }
.du-facefloat .fc .fcn { position: absolute; left: calc(100% + 8px); top: 50%; transform: translate(-4px, -50%); opacity: 0; pointer-events: none; white-space: nowrap; font-size: 11.5px; background: rgba(28,31,36,.85); color: #fff; padding: 3px 8px; border-radius: 999px; transition: opacity .15s, transform .15s; }
.du-facefloat .fc:hover .fcn { opacity: 1; transform: translate(0, -50%); }
.du-facefloat .fc-more { display: flex; flex-direction: column; gap: 8px; padding-top: 0; max-height: 0; overflow: visible; opacity: 0; transform: translateY(-10px); pointer-events: none;
  transition: max-height .28s cubic-bezier(.2,.8,.2,1), opacity .22s, transform .28s cubic-bezier(.2,.8,.2,1), padding .28s; }
.du-facefloat:hover .fc-more, .du-facefloat:focus-within .fc-more { max-height: 420px; padding-top: 8px; opacity: 1; transform: none; pointer-events: auto; }
.du-facefloat .fc-more .fc { width: 40px; height: 40px; margin-left: 3px; }
.du-style .du-h.du-h-tabs { justify-content: flex-end; }
/* 操作台：文字をひとまわり大きく。横にはみ出さない */
.du-stagebox { overflow-x: hidden !important; }
.du-op { max-width: 100%; box-sizing: border-box; min-width: 0; }
.du-op .op-tabs button { font-size: 13px !important; padding: 8px 0 !important; }
.du-op .op-tabs .op-reset { font-size: 12px !important; padding: 8px 10px !important; }
.du-op .srow { font-size: 12.5px !important; gap: 10px !important; min-width: 0; }
.du-op .srow .snm { width: 60px !important; }
.du-op .srow .sv { width: 42px !important; font-size: 11.5px !important; }
/* 比率｜幅｜丈：ひと続きのカプセル＋スライドする黒い札 */
.du-op .op-scm { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: #fff; }
.du-op .op-scm button { border: 0; background: none; border-radius: 999px; padding: 4px 16px; font-size: 12px; color: var(--sub); cursor: pointer; }
.du-op .op-scm button[aria-selected=true] { color: #fff; }
/* ⚠（ラフが新しくなっている） */
.du-op .op-h .op-warn { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff4d6; color: #a86a00; font-size: 13px; cursor: help; margin-left: 2px; }

/* ===== v0.1.70 ===== */
.du-mask-zoom .du-mask-fit { width: auto; padding: 0 12px; border-radius: 999px; font-size: 12px; }
.du-mask-ctl label { white-space: nowrap; }
/* LOOKS のタブは、同じ段の右端へ */
.du-stabs { display: flex; }
.du-stabs [data-st=looks] { margin-left: auto; }
.du-style > .du-stabs { right: 10px; }
.du-style > .du-stabs [data-st=looks] { margin-left: auto; margin-right: 0; }
/* カラー欄：最後の「＋」と「近い色をまとめる」、テーマの色 */
.win-list .win-tools { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.win-list .win-plus { width: 30px; height: 30px; border-radius: 6px; border: 1px dashed #9aa1ab; background: none; color: var(--sub); font-size: 16px; cursor: pointer; padding: 0; }
.win-list .win-plus:hover { border-color: var(--ink); color: var(--ink); }
.win-list .win-merge { padding: 4px 12px; font-size: 12px; }
.win-list .win-theme { margin-top: 14px; }
.win-list .win-theme .win-sec { font-size: 12px; color: var(--sub); margin-bottom: 6px; }
.win-list .win-theme-sw { display: flex; flex-wrap: wrap; gap: 6px; }
.win-list .win-theme-sw button { width: 30px; height: 30px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .15); cursor: pointer; padding: 0; }
.win-list .win-theme-sw button:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
/* v0.1.71：マスク編集の下の段が窓からはみ出さないように（折り返す） */
.du-mask { overflow-x: hidden; }
.du-mask-ctl { flex-wrap: wrap; row-gap: 10px; column-gap: 14px; max-width: 100%; }
.du-mask-ctl label { min-width: 0; }
.du-mask-ctl input[type=range] { width: 120px; min-width: 0; }

/* ===== v0.1.72（Web 版・iPad）===== */
.dp-cv { touch-action: none; }
.du-facefloat.open .fc-more { max-height: 420px; padding-top: 8px; opacity: 1; transform: none; pointer-events: auto; }
/* Map-BOARD：面の上のもの（写真・文字）は指でもドラッグできる。空いたところは指でスクロール */
.mu-stage svg [data-el], .mu-stage svg .sel-handle { touch-action: none; }
/* 乗せたときだけ出る説明（data-tip）は、タッチの画面では出さない */
@media (hover: none) { [data-tip]::after, [data-tip]::before { display: none !important; } }
