/* 管理画面（Phase 2B）: 表形式・情報密度は維持し、ブランドの階層と操作の強弱だけを整える。
   ヘッダー=チャコール＋白ロゴ＋金の細線（現在地だけ金）。主要ボタン=配布・進行の緑。利用可能/通常確認は青。利用停止は深赤のボタン。
   金は現在地の識別と細線だけ。光はPrimaryボタン（画面に1つ）の低頻度のshineだけ。 */
.top { background: var(--ch); border-bottom: 1px solid var(--gold-line); position: sticky; top: 0; z-index: 5; }
.top-in { max-width: 1240px; margin: 0 auto; min-height: 78px; padding: 10px 16px; display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.mark { width: 42px; height: auto; display: block; }
.mark[hidden] { display: none; }
.top h1 { margin: 0; font-family: var(--mincho); font-size: 18px; font-weight: 600; letter-spacing: 0.08em; line-height: 1.3; white-space: nowrap; color: #f4ede1; }
#nav[hidden] { display: none; }
#nav { display: flex; gap: 2px; flex-wrap: wrap; margin-left: auto; justify-content: flex-end; }
.brand { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; text-decoration: none; border-radius: 4px; }
.brand:hover h1 { color: var(--gold-light); }
.brand:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
#nav a { padding: 6px 10px 5px; color: rgba(244, 237, 225, 0.68); text-decoration: none; font-size: 15px; font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; }
#nav a:hover { color: #f4ede1; }
#nav a[aria-current="page"] { color: var(--gold-light); border-bottom-color: var(--gold); }
#nav a:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.who { font-size: 13px; color: rgba(244, 237, 225, 0.55); }
.account {display:flex;align-items:center;gap:10px;margin-left:auto;}
.logout {display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 8px;color:#f4ede1;font-size:13px;text-decoration:none;border:1px solid #716852;border-radius:5px;white-space:nowrap;}
.logout:hover {background:#ffffff10;}
.logout:focus-visible {outline:2px solid var(--gold);outline-offset:2px;}

.main { max-width: 1240px; margin: 0 auto; padding: 14px 16px 40px; }
.muted { color: var(--ink-soft); }
.foot { max-width: 1240px; margin: 0 auto; padding: 0 16px 24px; font-size: 12px; }
.foot a { color: #8a7a6a; }

h2 { font-size: 17px; margin: 0 0 8px; color: var(--ink); }
h3 { font-size: 15px; margin: 18px 0 6px; color: var(--ink); }

.bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.bar .grow { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 1px 4px 1px 10px; border-radius: 999px; background: #eadfc9; font-size: 13px; }
.chip button { border: 0; background: transparent; cursor: pointer; padding: 0 6px; color: var(--ink-soft); }

/* ボタンの強弱: Primary（ゴールド）> Secondary（枠線）> Tertiary/Danger（文字だけ） */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  border: 1px solid #a88f6c; background: #fffdf8; color: var(--ink);
  padding: 4px 12px; border-radius: 5px; cursor: pointer; font-size: 14px; font-weight: 600; text-decoration: none; display: inline-block; line-height: 1.6;
}
.btn:hover { background: #f3e9d6; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--primary); outline-offset: 1px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.primary:not(.small)::after { /* 画面に1つだけのPrimaryに、ごく弱いshineを約10秒に1度 */
  content: ''; position: absolute; top: 0; bottom: 0; left: -40%; width: 26%; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 244, 222, 0.16), transparent); transform: skewX(-18deg);
  animation: btn-shine 10s ease-in-out 3s infinite;
}
@keyframes btn-shine { 0%, 86% { left: -40%; } 100% { left: 140%; } }
.btn.small { padding: 1px 9px; font-size: 13px; }
.btn.danger { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.danger:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.danger.outline { color:var(--accent);border-color: #d9a9a4; background: #fffdf8; }
.btn.info {color:var(--info);border-color:#adc2d3;background:var(--paper);}
.btn.confirm { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn[disabled] { opacity: 0.55; cursor: default; }

input, select, textarea { border: 1px solid #8b8376; border-radius: 5px; background: #fff; padding: 4px 8px; font-size: 14.5px; line-height: 1.5; max-width: 100%; }
label { font-size: 14px; color: var(--ink-soft); display: block; }
label > span { display: block; margin-bottom: 2px; font-weight: 600; }

.tablewrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #efe5d1; font-size: 13.5px; color: var(--ink-soft); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: left; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.actions { white-space: nowrap; }
td.actions > * { margin-right: 4px; vertical-align: middle; }
td.actions .danger { margin-left: 10px; }
td.actions { line-height: 1.4; }
tr.sel td { background: #fbf3e2; }
.nowrap { white-space: nowrap; }
.empty { padding: 24px; text-align: center; color: var(--ink-soft); }

/* 案件一覧は通常幅に収め、数値を圧縮して操作だけを2行にまとめる。 */
table.t-camp { table-layout: fixed; width: 100%; min-width: 0; }
table.t-camp th, table.t-camp td { padding: 6px 5px; }
table.t-camp th { white-space: normal; text-align: center; line-height: 1.2; font-size: 12.5px; }
table.t-camp th:nth-child(2) { width: 9.5%; }
table.t-camp th:nth-child(3) { width: 12%; }
table.t-camp th:nth-child(n+4):nth-child(-n+6) { width: 7%; }
table.t-camp th:nth-child(7) { width: 6.5%; }
table.t-camp th:nth-child(8) { width: 30.5%; }
.t-camp td:first-child { overflow-wrap: anywhere; white-space: normal; }
.t-camp td.num { text-align: center; font-size: 12px; }
.t-camp td.available-ratio { white-space: nowrap; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.t-camp .ratio-divider { color: var(--ink-soft); padding: 0 2px; font-weight: 400; }
.t-camp td.actions { padding: 6px 5px; white-space: normal; line-height: 1.2; }
.campaign-actions { display: grid; gap: 5px; min-width: 0; }
.campaign-action-row { display: grid; gap: 5px; min-width: 0; }
.campaign-action-row:first-child { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.campaign-action-row:last-child { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.campaign-action-row > .btn { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 38px; margin: 0; padding: 4px 2px; font-size: 12px; line-height: 1.2; text-align: center; white-space: nowrap; }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px 14px; margin-bottom: 12px; }
details.panel > summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 12px; margin-top: 8px; align-items: end; }
.form .wide { grid-column: 1 / -1; }
.form.campaign-create-form { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto; gap: 12px 18px; }
.campaign-create-form > label { min-width: 0; }
.campaign-create-form > div:last-child { justify-self: end; }
@media (max-width: 720px) {
  .form.campaign-create-form { grid-template-columns: minmax(0, 1fr); }
  .campaign-create-form > div:last-child { justify-self: start; }
}

/* スマホの案件・券は、対象から主要操作までカード内で完結させる。 */
@media (max-width:720px) {
  .top-in {gap:6px 10px;}
  .brand {gap:8px;flex:1 1 auto;}
  .brand h1 {font-size:14px;letter-spacing:.02em;}
  .mark {width:30px;}
  .account {margin-left:auto;gap:0;}
  .account .who {display:none;}
  .logout {font-size:12px;padding:0 7px;}
  .tablewrap:has(.t-camp),.tablewrap:has(.t-coupons) {overflow:visible;background:transparent;border:0;}
  table.t-camp,table.t-coupons {display:block;min-width:0;width:100%;table-layout:auto;}
  .t-camp thead,.t-coupons thead {display:none;}
  .t-camp tbody,.t-coupons tbody {display:grid;gap:10px;}
  .t-camp tr,.t-coupons tr {display:grid;gap:8px;background:var(--paper);padding:12px;border:1px solid var(--line);border-radius:8px;min-width:0;}
  .t-camp tr {grid-template-columns:repeat(3,minmax(0,1fr));}
  .t-coupons tr {grid-template-columns:auto minmax(0,1fr);}
  .t-camp td,.t-coupons td {display:block;padding:0;border:0!important;min-width:0;white-space:normal;}
  .t-camp td:first-child {grid-column:1/3;overflow:visible;white-space:normal;font-size:16px;font-weight:700;overflow-wrap:anywhere;}
  .t-camp td:nth-child(2) {grid-column:3;justify-self:end;}
  .t-camp td:nth-child(n+3):nth-child(-n+4) {font-size:15px;}
  .t-camp td:nth-child(3)::before {content:'利用可能／発行数';}
  .t-camp td:nth-child(4)::before {content:'使用済み';}
  .t-camp td:nth-child(n+3):nth-child(-n+4)::before {display:block;font-size:12px;color:var(--ink-soft);}
  .t-camp td.available-ratio {white-space:normal;}
  .t-camp td:nth-child(n+5):nth-child(-n+7) {display:none;}
  .t-camp td.actions,.t-coupons td.actions {grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;white-space:normal;border-top:1px solid var(--line)!important;padding-top:10px;}
  .t-camp td.actions {display:block;}
  .t-camp .campaign-actions {gap:8px;}
  .t-camp .campaign-action-row {gap:8px;}
  .t-camp .campaign-action-row>.btn,.t-coupons td.actions>.btn {margin:0;min-height:44px;display:flex;align-items:center;justify-content:center;width:100%;padding:6px 8px;font-size:14px;text-align:center;white-space:nowrap;}
  .t-camp td.actions .campaign-action-row>button.danger {background:var(--paper);color:var(--accent);border-color:#d9a9a4;}
  .t-camp td.actions .campaign-action-row>button.confirm {background:var(--accent);color:white;}
  .t-coupons td.hide-sm {display:none;}
  .t-coupons td:first-child {grid-column:1;grid-row:1;font-size:16px;font-weight:700;align-self:center;}
  .t-coupons td:nth-child(3) {grid-column:1/-1;grid-row:2;font-size:15px;font-weight:600;overflow-wrap:anywhere;}
  .t-coupons td.coupon-state {grid-column:2;grid-row:1;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:4px;}
  .t-coupons .state,.t-camp .state {font-size:12px;padding:1px 7px;min-width:0;}
  .t-coupons td.actions>.danger {background:var(--paper);color:var(--accent);border-color:#d9a9a4;}
  .t-coupons td.actions>.confirm {background:var(--accent);color:white;}
}
.form input:not([type=checkbox]), .form select, .form textarea { width: 100%; }
.form .check { display: flex; align-items: center; gap: 6px; }

.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 8px; font-size: 14px; color: var(--ink-soft); }

.progress { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 6px 0; }
.progress i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .2s; }
.done { background: var(--ok-bg); border: 1px solid #b9d8bd; border-radius: 6px; padding: 10px 14px; margin-top: 10px; }
.done b { font-size: 16px; }

.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: var(--ch-2); color: #f4ede1; border: 1px solid var(--gold-line); padding: 8px 16px; border-radius: 6px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 92vw; z-index: 20; }
.toast.show { opacity: 1; }
.toast.err { background: var(--accent-dark); border-color: var(--accent-dark); }

main a:not(.btn) { color: var(--link-ink); text-decoration-color: #c9a06f; text-underline-offset: 2px; }
main a:not(.btn):hover { color: var(--accent-dark); }

/* ---- 店舗スタッフ: 検索 → 状態確認 → 必要なら取消 をコンパクトに ---- */
.staff-search { display: flex; gap: 8px; margin-bottom: 8px; }
.staff-search input { flex: 1; min-width: 0; height: 44px; font-size: 16px; padding: 4px 12px; }
.staff-search .btn { height: 44px; padding: 0 22px; font-size: 16px; }
.staff-count { margin: 2px 2px 6px; font-size: 13.5px; color: var(--ink-soft); }
.slist { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.srow { display: grid; grid-template-columns: auto 1fr auto; column-gap: 10px; row-gap: 2px; padding: 8px 12px; border-bottom: 1px solid var(--line); align-items: center; }
.srow:last-child { border-bottom: 0; }
.srow .state { min-width: 6.2em; text-align: center; font-size: 14px; padding: 0 8px; border-radius: 4px; }
.srow .sn { font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.4; font-variant-numeric: tabular-nums; }
.srow .btn { align-self: center; justify-self: end; }
.srow .st { grid-column: 1 / -1; font-size: 14.5px; line-height: 1.5; }
.srow .st span { display: inline-block; white-space: nowrap; }
.srow .st .ty { font-weight: 700; color: var(--ink); margin-right: 0.9em; }
.srow .st .cp { color: var(--ink-soft); }
.srow .su { grid-column: 1 / 3; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.srow .hist { grid-column: 1 / -1; font-size: 13.5px; border-top: 1px dashed var(--line); padding-top: 5px; margin-top: 3px; }
.srow.used { background: #f7f2e8; }

@media (max-width: 720px) {
  .top h1 { font-size: 16px; }
  th, td { padding: 6px 8px; font-size: 13px; }
  .main { padding: 10px 10px 40px; }
  .form { grid-template-columns: 1fr 1fr; }
  .top-in { min-height: 0; gap: 10px; padding: 10px 12px 0; }
  .brand { gap: 12px; }
  .mark { width: 36px; }
  .who { margin-left: auto; font-size: 12px; }
  .top h1 { flex: 1; }
  #nav { flex: 0 0 100%; order: 3; flex-wrap: nowrap; overflow-x: auto; gap: 0; justify-content: flex-start; border-top: 1px solid var(--gold-line); }
  #nav a { padding: 5px 10px 4px; font-size: 14px; }
  .hide-sm { display: none; }
  td.actions { white-space: normal; }
  td.actions > * { margin: 0 4px 4px 0; }
  .bar select, .bar input { max-width: 46vw; }
  table.t-camp { table-layout: fixed; min-width: 1100px; }
  
  table.t-camp td:first-child { white-space: nowrap; overflow: hidden; }
  table.t-camp td.actions { white-space: nowrap; } /* スマホでは操作列を縦に積まず、表ごと横にスクロールさせる */
}

@media (prefers-reduced-motion: reduce) {
  .btn.primary:not(.small)::after { animation: none; opacity: 0; }
}

/* 2C: 短い項目は折り返さず、日時・番号範囲・操作を意図的に縦へ配置。 */
.stack > span { display: block; white-space: nowrap; line-height: 1.45; }
.datetime { display:block;font-variant-numeric: tabular-nums; }
.datetime span + span { color: var(--ink-soft); font-size: 13px; }
.name-lines { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; word-break: auto-phrase; overflow-wrap: normal; line-height: 1.55; }
table.t-issue { table-layout: fixed; min-width: 1160px; }
.t-issue th:nth-child(1) { width: 112px; }
.t-issue th:nth-child(2) { width: 23%; }
.t-issue th:nth-child(3) { width: 21%; }
.t-issue th:nth-child(4) { width: 110px; }
.t-issue th:nth-child(5) { width: 96px; }
.t-issue th:nth-child(6) { width: 90px; }
.t-issue th:nth-child(7) { width: 110px; }
.t-issue th:nth-child(8) { width: 116px; }
td.actions.vertical { white-space: nowrap; padding-top: 6px; padding-bottom: 6px; }
td.actions.vertical > * { display: block; width: 94px; margin: 0 0 3px; text-align: center; }
td.actions.vertical > :last-child { margin-bottom: 0; }
table:not(.t-camp):not(.t-issue) { min-width: 960px; }
table:not(.t-camp):not(.t-issue) td { white-space: nowrap; }
.staff-intro { margin: 0 0 12px; font-size: 14px; color: var(--ink-soft); }
.srow .st span { white-space: normal; word-break: auto-phrase; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .brand h1 { font-size: 16px; letter-spacing: .04em; }
  .brand { max-width: 100%; }
  .who { flex: 0 0 auto; }
  .staff-intro { font-size: 14px; }
  .form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* UI差分: 表の区切りと情報の役割 */
th+th,td+td {border-left:1px solid #dccfb67a;}
.coupon-state {min-width:108px;}
.coupon-state>span {display:table;width:max-content;margin:0 0 3px;line-height:1.5;}
.coupon-state>span:last-child {margin-bottom:0;}
.coupon-state .state {justify-self:start;}
.distribution-state {font-size:13px;color:var(--off);background:var(--off-bg);border-color:#cfc6b8;white-space:nowrap;}
.distribution-state.is-distributed {color:var(--ok);background:var(--ok-bg);border-color:#b9d8bd;}
@media(min-width:1200px){.t-issue th:first-child{width:166px;}.t-issue .datetime{display:flex;gap:5px;white-space:nowrap;}.t-issue .datetime span+span{font-size:inherit;}}

.t-issue td:nth-child(4) {white-space:normal;}
.t-issue td:nth-child(4) .name-lines {overflow-wrap:anywhere;}

/* Staff issuance: keep the task small and coupon actions on separate rows. */
.staff-issue-page {max-width:900px; margin-inline:auto;}
.staff-issue-form {grid-template-columns:minmax(0,1fr) auto;}
.staff-issue-form input[type=number] {max-width:180px;}
.staff-type-detail {line-height:1.75; margin:0; overflow-wrap:anywhere;}
.staff-type-detail p {margin:0 0 8px;}
.staff-issue-form strong {font-size:20px;overflow-wrap:anywhere;}
.staff-issue-form .muted {margin:0 0 5px;}
.metadata-dialog.coupon-type-dialog {width:min(720px,calc(100% - 24px));max-height:90dvh;overflow:auto;color:var(--ink);}
.coupon-type-dialog .form {gap:14px;}
.edit-impact {background:#efe5d1;border-left:3px solid var(--gold);padding:12px;}
.edit-impact p {margin:0 0 6px;}
.edit-impact p:last-child {margin:0;}
.staff-issued-list {list-style:none; padding:0; margin:16px 0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px;}
.staff-issued-list li {min-width:0; border:1px solid var(--line,#d8cbb5); border-radius:8px; padding:16px; background:#fffdf8;}
.staff-issued-list .actions {display:flex; flex-wrap:wrap; gap:8px;}
.permission-editor {min-width:240px; padding:12px 0;}
.permission-editor .check {display:flex; align-items:flex-start; gap:8px;}
@media(max-width:720px){.staff-issue-form {grid-template-columns:minmax(0,1fr);} .staff-issued-list {grid-template-columns:minmax(0,1fr);} .staff-issued-list .actions {flex-direction:column; align-items:stretch;} .staff-issued-list .btn {text-align:center;} }

@media(max-width:720px){
  .main table.t-camp,.main table.t-coupons {min-width:0;table-layout:auto;}
  table.t-camp td:first-child,.main table.t-coupons td {white-space:normal;overflow:visible;}
  table.t-camp td.actions {white-space:normal;}
  .brand h1 {font-size:14px;letter-spacing:.02em;}
  .brand {gap:8px;}
  .mark {width:30px;}
  .t-coupons td.coupon-state {min-width:0;}
  .t-coupons .coupon-state>span {display:inline-block;width:auto;margin:0;}
}
/* 案件だけを横へ切り替え、券カードは縦のまま維持する。 */
.campaign-quick {display:flex;gap:8px;overflow-x:auto;max-width:100%;padding:4px 0 10px;}
.campaign-chip {flex:none;white-space:nowrap;min-height:44px;}
.campaign-chip[aria-pressed=true] {border-color:var(--gold-deep);background:#eadfc9;color:var(--ink);font-weight:700;box-shadow:inset 0 -3px var(--gold);}
.used-toggle {display:flex;align-items:center;gap:8px;min-height:44px;font-size:14px;white-space:nowrap;}
.used-toggle input {width:20px;height:20px;min-height:20px;accent-color:var(--gold-deep);}
.filter-note {font-size:13px;color:var(--ink-soft);margin:0 0 12px;}
@media(max-width:720px){.coupon-toolbar {gap:8px;}.coupon-toolbar select,.coupon-toolbar input:not([type=checkbox]){max-width:100%;}.coupon-toolbar>.btn{min-height:44px;}}

/* 第二次実運用調整: global navigation and local filters have separate roles. */
.menu-button{display:none}.mobile-menu{width:min(420px,calc(100% - 24px));max-height:calc(100dvh - 24px);border:1px solid var(--gold-line);border-radius:8px;background:var(--paper);color:var(--ink);padding:18px}.mobile-menu::backdrop,.metadata-dialog::backdrop{background:#111a}.menu-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.mobile-menu nav{display:grid;margin:12px 0}.mobile-menu nav a{padding:13px 12px;border-bottom:1px solid #ddd2bf;color:var(--ink);text-decoration:none;min-height:44px}.mobile-menu nav a[aria-current=page]{background:#eadfc7;font-weight:700;border-left:3px solid var(--gold)}.mobile-menu .logout{display:block;margin-top:12px;color:var(--ink);padding:12px}.metadata-dialog{width:min(520px,calc(100% - 24px));padding:20px;border:1px solid var(--gold-line);border-radius:8px;background:var(--paper)}.metadata-dialog input,.metadata-dialog textarea{width:100%;min-width:0}.metadata-dialog textarea{min-height:100px}.dialog-actions{display:flex;gap:12px}.campaign-title{font-weight:700}.type-summary{display:block;margin-top:7px;color:var(--muted);font-size:13px}.list-heading{justify-content:space-between;flex-wrap:wrap}.filter-panel{margin-left:auto}.filter-panel>.coupon-toolbar{margin-top:12px;padding:12px;border:1px solid #ded3bf;border-radius:6px}.filter-panel[open]{flex:1 0 100%;margin:0}.type-quick{margin-top:8px}.filter-note{font-size:12px}
@media(max-width:640px){
.top-in{display:flex!important;align-items:center!important;justify-content:space-between;gap:8px;padding:12px!important}.top .brand{min-width:0;flex:1}.top .brand h1{font-size:20px!important;letter-spacing:0!important;white-space:normal!important;line-height:1.3}.top .mark{height:50px!important;width:35px!important}.top #nav,.top .account{display:none!important}.menu-button{display:block;flex:0 0 44px;width:44px;min-height:44px;background:transparent;color:var(--paper);border:1px solid var(--gold-line);border-radius:4px;font-size:22px}.main h2{font-size:22px!important}.t-camp .campaign-title{font-size:21px!important;line-height:1.4}.t-camp td.actions{grid-template-columns:1fr 1fr!important}.t-camp td.actions .danger{grid-column:1/-1}.t-coupons tbody tr{grid-template-areas:'title title' 'serial state' 'actions actions'!important}.t-coupons tbody td:nth-child(1){grid-area:serial;font-size:14px!important;font-weight:400!important}.t-coupons tbody td:nth-child(3){grid-area:title;font-size:21px!important;font-weight:700!important;line-height:1.4}.t-coupons tbody td.coupon-state{grid-area:state}.t-coupons tbody td.actions{grid-area:actions}.filter-panel .coupon-toolbar{max-width:100%;display:flex;flex-wrap:wrap}.filter-panel input,.filter-panel select{max-width:100%}.filter-panel .used-toggle{min-height:44px}.list-heading h2{margin:0}.list-heading{gap:10px}.type-quick{max-width:100%}
}

@media(max-width:640px){.t-camp td.actions>.btn{grid-column:auto!important}.t-camp td.actions>.danger{grid-column:1/-1!important}.tablewrap:has(.t-types){overflow:visible;background:transparent;border:0}table.t-types{display:block!important;min-width:0!important;width:100%!important}.t-types thead{display:none}.t-types tbody{display:grid;gap:12px}.t-types tr{display:grid;gap:8px;border:1px solid var(--line);border-radius:6px;padding:12px;background:var(--paper)}.t-types td{display:block;border:0!important;padding:0;white-space:normal!important;min-width:0}.t-types td:first-child{font-size:20px;font-weight:700}.t-types td:nth-child(3){font-size:13px;color:var(--muted)}.t-types .actions{display:flex;gap:8px;flex-wrap:wrap}.t-types .actions>.btn{flex:1;min-height:44px}.metadata-dialog .form{grid-template-columns:1fr}.metadata-dialog h2{font-size:22px}}
@media(max-width:640px){.t-camp td.actions>button:not(.danger):not(.confirm){background:var(--paper);color:var(--ink);border-color:var(--line)}}

/* 複数店舗（MULTISTORE_MODE=on のときだけ要素が出る） */
.store-switch{min-height:36px;max-width:220px;padding:4px 8px;border:1px solid var(--gold-line);border-radius:4px;background:var(--paper);color:var(--ink);font-size:14px;font-weight:700}
span.store-switch{display:inline-flex;align-items:center;background:transparent;color:var(--paper)}
.menu-store{display:grid;gap:6px;margin:0 0 16px}.menu-store span{font-size:14px;color:var(--ink-soft)}.menu-store .store-switch{max-width:100%;min-height:44px;font-size:16px}
.store-label{display:block;margin-top:4px;color:var(--ink-soft);font-weight:700}
.store-unresolved{display:grid;gap:6px;margin-top:6px}.store-assign{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.store-assign select{min-height:36px;max-width:100%}
.record-filter{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;align-items:end}
@media (max-width:720px){.record-filter{grid-template-columns:1fr}.store-assign select{min-height:44px;flex:1 1 100%}}
@media (max-width:720px){
.t-records,.t-members{min-width:0!important;width:100%}
.t-records thead,.t-members thead{display:none}
.t-records tbody tr,.t-members tbody tr{display:grid;grid-template-columns:1fr auto;gap:6px 12px;padding:12px;border-bottom:1px solid var(--gold-line)}
.t-records td,.t-members td{display:block;border:0!important;padding:0!important;min-width:0;overflow-wrap:anywhere}
.t-records td:nth-child(3){grid-column:1/-1;grid-row:1;font-weight:700;font-size:17px}
.t-records td:nth-child(5),.t-records td:nth-child(7){color:var(--ink-soft)}
.t-members td:first-child{font-weight:700;font-size:17px}.t-members td.actions{grid-column:1/-1}
}

/* 表示訂正ダイアログの適用範囲欄 */
.coupon-type-dialog fieldset { border: 1px solid var(--line, #d6d2c8); border-radius: 6px; padding: 10px 14px; }
.coupon-type-dialog fieldset label.check { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; text-align: left; margin: 6px 0; }
.coupon-type-dialog fieldset label.check input { flex: 0 0 auto; width: auto; }

/* hidden属性は .btn 等のdisplay指定より優先する（隠したボタンが見えたまま押せて無反応になるのを防ぐ） */
[hidden] { display: none !important; }
/* 通知はダイアログ（最前面レイヤー）より手前に出す（popover）。既定のpopover枠・位置は使わない */
.toast[popover] { inset: auto auto 18px 50%; margin: 0; width: max-content; height: auto; overflow: visible; }
/* 特典・補足・注意事項の改行を一覧・プレビュー説明でもそのまま見せる */
.multiline, table.t-types td.multiline { white-space: pre-line; overflow-wrap: anywhere; min-width: 12em; }
.role-guide { margin: 4px 0 10px; font-size: 13px; }
.role-guide b { font-weight: 700; }
.preview-quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 12px; }
.batch-counts { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); white-space: normal; }
.empty-reason { margin: 10px 0; padding: 12px 14px; border: 1px solid var(--gold-line); border-radius: 6px; background: var(--paper); }
.empty-reason p { margin: 4px 0; }
.empty-reason .dialog-actions { flex-wrap: wrap; margin-top: 8px; }
/* 券面プレビュー（管理用の見本） */
.card-preview-dialog { width: min(980px, calc(100% - 24px)); max-height: 94dvh; overflow: auto; color: var(--ink); }
.card-preview-dialog .sample-banner { margin: 0 0 12px; padding: 10px 12px; border: 2px solid var(--accent); border-radius: 6px; color: var(--accent-dark); font-weight: 700; background: #fff6f2; }
.card-preview-layout { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 18px; align-items: start; }
.card-preview-frame { display: block; width: 390px; max-width: 100%; height: min(760px, 72dvh); border: 1px solid var(--line); border-radius: 18px; background: #fff; margin: 0 auto; }
.card-preview-controls { display: grid; gap: 10px; }
.card-preview-controls .seg { display: flex; flex-wrap: wrap; gap: 6px; }
.card-preview-controls .seg .btn[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.field-map { margin: 0; border-top: 1px solid var(--line); }
.field-map > div { display: grid; grid-template-columns: 9em 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.field-map dt { color: var(--muted); }
.field-map dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.save-result { padding: 10px 12px; border-radius: 6px; border: 1px solid #6c8f5a; background: #f1f7ec; }
.save-result.error { border-color: var(--accent); background: #fff1ee; }
@media (max-width: 760px) { .card-preview-layout { grid-template-columns: 1fr; } .field-map > div { grid-template-columns: 7em 1fr; } }
/* 券種編集: 保存する変更（変更した項目だけ）の一覧 */
.edit-diff { border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; }
.edit-diff h3 { margin: 0 0 4px; font-size: 15px; }
.edit-diff p { margin: 3px 0; }
/* 編集・表示訂正: 入力欄の隣に入力中の券面プレビューを固定表示（PC）。狭い画面では入力欄の下に表示 */
.coupon-type-dialog.with-live { width: min(1180px, calc(100% - 24px)); }
.live-layout { display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 18px; align-items: start; }
.live-card { position: sticky; top: 0; display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.live-card .sample-banner { margin: 0; padding: 6px 10px; border: 2px solid var(--accent); border-radius: 6px; color: var(--accent-dark); font-weight: 700; font-size: 13px; background: #fff6f2; }
.live-card .card-preview-frame.live { height: min(640px, 66dvh); }
.live-card .seg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.br-help { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: -6px; }
@media (max-width: 900px) { .live-layout { grid-template-columns: 1fr; } .live-card { position: static; } }
/* 共通URL配布（案件の詳細内）。既存のpanel・btn・stateを使い、数値は意味が分かる短い注記つきのタイルで並べる */
.event-url { margin: 4px 0 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.event-url h3 { margin: 0; font-size: 17px; }
.event-state { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0; }
.event-url-link { display: flex; gap: 8px; align-items: center; }
.event-url-link input { flex: 1 1 auto; min-width: 0; min-height: 40px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.event-url .small-note { font-size: 13px; margin: 6px 0 10px; }
.event-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 0 0 12px; }
.event-stat { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; min-width: 0; }
.event-stat .lab { font-size: 12px; color: var(--ink-soft); }
.event-stat b { font-size: 20px; line-height: 1.3; }
.event-stat small { font-size: 12px; color: var(--ink-soft); line-height: 1.4; overflow-wrap: anywhere; }
.event-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 8px; }
.event-add { display: inline-flex; gap: 6px; align-items: center; }
.event-add input { width: 6.5em; min-height: 40px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; }
.event-settings-wrap, .event-url details { margin-top: 8px; }
.event-links { margin: 10px 0 0; font-size: 14px; }
@media (max-width: 720px) {
  .event-url { padding: 12px; }
  .event-url-link { flex-direction: column; align-items: stretch; }
  .event-url-link .btn, .event-actions .btn { min-height: 44px; }
  .event-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* 受取ページの表示モード切替と、案内型のデザイン編集 */
.event-mode { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--gold-line); border-radius: 6px; background: #fbf6ea; }
.event-mode-now { margin: 0; font-size: 15px; }
.event-mode-now b { font-size: 17px; }
.metadata-dialog.guide-editor { width: min(1240px, calc(100% - 24px)); max-height: 94dvh; overflow: auto; color: var(--ink); }
.guide-editor-layout { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 20px; align-items: start; }
.guide-form { grid-template-columns: 1fr 1fr; }
.guide-form input[type=color] { width: 100%; min-height: 40px; padding: 2px; }
.guide-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; }
.guide-preview-col { position: sticky; top: 0; }
.guide-preview-frame { margin: 8px auto 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; max-width: 100%; }
.guide-preview-frame.w-390 { width: 390px; }
.guide-preview-frame.w-820 { width: 820px; }
.guide-preview .guide { padding: 14px; min-height: 420px; }
.guide-history ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.guide-history li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 4px 0; font-size: 14px; }
.save-result.ok { color: var(--ok); } .save-result.warn { color: var(--warn); } .save-result.error { color: var(--accent); }
@media (max-width: 900px) {
  .guide-editor-layout { grid-template-columns: 1fr; }
  .guide-form { grid-template-columns: 1fr; }
  .guide-preview-col { position: static; }
  .guide-preview-frame.w-820 { width: 100%; }
}
.guide-form label.check { grid-column: 1 / -1; display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; text-align: left; margin: 0; }
.guide-form label.check input { width: auto; flex: 0 0 auto; }
.guide-editor-layout > div, .guide-form > * { min-width: 0; }
.guide-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.guide-form input:not([type=checkbox]), .guide-form textarea, .guide-form select { width: 100%; max-width: 100%; box-sizing: border-box; }
@media (max-width: 900px) { .guide-form { grid-template-columns: minmax(0, 1fr); } }
/* 受取ページVisual Editor（総合システム管理者専用）。左=要素の選択と詳細、右=見本（公開ページと同じ描画） */
.metadata-dialog.ee-dialog { width: min(1320px, calc(100% - 20px)); max-height: 96dvh; overflow: auto; color: var(--ink); padding: 16px 18px; }
.ee-pick { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0 8px; }
.ee-pick label { display: flex; flex-direction: column; gap: 2px; min-width: 200px; flex: 1 1 200px; max-width: 360px; }
.ee-pick select { width: 100%; min-height: 40px; }
.ee-mode-note { margin: 0 0 6px; font-size: 13px; color: var(--ink-soft); }
.ee-body { display: grid; grid-template-columns: minmax(320px, 460px) minmax(0, 1fr); gap: 20px; align-items: start; }
.ee-body > div { min-width: 0; }
.ee-targets { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.ee-target[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.ee-props { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px 14px; background: #fff; margin-bottom: 12px; }
.ee-props h3 { margin: 4px 0 8px; font-size: 17px; }
.ee-props h4, .ee-left h4 { margin: 14px 0 6px; font-size: 14px; }
.ee-row { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid #efe7d6; }
.ee-label { font-size: 13px; color: var(--ink-soft); }
.ee-ctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.ee-ctl input[type=range] { flex: 1 1 110px; min-width: 90px; }
.ee-ctl input[type=number] { width: 5.5em; min-height: 36px; padding: 2px 6px; }
.ee-ctl input[type=text], .ee-ctl input:not([type]), .ee-ctl select, .ee-ctl textarea { width: 100%; max-width: 100%; box-sizing: border-box; min-height: 36px; }
.ee-ctl input[type=color] { width: 44px; height: 36px; padding: 2px; }
.ee-ctl input.ee-hex { width: 7.5em; font-family: ui-monospace, Menlo, monospace; }
.ee-ctl input.bad { border-color: var(--accent); background: #fff1ee; }
.ee-inline { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.ee-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 8px; }
.ee-actions { flex-wrap: wrap; margin: 6px 0; }
.ee-actions input { flex: 1 1 180px; min-width: 0; min-height: 40px; }
.ee-delegation { margin-top: 16px; padding: 10px 12px; border: 1px dashed var(--gold-line); border-radius: 8px; background: #fbf6ea; }
.ee-preview-col { position: sticky; top: 0; }
.ee-contrast { font-size: 12px; margin: 8px 0 0; }
.guide-preview-frame.w-320 { width: 320px; }
.ee-body .guide-preview .guide { padding: 14px; min-height: 420px; }
@media (max-width: 900px) {
  .ee-body { grid-template-columns: minmax(0, 1fr); }
  .ee-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .ee-preview-col { position: static; order: -1; }
  .guide-preview-frame.w-820 { width: 100%; }
}

/* Visual Editor: 実クーポン券種の文言・見本の切替 */
.ee-previews { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.ee-previews.m-guide .ee-ticket-wrap, .ee-previews.m-ticket .ee-guide-wrap { display: none; }
.ee-previews > div { min-width: 0; flex: 1 1 320px; }
.ee-previews.m-both .guide-preview-frame { width: 100%; }
.ee-previews .live-card { position: static; }
.ee-pmode { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 8px; }
.ee-pmode .btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.ee-pending { margin: 8px 0 2px; font-size: 13px; color: var(--ink-soft); }
.ee-pending.warn { color: var(--accent-dark); font-weight: 700; }
.ee-source { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 4px 0 8px; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line); background: #f7f3ea; font-size: 13px; }
.ee-source.s-type, .ee-source.s-mixed { border-color: var(--accent); background: #fff6f2; }
.ee-source.s-cond { background: #eef2f6; }
.ee-review { margin: 8px 0; padding: 8px 12px; border: 1px solid var(--accent); border-radius: 8px; background: #fff6f2; }
.ee-review:empty { display: none; }
.ee-review h4 { margin: 4px 0 6px; }

/* ---- 2026-11-13 案件一覧の6ショートカット・案件の管理画面（タブ統合） ---- */
.shortcut-grid .campaign-action-row:last-child { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shortcut-grid .campaign-action-row + .campaign-action-row { padding-top: 5px; border-top: 1px dashed var(--line); }
td.actions .shortcut-grid .danger { margin-left: 0; }
.workspace { display: grid; gap: 12px; min-width: 0; }
.ws-head { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: end; }
.ws-back { grid-column: 1 / -1; font-size: 13px; color: var(--ink-soft); text-decoration: none; }
.ws-back:hover { text-decoration: underline; }
.ws-title h2 { margin: 0 0 4px; font-size: 19px; overflow-wrap: anywhere; }
.ws-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.ws-switch { display: grid; gap: 2px; font-size: 12px; color: var(--ink-soft); min-width: 0; }
.ws-switch select { max-width: 280px; min-height: 40px; }
.ws-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 2px solid var(--line); scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.ws-tab { flex: 0 0 auto; padding: 10px 14px; min-height: 44px; display: flex; align-items: center; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; color: var(--ink-soft); text-decoration: none; font-size: 14px; font-weight: 600; margin-bottom: -2px; }
.ws-tab:hover { background: #f6f1e6; color: var(--ink); }
.ws-tab[aria-current='page'] { background: var(--paper); color: var(--primary); border-color: var(--line); border-bottom: 2px solid var(--paper); }
.ws-tab:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
.ws-body { display: grid; gap: 12px; min-width: 0; }
.ws-body > .panel { margin: 0; min-width: 0; }
.ws-next { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.ws-next .btn { min-height: 44px; display: inline-flex; align-items: center; }
.ws-dl { display: grid; grid-template-columns: 8em 1fr; gap: 6px 12px; margin: 8px 0 0; }
.ws-dl dt { color: var(--ink-soft); font-size: 13px; }
.ws-dl dd { margin: 0; overflow-wrap: anywhere; }
.ws-danger { border-color: #d9a9a4; }
.ws-help summary { cursor: pointer; color: var(--ink-soft); font-size: 13px; }
.ws-body .issue-layout { min-width: 0; }
.ws-body .tablewrap { max-width: 100%; overflow-x: auto; }
.ws-body .t-types td.actions { white-space: normal; min-width: 150px; }
.ws-body .t-types td.actions .btn { margin: 2px 4px 2px 0; }
@media (max-width: 720px) {
  .ws-head { grid-template-columns: 1fr; }
  .ws-switch select { max-width: 100%; width: 100%; }
  .ws-tab { padding: 8px 10px; font-size: 13px; }
  .ws-dl { grid-template-columns: 1fr; }
  .ws-dl dd { margin-bottom: 6px; }
}

/* ---- 2026-11-13 Visual Editor: 編集箇所メニュー・保存の常時表示・折りたたみ ---- */
.ee-head { align-items: center; gap: 8px; flex-wrap: wrap; }
.ee-head h2 { margin: 0; }
.ee-menu { display: grid; gap: 4px; margin: 0 0 10px; }
.ee-menu > span { font-weight: 700; font-size: 14px; }
.ee-target-select { min-height: 44px; font-size: 15px; width: 100%; }
.ee-savebar { position: sticky; bottom: 0; z-index: 2; background: var(--paper); border-top: 1px solid var(--line); padding: 8px 0 6px; margin-top: 10px; }
.ee-savebar .ee-pending { margin: 0 0 6px; }
.ee-acc { border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; margin-top: 8px; background: #fff; }
.ee-acc > summary { cursor: pointer; font-weight: 600; font-size: 14px; min-height: 32px; display: flex; align-items: center; }
.ee-acc[open] > summary { margin-bottom: 6px; }
.ee-ver-pick { display: grid; gap: 4px; }
.ee-ver-pick select { min-height: 40px; width: 100%; }
.ee-viewing { border: 2px solid #c9a55e; border-radius: 6px; padding: 8px 12px; background: #fffaf0; }
.ee-viewing h3 { margin: 0 0 4px; }
.ee-viewing-tag { margin: 4px 0; padding: 4px 8px; background: #fffaf0; border: 1px solid #c9a55e; border-radius: 4px; font-size: 13px; font-weight: 600; }
@media (max-width: 720px) {
  .ws-body .t-types td.actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
  .ws-body .t-types td.actions .btn { flex: 1 1 calc(33% - 6px); min-width: 88px; min-height: 44px; margin: 0; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; }
}
.history-link { display:block; margin-top:8px; font-size:14px; }
.coupon-history h3 { padding-bottom:8px; border-bottom:2px solid var(--gold-line); }
.history-tabs, .history-pages { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:16px 0; }
.history-tabs [aria-current="page"] { border-color:var(--gold); font-weight:700; }
@media (max-width:720px) {
  .history-tabs .btn, .history-pages .btn, .history-link { min-height:44px; display:inline-flex; align-items:center; }
  .t-history { min-width:0!important; width:100%; }
  .t-history thead { display:none; }
  .t-history tbody tr { display:grid; gap:6px; padding:14px; border-bottom:1px solid var(--gold-line); }
  .t-history td { display:block; border:0!important; padding:0!important; overflow-wrap:anywhere; }
  .t-history td:nth-child(1), .t-history td:nth-child(2) { font-weight:700; }
  .t-history td:nth-child(3)::before { content:'操作：'; }
  .t-history td:nth-child(4)::before { content:'操作日時：'; }
  .t-history td:nth-child(5)::before { content:'発行：'; }
  .t-history td:nth-child(6)::before { content:'現在の配布：'; }
  .t-history td:nth-child(7)::before { content:'現在の使用：'; }
  .t-history td:nth-child(8)::before { content:'現在の状態：'; }
  .t-history .datetime { display:inline-flex; gap:6px; }
}
/* 2026-11-14 券種のカード一覧（横スクロールしない）・標準の引き継ぎ・券種編集の見出し */
.type-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.type-card { border: 1px solid var(--line); border-radius: 8px; background: var(--paper); padding: 14px; display: grid; gap: 10px; min-width: 0; }
.type-card.is-inactive { background: var(--off-bg); }
.type-card-head { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.type-card-name { margin: 0; font-size: 18px; line-height: 1.45; overflow-wrap: anywhere; }
.type-card-info { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 6px 10px; margin: 0; font-size: 14px; }
.type-card-info dt { color: var(--ink-soft); font-weight: 700; }
.type-card-info dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.type-card-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.type-card-actions > .btn { min-height: 40px; }
.type-card-more { flex: 1 1 100%; }
.type-card-more > summary { cursor: pointer; color: var(--link-ink); font-size: 13px; padding: 4px 0; }
.type-card-more-body { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.role-guide-acc > summary { cursor: pointer; color: var(--link-ink); font-size: 13px; margin: 2px 0 8px; }
.std-inherit { border: 1px solid var(--line); border-radius: 8px; background: var(--info-bg); padding: 10px 12px; display: grid; gap: 6px; }
.std-inherit .std-inherit-head { margin: 0; font-weight: 700; color: var(--info); }
.std-inherit-list { margin: 0; padding-left: 1.2em; font-size: 14px; }
.std-inherit-note { margin: 0; padding: 8px 10px; border-radius: 6px; background: var(--info-bg); color: var(--info); font-size: 13px; }
.edit-sec { margin: 6px 0 0; font-size: 15px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.edit-more > summary { cursor: pointer; color: var(--link-ink); font-size: 13px; }
@media (max-width: 720px) {
  .type-card-info { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .type-card-info dd { margin-bottom: 6px; }
  .type-card-actions > .btn { flex: 1 1 calc(50% - 8px); min-height: 44px; }
}

/* ===== 2026-11-14 管理UI全面整理（本人の15画面フィードバック）: 説明は？へ・主要操作を明瞭に・フォームの高さ/ラベル位置を統一 ===== */
.top-in { min-height: 60px; padding: 6px 16px; gap: 20px; }
.top h1 { font-size: 17px; letter-spacing: 0.04em; }
.main { padding-top: 12px; }
/* ？ヘルプ（クリック/タップ/キーボードで開閉。hoverに依存しない） */
.help { position: relative; display: inline-flex; align-items: center; vertical-align: middle; margin-left: 4px; }
.help-q { width: 22px; height: 22px; min-width: 22px; padding: 0; border-radius: 50%; border: 1px solid #a99c86; background: #fff; color: var(--info); font: 700 13px/1 system-ui, sans-serif; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.help-q:hover, .help-q[aria-expanded='true'] { background: #eef4f9; border-color: var(--info); }
.help-q:focus-visible { outline: 3px solid var(--primary); outline-offset: 1px; }
@media (pointer: coarse) { .help-q { width: 28px; height: 28px; min-width: 28px; } }
.help-pop { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: max-content; max-width: min(340px, calc(100vw - 24px)); padding: 10px 12px; border: 1px solid #b9ad97; border-radius: 6px; background: #fffdf8; color: var(--ink); box-shadow: 0 6px 18px #0002; font-size: 13px; font-weight: 400; line-height: 1.6; text-align: left; white-space: normal; }
.help-pop[hidden] { display: none; }
.help-line { display: block; }
.help-line + .help-line { margin-top: 4px; }
/* 見出し＋？＋右上の操作 */
.card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.card-head h3, .card-head h2 { margin: 0; }
.card-head > .btn:last-child, .card-head > .grow + * { margin-left: auto; }
.page-head h2 { margin: 0; }
/* 稼働/停止・受付のバッジ（色だけでなく文字で示す） */
.badge { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.6; white-space: nowrap; border: 1px solid; }
.badge.on { color: #1f5a31; background: #e8f3ea; border-color: #a8c9b0; }
.badge.off { color: #5d5a54; background: #eeece8; border-color: #c9c4ba; }
.badge.sub { font-weight: 600; }
.badge.sub.on { color: var(--info); background: #eef4f9; border-color: #adc2d3; }
/* 数（累計発行・未配布・配布済み・使用済み） */
.kpi-wrap { min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; min-width: 0; }
.kpi-lab { font-size: 12.5px; color: var(--ink-soft); display: flex; align-items: center; }
.kpi-num { font-size: 24px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.kpi small { font-size: 12px; color: var(--ink-soft); line-height: 1.4; overflow-wrap: anywhere; }
.kpi.is-on .kpi-num { color: #1f5a31; } .kpi.is-off .kpi-num { color: #5d5a54; } .kpi.is-warn .kpi-num { color: var(--accent); }
.kpi-sub { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-soft); display: flex; align-items: center; flex-wrap: wrap; }
@media (max-width: 720px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi-num { font-size: 21px; } }

/* 案件一覧（案件名が主役・数4列・右端に6ショートカット） */
table.t-camps { width: 100%; table-layout: fixed; min-width: 0; }
table.t-camps th, table.t-camps td { padding: 7px 6px; vertical-align: middle; }
table.t-camps th { text-align: center; font-size: 12.5px; white-space: nowrap; }
table.t-camps th:first-child { text-align: left; width: auto; }
table.t-camps th:nth-child(n+2):nth-child(-n+5) { width: 7.5%; }
table.t-camps th:last-child { width: 33%; }
.t-camps td.num { text-align: center; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.t-camps td.camp-name { white-space: normal; overflow-wrap: anywhere; }
.camp-name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.t-camps .campaign-title { font-weight: 700; font-size: 15px; color: var(--ink); }
.camp-extra { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 12px; }
.t-camps tr.is-paused td { background: #f1f0ec; color: #5d5a54; }
.t-camps tr.is-paused .campaign-title { color: #4a4740; }
.t-camps td.actions { white-space: normal; }
.t-camps .campaign-action-row { display: flex; flex-wrap: wrap; gap: 4px; }
.t-camps .campaign-action-row > .btn { flex: 1 1 0; text-align: center; white-space: nowrap; padding-left: 6px; padding-right: 6px; }
@media (max-width: 720px) {
  .tablewrap:has(.t-camps) { overflow: visible; background: transparent; border: 0; }
  table.t-camps { display: block; } .t-camps thead { display: none; }
  .t-camps tbody { display: grid; gap: 10px; }
  .t-camps tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
  .t-camps tr.is-paused { background: #f1f0ec; }
  .t-camps td { display: block; padding: 0; border: 0 !important; min-width: 0; background: transparent !important; }
  .t-camps td.camp-name { grid-column: 1 / -1; }
  .t-camps td.num::before { content: attr(data-label); display: block; font-size: 11.5px; font-weight: 400; color: var(--ink-soft); white-space: nowrap; }
  .t-camps td.actions { grid-column: 1 / -1; border-top: 1px solid var(--line) !important; padding-top: 8px; }
  .t-camps .campaign-action-row > .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
}

/* イベント管理: タイトル1段・4タブ＋デザイン編集（折り返し・横スクロールなし） */
.ws-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.ws-back { flex: 1 0 100%; }
.ws-title { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; flex: 1 1 320px; }
.ws-title h2 { margin: 0; }
select.ws-switch { min-height: 38px; max-width: 320px; margin-left: auto; }
.ws-tabbar { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; border-bottom: 2px solid var(--line); margin-top: 6px; }
.ws-tabbar .ws-tabs { flex-wrap: wrap; overflow: visible; border-bottom: 0; flex: 1 1 auto; }
.ws-tabbar .ws-tab { margin-bottom: -2px; }
.ws-design { margin: 0 0 6px auto; min-height: 36px; }
.ws-summary .kpi-wrap { margin-bottom: 8px; }
.ws-status { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.ws-st { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 6px; border: 1px solid var(--line); background: #fff; font-size: 13px; }
.ws-st-lab { color: var(--ink-soft); }
.ws-st.on b { color: #1f5a31; } .ws-st.off b { color: #5d5a54; } .ws-st.warn b { color: var(--accent); }
.ws-st-link { font-size: 13px; margin-left: auto; }
.ws-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.ws-cols.single { grid-template-columns: minmax(0, 1fr); }
.ws-cols > .panel { margin: 0; }
.ws-card .ws-dl { grid-template-columns: 5.5em 1fr; gap: 4px 10px; margin: 0; }
.ws-memo { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reserve-prefix .reserve-prefix-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.reserve-prefix .err:empty, .reserve-prefix p[role=status]:empty { display: none; }
.mini-acc > summary { cursor: pointer; font-size: 13px; color: var(--ink-soft); }
.ws-ops { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 14px; }
.ws-ops-main { display: inline-flex; align-items: center; gap: 4px; }
.ws-ops .grow { flex: 1; }
.ws-ops.flash { box-shadow: 0 0 0 3px #d9a9a4; }
@media (max-width: 720px) { .ws-cols { grid-template-columns: minmax(0, 1fr); } select.ws-switch { max-width: 100%; width: 100%; margin-left: 0; } .ws-design { margin-left: 0; } .ws-st-link { margin-left: 0; } }

/* 配布・発行: 共通URL配布・受取ページの表示・設定を独立したカードに */
.event-url { display: grid; gap: 10px; }
.eu-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; min-width: 0; }
.eu-main { border-color: var(--gold-line, #c9b07a); background: #fffdf6; }
.eu-main .event-url-link { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.eu-main .event-url-link input { flex: 1 1 320px; min-width: 0; min-height: 36px; font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; }
.eu-type { margin: 6px 0 0; font-size: 14px; }
.eu-health { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.eu-mode { background: #fbf6ea; border-color: var(--gold-line, #c9b07a); }
.eu-mode-now { font-size: 14px; } .eu-mode-now b { font-size: 16px; }
.eu-mode-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.eu-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.tg { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 8px; background: #fffdf8; }
.tg-check { display: inline-flex !important; align-items: center; gap: 8px; margin: 0; cursor: pointer; }
.tg-check input { width: 20px; height: 20px; margin: 0; }
.tg-lab { font-weight: 700; color: var(--ink); margin: 0 !important; display: inline !important; }
.tg-val { font-size: 14px; } .tg-val.on { color: #1f5a31; } .tg-val.off { color: #5d5a54; }
.event-settings { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.eu-stock .event-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 900px) { .event-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .event-settings { grid-template-columns: minmax(0, 1fr); } .eu-health { grid-template-columns: minmax(0, 1fr); } }

/* ラベル＋？＋入力欄（ラベルは1行・入力欄の高さを統一） */
.fq { min-width: 0; }
.fq .fq-lab { display: flex !important; align-items: center; gap: 0; margin-bottom: 2px; font-weight: 600; min-height: 22px; }
.fq .fq-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.form input:not([type=checkbox]):not([type=radio]), .form select { min-height: 38px; height: 38px; box-sizing: border-box; }
.form textarea { box-sizing: border-box; }
.form > label > span:first-child:not(.fq-lab) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 22px; }
.form-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; align-items: end; }
.check-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.check-row .check, .form .check-row label.check { display: inline-flex !important; flex-direction: row; align-items: center; gap: 8px; margin: 0; min-height: 36px; color: var(--ink); }
.check-row .check input { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; }
.check-row .check span { display: inline !important; margin: 0 !important; font-weight: 600; }
@media (max-width: 640px) { .form-grid3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 380px) { .form-grid3 { grid-template-columns: minmax(0, 1fr); } }

/* 個別に発行: 案件・券種（2列）／枚数・発行名・配布方法（3列）／発行する */
.issue-panel { margin-bottom: 10px; }
.form.issue-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.issue-row { display: grid; gap: 8px 12px; align-items: end; }
.issue-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.issue-row.three { grid-template-columns: 8em minmax(0, 1fr) minmax(0, 1fr); }
.issue-row.submit { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.issue-hint { font-size: 13px; }
@media (max-width: 640px) { .issue-row.two, .issue-row.three { grid-template-columns: minmax(0, 1fr); } }
.t-issue .datetime { display: grid !important; gap: 0; white-space: nowrap; }
.t-issue th:first-child { width: 6.5em !important; }
.batch-actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.batch-more { position: relative; }
.batch-more > summary { list-style: none; cursor: pointer; }
.batch-more > summary::-webkit-details-marker { display: none; }
.batch-more-body { position: absolute; right: 0; z-index: 20; display: grid; gap: 4px; padding: 6px; background: #fffdf8; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 4px 12px #0002; }
.pager-total { margin-right: auto; font-weight: 600; color: var(--ink); }

/* 券一覧（案件の画面内）: 見出しなし・券種切替と絞り込みを1行に */
.coupon-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.coupon-head .type-quick { margin: 0; flex: 0 1 auto; min-width: 0; }
.coupon-head .grow { flex: 1; }
/* 発行・配布履歴／絞り込み・出力: 同じ高さ・罫線・縦位置の2ボタンを1つの組にして折り返しでも離れない。展開パネルは直下の独立行 */
.coupon-head-actions { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; margin-left: auto; }
.tool-btn { box-sizing: border-box; min-height: 36px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; line-height: 1.2; white-space: nowrap; font-family: inherit; }
.filter-toggle[aria-expanded="true"] { background: #f3e9d6; }
.filter-panel { margin: 4px 0 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fffdf8; }
.filter-panel[hidden] { display: none; }
.filter-panel > .bar { margin-bottom: 0; }
/* クーポンを追加フォーム: 名前・特典は全幅、他は3列（狭幅は1列）で上端・幅を揃える。条件で出る欄（開始日・有効期限・有効日数）は隠すと詰まる */
.type-add .form { align-items: start; gap: 12px 14px; }
.cp-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; align-items: start; }
.cp-grid3 > [hidden], .type-add .fq[hidden] { display: none; }
.type-add .form .fq .fq-lab { min-height: 22px; }
.type-add .form input:not([type=checkbox]), .type-add .form select { min-height: 40px; height: 40px; box-sizing: border-box; }
.type-add .form textarea { box-sizing: border-box; width: 100%; padding: 8px 10px; line-height: 1.5; }
.type-add .form .cp-benefit textarea { min-height: 84px; }
.type-add .form .check-row { align-items: center; }
@media (max-width: 720px) { .cp-grid3 { grid-template-columns: minmax(0, 1fr); } .type-add .form input:not([type=checkbox]), .type-add .form select { min-height: 44px; height: 44px; } }
/* 履歴の長い説明は「？」へ収納（見出し・件数集計の脇） */
.history-heading { display: flex; align-items: center; gap: 4px; }
.history-heading h3 { margin: 18px 0 6px; }
.stats-note { display: flex; align-items: center; margin: 4px 0 6px; font-size: 13px; }
@media (max-width: 720px) { .tool-btn { min-height: 44px; } .coupon-head-actions { flex: 1 1 100%; justify-content: flex-end; } }
.filter-note { display: flex; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--ink-soft); margin: 4px 0 6px; }

/* 券種編集モーダル: 右上×・左フォーム・右に大きな見本 */
.metadata-dialog.ct-modal { width: min(1280px, calc(100% - 24px)); max-height: 94dvh; padding: 0 16px 16px; }
.ct-head { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 12px 0 8px; background: var(--paper); border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.ct-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex-wrap: wrap; }
.ct-title h2 { margin: 0; font-size: 18px; }
.ct-name { color: var(--ink-soft); font-size: 14px; overflow-wrap: anywhere; }
.ct-impact { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 13px; font-weight: 600; }
.ct-x { width: 40px; height: 40px; border: 1px solid #a99c86; border-radius: 50%; background: #fff; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink); }
.ct-x:hover { background: #f3e9d6; }
.ct-x:focus-visible { outline: 3px solid var(--primary); outline-offset: 1px; }
.ct-pane { display: none; }
.ct-confirm { position: sticky; top: 64px; z-index: 6; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; padding: 10px 12px; border: 2px solid var(--accent); border-radius: 8px; background: #fff6f2; }
.ct-confirm[hidden] { display: none; }
.ct-modal .ct-layout { grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; }
.ct-modal .form.ct-form { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 0; }
.ct-modal .edit-sec { margin: 8px 0 0; padding-top: 6px; border-top: 1px solid #ece4d3; font-size: 14.5px; }
.ct-modal .edit-sec:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.ct-modal .br-help.compact:has(button[hidden]) { display: none; }
.ct-modal .edit-diff { padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.ct-modal .edit-diff.is-empty { padding: 4px 10px; border-style: dashed; font-size: 13px; }
.ct-modal .edit-diff.is-empty p { margin: 0; }
.ct-modal .edit-diff h3 { margin: 0 0 4px; }
.ct-modal .edit-scope { font-weight: 600; color: var(--accent-dark, #5e1d2b); }
.ct-modal .live-card.compact { position: sticky; top: 72px; padding: 8px; gap: 6px; }
.live-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sample-tag { font-size: 12px; font-weight: 700; color: var(--accent-dark, #5e1d2b); border: 1px solid #d9a9a4; border-radius: 4px; padding: 0 6px; background: #fff6f2; }
.ct-modal .live-card.compact .card-preview-frame.live { height: calc(94dvh - 150px); min-height: 420px; }
@media (max-width: 900px) {
  .ct-pane { display: inline-flex; }
  .ct-modal .ct-layout { grid-template-columns: minmax(0, 1fr); }
  .ct-modal .ct-layout[data-pane=form] > .live-card { display: none; }
  .ct-modal .ct-layout[data-pane=preview] > form { display: none; }
  .ct-modal .live-card.compact { position: static; }
  .ct-modal .live-card.compact .card-preview-frame.live { height: calc(94dvh - 170px); min-height: 360px; }
  .ct-confirm { top: 96px; }
}
@media (max-width: 480px) { .metadata-dialog.ct-modal { width: calc(100% - 12px); padding: 0 10px 12px; } .ct-impact { font-weight: 400; } }

/* 券種の一覧（クーポン設定）: カードを小さく */
.type-cards { gap: 10px; }
.type-card { padding: 10px 12px; gap: 6px; }
.type-card-info { margin: 0; }
/* Editor: 公開ページの閲覧リンク */
.ee-public[hidden] { display: none; }
.ct-head .grow, .card-head .grow { flex: 1 1 auto; }
/* 発行済み一覧: 操作列を広げ、行を縦長にしない */
.t-issue th:last-child { width: 17em; }
.t-issue .batch-actions .batch-counts { flex: 1 0 100%; white-space: nowrap; }
.t-issue td .batch-counts { white-space: nowrap; }
/* 案件一覧の新しい表は汎用の最小幅（960px）を使わない（スマホでカード表示） */
table.t-camps { min-width: 0 !important; }
/* 券種カード: 中の要素の最小幅でカードを押し広げない（320px） */
.type-card { grid-template-columns: minmax(0, 1fr); }
.type-card > *, .type-card-info > * { min-width: 0; }
.type-card .btn { white-space: normal; }
.type-card-head > .type-card-name { flex: 1 1 auto; min-width: 0; }
.type-card-head > .state { flex: 0 0 auto; min-width: 0; white-space: nowrap; }
/* ？つき欄（div.fq > div.fq-lab > label[for] ＋ ？）*/
.fq { display: block; min-width: 0; }
.fq .fq-lab { display: flex; align-items: center; margin-bottom: 2px; min-height: 22px; }
.fq label.fq-text { display: block; font-weight: 600; font-size: 14px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.fq > input:not([type=checkbox]), .fq > select, .fq > textarea { width: 100%; }
.form-grid3 > label > span:first-child { min-height: 22px; display: flex; align-items: center; margin-bottom: 2px; }

/* ===== 2026-11-15 管理UI第2次（案件作成・基本情報へのクーポン統合・配布表示・日付列） ===== */
/* B 案件一覧: 1行目＝案件名（長い名前も幅いっぱい）、2行目＝稼働/停止・新規受取・補助の数 */
.t-camps .campaign-title { display: block; font-size: 15.5px; line-height: 1.45; overflow-wrap: anywhere; }
.camp-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; }
.camp-sub .camp-extra { display: inline; margin: 0; }
table.t-camps th:last-child { width: 30%; }
.t-camps tr.is-archived td { background: #f4f2ee; color: #6a665f; }
.page-head .grow { flex: 1 1 auto; }
.arch-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
/* A 案件を作成（案件名→任意のクーポン→任意の初期配布） */
.cw .campaign-create-form { grid-template-columns: minmax(0, 1fr); max-width: 980px; }
.cw input.cw-name { font-size: 17px; min-height: 44px !important; height: 44px !important; }
.cw-step { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: #fffdf8; }
.cw-step > summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.cw-step[open] > summary { margin-bottom: 8px; }
.cw-coupons { display: grid; gap: 10px; margin-bottom: 8px; }
.cw-coupon { border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; display: grid; gap: 8px; }
.cw-coupon-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cw-step .eu-toggles .check { display: inline-flex !important; align-items: center; gap: 8px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 8px; background: #fff; }
.cw-step > .check { display: inline-flex !important; align-items: center; gap: 8px; margin-top: 8px; font-weight: 600; }
.cw-step .form-grid3 { margin-top: 8px; }
.cw-confirm { grid-column: 1 / -1; border: 2px solid var(--gold-line, #c9b07a); border-radius: 8px; padding: 10px 14px; background: #fffbea; }
.cw-confirm ul { margin: 6px 0 8px; padding-left: 1.2em; }
.cw-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cw-out { grid-column: 1 / -1; font-size: 14px; color: var(--ink-soft); }
.cw-out:empty { display: none; }
/* F クーポンの追加: クーポン名（左40%）と特典内容（右60%・複数行）。狭い幅は縦積み */
.cp-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px 14px; align-items: start; }
.cp-grid textarea { width: 100%; min-height: 92px; box-sizing: border-box; resize: vertical; }
@media (max-width: 720px) { .cp-grid { grid-template-columns: minmax(0, 1fr); } }
/* F2 クーポンカードの行間（詰まりを少し緩める） */
.type-card { padding: 12px 14px; gap: 10px; }
.type-card-info { gap: 8px 12px; line-height: 1.55; }
.type-card-actions { gap: 8px; padding-top: 2px; }
.ws-types .card-head { margin-bottom: 8px; }
.ws-types.flash, .ws-ops.flash { box-shadow: 0 0 0 3px #e2c98f; }
/* C2 状態行の右端に停止/再開と履歴（狭い幅は折り返し） */
.ws-status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ws-status-row .ws-status { flex: 1 1 420px; min-width: 0; }
.ws-status-row .ws-ops { padding: 0; margin-left: auto; gap: 6px; }
.ws-more > summary { cursor: pointer; font-weight: 600; color: var(--ink-soft); }
.ws-more-body { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 4px; }
/* E3 タイトル行の右側: イベントの切替・公開ページ・デザイン編集 */
.ws-head-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.ws-head-acts select.ws-switch { margin-left: 0; }
.ws-head-acts .btn { min-height: 38px; display: inline-flex; align-items: center; }
.ws-head-acts .ws-design { margin: 0; }
@media (max-width: 720px) { .ws-head-acts { width: 100%; margin-left: 0; } .ws-head-acts select.ws-switch { flex: 1 1 100%; } .ws-head-acts .btn { flex: 1 1 calc(50% - 6px); justify-content: center; } }
/* E1 配布・発行の6項目（PCは1行、狭い幅は3列→2列） */
.kpis.kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpis-6 .kpi-state .kpi-num { font-size: 19px; }
.kpis-6 .kpi-state.is-on .kpi-num { color: #1f5a31; } .kpis-6 .kpi-state.is-warn .kpi-num { color: var(--accent); } .kpis-6 .kpi-state.is-off .kpi-num { color: #5d5a54; }
@media (max-width: 1100px) { .kpis.kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .kpis.kpis-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* E2 受取ページの表示（案内型／券面型の選択） */
.seg-choice { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.seg-opt { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 2px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; min-width: 0; flex: 0 1 260px; }
.seg-opt:has(input:checked) { border-color: var(--ink); background: #fffdf3; }
.seg-opt input { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; }
.seg-l { display: flex; flex-direction: column; min-width: 0; } .seg-l small { color: var(--ink-soft); font-size: 12.5px; }
.eu-mode-apply { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.eu-mode-note { margin: 0; font-size: 13.5px; color: #6b4b00; flex: 1 1 300px; }
.eu-mode-note[hidden], .eu-mode-apply .btn[hidden] { display: none; }
/* E4 配布の設定: 見出し・入力欄の上下の余白と整列 */
.eu-settings .card-head { margin-bottom: 4px; }
.event-settings { grid-template-columns: minmax(0, 1fr) !important; gap: 14px; }
.eu-toggles { gap: 10px 14px; }
.eu-fields { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 12px 18px; align-items: end; }
.eu-type-field { display: flex; align-items: flex-end; gap: 6px; min-width: 0; }
.eu-type-field > .fq { flex: 1 1 auto; }
.eu-type-field > .btn { flex: 0 0 auto; min-height: 38px; }
@media (max-width: 900px) { .eu-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } .eu-type-field { grid-column: 1 / -1; } }
@media (max-width: 420px) { .eu-fields { grid-template-columns: minmax(0, 1fr); } .eu-type-field { flex-wrap: wrap; } .eu-type-field > .btn { flex: 1 1 100%; } }
/* G 発行済み一覧: 年月日・時刻の2段を各々1行で（隣の列へ食い込まない） */
.t-issue th:first-child { width: 8.4em !important; }
.t-issue td.dt-cell { white-space: nowrap; overflow: hidden; }
.t-issue td.dt-cell .datetime { display: grid !important; line-height: 1.35; font-variant-numeric: tabular-nums; }
.t-issue td.dt-cell .datetime span { white-space: nowrap; }
.t-event-batches td.dt-cell { white-space: nowrap; }
/* H Visual Editor の起動: 最終と同じ外枠の大きさで読み込み表示だけを出し、準備後に一度に表示する（白い小窓→大窓の跳ねをなくす） */
.metadata-dialog.ee-dialog { height: 96dvh; box-sizing: border-box; }
.ee-dialog.is-loading { display: flex; align-items: center; justify-content: center; }
.ee-loading { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--ink-soft); text-align: center; max-width: 520px; }
.ee-loading .dialog-actions { justify-content: center; }
.ee-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink); animation: ee-spin 0.9s linear infinite; }
@keyframes ee-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ee-spin { animation: none; } }
.ee-shell[hidden] { display: none; }
/* 長い案件名: 汎用の table td（nowrap）より強く指定して、案件列の中で折り返す */
table.t-camps td.camp-name { white-space: normal; }
.std-inherit:empty { display: none; }
/* SP: 共通URLの欄は縦積み（column）のとき高さが伸びないようにする */
@media (max-width: 720px) { .eu-main .event-url-link input { flex: 0 0 auto; width: 100%; height: 40px; } }
/* クーポンカードの「発行」（リンク）をボタンと同じ縦位置に */
.type-card-actions > a.btn { display: inline-flex; align-items: center; justify-content: center; }

/* 2026-11-16 アカウント（本人のパスワード）: 1列・読みやすい幅 */
.account-form { grid-template-columns: 1fr; max-width: 480px; }
.account-form label > span { white-space: normal; }

/* 2026-11-17 配布・発行: 入力欄とボタンの高さ・縦中央を揃える（共通URL＋URLをコピー、数量＋枚を追加発行）。機能・数値は変えない */
.event-url-link > input, .event-url-link > .btn, .event-add > input, .event-add > .btn { box-sizing: border-box; height: 40px; min-height: 40px; margin: 0; }
.event-url-link > .btn, .event-add > .btn { display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; line-height: 1; font-size: 14px; white-space: nowrap; flex: 0 0 auto; }
.event-url-link > input { padding: 0 10px; line-height: 1.2; min-width: 0; }
.event-add { display: inline-flex; gap: 8px; align-items: center; }
.event-add > input { width: 6.5em; padding: 0 8px; font-size: 15px; line-height: 1.2; }
.event-actions > .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; }
@media (max-width: 720px) {
  .event-url-link > input, .event-url-link > .btn, .event-add > input, .event-add > .btn, .eu-main .event-url-link input { height: 44px; min-height: 44px; }
  .event-url-link > input, .eu-main .event-url-link input { width: 100%; flex: 0 0 auto; }
  .event-url-link > .btn { flex: 1 1 100%; }
  .event-add { width: 100%; }
  .event-add > input { flex: 0 0 7em; }
  .event-add > .btn { flex: 1 1 auto; }
}
