
:root {
  --paper: #f3f5f9; --surface: #ffffff; --surface-2: #f0f3f8; --surface-3: #e7ecf4; --line: #e0e5ee; --line-strong: #c9d1de;
  --ink: #141c2e; --ink-2: #414c63; --ink-3: #5d6880;
  --ai: #2b47a8; --ai-hover: #213a8c; --ai-soft: #ebeffb; --ai-line: #bccaee; --on-ai: #ffffff;
  --side: #111a30; --side-2: #1a2643; --side-ink: #c4cde0; --side-ink-2: #8b97b2; --side-line: #24314f;
  --ok: #157048; --ok-soft: #e1f3ea; --warn: #8a5300; --warn-soft: #fcf1dc; --danger: #b42318; --danger-soft: #fdeceb;
  --r-lg: 14px; --r-md: 10px; --r-sm: 8px;
  --shadow-1: 0 1px 2px rgba(17, 26, 48, .05), 0 1px 3px rgba(17, 26, 48, .06);
  --shadow-2: 0 10px 30px -12px rgba(17, 26, 48, .22), 0 2px 6px rgba(17, 26, 48, .06);
  --font: "BIZ UDPGothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0c111b; --surface: #131a27; --surface-2: #19212f; --surface-3: #212b3c; --line: #263045; --line-strong: #364259;
    --ink: #e8ecf4; --ink-2: #b6c0d2; --ink-3: #8a96ab;
    --ai: #92a9f2; --ai-hover: #aebff6; --ai-soft: #1b2546; --ai-line: #33467e; --on-ai: #0b1330;
    --side: #080c15; --side-2: #141c2e; --side-ink: #c4cde0; --side-ink-2: #7e8aa4; --side-line: #1b2438;
    --ok: #5ccb97; --ok-soft: #10261c; --warn: #e6b05c; --warn-soft: #2a2112; --danger: #f2877e; --danger-soft: #2d1513;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3); --shadow-2: 0 14px 34px -14px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.8 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--ai); text-decoration: none; text-underline-offset: .2em; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.45; margin: 0; font-weight: 700; font-feature-settings: "palt"; }
h1 { font-size: 1.6rem; letter-spacing: .01em; }
h2 { font-size: 1.05rem; }
h3 { font-size: .98rem; }
p { margin: 0 0 .75rem; }
code, .mono { font-family: var(--mono); font-size: .9em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: .86rem; }
.icon { flex: none; }
:focus-visible { outline: 3px solid var(--ai); outline-offset: 2px; }
.side :focus-visible, .mobilebar :focus-visible { outline-color: #9fb4ff; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* 骨組み: 左にサイドバー、右に中身 */
.shell { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; gap: 1rem; padding: 1.1rem .85rem 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--ink); white-space: nowrap; letter-spacing: .02em; }
.side .brand { color: #fff; padding: .2rem .45rem; font-size: 1.02rem; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 1.85rem; height: 1.85rem; border-radius: var(--r-sm); background: linear-gradient(160deg, #4565d6, #2b47a8); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.brand-mark svg { width: 1.05rem; height: 1.05rem; }
.tenant { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .7rem; border-radius: var(--r-sm); background: var(--side-2); border: 1px solid var(--side-line); color: var(--side-ink); font-size: .86rem; font-weight: 700; }
a.tenant:hover { text-decoration: none; border-color: #3a4a70; color: #fff; }
.side-search { position: relative; display: flex; align-items: center; }
.side-search-go { position: absolute; left: .2rem; top: 50%; transform: translateY(-50%); z-index: 1; display: grid; place-items: center; width: 1.85rem; height: 1.85rem; padding: 0; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--side-ink); cursor: pointer; }
.side-search-go:hover { color: #fff; background: var(--side-line); }
.side-search input[type=search] { width: 100%; height: 2.25rem; padding: 0 .7rem 0 2rem; border-radius: var(--r-sm); border: 1px solid var(--side-line); background: var(--side-2); color: #fff; font-size: .86rem; }
.side-search input[type=search]::placeholder { color: var(--side-ink); opacity: .75; }
.side-search input[type=search]:hover { border-color: #3a4a70; }
.side-search input[type=search]::-webkit-search-cancel-button { filter: invert(1); opacity: .7; }
.side-search input[type=search]:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, #9fb4ff 45%, transparent); }
.side-search input[type=search]:focus { border-color: #9fb4ff; background: var(--side); }
.tenant-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.nav { display: grid; gap: .15rem; }
.nav > a { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: var(--r-sm); color: var(--side-ink); font-weight: 700; font-size: .93rem; }
.nav > a .icon { color: var(--side-ink-2); }
.nav > a:hover { background: var(--side-2); color: #fff; text-decoration: none; }
.nav > a.on { background: var(--side-2); color: #fff; box-shadow: inset 3px 0 0 #7f9bff; }
.nav > a.on .icon { color: #9fb4ff; }
.nav-sub { display: grid; gap: .05rem; margin: .1rem 0 .35rem 2.15rem; padding-left: .6rem; border-left: 1px solid var(--side-line); }
.nav-sub a { display: block; padding: .3rem .55rem; border-radius: 6px; color: var(--side-ink-2); font-size: .86rem; }
.nav-sub a:hover { color: #fff; background: var(--side-2); text-decoration: none; }
.nav-sub a[aria-current="page"] { color: #fff; font-weight: 700; }
.side-foot { margin-top: auto; display: grid; gap: .5rem; padding: .85rem .45rem 0; border-top: 1px solid var(--side-line); }
.side-foot .email { font-size: .8rem; color: var(--side-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .btn.ghost, .mnav .btn.ghost { color: var(--side-ink); justify-self: start; }
.side .btn.ghost:hover, .mnav .btn.ghost:hover { background: var(--side-2); color: #fff; }
.content { min-width: 0; }
.mobilebar { display: none; }
.main { max-width: 76rem; margin: 0 auto; padding: 2.25rem 2.25rem 4rem; }

/* ページの頭 */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 1.5rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.page-head p { color: var(--ink-3); margin: .35rem 0 0; max-width: 46rem; }
.crumb { font-size: .84rem; color: var(--ink-3); margin-bottom: .3rem; display: flex; align-items: center; gap: .3rem; }
.crumb a { color: var(--ink-3); }
.crumb a:hover { color: var(--ai); }

/* 設定: 広い画面では左のメニューの中に項目を出すので、中のタブは狭い画面だけ */
.settings { display: block; }
.subnav { display: none; }

/* 面 */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
:is(.card, .strip, .setup, form, .notice, .grid-cards) + :is(.card, .strip, .setup, form, .grid-cards) { margin-top: 1.25rem; }
form > .card + .card { margin-top: 1.25rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.4rem; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 1rem; }
.card-body { padding: 1.4rem; }
.card-lead { color: var(--ink-3); font-size: .9rem; margin: -.25rem 0 1rem; }

/* 数字の帯（概要） */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); }
.stat { padding: 1.15rem 1.4rem; border-left: 1px solid var(--line); margin-left: -1px; }
.stat-label { color: var(--ink-3); font-size: .84rem; font-weight: 700; }
.stat-value { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.25; margin: .2rem 0 .1rem; letter-spacing: -.01em; }
.stat-sub { color: var(--ink-3); font-size: .8rem; }
.stat.attention .stat-value { color: var(--warn); }
.stat.alert .stat-value { color: var(--danger); }
.stat-link { color: inherit; text-decoration: none; transition: background .15s; }
.stat-link:hover { background: var(--surface-2); text-decoration: none; }
.stat-link:focus-visible { outline-offset: -3px; }
.stat-link:hover .stat-label { color: var(--ai); }
.todo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr)); }
.todo-group { padding: 1.1rem 1.4rem 1.2rem; border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin: -1px 0 0 -1px; min-width: 0; }
.todo-head { display: grid; grid-template-columns: 2rem 1fr; gap: .7rem; align-items: start; }
.todo-head h3 { font-size: .95rem; margin: .2rem 0 .15rem; }
.todo-head p { margin: 0; }
.todo-n { font-variant-numeric: tabular-nums; color: var(--ink-3); font-weight: 700; font-size: .85rem; }
.todo-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink-2); }
.tone-warn .todo-icon { background: var(--warn-soft); color: var(--warn); }
.tone-info .todo-icon { background: var(--ai-soft); color: var(--ai); }
.tone-ok .todo-icon { background: var(--ok-soft); color: var(--ok); }
.todo-list { list-style: none; margin: .8rem 0 0; padding: 0 0 0 2.7rem; display: grid; gap: .1rem; }
.todo-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .35rem; padding: .3rem 0; border-bottom: 1px dashed var(--line); min-width: 0; }
.todo-list li:last-child { border-bottom: 0; }
.todo-list a { font-weight: 700; overflow-wrap: anywhere; }
.todo-when { margin-left: auto; color: var(--ink-2); font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.todo-more { margin: .5rem 0 0 2.7rem; }
.inq-list { list-style: none; margin: 0; padding: 0; }
.inq-list > li { padding: .9rem 0; border-top: 1px solid var(--line); display: grid; gap: .2rem; min-width: 0; }
.inq-list p { margin: 0; overflow-wrap: anywhere; }
.inq-list .row-actions { margin-top: .5rem; }
.lic-summary { margin-bottom: 1.25rem; }
.lic-summary .stat { border-top: 1px solid var(--line); margin-top: -1px; }
.lic-summary .stat-value { font-size: 1.5rem; }
.stat-of { font-size: 1rem; color: var(--ink-3); font-weight: 700; }
.stat-value.stat-id { font: 700 .95rem/1.6 var(--mono); letter-spacing: 0; margin: .55rem 0 .25rem; overflow-wrap: anywhere; user-select: all; }
.meter { display: block; width: 100%; height: .4rem; margin-top: .45rem; border-radius: 999px; overflow: hidden; }
.meter-track { fill: var(--surface-3); }
.meter-fill { fill: var(--ai); }
.meter.full .meter-fill { fill: var(--warn); }
.meter.over .meter-fill { fill: var(--danger); }
.warn-text { color: var(--danger); margin-top: .3rem; }
.tl-cut { padding: 0 1.4rem 1rem; margin: 0; }
.timeline { list-style: none; margin: 0; padding: .6rem 1.4rem 1rem; }
.timeline li { position: relative; display: grid; grid-template-columns: 1.75rem 1fr; gap: .75rem; padding: .55rem 0; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: .875rem; top: 2.2rem; bottom: -.55rem; width: 1px; margin-left: -.5px; background: var(--line); }
.tl-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 999px; background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line); }
.tl-ok .tl-dot { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.tl-info .tl-dot { background: var(--ai-soft); color: var(--ai); border-color: transparent; }
.tl-warn .tl-dot { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.tl-danger .tl-dot { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.tl-body { min-width: 0; padding-top: .15rem; }
.tl-title { font-weight: 700; font-size: .92rem; }
.tl-detail { font-weight: 400; color: var(--ink-2); overflow-wrap: anywhere; }
.tl-meta { color: var(--ink-3); font-size: .8rem; font-variant-numeric: tabular-nums; margin-top: .1rem; overflow-wrap: anywhere; }

/* 始めるためにすること: キーの刻みのような区切りのバー（この管理画面の印） */
.setup { background: var(--surface); border: 1px solid var(--ai-line); border-radius: var(--r-lg); padding: 1.5rem; box-shadow: var(--shadow-1); position: relative; overflow: hidden; }
.setup::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--ai), #6f8cf0); }
.setup-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.setup-count { color: var(--ink-3); font-size: .9rem; font-variant-numeric: tabular-nums; }
.setup-count strong { color: var(--ai); font-size: 1.2rem; }
.cuts { display: flex; gap: 4px; margin: .9rem 0 1.25rem; height: 10px; }
.cut { flex: 1; background: var(--surface-2); border: 1px solid var(--line); }
.cut:first-child { border-radius: 5px 0 0 5px; }
.cut:last-child { border-radius: 0 5px 5px 0; }
.cut.done { background: var(--ai); border-color: var(--ai); }
.cut.now { background: repeating-linear-gradient(135deg, var(--ai-soft) 0 6px, var(--ai-line) 6px 9px); border-color: var(--ai-line); }
.setup-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.setup-step { display: grid; grid-template-columns: 1.85rem minmax(0, 1fr) auto; gap: .9rem; align-items: center; padding: .85rem 1rem; border-radius: var(--r-md); border: 1px solid var(--line); }
.setup-step .mark { display: grid; place-items: center; width: 1.85rem; height: 1.85rem; border-radius: 50%; font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; border: 1px solid var(--line-strong); color: var(--ink-3); }
.setup-step .mark svg { width: .95rem; height: .95rem; }
.setup-step.done { border-color: transparent; background: var(--surface-2); }
.setup-step.done .mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.setup-step.done .what { color: var(--ink-3); }
.setup-step.now { border-color: var(--ai); background: var(--ai-soft); }
.setup-step.now .mark { background: var(--ai); border-color: var(--ai); color: var(--on-ai); }
.setup-step .what strong { display: block; font-weight: 700; }
.setup-step .why { color: var(--ink-3); font-size: .86rem; }
.setup-step.done .why { display: none; }

/* 項目と値 */
.kv { display: grid; grid-template-columns: 11rem 1fr; gap: .7rem 1.25rem; margin: 0; }
.kv dt { color: var(--ink-3); font-size: .9rem; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv + .row-actions { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }

/* 表 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: .8rem 1.4rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--ink-3); font-weight: 700; font-size: .78rem; white-space: nowrap; letter-spacing: .02em; }
thead th { background: var(--surface-2); border-bottom-color: var(--line); }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
td.actions { text-align: right; white-space: nowrap; }

/* 札 */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .08rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.badge::before { content: ""; width: .42rem; height: .42rem; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge.info { background: var(--ai-soft); color: var(--ai); border-color: transparent; }

/* ボタン: 主・副（枠）・弱（ghost）・危険 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font: inherit; font-size: .9rem; line-height: 1.4; font-weight: 700; padding: .55rem 1.1rem; min-height: 2.5rem; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-1); transition: background .12s, border-color .12s, transform .08s; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ai); border-color: var(--ai); color: var(--on-ai); box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 4px 12px -4px color-mix(in srgb, var(--ai) 60%, transparent); }
.btn.primary:hover { background: var(--ai-hover); border-color: var(--ai-hover); }
.btn:disabled, .btn:disabled:hover, .btn[aria-disabled=true], .btn[aria-disabled=true]:hover { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.btn.primary:disabled:hover, .btn.primary[aria-disabled=true]:hover { background: var(--ai); border-color: var(--ai); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: transparent; box-shadow: none; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.small { padding: .3rem .7rem; font-size: .82rem; min-height: 0; }
.btn.large { padding: .8rem 1.5rem; font-size: 1rem; min-height: 3rem; }
form.inline { display: inline; }
/* 並んだボタンの中のフォーム（再開する・一時停止を解く）も、リンクのボタンと高さをそろえる */
.row-actions > form.inline { display: flex; margin: 0; }
.anchor { scroll-margin-top: 2rem; }
.row-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.form-foot { margin-top: 1.25rem; }
.sticky-foot { position: sticky; bottom: 0; z-index: 5; margin-top: 1.25rem; padding: .85rem 1rem; background: var(--paper); background: color-mix(in srgb, var(--paper) 88%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
/* 下に固定した帯に、フォーカスした欄が隠れないように */
html:has(.sticky-foot) { scroll-padding-bottom: 5.5rem; }
@media print { .sticky-foot { position: static; backdrop-filter: none; -webkit-backdrop-filter: none; } }
.input-unit { display: inline-flex; align-items: center; gap: .5rem; }
.input-unit input[type=number] { width: 7.5rem; }
.input-unit > span { color: var(--ink-2); font-weight: 700; }
.inbox-preview { margin-top: -.25rem; margin-bottom: 1.15rem; }
.inbox-label { display: block; font-size: .78rem; color: var(--ink-3); font-weight: 700; margin-bottom: .35rem; }
.inbox-row { display: flex; gap: 1rem; align-items: baseline; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); min-width: 0; }
.inbox-from { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.inbox-subject { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.inbox-preview .warn-text { margin: .45rem 0 0; color: var(--warn); font-size: .82rem; }

/* 入力 */
.field { display: grid; gap: .4rem; margin-bottom: 1.2rem; }
.field label, .field .label { font-weight: 700; font-size: .9rem; }
.field .hint { color: var(--ink-3); font-size: .83rem; }
.field .hint.error { color: var(--danger); font-weight: 700; }
.checkbox { display: flex; gap: .55rem; align-items: center; font-weight: 400 !important; }
input[type=text], input[type=email], input[type=number], input[type=url], input[type=tel], input[type=search], select, textarea {
  font: inherit; width: 100%; padding: .6rem .85rem; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); transition: border-color .12s, box-shadow .12s;
}
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--ai) 35%, var(--line-strong)); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ai-soft); border-color: var(--ai); }
input[type=radio], input[type=checkbox] { accent-color: var(--ai); width: 1rem; height: 1rem; }
textarea { line-height: 1.65; resize: vertical; }
textarea.mono { font-family: var(--mono); font-size: .85rem; }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.form-section { font-size: 1rem; margin: 1.75rem 0 .5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
details.form-section > summary { cursor: pointer; font-weight: 700; margin-bottom: .75rem; }
.toolbar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.toolbar input[type=search] { flex: 1; min-width: 12rem; }
.toolbar select { width: auto; max-width: 100%; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .75rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); background: var(--surface); font-size: .84rem; text-decoration: none; white-space: nowrap; }
.chip:hover { border-color: var(--ai-line); color: var(--ink); }
.chip.on { background: var(--ai); border-color: var(--ai); color: var(--on-ai); }
.chip-n { font-variant-numeric: tabular-nums; font-size: .78rem; color: var(--ink-3); }
.chip.on .chip-n { color: inherit; }
.card-head > form.toolbar { flex: 1; }
.card-head:has(> .chips) { flex-wrap: wrap; }
.card-head > .chips { flex-basis: 100%; }
.toolbar input, .toolbar select, .toolbar .btn { height: 2.5rem; }
.toolbar .btn.small { height: auto; }

/* 選ぶ（ラジオを大きな面に） */
.choices { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-bottom: 1.15rem; }
.choice { display: grid; align-content: start; grid-template-columns: auto 1fr; gap: .2rem .65rem; padding: .9rem 1rem; border: 1px solid var(--line-strong); border-radius: var(--r-md); cursor: pointer; transition: border-color .12s, background .12s; }
.choice:hover { border-color: var(--ai-line); }
.choice:has(input:checked) { border-color: var(--ai); background: var(--ai-soft); box-shadow: inset 0 0 0 1px var(--ai); }
.choice input { margin-top: .35rem; }
.choice strong { font-weight: 700; }
.choice span { grid-column: 2; color: var(--ink-3); font-size: .85rem; }
.choice:has(input:focus-visible) { outline: 3px solid var(--ai); outline-offset: 2px; }

/* 知らせ。うまくいった知らせは右上に出して、少しして消える（ほかは画面の中に残す） */
.notice { display: flex; gap: .65rem; align-items: flex-start; padding: .9rem 1.15rem; border-radius: var(--r-md); margin-bottom: 1.25rem; border: 1px solid transparent; }
.notice > .icon { margin-top: .2rem; }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 20%, transparent); }
.notice.danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 20%, transparent); }
.notice.info { background: var(--ai-soft); color: var(--ai); }
.notice a { color: inherit; text-decoration: underline; }
.notice.toast { pointer-events: none; position: fixed; top: 1rem; right: 1rem; z-index: 50; max-width: min(26rem, calc(100vw - 2rem)); margin: 0; background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-2); animation: toast 6s ease forwards; }
.notice.toast > .icon { color: var(--ok); }
@keyframes toast { 0% { opacity: 0; transform: translateY(-8px); } 6%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-8px); visibility: hidden; } }
.empty { padding: 3rem 1.4rem; color: var(--ink-3); text-align: center; display: grid; justify-items: center; gap: .35rem; }
.empty-icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 14px; background: var(--ai-soft); color: var(--ai); margin-bottom: .5rem; }
.empty strong { display: block; color: var(--ink); font-size: 1.05rem; }
.empty .btn { margin-top: 1rem; }

/* そのほか */
.keybox { font: 1.3rem/1.4 var(--mono); letter-spacing: .04em; padding: 1rem 1.25rem; border: 2px solid var(--ai); border-radius: var(--r-sm); background: var(--ai-soft); user-select: all; overflow-wrap: anywhere; }
.code { margin: .25rem 0; padding: .85rem 1rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); font: .82rem/1.6 var(--mono); overflow-x: auto; white-space: pre; user-select: all; }
.steps { list-style: none; margin: 0; padding: 0; }
.step { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.step:first-child { padding-top: 0; }
.step:last-child { border-bottom: 0; padding-bottom: 0; }
.step-num { flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; font-weight: 700; font-variant-numeric: tabular-nums; border: 1px solid var(--line-strong); color: var(--ink-3); background: var(--surface); }
.step.current .step-num { border-color: var(--ai); background: var(--ai); color: var(--on-ai); }
.step.done .step-num { border-color: var(--ok); background: var(--ok); color: #fff; }
.step-main { flex: 1; min-width: 0; padding-top: .2rem; }
.step-title { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-weight: 700; }
.step.todo .step-title { color: var(--ink-3); font-weight: 400; }
.step.done .step-title { color: var(--ink-2); font-weight: 400; }
.step-body { margin: .5rem 0 1rem; color: var(--ink-2); }
.pager { display: flex; justify-content: space-between; align-items: center; padding: .85rem 1.4rem; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .86rem; }
.legal-preview { line-height: 1.85; }
.legal-preview h2 { font-size: 1.05rem; margin: 1.25rem 0 .5rem; }
.legal-preview table { border-collapse: collapse; width: 100%; }
.legal-preview th, .legal-preview td { text-align: left; vertical-align: top; padding: .6rem .5rem; border-top: 1px solid var(--line); font-size: .93rem; }
.legal-preview th { width: 30%; color: var(--ink-2); background: none; }

/* 結果の場所（送った後に # で移る先）。上に固定の帯があっても隠れないよう、少し上を空ける。空なら場所を取らない */
.mail-result { scroll-margin-top: 5rem; }
.mail-result:empty { display: none; }
.mail-result > .mail-preview { margin: 0 0 1.25rem; }
.mail-preview { margin-top: 1.25rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.mail-preview-subject { padding: .65rem 1rem; border-bottom: 1px solid var(--line); font-weight: 700; }
.mail-preview pre { margin: 0; padding: 1rem; font: .9rem/1.75 var(--font); white-space: pre-wrap; overflow-wrap: anywhere; }
.note-form textarea { width: 100%; resize: vertical; min-height: 4.5rem; }
.note-form .row-actions { margin-top: .6rem; }
.invite { display: grid; gap: 1rem; }
.role-pick { border: 0; margin: 0; padding: 0; min-width: 0; }
.legal-source { margin-bottom: 1rem; }
.role-pick .choices { margin-bottom: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.role-table tbody th { white-space: normal; font-size: inherit; color: inherit; font-weight: 400; text-align: left; }
.role-pick legend { font-weight: 700; font-size: .9rem; margin-bottom: .45rem; padding: 0; }
.role-table .center { text-align: center; }
.role-table .yes { color: var(--ok); }
.role-table .no { color: var(--ink-3); }
.conn { display: flex; gap: .5rem; align-items: center; margin: 0; color: var(--ink-2); }
.conn.ok { color: var(--ok); font-weight: 700; }
.steps-list { margin: 0 0 1.25rem; padding-left: 1.4rem; display: grid; gap: .45rem; line-height: 1.75; }
.steps-list code, .langs code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .05rem .35rem; border-radius: 4px; }
.break { overflow-wrap: anywhere; }
.langs { display: grid; }
.lang-lead { padding: .85rem 1.4rem 0; margin: 0; }
.lang { border-top: 1px solid var(--line); }
.lang:first-child { border-top: 0; }
.lang > summary { cursor: pointer; padding: .85rem 1.4rem; font-weight: 700; list-style-position: inside; }
.lang[open] > summary { color: var(--ai); }
.lang-body { padding: 0 1.4rem 1.1rem; display: grid; gap: .4rem; }
.err-guide { display: grid; grid-template-columns: minmax(9rem, max-content) 1fr; margin: 0; }
.err-guide dt, .err-guide dd { margin: 0; padding: .75rem 1.4rem; border-top: 1px solid var(--line); }
.err-guide dt:first-of-type, .err-guide dt:first-of-type + dd { border-top: 0; }
.err-guide dt { font-weight: 700; color: var(--ink-2); font-size: .86rem; }
@media (max-width: 40rem) { .err-guide { grid-template-columns: 1fr; } .err-guide dd { border-top: 0; padding-top: 0; } }
.card-foot { padding: .85rem 1.4rem; margin: 0; border-top: 1px solid var(--line); }
.legal-status { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; padding: .9rem 1.1rem; margin-bottom: 1rem; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.legal-status.ok { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); background: var(--ok-soft); }
.legal-status.warn { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); background: var(--warn-soft); }
.legal-dots { display: inline-flex; gap: .35rem; }
.legal-dots span { width: .7rem; height: .7rem; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-strong); }
.legal-dots span.on { background: var(--ok); border-color: var(--ok); }
.legal-now { margin: 0 0 1rem; }
.legal-status p { margin: 0; flex: 1 1 20rem; }
.note-hit { color: var(--ink-2); margin-top: .15rem; overflow-wrap: anywhere; }
.note-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mail-frame { margin-top: 1.25rem; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: #eef1f6; }
.mail-frame-head { display: flex; flex-wrap: wrap; gap: .25rem 1rem; justify-content: space-between; align-items: baseline; padding: .6rem 1rem; background: var(--surface-2); border-bottom: 1px solid var(--line); font-weight: 700; }
.mail-frame-head .small { font-weight: 400; }
.mail-frame iframe { display: block; width: 100%; height: 640px; border: 0; background: #eef1f6; }

/* ログインの画面 */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; background: radial-gradient(60rem 30rem at 50% -10%, color-mix(in srgb, var(--ai) 14%, transparent), transparent 70%), var(--paper); }
.auth-box { width: 100%; max-width: 26rem; }
.auth h1 { font-size: 1.25rem; margin-bottom: 1rem; }
.auth-foot { text-align: center; margin-top: 1rem; }
.auth .brand { display: flex; justify-content: center; margin-bottom: 1.5rem; font-size: 1.1rem; }
.auth .card { box-shadow: var(--shadow-2); }
.auth-wide { place-items: start center; }
.auth-wide .auth-box { max-width: 64rem; }

/* 狭い画面: サイドバーをやめ、上の帯の「メニュー」から開く */
@media (max-width: 60rem) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .mobilebar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; position: sticky; top: 0; z-index: 20; padding: .6rem 1rem; background: var(--side); }
  .mobilebar .brand { color: #fff; }
  .mnav > summary { list-style: none; display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .75rem; border-radius: var(--r-sm); color: var(--side-ink); font-weight: 700; font-size: .9rem; cursor: pointer; border: 1px solid var(--side-line); }
  .mnav > summary::-webkit-details-marker { display: none; }
  .mnav[open] > summary { background: var(--side-2); color: #fff; }
  /* 閉じた details の中身も、ブラウザによっては配置される（横にはみ出してページが横にずれる）。閉じている間は出さない */
  .mnav:not([open]) > .mnav-panel { display: none; }
  .mnav-panel { max-height: calc(100dvh - 4.5rem); overflow-y: auto; position: absolute; right: .75rem; left: .75rem; top: calc(100% + .4rem); background: var(--side); border: 1px solid var(--side-line); border-radius: var(--r-lg); padding: .85rem; display: grid; gap: .75rem; box-shadow: var(--shadow-2); }
  .main { padding: 1.5rem 1rem 3rem; }
  .notice.toast { top: 4.25rem; }
  .settings { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .subnav { display: flex; flex-wrap: wrap; gap: 0 .25rem; border-bottom: 1px solid var(--line); }
  .subnav a { white-space: nowrap; padding: .5rem .75rem; color: var(--ink-2); border-bottom: 2px solid transparent; }
  .subnav a:hover { text-decoration: none; color: var(--ink); }
  .subnav a[aria-current="page"] { color: var(--ai); font-weight: 700; border-bottom-color: var(--ai); }
}
@media (max-width: 40rem) {
  body { font-size: 14.5px; }
  h1 { font-size: 1.35rem; }
  th, td { padding: .65rem .9rem; }
  .kv { grid-template-columns: 1fr; gap: .1rem; }
  .kv dd { margin-bottom: .6rem; }
  .hide-sm { display: none; }
  .stat { padding: .9rem 1rem; }
  .setup { padding: 1.15rem; }
  .setup-step { grid-template-columns: 1.85rem minmax(0, 1fr); }
  .setup-step > :last-child { grid-column: 2; justify-self: start; }
  .setup-step.done > :last-child { display: none; }
  .legal-preview th, .legal-preview td { display: block; width: auto; border: 0; padding: .2rem 0; }
  .legal-preview th { padding-top: .8rem; border-top: 1px solid var(--line); }
  /* 狭い画面では、長いボタンの文を折り返す（はみ出さない）。高さは中身に合わせる */
  .btn { white-space: normal; max-width: 100%; text-align: center; }
  .toolbar .btn { height: auto; }
}

/* 製品: カードの一覧・製品の画面のタブ（2026-11-10） */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); gap: 1.25rem; }
.prod-card { display: grid; grid-template-rows: auto 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); transition: box-shadow .18s, transform .18s, border-color .18s; }
.prod-card:hover { box-shadow: var(--shadow-2); border-color: var(--ai-line); transform: translateY(-2px); }
.prod-thumb-link { display: block; border-bottom: 1px solid var(--line); }
.thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
/* ページを 4 倍の大きさで描き、1/4 に縮める（枠の幅に合わせて、PC の幅の見た目になる） */
.thumb iframe { position: absolute; top: 0; left: 0; width: 400%; height: 400%; border: 0; transform-origin: 0 0; transform: scale(.25); pointer-events: none; background: #fff; }
.empty-thumb { display: grid; place-content: center; justify-items: center; gap: .5rem; color: var(--ink-3); font-size: .85rem; background: repeating-linear-gradient(135deg, var(--surface-2) 0 10px, var(--surface-3) 10px 11px); }
.prod-body { padding: 1.1rem 1.25rem 1.25rem; display: grid; gap: .5rem; align-content: start; }
.prod-body h2 { font-size: 1.15rem; }
.prod-body h2 a { color: var(--ink); }
.prod-body p { margin: 0; }
.prod-badges { display: flex; flex-wrap: wrap; gap: .35rem; }
.prod-body .row-actions { margin-top: .5rem; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin: -.5rem 0 1.5rem; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs a { display: inline-flex; align-items: center; gap: .45rem; padding: .7rem .9rem; color: var(--ink-2); font-weight: 700; font-size: .92rem; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a .icon { color: var(--ink-3); }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--ai); border-bottom-color: var(--ai); }
.tabs a[aria-current="page"] .icon { color: var(--ai); }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1.25rem; margin-top: 1.25rem; }
.hub-grid .card + .card { margin-top: 0; }
.hub-big { font-size: 1.35rem; font-weight: 700; margin: 0 0 .25rem; }
.hub-page { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem; padding: 1.5rem; align-items: center; }
.hub-thumb .thumb { border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-2); }
.hub-page-side { display: grid; gap: .75rem; align-content: center; justify-items: start; }
.hub-page-side p { margin: 0; }
.hub-page-side .kv { grid-template-columns: auto 1fr; }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.mini-stats div { display: grid; gap: .1rem; }
.mini-stats b { font-size: 1.6rem; line-height: 1.2; }
.spark { margin: 0; }
.spark svg { display: block; width: 100%; height: 8rem; overflow: visible; }
.spark-base { stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.spark-fill { fill: var(--ai); }
.spark-hit { fill: transparent; }
.spark-bar:hover .spark-fill { fill: var(--ai-hover); }
.spark-bar:hover .spark-hit { fill: color-mix(in srgb, var(--ai) 8%, transparent); }
.spark-axis { display: flex; justify-content: space-between; color: var(--ink-3); font-size: .78rem; font-variant-numeric: tabular-nums; margin-top: .25rem; }
.spark-table { margin-top: .75rem; }
.spark-table summary { cursor: pointer; font-size: .86rem; color: var(--ai); font-weight: 700; }
.spark-table table { margin-top: .5rem; }
@media (max-width: 60rem) { .hub-page { grid-template-columns: 1fr; } .hub-page-side .kv { grid-template-columns: 1fr; } }
/* ---- 製品のページの編集（左で編集・右に見た目。2026-11-10） ---- */
.main.wide { max-width: none; padding: 1.25rem 1.5rem 2rem; }
.pe-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1.5rem; margin-bottom: 1rem; }
.pe-head h1 { font-size: 1.3rem; }
.pe-publish { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.pe-app { display: grid; grid-template-columns: minmax(330px, 410px) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.pe-tabs { display: none; }
.pe-left { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; min-width: 0; }
.pe-left > *, .pe-look > *, .pe-fields > *, .pe-item > *, .pe-sec { min-width: 0; }
.pe-look, .pe-templates, .pe-fields, .pe-item { grid-template-columns: minmax(0, 1fr); }
.pe-left h2 { font-size: .95rem; }
.pe-right { position: sticky; top: 1rem; min-width: 0; display: grid; gap: .6rem; }
.pe-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.pe-seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; }
.pe-seg button { font: inherit; font-size: .85rem; font-weight: 700; padding: .3rem .9rem; border: 0; background: var(--surface); color: var(--ink-2); cursor: pointer; }
.pe-seg button + button { border-left: 1px solid var(--line-strong); }
.pe-seg button[aria-pressed="true"] { background: var(--ai); color: var(--on-ai); }
.pe-status { font-size: .85rem; color: var(--ink-3); margin-right: auto; }
.pe-status.ok { color: var(--ok); }
.pe-status.danger { color: var(--danger); font-weight: 700; }
.pe-open { font-size: .85rem; }
.pe-stage { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0; overflow: hidden; display: flex; justify-content: center; }
.pe-frame { display: block; width: 100%; height: calc(100vh - 5.5rem); min-height: 480px; border: 0; background: #fff; }
.pe-stage.phone { padding: 1rem 0; }
.pe-stage.phone .pe-frame { width: 390px; max-width: 100%; border-radius: 22px; border: 8px solid #1c2330; height: min(780px, calc(100vh - 11.5rem)); }
.pe-look, .pe-templates { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem 1.1rem; display: grid; gap: .75rem; }
.pe-accent { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.pe-accent .pe-label { flex-basis: 100%; }
.pe-swatches { display: flex; flex-wrap: wrap; gap: .35rem; }
.pe-swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; padding: 0; }
.pe-swatch.on { box-shadow: 0 0 0 2px var(--ink); }
.pe-accent input[type=color] { width: 38px; height: 30px; padding: 0 2px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); }
.pe-accent .pe-hex { width: 6.5rem; font-family: var(--mono); }
.pe-h { margin-top: .25rem; }
.pe-secs { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.pe-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.pe-sec.open { border-color: var(--ai-line); }
.pe-sec.dragging { opacity: .45; }
.pe-sec.over { box-shadow: 0 -3px 0 var(--ai); }
.pe-sec-head { display: flex; align-items: center; gap: .35rem; padding: .35rem .5rem .35rem .35rem; }
.pe-grip { cursor: grab; color: var(--ink-3); letter-spacing: -.2em; padding: 0 .35rem; user-select: none; }
.pe-sec-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: .5rem; font: inherit; text-align: left; background: none; border: 0; padding: .35rem .25rem; color: var(--ink); cursor: pointer; }
.pe-sec-title b { font-size: .92rem; white-space: nowrap; }
.pe-sec-title span { color: var(--ink-3); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pe-sec-title .pe-badge { flex: none; }
.pe-badge { font-size: .72rem !important; font-weight: 700; color: var(--warn) !important; background: var(--warn-soft); border-radius: 999px; padding: 0 .5rem; }
.pe-tools { display: inline-flex; gap: .2rem; flex: none; }
.pe-icon { font: inherit; font-size: .85rem; line-height: 1; width: 1.85rem; height: 1.85rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.pe-icon:hover:not(:disabled) { border-color: var(--line-strong); color: var(--ink); }
.pe-icon:disabled { opacity: .35; cursor: default; }
.pe-icon.danger:hover { color: var(--danger); border-color: var(--danger); }
.pe-fields { display: grid; gap: .8rem; padding: .25rem 1rem 1rem; border-top: 1px solid var(--line); padding-top: .9rem; }
.pe-field { display: grid; gap: .3rem; }
.pe-label { font-weight: 700; font-size: .83rem; }
.pe-hint { color: var(--ink-3); font-size: .8rem; line-height: 1.6; }
.pe-hint.error { color: var(--danger); font-weight: 700; }
.pe-warn { color: var(--warn); background: var(--warn-soft); border-radius: var(--r-sm); padding: .5rem .75rem; font-size: .85rem; margin: 0; }
.pe-items { display: grid; gap: .6rem; }
.pe-item { background: var(--surface-2); border-radius: var(--r-sm); padding: .6rem .75rem .75rem; display: grid; gap: .55rem; }
.pe-item-head { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; font-weight: 700; color: var(--ink-3); }
.pe-add { justify-self: start; }
.pe-image { display: grid; gap: .5rem; }
.pe-image-now { display: flex; align-items: center; gap: .75rem; }
.pe-image-now img { width: 96px; height: 60px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); }
.pe-image-empty { display: grid; place-items: center; width: 96px; height: 60px; border: 1px dashed var(--line-strong); border-radius: var(--r-sm); color: var(--ink-3); font-size: .75rem; }
.pe-image-actions { display: flex; gap: .35rem; flex-wrap: wrap; }
.pe-library { display: grid; gap: .5rem; background: var(--surface-2); border-radius: var(--r-sm); padding: .6rem; }
.pe-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: .4rem; }
.pe-thumb-box { position: relative; }
.pe-thumb-box .pe-thumb { width: 100%; }
.pe-thumb-del { position: absolute; top: -6px; right: -6px; width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font: inherit; font-size: .75rem; line-height: 1; cursor: pointer; padding: 0; }
.pe-thumb-del:hover { color: var(--danger); border-color: var(--danger); }
.pe-thumb { padding: 0; border: 2px solid transparent; border-radius: var(--r-sm); background: var(--surface); cursor: pointer; }
.pe-thumb img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; }
.pe-thumb.on { border-color: var(--ai); }
.pe-upload { position: relative; justify-self: start; cursor: pointer; }
.pe-upload input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.pe-upload:focus-within .btn { outline: 3px solid var(--ai-line); outline-offset: 2px; }
.pe-compare { display: grid; gap: .5rem; }
.pe-cols { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.pe-col { display: flex; gap: .25rem; align-items: center; flex: 1 1 8rem; }
.pe-row { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(3rem, 1fr)) auto; gap: .3rem; align-items: center; }
.pe-addsec { display: flex; gap: .5rem; }
.pe-addsec select { flex: 1; }
.pe-template { font: inherit; text-align: left; display: grid; gap: .2rem; padding: .85rem 1rem; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); cursor: pointer; }
.pe-template:hover { border-color: var(--ai); background: var(--ai-soft); }
.pe-template span { color: var(--ink-2); font-size: .86rem; }
.pe-template small { color: var(--ink-3); font-size: .78rem; }
.pe-conflict { background: var(--danger-soft); color: var(--danger); border-radius: var(--r-lg); padding: .85rem 1rem; display: grid; gap: .5rem; }
.pe-conflict p { margin: 0; font-weight: 700; }

/* 見た目の選択（型のギャラリー・配色・文字と形）とひな形のギャラリー（2026-11-10） */
.pe-look-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.pe-group { border-top: 1px solid var(--line); padding-top: .6rem; }
.pe-group > summary { cursor: pointer; font-weight: 700; font-size: .88rem; padding: .2rem 0 .5rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.pe-group > summary::-webkit-details-marker { display: none; }
.pe-group > summary::after { content: ""; width: .5rem; height: .5rem; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .15s; margin-right: .3rem; }
.pe-group[open] > summary::after { transform: rotate(-135deg); }
.pe-group > :not(summary) { margin-bottom: .75rem; }
.pe-themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.pe-theme { font: inherit; text-align: left; display: grid; gap: .15rem; padding: .45rem .45rem .55rem; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.pe-theme:hover { border-color: var(--ai-line); }
.pe-theme.on { border-color: var(--ai); box-shadow: 0 0 0 2px var(--ai-soft), inset 0 0 0 1px var(--ai); }
.pe-theme b { font-size: .82rem; padding: 0 .15rem; }
.pe-theme small { font-size: .7rem; color: var(--ink-3); line-height: 1.45; padding: 0 .15rem; }
.tm { position: relative; display: block; height: 58px; border-radius: 6px; overflow: hidden; background: #fff; border: 1px solid #e3e7ee; margin-bottom: .3rem; --ink: #1d2638; --sub: #c9d0dc; --a: #2b47a8; }
.tm i { position: absolute; display: block; border-radius: 2px; }
.tm-x { display: none !important; }
/* a 画面が主役: 中央の見出し、大きな写しを下の濃い帯に重ねる */
.tm-standard .tm-x, .tm-dark .tm-x { display: block !important; left: 0; right: 0; top: 44px; bottom: 0; border-radius: 0 !important; background: #0f1626; }
.tm-standard .tm-bar, .tm-dark .tm-bar, .tm-photo .tm-bar { display: none; }
.tm-standard .tm-h1, .tm-dark .tm-h1 { left: 26%; width: 48%; top: 8px; height: 6px; background: var(--ink); }
.tm-standard .tm-h2, .tm-dark .tm-h2 { left: 34%; width: 32%; top: 17px; height: 3px; background: var(--sub); }
.tm-standard .tm-btn, .tm-dark .tm-btn { left: 42%; width: 16%; top: 24px; height: 5px; border-radius: 3px !important; background: var(--a); }
.tm-standard .tm-img, .tm-dark .tm-img { left: 14%; right: 14%; top: 33px; height: 30px; background: #f4f6f9; border: 1px solid #dfe4ec; border-radius: 3px !important; }
.tm-dark { background: #0d1424; border-color: #1f2a40; --ink: #eef2f8; --sub: #3a465f; }
.tm-dark .tm-x { background: #080d18; }
.tm-dark .tm-img { background: #18233c; border-color: #2c3a58; }
.tm-photo { background: linear-gradient(to top, rgba(10, 12, 18, .92), rgba(10, 12, 18, .45)), repeating-linear-gradient(90deg, #7d8798 0 14px, #9aa3b2 14px 26px); --ink: #fff; --sub: rgba(255, 255, 255, .5); border-color: #333; }
.tm-photo .tm-img { display: none; }
.tm-photo .tm-h1 { left: 8%; width: 46%; top: 24px; height: 6px; background: var(--ink); } .tm-photo .tm-h2 { left: 8%; width: 30%; top: 34px; height: 3px; background: var(--sub); } .tm-photo .tm-btn { left: 8%; width: 16%; top: 42px; height: 5px; border-radius: 3px !important; background: #fff; }
/* b 文字が主役: 大きく太い左揃えの見出しと、罫線 */
.tm-editorial, .tm-simple, .tm-tech { --ink: #16191f; }
.tm-editorial .tm-bar, .tm-simple .tm-bar, .tm-tech .tm-bar { left: 0; right: 0; top: 8px; height: 1px; border-radius: 0 !important; background: var(--ink); }
.tm-editorial .tm-h1, .tm-simple .tm-h1, .tm-tech .tm-h1 { left: 8%; width: 66%; top: 14px; height: 9px; background: var(--ink); }
.tm-editorial .tm-h2, .tm-simple .tm-h2, .tm-tech .tm-h2 { left: 8%; width: 38%; top: 29px; height: 3px; background: var(--sub); }
.tm-editorial .tm-btn, .tm-simple .tm-btn, .tm-tech .tm-btn { right: 8%; width: 15%; top: 28px; height: 5px; border-radius: 3px !important; background: var(--a); }
.tm-editorial .tm-img, .tm-simple .tm-img, .tm-tech .tm-img { left: 8%; right: 8%; top: 38px; height: 30px; background: #fff; border: 1px solid var(--ink); border-radius: 3px !important; }
.tm-editorial { background: #fbfbf9; }
.tm-editorial .tm-h1 { height: 8px; border-radius: 1px !important; background: #2a2620; }
.tm-tech { background-color: #fbfcfd; background-image: linear-gradient(#e3e8ee 1px, transparent 1px), linear-gradient(90deg, #e3e8ee 1px, transparent 1px); background-size: 9px 9px; }
/* c 色の面で区切る: 地の上の、角の丸い深い色の面。写しは右からはみ出す */
.tm-corporate, .tm-pop { background: #e6ebf2; --deep: color-mix(in srgb, var(--a) 34%, #071226); }
.tm-pop { background: color-mix(in srgb, var(--a) 10%, #f4f3f7); border-color: color-mix(in srgb, var(--a) 22%, #fff); --deep: color-mix(in srgb, var(--a) 58%, #100a1c); }
.tm-corporate .tm-x, .tm-pop .tm-x { display: block !important; left: 4px; right: 4px; top: 9px; height: 40px; border-radius: 4px !important; background: var(--deep); overflow: hidden; }
.tm-pop .tm-x { border-radius: 8px !important; }
.tm-corporate .tm-bar, .tm-pop .tm-bar { left: 4px; width: 22%; top: 3px; height: 3px; background: #9aa6b8; }
.tm-corporate .tm-h1, .tm-pop .tm-h1 { left: 10%; width: 34%; top: 17px; height: 5px; background: #fff; }
.tm-corporate .tm-h2, .tm-pop .tm-h2 { left: 10%; width: 26%; top: 26px; height: 3px; background: rgba(255, 255, 255, .45); }
.tm-corporate .tm-btn, .tm-pop .tm-btn { left: 10%; width: 14%; top: 34px; height: 5px; border-radius: 3px !important; background: #fff; }
.tm-corporate .tm-img, .tm-pop .tm-img { left: 56%; right: 4px; top: 19px; height: 30px; background: #f4f6f9; border-radius: 3px 0 0 0 !important; }
.pe-palettes { display: flex; flex-wrap: wrap; gap: .4rem; }
.pe-palette { font: inherit; display: flex; align-items: center; gap: .4rem; padding: .3rem .45rem; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: .78rem; font-weight: 700; cursor: pointer; }
.pe-palette span { white-space: nowrap; }
.pe-palette i { width: 1rem; height: 1rem; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.pe-palette:hover { border-color: var(--ai-line); }
.pe-palette.on { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pe-fonts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
.pe-font { font: inherit; display: grid; justify-items: center; gap: .05rem; padding: .45rem .2rem; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); cursor: pointer; }
.pe-font b { font-size: 1.35rem; line-height: 1.2; }
.pe-font span { font-size: .7rem; color: var(--ink-3); white-space: nowrap; }
.pe-font.on { border-color: var(--ai); background: var(--ai-soft); box-shadow: inset 0 0 0 1px var(--ai); }
.pe-font.f-mincho b { font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif; font-weight: 600; }
.pe-font.f-rounded b { font-family: "Hiragino Maru Gothic ProN", "Zen Maru Gothic", "Rounded Mplus 1c", sans-serif; }
.pe-font.f-gothic b { font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif; font-weight: 800; }
.pe-seg.wide { display: flex; width: 100%; }
.pe-seg.wide button { flex: 1; }
.pe-app:not(.picking) .pe-gallery { display: none; }
.pe-app.picking .pe-stage, .pe-app.picking .pe-bar { display: none; }
.pe-gallery { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.25rem; display: grid; gap: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; box-shadow: var(--shadow-1); }
.pe-gallery-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.pe-gallery-head h2 { font-size: 1.15rem; }
.pe-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.pe-chips button { font: inherit; font-size: .82rem; font-weight: 700; padding: .3rem .85rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.pe-chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.pe-tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1rem; }
.pe-tcard { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; display: grid; grid-template-rows: auto 1fr; background: var(--surface); transition: box-shadow .18s, border-color .18s; }
.pe-tcard:hover { box-shadow: var(--shadow-2); border-color: var(--ai-line); }
.pe-tcard .thumb { border-bottom: 1px solid var(--line); }
.pe-tcard-body { padding: .8rem .9rem .95rem; display: grid; gap: .3rem; align-content: start; justify-items: start; }
.pe-tcard-body b { font-size: .98rem; }
.pe-tcard-body .btn { margin-top: .35rem; }
.pe-confirm { display: grid; gap: .45rem; margin-top: .35rem; }
.pe-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.25rem, 1fr)); gap: .3rem; }
.pe-icon-pick { display: grid; place-items: center; height: 2.25rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink-2); cursor: pointer; font: inherit; padding: 0; }
.pe-icon-pick svg { width: 1.15rem; height: 1.15rem; }
.pe-icon-pick:hover { border-color: var(--ai-line); color: var(--ink); }
.pe-icon-pick.on { border-color: var(--ai); background: var(--ai-soft); color: var(--ai); box-shadow: inset 0 0 0 1px var(--ai); }
.pe-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; padding: .35rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.pe-toolbar .btn:disabled { opacity: .45; cursor: default; }
.pe-revert { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-left: auto; }
.pe-toolbar > .btn:last-child:not(:nth-child(2)) { margin-left: auto; }
.pe-check { display: flex; align-items: center; gap: .5rem; font-size: .86rem; }
@media (max-width: 900px) {
  .main.wide { padding: 1rem 1rem 2rem; }
  .pe-app { grid-template-columns: minmax(0, 1fr); }
  .pe-tabs { display: flex; gap: 0; border: 1px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; position: sticky; top: 3.9rem; z-index: 5; background: var(--surface); }
  .pe-tabs button { flex: 1; font: inherit; font-weight: 700; padding: .55rem; border: 0; background: var(--surface); color: var(--ink-2); cursor: pointer; }
  .pe-tabs button + button { border-left: 1px solid var(--line-strong); }
  .pe-tabs button[aria-selected="true"] { background: var(--ai); color: var(--on-ai); }
  .tab-edit .pe-right, .tab-view .pe-left { display: none; }
  .pe-right { position: static; }
  .pe-frame { height: 75vh; min-height: 420px; }
}

/* 開発者向けのポータル（/developers）。読みやすい行の長さ（約 40 字）と、横に流せるコード・表 */
.skip { position: absolute; left: -999px; top: .5rem; z-index: 50; background: var(--surface); padding: .4rem .8rem; border-radius: var(--r-sm); }
.skip:focus { left: .5rem; }
.dev-bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1.5rem; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.dev-bar-sub { font-weight: 400; color: var(--ink-3); font-size: .9rem; padding-left: .6rem; border-left: 1px solid var(--line-strong); }
.dev-shell { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 2.5rem; max-width: 74rem; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.dev-nav ul { list-style: none; margin: 0; padding: 0; position: sticky; top: 5rem; display: grid; gap: .15rem; }
.dev-nav a { display: block; padding: .4rem .75rem; border-radius: var(--r-sm); color: var(--ink-2); }
.dev-nav a:hover { background: var(--surface-2); text-decoration: none; }
.dev-nav a[aria-current="page"] { background: var(--ai-soft); color: var(--ink); font-weight: 700; box-shadow: inset 3px 0 0 var(--ai); }
.dev-main { min-width: 0; }
.dev-doc { max-width: 46rem; }
.dev-doc h1 { font-size: 1.9rem; margin-bottom: 1.25rem; }
.dev-doc h2 { font-size: 1.3rem; margin: 2.5rem 0 .75rem; padding-top: 1rem; border-top: 1px solid var(--line); scroll-margin-top: 5rem; }
.dev-doc h3 { font-size: 1.05rem; margin: 1.75rem 0 .5rem; scroll-margin-top: 5rem; }
.dev-doc h4 { font-size: .95rem; margin: 1.25rem 0 .4rem; }
.dev-doc ul, .dev-doc ol { padding-left: 1.4rem; margin: 0 0 1rem; }
.dev-doc li + li { margin-top: .25rem; }
.dev-doc a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ai) 40%, transparent); }
.dev-doc pre { margin: .5rem 0 1.25rem; padding: .9rem 1.1rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); overflow-x: auto; font: .84rem/1.65 var(--mono); }
.dev-doc pre code { font-size: inherit; background: none; padding: 0; }
.dev-doc :not(pre) > code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: .05em .35em; overflow-wrap: anywhere; }
.dev-doc .table-wrap { margin: .5rem 0 1.25rem; border: 1px solid var(--line); border-radius: var(--r-sm); }
.dev-doc table th, .dev-doc table td { padding: .5rem .75rem; vertical-align: top; text-align: left; border-bottom: 1px solid var(--line); }
.dev-doc table tr:last-child td { border-bottom: 0; }
.dev-doc table th { background: var(--surface-2); font-size: .86rem; white-space: nowrap; }
.dev-doc blockquote { margin: 0 0 1rem; padding: .6rem 1rem; border-left: 3px solid var(--ai); background: var(--ai-soft); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.dev-doc blockquote p:last-child { margin: 0; }
.dev-toc { margin: 0 0 2rem; padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.dev-toc-title { font-weight: 700; font-size: .9rem; margin-bottom: .4rem; }
.dev-toc ul { list-style: none; margin: 0; padding: 0; columns: 2 16rem; column-gap: 2rem; }
.dev-toc li { break-inside: avoid; padding: .1rem 0; font-size: .92rem; }
.dev-toc li.sub { padding-left: 1rem; font-size: .86rem; }
.dev-products { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .5rem; }
.dev-products li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .75rem; }
.dev-products a { font-weight: 700; }
.dev-file { display: flex; align-items: flex-start; gap: .5rem 1rem; margin: .5rem 0 .75rem; }
.dev-file-meta { display: grid; min-width: 0; line-height: 1.6; }
.dev-file-meta .mono { overflow-wrap: anywhere; }
.dev-examples { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .25rem; }
.dev-examples li + li { border-top: 1px solid var(--line); padding-top: .75rem; }
.dev-examples h3 { font-size: .95rem; margin: 0; }
.dev-pre { white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
/* マーケットプレイスの出品のタブ */
.mk-status { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: .75rem; }
.mk-reason { background: var(--surface-2); border-radius: var(--r-sm); padding: .7rem .9rem; margin: 0 0 .9rem; overflow-wrap: anywhere; }
.mk-fields { border: 0; margin: 0; padding: 0; min-width: 0; }
.mk-fields fieldset.field { border: 0; padding: 0; margin: 0 0 1.2rem; }
.mk-fields fieldset.field legend { font-weight: 700; font-size: .9rem; margin-bottom: .4rem; padding: 0; }
.mk-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0 1rem; }
.mk-images { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .9rem; }
.mk-image { display: grid; gap: .3rem; align-content: start; padding: .6rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.mk-image img { width: 100%; height: 7rem; object-fit: contain; background: var(--surface); border-radius: calc(var(--r-sm) - 2px); }
.mk-image:has(input:checked) { border-color: var(--ai); box-shadow: 0 0 0 1px var(--ai); }
.mk-images-legend { grid-column: 1 / -1; display: grid; gap: .3rem; padding: 0; font-size: .9rem; }
ul.warn-text { margin: 0 0 .6rem; padding-left: 1.2rem; }
.mk-upload { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.mk-upload .hint { flex-basis: 100%; color: var(--ink-3); font-size: .83rem; }
.mk-upload .hint.error { color: var(--danger); font-weight: 700; }
fieldset[disabled] .mk-image, fieldset[disabled] input, fieldset[disabled] select, fieldset[disabled] textarea { opacity: .75; }
.mk-preview { display: grid; gap: .8rem; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 1rem; background: var(--surface); }
.mk-preview p { margin: 0; overflow-wrap: anywhere; }
.mk-preview-head { display: flex; gap: .9rem; align-items: flex-start; }
.mk-preview-head img, .mk-noicon { width: 64px; height: 64px; border-radius: 14px; flex: none; object-fit: cover; background: var(--surface-2); }
.mk-noicon { display: grid; place-items: center; font-size: .7rem; color: var(--ink-3); text-align: center; }
.mk-shots { display: flex; gap: .6rem; overflow-x: auto; padding-bottom: .3rem; }
.mk-shots img { height: 9rem; width: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.mk-queue { list-style: none; margin: 0 0 1.2rem; padding: 0; }
.mk-queue > li { padding: .7rem 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: baseline; }
.mk-queue p { margin: 0; overflow-wrap: anywhere; }
.mk-full { flex-basis: 100%; }
.mk-gap { margin-top: 1rem; }
.mk-op h2 { font-size: 1.05rem; margin: 1.6rem 0 .6rem; }
.mk-op dl { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0 0 .8rem; }
.mk-op dt { color: var(--ink-3); font-size: .88rem; }
.mk-op dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 40rem) { .mk-op dl { grid-template-columns: 1fr; } .mk-op dd { margin-bottom: .4rem; } }
@media (max-width: 40rem) { .dev-file { flex-direction: column; } }
@media (max-width: 52rem) {
  .dev-shell { grid-template-columns: 1fr; gap: 1rem; padding: 1rem 1rem 3rem; }
  .dev-nav ul { position: static; display: flex; flex-wrap: wrap; gap: .35rem; }
  .dev-nav a { border: 1px solid var(--line); padding: .3rem .7rem; font-size: .9rem; }
  .dev-nav a[aria-current="page"] { box-shadow: none; border-color: var(--ai); }
  .dev-bar { padding: .6rem 1rem; }
  .dev-doc h1 { font-size: 1.5rem; }
}

/* 販売者向けの試験の環境（sandbox）の帯（src/sandbox.ts が <body> の頭に入れる。CSP で style の属性が効かないので、ここでも同じ見た目にする） */
.sbx-banner { display: block; margin: 0; padding: 8px 16px; background: #fff4d6; color: #5c4100; border-bottom: 1px solid #e8c766; font: 600 14px/1.5 system-ui, sans-serif; text-align: center; }
