/* 校了スタジオ — 広告代理店向けデモ
   世界観: 入稿・校正（紙の白 / プロセスマゼンタ＝赤入れ・操作 / プロセスシアン＝データ） */
:root {
  --paper: #f5f5f2; --sheet: #ffffff; --sheet-2: #fafaf8;
  --ink: #17181a; --ink-2: #44474c; --muted: #767a80; --faint: #a3a6aa;
  --rule: #d6d7d2; --rule-2: #e8e8e4;
  --mag: #e4007f; --mag-strong: #c4006d; --mag-soft: #fde4f1; --on-mag: #ffffff;
  --cyan: #0094d8; --cyan-soft: #dff2fb; --cyan-week1: #9fd6f0;
  --yel: #ffe100;
  --mark: #17181a;
  --shadow: 0 1px 0 rgba(23,24,26,.04), 0 2px 8px rgba(23,24,26,.06);
  --shadow-lift: 0 2px 0 rgba(23,24,26,.05), 0 14px 30px rgba(23,24,26,.16);
  --f-disp: "Dela Gothic One", "Hiragino Sans", sans-serif;
  --f-body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111213; --sheet: #1a1b1d; --sheet-2: #1f2023;
    --ink: #ececea; --ink-2: #c3c5c8; --muted: #8f9398; --faint: #62666b;
    --rule: #303236; --rule-2: #26282b;
    --mag: #ff4aa5; --mag-strong: #ff6db6; --mag-soft: #3a1529; --on-mag: #1a0a12;
    --cyan: #3cbcf2; --cyan-soft: #11303f; --cyan-week1: #1f5a76;
    --mark: #ececea;
    --shadow: 0 1px 0 rgba(0,0,0,.3); --shadow-lift: 0 14px 30px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111213; --sheet: #1a1b1d; --sheet-2: #1f2023;
  --ink: #ececea; --ink-2: #c3c5c8; --muted: #8f9398; --faint: #62666b;
  --rule: #303236; --rule-2: #26282b;
  --mag: #ff4aa5; --mag-strong: #ff6db6; --mag-soft: #3a1529; --on-mag: #1a0a12;
  --cyan: #3cbcf2; --cyan-soft: #11303f; --cyan-week1: #1f5a76;
  --mark: #ececea;
  --shadow: 0 1px 0 rgba(0,0,0,.3); --shadow-lift: 0 14px 30px rgba(0,0,0,.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-size: 14px; line-height: 1.65;
  overflow-x: clip; min-height: 100vh;
  font-feature-settings: "palt" 1;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--mag); outline-offset: 2px; }
.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* ---------- slug（版面外情報） ---------- */
.slug {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 6px 32px; font-size: 11.5px; color: var(--muted);
  border-bottom: 1px solid var(--rule-2); letter-spacing: .02em;
}
.slug .ic { width: 14px; height: 14px; }
.slug-reg { display: inline-flex; color: var(--ink-2); }
.slug-text { flex: 1 1 auto; min-width: 0; }
.slug-link { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--rule); }
.slug-link:hover { color: var(--mag); border-color: var(--mag); }

/* ---------- masthead ---------- */
.masthead {
  display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 24px;
  padding: 18px 32px 0; border-bottom: 1.5px solid var(--ink);
  position: relative;
}
.brand { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center; position: relative; flex: none;
  font-family: var(--f-disp); font-size: 22px; line-height: 1; color: var(--paper); background: var(--ink);
  box-shadow: 3px 3px 0 var(--mag), -2px -2px 0 var(--cyan);
}
/* 版ズレ: 墨版にマゼンタ・シアン版がずれて刷られた印 */
.brand-text { display: grid; line-height: 1.15; }
.brand-name { font-family: var(--f-disp); font-size: 20px; letter-spacing: .04em; }
.brand-sub { font-family: var(--f-mono); font-size: 10px; letter-spacing: .18em; color: var(--muted); }

.tabs { display: flex; gap: 4px; justify-self: center; margin-bottom: -1.5px; }
.tab {
  display: flex; align-items: baseline; gap: 8px; padding: 11px 20px 12px;
  background: transparent; border: 1.5px solid transparent; border-bottom: 0;
  border-radius: 2px 2px 0 0; color: var(--muted); font-weight: 700; font-size: 14px;
  position: relative; transition: color .15s;
}
.tab:hover { color: var(--ink); }
.tab-no { font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; }
.tab[aria-selected="true"] {
  color: var(--ink); background: var(--paper); border-color: var(--ink);
}
.tab[aria-selected="true"]::before {
  content: ""; position: absolute; left: -1.5px; right: -1.5px; top: -1.5px; height: 4px; background: var(--mag);
}
.tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; background: var(--paper);
}
.tab[aria-selected="true"] .tab-no { color: var(--mag); }

.mast-tools { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; }
.colorbar { display: flex; height: 14px; border: 1px solid var(--rule); }
.colorbar i { width: 14px; display: block; }
.colorbar .c { background: #00a0e9; } .colorbar .m { background: #e4007f; } .colorbar .y { background: #ffe100; } .colorbar .k { background: #1a1a1a; }
.colorbar .k75 { background: #595757; } .colorbar .k50 { background: #9e9e9f; } .colorbar .k25 { background: #d3d3d4; }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--rule); background: var(--sheet); color: var(--ink-2);
}
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.ic-moon { display: none; }
:root[data-theme="dark"] .ic-sun { display: none; } :root[data-theme="dark"] .ic-moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ic-sun { display: none; } :root:not([data-theme="light"]) .ic-moon { display: block; } }

/* ---------- workspace shell ---------- */
main { max-width: 1520px; margin: 0 auto; padding: 0 32px; }
.ws { padding: 28px 0 40px; animation: ws-in .28s ease-out; }
@keyframes ws-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ws-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }
.ws-title { display: grid; gap: 6px; min-width: 0; }
h1 { font-family: var(--f-disp); font-weight: 400; font-size: 30px; line-height: 1.15; margin: 0; letter-spacing: .02em; }
.solve { margin: 0; font-size: 12.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.solve b {
  font-family: var(--f-mono); font-weight: 500; font-size: 10.5px; letter-spacing: .06em;
  color: var(--mag); border: 1px solid var(--mag); padding: 0 6px; border-radius: 2px;
}
.solve em { font-style: normal; font-weight: 700; color: var(--ink); background: linear-gradient(transparent 62%, var(--mag-soft) 62%); }
.plate {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .14em; font-weight: 600;
  color: var(--paper); background: var(--ink); padding: 1px 7px; border-radius: 1px;
}

/* トンボ（四隅のトリムマーク） */
.trim { position: relative; }
.trim::before {
  content: ""; position: absolute; inset: -11px; pointer-events: none; z-index: 3;
  --l: var(--mark);
  background:
    linear-gradient(var(--l),var(--l)) left 0 top 11px / 7px 1px,
    linear-gradient(var(--l),var(--l)) left 11px top 0 / 1px 7px,
    linear-gradient(var(--l),var(--l)) right 0 top 11px / 7px 1px,
    linear-gradient(var(--l),var(--l)) right 11px top 0 / 1px 7px,
    linear-gradient(var(--l),var(--l)) left 0 bottom 11px / 7px 1px,
    linear-gradient(var(--l),var(--l)) left 11px bottom 0 / 1px 7px,
    linear-gradient(var(--l),var(--l)) right 0 bottom 11px / 7px 1px,
    linear-gradient(var(--l),var(--l)) right 11px bottom 0 / 1px 7px;
  background-repeat: no-repeat;
}

/* ---------- buttons / controls ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--mag); color: var(--on-mag); border: 0; border-radius: 3px;
  padding: 12px 18px; font-weight: 700; letter-spacing: .04em;
  box-shadow: 3px 3px 0 var(--ink); transition: transform .12s, box-shadow .12s, background .15s;
}
.btn-primary:hover { background: var(--mag-strong); }
.btn-primary:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-primary[disabled] { opacity: .6; cursor: progress; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px; background: var(--sheet); color: var(--ink);
  border: 1px solid var(--ink); border-radius: 3px; padding: 8px 12px; font-weight: 700;
}
.btn-ghost:hover:not([disabled]) { background: var(--ink); color: var(--paper); }
.btn-ghost[disabled] { opacity: .4; cursor: not-allowed; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }
.btn-sm .ic { width: 15px; height: 15px; }

.seg { display: inline-flex; border: 1px solid var(--ink); border-radius: 3px; overflow: hidden; background: var(--sheet); }
.seg button { border: 0; background: transparent; padding: 7px 12px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--rule); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.seg-sm button { padding: 5px 10px; font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--rule); background: var(--sheet); border-radius: 99px;
  padding: 4px 12px; font-size: 12.5px; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center;
}
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.sel-wrap select {
  appearance: none; border: 1px solid var(--ink); border-radius: 3px; background: var(--sheet);
  padding: 7px 34px 7px 12px; font-weight: 700; font-size: 13px; max-width: 100%;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: right 16px center, right 11px center; background-size: 5px 5px; background-repeat: no-repeat;
}

/* ---------- 01 board ---------- */
.board-stats { display: flex; gap: 0; border: 1px solid var(--rule); background: var(--sheet); }
.stat { padding: 8px 18px; display: grid; gap: 0; min-width: 112px; }
.stat + .stat { border-left: 1px solid var(--rule); }
.stat-label { font-size: 11px; color: var(--muted); }
.stat-val { font-family: var(--f-mono); font-size: 24px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-val small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.stat.hot .stat-val { color: var(--mag); }
.board-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.hint { margin: 0; font-size: 12px; color: var(--muted); }
.hint-tap { display: none; }
@media (hover: none) { .hint-drag { display: none; } .hint-tap { display: block; } }

.board-scroll { overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 12px; scroll-snap-type: x proximity; }
.board { display: grid; grid-template-columns: repeat(5, minmax(248px, 1fr)); gap: 14px; min-width: min-content; }
.col { display: flex; flex-direction: column; min-width: 0; scroll-snap-align: start; }
.col-head {
  display: flex; align-items: baseline; gap: 8px; padding: 0 2px 8px; border-bottom: 1.5px solid var(--ink); margin-bottom: 10px;
}
.col-no { font-family: var(--f-mono); font-size: 11px; color: var(--muted); }
.col-name { font-weight: 700; font-size: 14px; }
.col-count { margin-left: auto; font-family: var(--f-mono); font-size: 12px; color: var(--ink-2); background: var(--rule-2); border-radius: 99px; padding: 0 8px; }
.col[data-col="live"] .col-head { border-bottom-color: var(--cyan); }
.col-body {
  flex: 1; display: grid; align-content: start; gap: 10px; min-height: 180px;
  padding: 4px; margin: -4px; border-radius: 4px; transition: background .15s, outline-color .15s;
  outline: 1.5px dashed transparent; outline-offset: -1px;
}
.col-body.over { background: var(--mag-soft); outline-color: var(--mag); }
.col-empty { font-size: 12px; color: var(--faint); text-align: center; padding: 22px 0; border: 1px dashed var(--rule); border-radius: 3px; }

.card {
  position: relative; background: var(--sheet); border: 1px solid var(--rule); border-radius: 3px;
  padding: 12px 12px 10px; box-shadow: var(--shadow); display: grid; gap: 8px;
  cursor: grab; transition: box-shadow .15s, transform .15s, border-color .15s;
}
.card:hover { border-color: var(--ink-2); }
.card.dragging { opacity: .45; transform: rotate(-1.5deg); }
.card.just-moved { animation: moved .9s ease-out; }
@keyframes moved { 0% { box-shadow: 0 0 0 3px var(--mag); } 100% { box-shadow: var(--shadow); } }
.card.hot { border-left: 4px solid var(--mag); padding-left: 10px; }
.card.warm { border-left: 4px solid var(--yel); padding-left: 10px; }
.card-top { display: flex; align-items: flex-start; gap: 8px; padding-right: 26px; }
.card-client { font-size: 11.5px; color: var(--muted); font-weight: 500; line-height: 1.3; }
.card-title { font-size: 14px; font-weight: 700; line-height: 1.45; margin: 0; text-wrap: pretty; }
.card-menu-btn {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; display: grid; place-items: center;
  border: 0; background: transparent; border-radius: 3px; color: var(--muted);
}
.card-menu-btn:hover, .card-menu-btn[aria-expanded="true"] { background: var(--rule-2); color: var(--ink); }
.card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.media {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ink-2);
  border: 1px solid var(--rule); border-radius: 2px; padding: 1px 6px 1px 4px; line-height: 1.5;
}
.media .ic { width: 14px; height: 14px; }
.proof { font-size: 11.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 4px; }
.proof i { font-style: normal; font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px dashed var(--rule); }
.due { font-family: var(--f-mono); font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.due b { font-family: var(--f-body); font-weight: 700; margin-left: 4px; }
.card.hot .due b { color: var(--mag); }
.stamp {
  font-weight: 700; font-size: 11px; color: var(--mag); border: 1.5px solid var(--mag); border-radius: 3px;
  padding: 0 5px; transform: rotate(-4deg); display: inline-block; letter-spacing: .04em; line-height: 1.5;
}
.owner {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700;
  border: 1.5px solid var(--ink); background: var(--sheet); flex: none;
}
.move-menu {
  position: absolute; top: 36px; right: 6px; z-index: 20; min-width: 168px; background: var(--sheet);
  border: 1px solid var(--ink); border-radius: 3px; box-shadow: var(--shadow-lift); padding: 4px; display: grid;
}
.move-menu p { margin: 0; padding: 4px 8px 2px; font-size: 11px; color: var(--muted); }
.move-menu button { text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 2px; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.move-menu button:hover, .move-menu button:focus-visible { background: var(--mag-soft); color: var(--ink); }
.move-menu button .col-no { width: 18px; }

/* ---------- 02 creative ---------- */
.studio { display: grid; grid-template-columns: 330px minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
.brief {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 3px; padding: 18px; display: grid; gap: 14px;
  position: sticky; top: 16px;
}
.brief-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.brief-head .sel-wrap { min-width: 0; }
.brief-head select { width: 100%; }
.field { display: grid; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field > span, .field legend { font-size: 12px; font-weight: 700; color: var(--ink-2); display: flex; gap: 8px; align-items: baseline; padding: 0; }
.field small { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; border: 0; border-bottom: 1.5px solid var(--rule); background: var(--sheet-2);
  padding: 8px 10px; border-radius: 2px 2px 0 0; font-size: 14px; resize: vertical; line-height: 1.6;
}
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--mag); }
.field .seg { width: 100%; }
.field .seg button { flex: 1; padding: 7px 4px; }
.media-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.media-pick button {
  display: flex; align-items: center; gap: 8px; border: 1px solid var(--rule); border-radius: 3px; background: var(--sheet);
  padding: 8px 10px; font-size: 12.5px; font-weight: 500; text-align: left;
}
.media-pick button[aria-pressed="true"] { border-color: var(--mag); box-shadow: inset 0 0 0 1px var(--mag); color: var(--ink); }
.media-pick button[aria-pressed="true"] .ic { color: var(--mag); }
.rule-note { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.rule-note b { color: var(--ink-2); }

.col-label { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; min-height: 30px; font-size: 12.5px; color: var(--muted); }
.drafts { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: d; }
.drafts:empty::before {
  content: "左のブリーフを確認して「コピー案を生成」を押してください。案ごとに媒体の文字数ルールを自動で判定します。";
  display: block; padding: 48px 24px; text-align: center; color: var(--muted); font-size: 13px;
  border: 1.5px dashed var(--rule); border-radius: 3px; background:
    repeating-linear-gradient(-45deg, transparent 0 10px, var(--rule-2) 10px 11px);
}
.draft {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 3px; padding: 16px 18px; display: grid; gap: 12px;
  cursor: pointer; transition: border-color .15s, box-shadow .15s; animation: ws-in .25s ease-out;
}
.draft:hover { border-color: var(--ink-2); }
.draft.selected { border-color: var(--mag); box-shadow: inset 0 0 0 1px var(--mag); }
.draft-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.draft-id { font-family: var(--f-disp); font-size: 20px; line-height: 1; }
.draft.selected .draft-id { color: var(--mag); }
.draft-angle { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.verdict { margin-left: auto; font-family: var(--f-mono); font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 2px 8px; border-radius: 2px; }
.verdict.ok { background: var(--cyan-soft); color: var(--cyan); }
.verdict.ng { background: var(--mag); color: var(--on-mag); }
.verdict.wait { color: var(--muted); border: 1px solid var(--rule); }
.d-row { display: grid; gap: 4px; }
.d-label { font-size: 11px; color: var(--muted); font-weight: 500; }
.d-h { word-break: auto-phrase; font-family: var(--f-disp); font-size: 21px; line-height: 1.35; margin: 0; overflow-wrap: anywhere; }
.d-d { margin: 0; font-size: 14px; line-height: 1.75; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.d-d .fold-rest { color: var(--faint); }
.d-d .fold-more { color: var(--mag); font-size: 11px; font-weight: 700; margin: 0 2px; }
.caret::after { content: ""; display: inline-block; width: 2px; height: 1em; background: var(--mag); vertical-align: -0.15em; margin-left: 2px; animation: blink .8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.thinking { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.thinking i { width: 6px; height: 6px; border-radius: 50%; background: var(--mag); animation: dot 1s infinite ease-in-out; }
.thinking i:nth-child(2) { animation-delay: .15s; } .thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { opacity: .2; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.limits { display: grid; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--rule); }
.limit { display: grid; grid-template-columns: 112px 1fr auto; align-items: center; gap: 10px; font-size: 11.5px; }
.limit-name { color: var(--ink-2); }
.meter { height: 6px; background: var(--rule-2); border-radius: 1px; position: relative; overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; background: var(--ink-2); transition: width .4s ease-out; }
.limit.ng .meter i { background: var(--mag); }
.limit.ok .meter i { background: var(--cyan); }
.limit-count { font-family: var(--f-mono); font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.limit.ng .limit-count { color: var(--mag); font-weight: 600; }
.limit-count small { color: var(--muted); }
.draft-foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.draft-foot .note { font-size: 11.5px; color: var(--muted); }
.fix-btn { border: 1px solid var(--mag); color: var(--mag); background: transparent; border-radius: 3px; padding: 5px 10px; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.fix-btn:hover { background: var(--mag); color: var(--on-mag); }
.fix-btn .ic { width: 14px; height: 14px; }

.preview-col { position: sticky; top: 16px; display: grid; gap: 10px; }
.preview-col .col-label { margin-bottom: 0; }
.proof-table {
  background: var(--rule-2); border: 1px solid var(--rule); border-radius: 3px; padding: 30px 24px;
  display: grid; place-items: center; min-height: 420px;
  background-image: radial-gradient(var(--rule) 1px, transparent 1px); background-size: 14px 14px;
}
.preview { width: 100%; display: grid; place-items: center; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.toggle input { accent-color: var(--mag); width: 15px; height: 15px; }
.preview-col:not(.guides) .trim::before, .preview-col:not(.guides) .safe { display: none; }

/* 媒体モック共通（作品側の色は固定＝テーマに依存しない） */
.mock { background: #fff; color: #17181a; border-radius: 6px; box-shadow: 0 10px 28px rgba(0,0,0,.18); width: 100%; overflow: hidden; font-family: var(--f-body); }
.mock-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 11.5px; }
.mock-ava { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; flex: none; }
.mock-name { font-weight: 700; line-height: 1.2; }
.mock-name small { display: block; font-weight: 400; color: #767a80; font-size: 10px; }
.mock-cta { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; font-size: 12px; font-weight: 700; border-top: 1px solid #ececea; border-bottom: 1px solid #ececea; }
.mock-cta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.mock-cap { padding: 8px 12px 12px; font-size: 12px; line-height: 1.6; color: #2a2b2e; }
.mock-cap b { margin-right: 6px; }
.mock-cap .more { color: #8a8d92; }

.art { position: relative; container-type: inline-size; overflow: hidden; width: 100%; }
.art-feed { aspect-ratio: 1 / 1; }
.art-story { aspect-ratio: 9 / 16; }
.art-in { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 7cqw; }
.art-brand { font-size: 4.4cqw; font-weight: 700; letter-spacing: .06em; display: flex; align-items: center; gap: 2cqw; }
.art-brand::before { content: ""; width: 3cqw; height: 3cqw; border-radius: 50%; background: currentColor; }
.art-h { word-break: auto-phrase; font-family: var(--f-disp); font-size: 9.6cqw; line-height: 1.22; margin: 0; overflow-wrap: anywhere; position: relative; z-index: 2; text-wrap: balance; }
.art-sub { font-size: 4.2cqw; line-height: 1.5; margin: 3cqw 0 0; font-weight: 700; position: relative; z-index: 2; }
.art-cta { align-self: flex-start; font-size: 4.4cqw; font-weight: 700; padding: 2.4cqw 5cqw; border-radius: 99px; position: relative; z-index: 2; }
.art-motif { position: absolute; z-index: 1; pointer-events: none; }
.art-story .art-in { padding: 9cqw 8cqw 12cqw; justify-content: center; gap: 6cqw; }
.art-story .art-h { font-size: 11.5cqw; }
.art-story .art-sub { font-size: 5cqw; }
.art-story .art-cta { align-self: center; font-size: 5cqw; }
.story-top { position: absolute; top: 3cqw; left: 4cqw; right: 4cqw; z-index: 4; display: grid; gap: 2.4cqw; }
.story-bars { display: flex; gap: 1.4cqw; }
.story-bars i { flex: 1; height: .9cqw; border-radius: 1cqw; background: rgba(255,255,255,.5); }
.story-bars i:first-child { background: rgba(255,255,255,.95); }
.story-who { display: flex; align-items: center; gap: 2cqw; font-size: 3.8cqw; font-weight: 700; }
.story-who .mock-ava { width: 7cqw; height: 7cqw; font-size: 3.2cqw; }
.story-who small { font-weight: 400; opacity: .8; }
.story-swipe { position: absolute; left: 0; right: 0; bottom: 4cqw; z-index: 4; display: grid; justify-items: center; font-size: 3.8cqw; font-weight: 700; gap: 1cqw; }
.story-swipe svg { width: 6cqw; height: 6cqw; fill: none; stroke: currentColor; stroke-width: 2.4; transform: rotate(-90deg); }
.safe { position: absolute; left: 0; right: 0; z-index: 5; pointer-events: none; border: 0 dashed #00a0e9; }
.safe-top { top: 0; height: 14%; border-bottom-width: 1.5px; background: rgba(0,160,233,.08); }
.safe-bot { bottom: 0; height: 20%; border-top-width: 1.5px; background: rgba(0,160,233,.08); }
.safe-in { inset: 6%; border-width: 1.5px; }
.safe span { position: absolute; right: 2%; font: 600 9px/1 var(--f-mono); color: #0079b3; background: rgba(255,255,255,.85); padding: 2px 4px; letter-spacing: .04em; }
.safe-top span { bottom: 4px; } .safe-bot span { top: 4px; } .safe-in span { top: 4px; }

/* トーン別アートワーク */
.tone-friendly { background: #fff6c2; color: #2a1d0b; }
.tone-friendly .art-cta { background: #e4007f; color: #fff; }
.tone-premium { background: #17181a; color: #f4f1ea; }
.tone-premium .art-h { font-family: var(--f-body); font-weight: 700; letter-spacing: .08em; font-size: 8.6cqw; }
.tone-premium.art-story .art-h { font-size: 10cqw; }
.tone-premium .art-cta { background: transparent; color: #f4f1ea; border: 1.5px solid #f4f1ea; border-radius: 0; }
.tone-direct { background: #ffffff; color: #17181a; }
.tone-direct::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: #e4007f; }
.tone-direct .art-cta { background: #fff; color: #e4007f; }
.tone-direct .art-sub { color: #fff; }
.tone-playful { background-color: #00a0e9; color: #fff; background-image: radial-gradient(rgba(255,255,255,.22) 22%, transparent 24%); background-size: 6cqw 6cqw; }
.tone-playful .art-h { text-shadow: .7cqw .7cqw 0 #e4007f; }
.tone-playful .art-cta { background: #ffe100; color: #17181a; }

.art-badge {
  position: absolute; z-index: 3; right: 6cqw; top: 20cqw; width: 25cqw; height: 25cqw; border-radius: 50%;
  display: grid; place-items: center; text-align: center; transform: rotate(10deg);
  background: #e4007f; color: #fff; font-weight: 700; font-size: 4cqw; line-height: 1.25; padding: 3cqw;
  box-shadow: .8cqw .8cqw 0 #17181a; word-break: auto-phrase;
}
.art-feed .art-badge { top: auto; bottom: 7cqw; right: 7cqw; }
.art-story .art-badge { top: 24cqw; width: 30cqw; height: 30cqw; font-size: 5cqw; }
.tone-direct .art-badge { background: #17181a; box-shadow: .8cqw .8cqw 0 #e4007f; border-radius: 0; transform: rotate(-4deg); }
.tone-playful .art-badge { background: #ffe100; color: #17181a; }

/* 検索広告モック */
.art-search { padding: 16px 18px 18px; display: grid; gap: 4px; }
.serp-q { display: flex; align-items: center; gap: 8px; border: 1px solid #dadce0; border-radius: 99px; padding: 7px 14px; font-size: 12.5px; color: #3c4043; margin-bottom: 12px; }
.serp-q svg { width: 15px; height: 15px; fill: none; stroke: #767a80; stroke-width: 2; }
.serp-sp { font-size: 11.5px; font-weight: 700; color: #202124; }
.serp-site { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #202124; line-height: 1.3; }
.serp-site small { display: block; color: #4d5156; font-size: 11px; }
.serp-h { font-size: 18px; line-height: 1.35; color: #1a0dab; margin: 4px 0 2px; overflow-wrap: anywhere; }
.serp-d { font-size: 13px; line-height: 1.6; color: #4d5156; margin: 0; overflow-wrap: anywhere; }
.serp-links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: 12.5px; color: #1a0dab; }
.serp-dim { margin-top: 14px; display: grid; gap: 6px; opacity: .45; }
.serp-dim i { display: block; height: 8px; border-radius: 2px; background: #dadce0; }
.preview .mock-wrap { width: 100%; }
.preview .fmt-feed { max-width: 340px; }
.preview .fmt-story { max-width: 260px; }
.preview .fmt-search { max-width: 520px; }

/* ---------- 03 report ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--ink); background: var(--sheet); margin-bottom: 18px; }
.kpi { padding: 14px 18px; display: grid; gap: 2px; min-width: 0; }
.kpi + .kpi { border-left: 1px solid var(--rule); }
.kpi-label { font-size: 11.5px; color: var(--muted); font-weight: 500; display: flex; justify-content: space-between; gap: 6px; }
.kpi-label span:last-child { font-family: var(--f-mono); font-size: 10px; }
.kpi-val { font-family: var(--f-mono); font-size: 26px; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-delta { font-family: var(--f-mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.kpi-delta.good { color: var(--cyan); } .kpi-delta.bad { color: var(--mag); }
.kpi-delta small { color: var(--muted); font-family: var(--f-body); margin-left: 4px; }
.report-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; }
.panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: 3px; padding: 16px 18px; min-width: 0; }
.panel-summary { grid-column: 1 / -1; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-head h2 { font-size: 15px; margin: 0; font-weight: 700; }
.panel-head h2 small { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 6px; font-family: var(--f-mono); }
.chart { position: relative; width: 100%; min-height: 240px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--rule-2); }
.chart .axis line, .chart .axis path { stroke: var(--ink-2); }
.chart text { fill: var(--muted); font-family: var(--f-mono); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart text.we { fill: var(--mag); }
.chart rect.bar { fill: var(--cyan); transition: opacity .15s; }
.chart rect.bar.w1 { fill: var(--cyan-week1); }
.chart rect.bar.hl { fill: var(--mag); }
.chart .ma { fill: none; stroke: var(--ink); stroke-width: 2; }
.chart .ma-dot { fill: var(--sheet); stroke: var(--ink); stroke-width: 1.5; }
.chart .divider { stroke: var(--ink-2); stroke-dasharray: 3 3; }
.chart .divider-label { fill: var(--ink-2); font-family: var(--f-body); font-size: 11px; }
.tip {
  position: absolute; pointer-events: none; background: var(--ink); color: var(--paper); border-radius: 3px; padding: 6px 9px;
  font-size: 12px; line-height: 1.5; white-space: nowrap; transform: translate(-50%, -100%); z-index: 4; box-shadow: var(--shadow-lift);
}
.tip b { font-family: var(--f-mono); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; display: inline-block; }
.legend .lg-w1 { background: var(--cyan-week1); } .legend .lg-w2 { background: var(--cyan); }
.legend .lg-ma { height: 2px; width: 16px; background: var(--ink); }

table.mt { width: 100%; border-collapse: collapse; font-size: 13px; }
.mt th { font-size: 11px; font-weight: 500; color: var(--muted); text-align: right; padding: 6px 8px; border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
.mt th:first-child, .mt td:first-child { text-align: left; }
.mt td { padding: 10px 8px; border-bottom: 1px solid var(--rule-2); text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mt td:first-child { font-family: var(--f-body); font-weight: 700; }
.mt td:first-child .ic { width: 15px; height: 15px; vertical-align: -3px; margin-right: 6px; color: var(--ink-2); }
.mt tfoot td { border-bottom: 0; border-top: 1.5px solid var(--ink); font-weight: 600; }
.mt td.mark { position: relative; }
.mt th:last-child, .mt td:last-child { padding-right: 12px; }
.mt td.mark::after {
  content: ""; position: absolute; inset: 3px -2px; border: 1.8px solid var(--mag); border-radius: 50%; transform: rotate(-3deg);
  animation: circle-in .5s ease-out both;
}
.mt td.mark.good::after { border-color: var(--cyan); }
@keyframes circle-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.mt-notes { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 12px; }
.mt-notes li { display: flex; gap: 8px; align-items: baseline; color: var(--ink-2); }
.mt-notes li b { font-family: var(--f-mono); font-size: 10.5px; padding: 0 5px; border-radius: 2px; color: var(--on-mag); background: var(--mag); font-weight: 600; flex: none; }
.mt-notes li.good b { background: var(--cyan); color: var(--paper); }

.summary-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.summary {
  background: var(--sheet-2); border: 1px solid var(--rule-2); border-radius: 3px; padding: 20px 22px; min-height: 140px;
  font-size: 14px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere;
  border-left: 3px solid var(--mag);
}
.summary:focus { outline: none; }
.summary-empty { margin: 0; color: var(--muted); white-space: normal; }
.summary .s-h { font-weight: 700; color: var(--ink); }
.summary .s-sec { font-weight: 700; color: var(--mag); }

/* ---------- colophon / toast ---------- */
.colophon { border-top: 1.5px solid var(--ink); margin-top: 24px; }
.colophon-inner { max-width: 1520px; margin: 0 auto; padding: 20px 32px 36px; display: grid; gap: 6px; }
.colophon-pitch { margin: 0; font-size: 13px; color: var(--ink-2); }
.colophon-pitch b { color: var(--ink); }
.colophon-meta { margin: 0; font-size: 11.5px; color: var(--muted); }
.colophon-meta a { color: var(--ink-2); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 3px; font-size: 13px; font-weight: 500;
  box-shadow: 4px 4px 0 var(--mag); transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .studio { grid-template-columns: 320px minmax(0, 1fr); }
  .preview-col { grid-column: 1 / -1; position: static; }
  .brief { position: static; }
}
@media (max-width: 1100px) {
  .masthead { grid-template-columns: 1fr auto; }
  .tabs { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
  .report-grid { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi:nth-child(4) { border-left: 0; }
  .kpi:nth-child(n+4) { border-top: 1px solid var(--rule); }
}
@media (max-width: 760px) {
  body { font-size: 14px; }
  .slug { padding: 6px 16px; font-size: 11px; }
  .masthead { padding: 12px 16px 0; gap: 10px 12px; }
  .brand { padding-bottom: 0; }
  .brand-name { font-size: 18px; }
  .mast-tools { padding-bottom: 0; }
  .colorbar { display: none; }
  .tabs { gap: 0; }
  .tab { flex: 1; justify-content: center; padding: 10px 4px 11px; font-size: 12.5px; flex-direction: column; align-items: center; gap: 0; line-height: 1.3; }
  .tab-no { font-size: 10px; }
  main { padding: 0 16px; }
  .ws { padding-top: 20px; }
  h1 { font-size: 24px; }
  .board-stats { width: 100%; }
  .stat { flex: 1; min-width: 0; padding: 8px 10px; }
  .stat-val { font-size: 20px; }
  .board { grid-template-columns: repeat(5, 78vw); }
  .board-scroll { margin: 0 -16px; padding: 0 16px 12px; scroll-padding: 0 16px; }
  .studio { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .brief { padding: 16px; }
  .limit { grid-template-columns: 1fr auto; }
  .limit .meter { grid-column: 1 / -1; grid-row: 2; }
  .proof-table { padding: 24px 16px; min-height: 0; }
  .col-label .seg { width: 100%; }
  .col-label .seg button { flex: 1; padding: 6px 2px; font-size: 11.5px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 12px; }
  .kpi:nth-child(n) { border-left: 0; border-top: 1px solid var(--rule); }
  .kpi:nth-child(-n+2) { border-top: 0; }
  .kpi:nth-child(even) { border-left: 1px solid var(--rule); }
  .kpi:last-child { grid-column: 1 / -1; }
  .kpi-val { font-size: 21px; }
  .panel { padding: 14px; }
  /* 表は媒体ごとのカード表示に組み替える */
  table.mt, .mt tbody, .mt tfoot, .mt tr, .mt td { display: block; }
  .mt thead { display: none; }
  .mt tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .mt tfoot tr { border-bottom: 0; border-top: 1.5px solid var(--ink); }
  .mt td, .mt tfoot td { border: 0; padding: 0; text-align: left; display: grid; font-size: 13px; }
  .mt td::before { content: attr(data-label); font-family: var(--f-body); font-size: 10.5px; color: var(--muted); font-weight: 400; }
  .mt td:first-child { grid-column: 1 / -1; font-size: 14px; display: flex; align-items: center; }
  .mt td:first-child::before { display: none; }
  .mt td.mark::after { inset: -4px -6px; }
  .summary { padding: 16px; font-size: 13.5px; }
  .summary-actions { width: 100%; }
  .summary-actions button { flex: 1; justify-content: center; }
  .colophon-inner { padding: 18px 16px 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
