@import url("./form-followup.css");
/* =========================================================
 * 管理画面スタイル
 * ========================================================= */
:root {
  --primary: #0E9F6E;
  --primary-dark: #057A55;
  --primary-soft: #E8F7F1;
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --border: #E3E6EA;
  --text: #1F2937;
  --muted: #6B7280;
  --danger: #DC2626;
  --danger-soft: #FEF2F2;
  --warn: #B45309;
  --warn-soft: #FFFBEB;
  --info: #2563EB;
  --info-soft: #EFF6FF;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
a { color: var(--primary-dark); }
h1, h2, h3, h4 { margin: 0; line-height: 1.4; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---------- レイアウト ---------- */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { background: #111827; color: #D1D5DB; padding: 16px 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 8px; padding: 4px 10px 18px; color: #fff; font-weight: 700; font-size: 16px; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--primary); display: grid; place-items: center; font-size: 14px; }
.nav-group { font-size: 11px; color: #6B7280; padding: 14px 10px 6px; letter-spacing: .05em; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #D1D5DB; text-decoration: none; font-size: 13.5px; }
.nav a:hover { background: #1F2937; color: #fff; }
.nav a.active { background: var(--primary); color: #fff; }
.nav .ico { width: 18px; text-align: center; opacity: .9; }
.nav .cnt { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; border-radius: 10px; padding: 0 7px; line-height: 18px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; padding: 10px 24px; }
.topbar .company { font-weight: 700; }
.topbar .spacer { flex: 1; }
.topbar .menu-toggle { display: none; }
.content { padding: 24px; max-width: 1180px; width: 100%; }

.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 21px; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 部品 ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.card h2 { font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card h2 .sub { font-weight: 400; color: var(--muted); font-size: 12px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.sticky { position: sticky; top: 76px; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; font-family: inherit; }
.btn:hover { background: #F9FAFB; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.danger { color: var(--danger); border-color: #FECACA; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: #F3F4F6; }
.btn.sm { padding: 4px 10px; font-size: 12.5px; }
.btn.xs { padding: 2px 8px; font-size: 12px; font-weight: 500; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ai { background: linear-gradient(135deg, #7C3AED, #2563EB); color: #fff; border: none; }
.btn.ai:hover { filter: brightness(1.08); }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 10px; background: #F3F4F6; color: #4B5563; white-space: nowrap; }
.badge.green { background: var(--primary-soft); color: var(--primary-dark); }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.amber { background: var(--warn-soft); color: var(--warn); }
.badge.blue { background: var(--info-soft); color: var(--info); }
.badge.purple { background: #F5F3FF; color: #6D28D9; }

.alert { padding: 12px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; border: 1px solid; display: flex; gap: 10px; align-items: flex-start; }
.alert.warn { background: var(--warn-soft); border-color: #FDE68A; color: #78350F; }
.alert.info { background: var(--info-soft); border-color: #BFDBFE; color: #1E3A8A; }
.alert.danger { background: var(--danger-soft); border-color: #FECACA; color: #7F1D1D; }
.alert.ok { background: var(--primary-soft); border-color: #A7F3D0; color: #064E3B; }
.alert .grow { flex: 1; }

/* フォーム */
.field { margin-bottom: 14px; }
.field > label, .lbl { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 5px; color: #374151; }
.help { font-size: 12px; color: var(--muted); margin-top: 4px; }
input:not([type]), input[type=text], input[type=email], input[type=url], input[type=number], input[type=time], input[type=password], input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #D1D5DB; border-radius: 8px; font-size: 14px; background: #fff; color: var(--text); font-family: inherit;
}
textarea { min-height: 84px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { outline: 2px solid #A7F3D0; border-color: var(--primary); }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline > input, .inline > select { width: auto; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13.5px; }
.check input { accent-color: var(--primary); width: 16px; height: 16px; }

.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #D1D5DB; border-radius: 22px; cursor: pointer; transition: .15s; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::before { transform: translateX(16px); }
.switch input:disabled + span { opacity: .5; cursor: not-allowed; }

.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { border: none; background: #fff; padding: 6px 14px; font-size: 13px; cursor: pointer; border-right: 1px solid var(--border); font-family: inherit; }
.seg button:last-child { border-right: none; }
.seg button.on { background: var(--primary); color: #fff; font-weight: 700; }

/* テーブル */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); background: #FAFAFB; white-space: nowrap; }
table.t td { padding: 10px; border-bottom: 1px solid #F0F1F3; vertical-align: middle; }
table.t tr.clickable { cursor: pointer; }
table.t tr.clickable:hover td { background: #F9FAFB; }
table.t tr.unread td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.empty { text-align: center; color: var(--muted); padding: 32px 0; }

/* KPI */
.kpi { padding: 16px 18px; }
.kpi .k { font-size: 12px; color: var(--muted); }
.kpi .v { font-size: 26px; font-weight: 700; margin-top: 2px; }
.kpi .v small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }

/* チェックリスト */
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #F0F1F3; }
.steps li:last-child { border-bottom: none; }
.steps .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: #F3F4F6; color: var(--muted); flex-shrink: 0; }
.steps li.done .dot { background: var(--primary); color: #fff; }
.steps .grow { flex: 1; }
.steps .desc { font-size: 12px; color: var(--muted); }
.progress { height: 8px; background: #EEF0F3; border-radius: 8px; overflow: hidden; }
.progress > div { height: 100%; background: var(--primary); border-radius: 8px; transition: width .3s; }

/* リスト行 */
.row-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; background: #fff; }
.row-item .grow { flex: 1; min-width: 0; }
.row-item.sel { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.icon-btn { border: none; background: transparent; cursor: pointer; padding: 4px 6px; border-radius: 6px; color: var(--muted); font-size: 13px; font-family: inherit; }
.icon-btn:hover { background: #F3F4F6; color: var(--text); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.icon-btn.del:hover { color: var(--danger); background: var(--danger-soft); }

/* FAQ */
.cat-list a { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 13.5px; cursor: pointer; }
.cat-list a:hover { background: #F3F4F6; }
.cat-list a.on { background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
.faq-q { font-weight: 600; }
.faq-a { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 460px; }

/* AIレビュー */
.ai-card { border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 12px; background: #fff; }
.ai-card.needs { border-color: #FCD34D; background: #FFFDF5; }
.ai-card .meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 8px; flex-wrap: wrap; }
.ai-card .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.ai-suggest { border: 1px dashed #A78BFA; background: #FAF5FF; border-radius: 8px; padding: 12px; margin-top: 10px; }

/* シナリオツリー */
.tree-node { border-left: 2px solid var(--border); margin-left: 14px; padding-left: 14px; }
.node-card { border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 12px; margin-bottom: 10px; }
.node-card .head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.node-card .lv { font-size: 11px; font-weight: 700; color: var(--muted); background: #F3F4F6; padding: 1px 8px; border-radius: 8px; white-space: nowrap; }
.node-card .grid { gap: 8px; }
.type-pill { font-size: 11px; padding: 1px 8px; border-radius: 8px; background: var(--info-soft); color: var(--info); }

/* タグ表示 */
.codebox { background: #0F172A; color: #E2E8F0; border-radius: 8px; padding: 14px; font-size: 12.5px; position: relative; word-break: break-all; }
.codebox .btn { position: absolute; right: 8px; top: 8px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { border: none; background: none; padding: 8px 14px; cursor: pointer; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-family: inherit; }
.tabs button.on { color: var(--primary-dark); border-bottom-color: var(--primary); font-weight: 700; }
ol.howto { padding-left: 20px; margin: 0; }
ol.howto li { margin-bottom: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: #F3F4F6; border-radius: 14px; padding: 3px 4px 3px 10px; font-size: 13px; margin: 0 6px 6px 0; }
.chip button { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 14px; padding: 0 4px; }
.swatches { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 2px var(--text); }
input[type=color] { width: 40px; height: 32px; border: 1px solid var(--border); border-radius: 8px; padding: 2px; background: #fff; cursor: pointer; }

/* プレビュー */
.device-frame { position: relative; isolation: isolate; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: 0 8px 30px rgba(0,0,0,.08); }
.device-frame.pc { width: 100%; height: 680px; }
.device-frame.sp { width: 360px; height: 700px; border: 10px solid #111827; border-radius: 36px; }
.mock-site { height: 100%; overflow: hidden; background: linear-gradient(#fff, #F9FAFB); }
.mock-site .nav { display: flex; align-items: center; gap: 18px; padding: 14px 22px; border-bottom: 1px solid #EEE; font-size: 13px; color: #555; }
.mock-site .nav b { color: #111; font-size: 15px; margin-right: auto; }
.mock-site .hero { padding: 48px 28px; background: linear-gradient(120deg, #F0FDF4, #ECFEFF); }
.mock-site .hero h3 { font-size: 26px; margin-bottom: 8px; }
.mock-site .blk { height: 14px; background: #ECEEF1; border-radius: 6px; margin: 10px 28px; }
.device-frame.sp .mock-site .nav span { display: none; }
.device-frame.sp .mock-site .hero h3 { font-size: 20px; }
.preview-mini { position: relative; isolation: isolate; height: 640px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: repeating-linear-gradient(45deg, #FAFAFB, #FAFAFB 10px, #F4F5F7 10px, #F4F5F7 20px); }
.preview-mini .label { position: absolute; top: 10px; left: 12px; font-size: 11px; color: var(--muted); background: #fff; padding: 2px 8px; border-radius: 8px; border: 1px solid var(--border); }

/* ウィザード */
.wizard { max-width: 760px; margin: 0 auto; }
.wiz-steps { display: flex; gap: 6px; margin-bottom: 20px; }
.wiz-steps div { flex: 1; height: 5px; border-radius: 4px; background: #E5E7EB; }
.wiz-steps div.on { background: var(--primary); }
.ind-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ind-card { border: 1.5px solid var(--border); border-radius: 10px; padding: 14px; cursor: pointer; background: #fff; text-align: left; font-family: inherit; }
.ind-card:hover { border-color: var(--primary); }
.ind-card.on { border-color: var(--primary); background: var(--primary-soft); }
.ind-card b { display: block; font-size: 15px; }
.ind-card span { font-size: 12px; color: var(--muted); }
.gen-list { list-style: none; padding: 0; margin: 0; }
.gen-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--muted); }
.gen-list li.run { color: var(--text); font-weight: 600; }
.gen-list li.ok { color: var(--primary-dark); }
.spinner { width: 16px; height: 16px; border: 2px solid #D1D5DB; border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 問い合わせ詳細 */
dl.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; margin: 0; font-size: 13.5px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; word-break: break-word; white-space: pre-wrap; }
.path { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.path span { background: #F3F4F6; padding: 3px 10px; border-radius: 12px; font-size: 12.5px; }
.path i { color: var(--muted); font-style: normal; font-size: 12px; }

/* ログイン */
.auth { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(140deg, #ECFDF5, #F0F9FF); padding: 16px; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 16px; padding: 32px; box-shadow: 0 10px 40px rgba(0,0,0,.08); }
.auth-card .brand { color: var(--text); padding: 0 0 20px; justify-content: center; font-size: 20px; }
.btn.google { width: 100%; justify-content: center; padding: 10px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* モーダル / トースト */
.modal-bg { position: fixed; inset: 0; background: rgba(17, 24, 39, .45); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal .mh { padding: 18px 20px 0; font-size: 16px; font-weight: 700; }
.modal .mb { padding: 14px 20px; font-size: 13.5px; }
.modal .mf { padding: 12px 20px 18px; display: flex; justify-content: flex-end; gap: 8px; }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #111827; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13.5px; box-shadow: 0 6px 20px rgba(0,0,0,.2); animation: tin .2s ease-out; }
.toast.err { background: var(--danger); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.hr { height: 1px; background: var(--border); margin: 16px 0; }
.dirty-dot { width: 8px; height: 8px; border-radius: 50%; background: #F59E0B; display: inline-block; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1100px) {
  .split { grid-template-columns: 1fr; }
  .sticky { position: static; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 240px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .topbar .menu-toggle { display: inline-flex; }
  .content { padding: 16px; }
  .topbar { padding: 10px 16px; flex-wrap: wrap; }
  .g2, .g3, .g4 { grid-template-columns: 1fr 1fr; }
  .ind-cards { grid-template-columns: 1fr; }
  dl.kv { grid-template-columns: 1fr; }
  dl.kv dt { margin-top: 6px; }
  .device-frame.sp { width: 100%; max-width: 360px; }
}
@media (max-width: 520px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .topbar .hide-sp { display: none; }
}

/* ---------- カレンダー（週表示） ---------- */
.cw-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
.cw { min-width: 820px; --row: 22px; }
.cw-head, .cw-allrow, .cw-body { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); }
.cw-head { border-bottom: 1px solid var(--border); background: #FAFAFB; }
.cw-dh { text-align: center; padding: 6px 0; font-size: 12px; color: var(--muted); }
.cw-dh b { display: block; font-size: 17px; color: var(--text); }
.cw-dh.sun span, .cw-dh.sun b { color: var(--danger); }
.cw-dh.sat span, .cw-dh.sat b { color: var(--info); }
.cw-dh.today b { background: var(--primary); color: #fff; border-radius: 50%; width: 30px; height: 30px; line-height: 30px; margin: 0 auto; }
.cw-allrow { border-bottom: 1px solid var(--border); min-height: 30px; }
.cw-tl { font-size: 11px; color: var(--muted); text-align: right; padding: 6px 6px 0 0; }
.cw-ad { border-left: 1px solid #F0F1F3; padding: 3px; cursor: pointer; min-height: 30px; }
.cw-ad:hover { background: #F9FAFB; }
.cw-adev { background: var(--mc); color: #fff; font-size: 11.5px; border-radius: 4px; padding: 2px 6px; margin-bottom: 2px; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cw-adev span { opacity: .85; margin-left: 4px; }
.cw-body { position: relative; }
.cw-times div { font-size: 11px; color: var(--muted); text-align: right; padding-right: 6px; transform: translateY(-7px); }
.cw-times div:first-child { transform: none; }
.cw-col { position: relative; border-left: 1px solid #F0F1F3; cursor: copy;
  background-image: repeating-linear-gradient(to bottom, #EEF0F3 0, #EEF0F3 1px, transparent 1px, transparent calc(var(--row) * 2)),
    repeating-linear-gradient(to bottom, transparent 0, transparent var(--row), #F7F8FA var(--row), #F7F8FA calc(var(--row) + 1px), transparent calc(var(--row) + 1px), transparent calc(var(--row) * 2)); }
.cw-col.today { background-color: #F6FFFB; }
.cw-ev { position: absolute; border-radius: 5px; padding: 2px 5px; font-size: 11px; line-height: 1.35; overflow: hidden; cursor: pointer; box-sizing: border-box; }
.cw-ev b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-ev span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.cw-ev.booking { background: var(--mc); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.15); z-index: 2; }
.cw-ev.event { background: #fff; color: var(--text); border: 1.5px solid var(--mc); border-left-width: 4px; z-index: 1; }
.cw-ev.google { background: repeating-linear-gradient(45deg, #F3F4F6, #F3F4F6 6px, #E5E7EB 6px, #E5E7EB 12px); color: #4B5563; border-left: 4px solid var(--mc); cursor: help; }
.cw-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 10px; color: #374151; }
.cw-sw { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.cw-sw.booking { background: var(--primary); }
.cw-sw.event { border: 1.5px solid var(--primary); border-left-width: 4px; background: #fff; }
.cw-sw.google { background: repeating-linear-gradient(45deg, #F3F4F6, #F3F4F6 3px, #D1D5DB 3px, #D1D5DB 6px); }
.cw-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }

/* ---------- カレンダー（日付を縦に並べる表示：時間は横軸） ---------- */
.cr { min-width: 900px; }
.cr-head, .cr-row { display: grid; grid-template-columns: 120px 1fr; }
.cr-head { border-bottom: 1px solid var(--border); background: #FAFAFB; position: sticky; top: 0; z-index: 3; }
.cr-hours { display: grid; grid-template-columns: repeat(var(--hours), 1fr); }
.cr-hours div { font-size: 11px; color: var(--muted); padding: 6px 0 6px 4px; border-left: 1px solid #EEF0F3; }
.cr-row { border-bottom: 1px solid #EEF0F3; }
.cr-row:last-child { border-bottom: none; }
.cr-date { padding: 6px 8px; cursor: pointer; font-size: 12px; color: var(--muted); border-right: 1px solid var(--border); }
.cr-date b { font-size: 15px; color: var(--text); }
.cr-date:hover { background: #F9FAFB; }
.cr-date .cw-adev { margin-top: 4px; }
.cr-row.sun .cr-date b, .cr-row.sun .cr-date span { color: var(--danger); }
.cr-row.sat .cr-date b, .cr-row.sat .cr-date span { color: var(--info); }
.cr-row.today .cr-date { background: var(--primary-soft); }
.cr-row.today .cr-date b { color: var(--primary-dark); }
.cr-line { position: relative; cursor: copy; min-height: 36px;
  background-image: linear-gradient(to right, #EEF0F3 1px, transparent 1px), linear-gradient(to right, #F7F8FA 1px, transparent 1px);
  background-size: calc(100% / var(--hours)) 100%, calc(100% / var(--hours) / 2) 100%; }
.cr-row.today .cr-line { background-color: #F6FFFB; }
.cr .cw-ev { padding: 0 6px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
/* タイトルを優先し、余った幅に時刻・担当を出す */
.cr .cw-ev b { display: block; flex: 0 0 auto; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.cr .cw-ev span { display: block; flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ---------- カレンダー（人 × 曜日の表） ---------- */
.cs { width: 100%; min-width: 860px; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.cs th, .cs td { border-bottom: 1px solid #EEF0F3; border-left: 1px solid #EEF0F3; vertical-align: top; }
.cs thead th { background: #FAFAFB; padding: 8px 4px; font-size: 13px; text-align: center; border-bottom: 1px solid var(--border); }
.cs thead th span { font-size: 11px; color: var(--muted); font-weight: 400; }
.cs thead th.sun, .cs thead th.sun span { color: var(--danger); }
.cs thead th.sat, .cs thead th.sat span { color: var(--info); }
.cs thead th.today { background: var(--primary-soft); color: var(--primary-dark); }
.cs thead th:first-child, .cs tbody th { width: 130px; border-left: none; }
.cs tbody th { text-align: left; padding: 8px; font-size: 13px; font-weight: 700; border-right: 1px solid var(--border); }
.cs tbody tr:last-child th, .cs tbody tr:last-child td { border-bottom: none; }
.cs td { padding: 4px; height: 72px; cursor: copy; }
.cs td:hover { background: #F9FAFB; }
.cs td.weekend { background: #FCFCFD; }
.cs td.today { background: #F6FFFB; }
.cs-ev { display: block; border-radius: 4px; padding: 2px 5px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; line-height: 1.45; }
.cs-ev i { font-style: normal; font-weight: 700; margin-right: 4px; }
.cs-ev.booking { background: var(--mc); color: #fff; }
.cs-ev.event { background: #fff; border: 1px solid var(--mc); border-left-width: 4px; }
.cs-ev.google { background: repeating-linear-gradient(45deg, #F3F4F6, #F3F4F6 6px, #E5E7EB 6px, #E5E7EB 12px); color: #4B5563; border-left: 4px solid var(--mc); cursor: help; }
.cs-free { color: #C0C4CC; font-size: 11px; }
.cr-sub { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }

/* 人の表：長い期間は横スクロール、名前の列を固定 */
.cs.long { min-width: 0; }
.cs tbody th, .cs thead th.cs-corner { position: sticky; left: 0; z-index: 2; background: #fff; }
.cs thead th.cs-corner { background: #FAFAFB; }
.cs thead th em { display: block; font-style: normal; font-size: 11px; font-weight: 700; color: var(--primary-dark); }
.cs th.mstart, .cs td.mstart { border-left: 2px solid #9CA3AF; }
.cs.long .cs-ev { font-size: 11px; }
.cs thead th { vertical-align: bottom; }

/* 休日・休業日 */
.hol { display: block; font-size: 10px; line-height: 1.3; color: var(--danger); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hol.closed { color: #6B7280; }
.cw-dh .hol { margin-top: 2px; }
.cw-col.closed, .cr-row.closed .cr-line, .cs td.closed { background-color: #F1F2F4 !important; background-image: repeating-linear-gradient(135deg, transparent 0 8px, #E7E9EC 8px 9px) !important; }
.cr-row.closed .cr-date { background: #F7F7F8; }
.cs thead th.closed { background: #EEEFF1; }
.cw-sw.closed { background: repeating-linear-gradient(135deg, #F1F2F4 0 3px, #D1D5DB 3px 4px); border: 1px solid #D1D5DB; }
.cr-row.sun .cr-date b, .cr-row.sun .cr-date span:not(.hol) { color: var(--danger); }

/* CSV help works with mouse hover, keyboard focus and the info button. */
.csv-import { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.content-editor { background: #f8fafc; border-radius: 8px; margin-bottom: 8px; padding: 12px; }
.content-editor .field { margin-top: 10px; }.content-editor .grow { min-width: 0; }
.form-image-preview { display: block; max-width: 100%; max-height: 160px; object-fit: contain; margin: 8px 0; border-radius: 6px; }
.field-controls { display: flex; flex-shrink: 0; }.form-add { border: 1px dashed #cbd5e1; border-radius: 8px; padding: 14px; margin-top: 16px; }.form-add h3 { font-size: 14px; margin: 0 0 10px; }
@media(max-width:600px) { .field-controls { flex-direction: column; } }

/* Purpose-based navigation and company settings. */
.brand { font-size: 16px; }
.settings-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:24px; }
.settings-tabs a { display:flex; flex-direction:column; gap:5px; padding:14px; border:1px solid var(--border); border-radius:10px; background:white; color:var(--text); text-decoration:none; }
.settings-tabs a span { color:var(--muted); font-size:12px; }
.settings-tabs a:hover, .settings-tabs a[aria-current] { border-color:var(--primary, #0e9f6e); background:#ecfdf5; }
.settings-tabs a[aria-current] b { color:#047857; }
.faq-layout { grid-template-columns:240px minmax(0,1fr); }
.share-chat-card { display:flex; flex-wrap:wrap; gap:16px; align-items:center; }
.share-chat-card .grow { flex-basis:400px; }
:focus-visible { outline:3px solid #059669; outline-offset:3px; }
@media(max-width:700px) { .settings-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); } .faq-layout { grid-template-columns:minmax(0,1fr); } .page-head { flex-wrap:wrap; } }

/* Settings assistant: readable on narrow management screens. */
.assistant-card{max-width:880px}
.assistant-examples{flex-wrap:wrap}
.assistant-examples .btn{white-space:normal;text-align:left}
.assistant-messages{display:grid;gap:16px;margin-top:20px}
.assistant-message{padding:16px;border:1px solid var(--border);border-radius:12px;min-width:0}
.assistant-message.user{background:#f5f3ff}
.assistant-text{white-space:pre-wrap;overflow-wrap:anywhere;margin-top:8px}
.assistant-step{margin-top:16px;padding-top:12px;border-top:1px solid var(--border)}
.assistant-error{color:var(--danger);overflow-wrap:anywhere}
#assistant-question{width:100%;margin-top:8px}
#tag{display:block;white-space:pre-wrap;padding-top:28px;overflow-wrap:anywhere}

.context-ai{width:min(860px,94vw);max-height:90dvh;padding:0;border:1px solid var(--border);border-radius:16px;color:var(--text);background:#fff;box-shadow:0 20px 70px #0003}
.context-ai::backdrop{background:#11182788}
.context-ai-head{position:sticky;top:0;z-index:1;background:white;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 22px;border-bottom:1px solid var(--border)}
.context-ai-head h2{margin:0;font-size:18px}
.context-ai-body{padding:20px 22px;overflow-wrap:anywhere}
.context-ai-item{border:1px solid var(--border);border-radius:10px;margin:16px 0;padding:16px;min-width:0}
.context-ai-item>label{display:block;margin-bottom:12px}
.context-ai-item input:not([type=checkbox]),.context-ai-item textarea,.context-ai-item select{display:block;width:100%;margin-top:6px}
.basic-tree{display:grid;gap:8px;padding:16px;border:1px solid var(--border);border-radius:10px;background:#f0fdf4}
#company-source-url{flex:1;min-width:180px}
#basic-prompt,#basic-greeting,#basic-result textarea,[data-source-text]{width:100%}

/* Form editors keep long field IDs and embed snippets inside the viewport. */
.split > *, .form-field-grid > * { min-width:0; }
.form-field-grid { grid-template-columns:150px minmax(0,1fr) minmax(0,1fr); gap:8px; }
#mail-token { min-width:0; max-width:100%; }
.codebox { white-space:pre-wrap; overflow-wrap:anywhere; }
@media(max-width:600px) { .form-field-grid { grid-template-columns:minmax(0,1fr); } }

.mail-editor { min-height:44px; width:100%; padding:12px; border:1px solid #cbd5e1; border-radius:8px; background:white; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.9; }
.mail-editor[aria-multiline=true] { min-height:180px; }.mail-editor[contenteditable=false] { background:#f8fafc; }
.mail-chip { display:inline; padding:2px 4px; border-radius:5px; background:#eef2ff; color:#3730a3; box-decoration-break:clone; font-size:13px; }.mail-chip.invalid { background:#fee2e2; color:#b91c1c; }
.mail-preview { margin-top:20px; border:1px solid var(--border); background:#f8fafc; border-radius:10px; padding:16px; overflow-wrap:anywhere; }#mail-preview-subject { font-weight:700; }
#mail-samples { display:grid; gap:12px; margin-top:12px; }#mail-samples input { width:100%; }
.mail-comparison { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }.mail-comparison>div { min-width:0; white-space:pre-wrap; overflow-wrap:anywhere; border:1px solid var(--border); border-radius:8px; padding:12px; }
@media(max-width:650px){.mail-comparison{grid-template-columns:minmax(0,1fr);}}

.mail-canonical[hidden] { display:none!important; }
#mail-undo[hidden] { display:none!important; }
.mail-comparison .context-ai-item { margin:8px 0 0; padding:0; border:0; }
.brand-mark.brand-bird,.sidebar.ops .brand-mark.brand-bird { width:32px; height:32px; object-fit:contain; background:transparent; border-radius:0; flex-shrink:0; }
.account-bird { vertical-align:middle; margin-right:8px; object-fit:contain; }
.account-privacy { margin-top:24px; font-size:12px; }
.sidebar.ops .brand:has(.operator-brand-name) { padding:20px 16px; gap:8px; font-size:15px; }
.operator-brand-name small { display:block; font-size:10px; font-weight:400; opacity:.75; margin-top:2px; }

/* メンバー管理：既存の色・タイポグラフィ・フォーム部品に統一 */
.member-heading { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.member-heading h2 { margin: 0; }
.member-heading-actions { margin-left: auto; }
.member-page > .help { margin: 12px 0 16px; }
.member-page .help a { margin-left: 6px; }
.member-status { color: var(--muted); font-size: 12px; margin: 8px 0; }
.member-status:empty { display: none; }
.member-search { display: block; max-width: 420px; margin: 16px 0; font-size: 12.5px; font-weight: 700; }
.member-search input { display: block; margin-top: 5px; font-weight: 400; }
.member-page td:first-child { min-width: 180px; overflow-wrap: anywhere; }
.member-page td:nth-child(2), .member-page td:nth-child(4) { white-space: nowrap; }
.member-row-actions { min-width: 210px; gap: 6px; }
.member-invitation label { display: block; font-weight: 600; }
.member-invitation input { margin: 6px 0 10px; }
/* ネイティブdialogの標準枠を除き、共通モーダルと同じ寸法・背景にする */
.member-dialog, dialog.context-ai-dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 20px 50px rgba(0,0,0,.25); overflow-y: auto; font: inherit; }
.member-dialog::backdrop, dialog.context-ai-dialog::backdrop { background: rgba(17,24,39,.45); }
.member-dialog-content { padding: 20px; }
.member-dialog h2, dialog.context-ai-dialog h2 { display: block; font-size: 16px; font-weight: 700; margin: 0 0 20px; }
.member-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.member-dialog .field label { margin: 0; }
.member-dialog label input, .member-dialog label select { display: block; margin-top: 6px; font-weight: 400; }
.member-dialog input:disabled { background: var(--bg); color: var(--muted); }
.member-dialog .help { margin: 8px 0 16px; line-height: 1.7; }
.member-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--border); padding-top: 16px; margin-top: 20px; }
.member-dialog .alert { margin: 12px 0; }
dialog.context-ai-dialog label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 14px; }
dialog.context-ai-dialog label input, dialog.context-ai-dialog label select { display: block; margin-top: 6px; font-weight: 400; }
@media (max-width: 600px) {
  .member-heading { align-items: flex-start; }
  .member-heading-actions { margin-left: 0; width: 100%; }
  .member-heading-actions .btn { flex: 1; justify-content: center; }
  .member-search { max-width: none; }
  .member-dialog-content { padding: 20px 16px; }
  .member-dialog-actions .btn { flex: 1; justify-content: center; }
}

.panel-actions { margin: 16px 0; }
.notification-recipients { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.notification-recipients .chip { max-width: 100%; overflow-wrap: anywhere; }
[data-notifications-ui] #new-email { flex: 1; min-width: 180px; }
[data-notifications-ui] li { overflow-wrap: anywhere; }
[data-calendar-ui] strong { overflow-wrap: anywhere; }

/* FAQ React views use the same controls and preview as the administration shell. */
.faq-category { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.faq-category:hover { background: var(--bg); }
.faq-category.on { background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
.faq-category span { font-size: 12px; color: var(--muted); }
.faq-category-row { flex-wrap: nowrap; gap: 0; }
.faq-category-row .faq-category { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.faq-table td:nth-child(3) { min-width: 220px; max-width: 480px; overflow-wrap: anywhere; }
.faq-table td:last-child { min-width: 190px; }
.faq-confirm-list { max-height: 240px; overflow: auto; overflow-wrap: anywhere; }
[data-faq-list] .faq-layout > *, [data-faq-editor] .split > * { min-width: 0; }
@media(max-width: 760px) { [data-faq-list] .faq-layout, [data-faq-editor] .split { grid-template-columns: minmax(0,1fr); } [data-faq-editor] .sticky { position: static; } }

/* React form editor: keep the shared management style and a visible save action. */
[data-form-list] .badge { margin: 2px 4px 2px 0; }
[data-form-list] .card, .form-editor-main { min-width: 0; }
.form-field-editor { align-items: flex-start; }
.form-field-editor .grow { min-width: 0; }
.form-save-bar { position: sticky; top: 0; z-index: 4; background: var(--bg, #f5f6f8); padding: 12px 0; }
[data-form-editor] .codebox { white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px; }
[data-form-editor] .inline > select { width: auto; max-width: 100%; }
[data-form-editor] .mail-preview label { display: block; margin-top: 12px; }
@media (max-width: 760px) {
 [data-form-editor] .split { display: block; }
 [data-form-editor] .sticky { position: static; margin-top: 20px; }
 .form-save-bar { position: static; }
 .form-field-editor { flex-wrap: wrap; }
}

/* React booking settings use the same cards and save controls as forms. */
[data-booking-list] .card, .booking-editor-main { min-width: 0; }
[data-booking-list] .badge { margin: 2px 4px 2px 0; }
.booking-summary { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 13px; }
.booking-summary dt { color: var(--muted); }
.booking-summary dd { margin: 0; overflow-wrap: anywhere; }
.booking-save-bar { position: sticky; top: 0; z-index: 4; background: var(--bg, #f5f6f8); padding: 12px 0; }
[data-booking-editor] .codebox { padding: 12px; overflow-wrap: anywhere; white-space: pre-wrap; }
.booking-days { border: 0; margin: 0 0 16px; padding: 0; }
.booking-days legend { font-weight: 600; margin-bottom: 8px; }
.booking-member .grow { min-width: 0; }
.booking-warning { color: var(--danger); }
@media (max-width: 760px) {
 [data-booking-editor] .split { display: block; }
 [data-booking-editor] .sticky { position: static; margin-top: 20px; }
 .booking-save-bar { position: static; }
 .booking-summary { grid-template-columns: 1fr; gap: 4px; }
 .booking-summary dd { margin-bottom: 8px; }
}

/* React management views retain the compact rhythm of the original HTML UI. */
body[data-react-panel] #local-save-status[data-state="saved"] { display: none; }
.editor-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; position: sticky; top: 0; z-index: 5; padding: 12px 0; background: var(--bg); border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.editor-heading { min-width: 0; }
.editor-heading > a { font-size: 12px; }
.editor-heading h1 { font-size: 20px; line-height: 1.4; margin: 4px 0 0; overflow-wrap: anywhere; }
.editor-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; flex-shrink: 0; }
.editor-more { position: relative; font-size: 12px; }
.editor-more summary, .inline-help summary, .editor-preview summary { cursor: pointer; padding: 6px 0; }
.editor-more > div { position: absolute; right: 0; width: max-content; max-width: 280px; padding: 12px; display: grid; gap: 12px; background: var(--surface, #fff); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 20px #0001; z-index: 6; }
:is([data-form-editor], [data-booking-editor], [data-faq-editor], .engagement-panel) .split { grid-template-columns: minmax(0, 1fr) minmax(300px, 440px); gap: 20px; }
.editor-preview { min-width: 0; }
.editor-preview summary { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.editor-preview .preview-mini, .install-preview .preview-mini { height: min(700px, calc(100dvh - 180px)); min-height: 180px; flex: none; }
.form-field-editor .form-field-grid { display: grid; grid-template-columns: minmax(100px, .7fr) minmax(120px, 1fr) minmax(120px, 1fr); gap: 8px; }
.form-field-editor .field { margin-bottom: 0; }
.form-field-editor .field label { font-size: 12px; }
.form-field-editor .field input, .form-field-editor .field select { margin-top: 4px; }
.form-field-editor .field-wide, .form-field-editor .check { grid-column: 1 / -1; }
.form-field-editor .check { font-size: 12px; }
.form-field-editor .field-controls { display: flex; gap: 2px; padding-top: 20px; }
.form-field-editor .grow:not(.form-field-grid) .field { margin-bottom: 12px; }
.inline-help { font-size: 13px; margin: 8px 0; }
.inline-help summary { color: var(--muted); }
.custom-number { display: block; margin-top: 8px; }
.reception-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.reception-list > .card { margin-bottom: 0; padding: 16px 20px; }
.reception-list h2 { margin-bottom: 6px; }
.reception-list p { margin: 6px 0; }
.reception-list .inline-help { margin: 4px 0; }
.faq-selection { margin: 8px 0; }
.faq-bulk { padding: 12px 16px; background: var(--primary-soft); }
.booking-member .grow { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; }
.booking-member p { margin: 0; }
.booking-member .booking-warning { flex-basis: 100%; }
.member-status:empty { display: none; }
[data-notifications-ui] > details.card > summary { cursor: pointer; font-size: 14px; font-weight: 600; }
@media (max-width: 1200px) and (min-width: 1000px) {
 .form-field-editor .form-field-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
 .form-field-editor .form-field-grid > .field:nth-child(3) { grid-column: 1 / -1; }
}
@media (max-width: 999px) {
 :is([data-form-editor], [data-booking-editor], [data-faq-editor], .engagement-panel) .split { display: flex; flex-direction: column; }
 :is([data-form-editor], [data-booking-editor], [data-faq-editor], .engagement-panel) .editor-preview { position: static; margin: 0 0 12px; order: -1; }
 .editor-preview details { background: #fff; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; }
 .editor-toolbar { position: static; flex-wrap: wrap; }
 .editor-actions { flex-shrink: 1; justify-content: flex-start; }
}
@media (max-width: 600px) {
 .form-field-editor .form-field-grid { grid-template-columns: minmax(0, 1fr); }
 .form-field-editor { flex-wrap: nowrap; gap: 4px; }
 .form-field-editor .field-controls { flex-direction: column; }
 .editor-heading h1 { font-size: 18px; }
 .editor-actions { width: 100%; }
 .editor-actions > .small { flex-basis: 100%; }
 .editor-more > div { left: 0; right: auto; max-width: 230px; }
 .reception-list > .card { padding: 14px; }
}
.editor-preview { top: var(--editor-sticky-offset, 76px); }
:is([data-form-editor], [data-faq-editor], [data-faq-list]) .btn.ai { background: #fff; color: #6d48a8; border: 1px solid #ddd4ec; }
:is([data-form-editor], [data-faq-editor], [data-faq-list]) .btn.ai:hover { background: #f6f2fb; filter: none; }
@media (min-width: 1000px) {
 .reception-list > .card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .85fr); gap: 8px 24px; align-items: start; }
 .reception-list > .card > .inline, .reception-list > .card > .help { grid-column: 1 / -1; }
 .reception-list .reception-status > p:first-child { margin-top: 0; }
}
.reception-summary { min-width: 0; overflow-wrap: anywhere; }
/* Reception workspace: keep the schedule as the primary working surface. */
[data-inbox-ui] .inbox-list { padding: 0; }
.inbox-list-tools { padding: 14px 14px 0; }
.inbox-list-tools .help { margin: 8px 0 0; }
.inbox-quick-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.inbox-quick-filters .btn[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
.inbox-quick-filters .btn span { font-size: 12px; font-variant-numeric: tabular-nums; margin-left: 4px; }
.inbox-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; }
.inbox-table .inbox-person { min-width: 140px; max-width: 220px; overflow-wrap: anywhere; }
.inbox-person > a { font-weight: 600; text-underline-offset: 3px; }
.inbox-table .inbox-content { min-width: 150px; max-width: 240px; overflow-wrap: anywhere; }
.inbox-booking-time { margin-top: 4px; font-weight: 600; font-size: 12px; }
.inbox-row-status { min-width: 112px; }
.inbox-row-status select { min-height: 38px; width: 100%; min-width: 96px; font-weight: 600; cursor: pointer; }
.inbox-status-select.status-new { border-color: #d9b674; color: #805416; background-color: #fffbeb; }
.inbox-status-select.status-progress { border-color: #8fb3df; color: #244f85; background-color: #eff6ff; }
.inbox-status-select.status-done { border-color: #82bca6; color: #116345; background-color: #ecfdf5; }
.inbox-row-status select:disabled { cursor: wait; opacity: .7; }
.inbox-row-actions { white-space: nowrap; }
.inbox-row-actions .btn { min-height: 38px; }
.inbox-row:focus-within { outline: 2px solid var(--primary); outline-offset: -2px; }
.inbox-row-status [role="status"] { display: block; margin-top: 4px; }

.inbox-filters { padding: 12px 14px; border-bottom: 1px solid var(--border); align-items: end; }
.inbox-filters label { font-size: 12px; font-weight: 600; }
.inbox-filters select, .inbox-filters input { display: block; margin-top: 4px; }
.inbox-source { max-width: 200px; overflow-wrap: anywhere; }
.inbox-source > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.inbox-detail dd { white-space: pre-wrap; overflow-wrap: anywhere; }
.inbox-answer { display: contents; }
.inbox-detail details summary { cursor: pointer; font-weight: 600; }
.schedule-main { padding: 14px; }
.schedule-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.schedule-toolbar select { width: auto; max-width: 220px; }
.schedule-slot { position: absolute; left: 0; width: 100%; border: 0; background: transparent; cursor: pointer; }
.schedule-slot:hover, .schedule-slot:focus-visible { background: #0e9f6e16; outline: 2px solid var(--primary); outline-offset: -2px; }
.schedule-event { display: block; width: 100%; border: 0; border-left: 3px solid var(--mc, #0e9f6e); border-radius: 4px; padding: 3px 5px; background: #e8f6f0; color: #174d3b; font: inherit; font-size: 11px; text-align: left; cursor: pointer; overflow: hidden; margin: 2px 0; z-index: 2; }
.schedule-event.booking { background: #e7effc; color: #204777; }
.schedule-event.google { background: #f0eafa; color: #604580; }
.schedule-event b, .schedule-event span { display: block; overflow: hidden; text-overflow: ellipsis; }
.schedule-event:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.schedule-agenda > section { display: grid; grid-template-columns: 160px 1fr; border-top: 1px solid var(--border); padding: 10px 0; gap: 12px; }
.schedule-agenda > section > .inline { align-content: start; }
.schedule-agenda .closed { background: #f4f4f4; }
.calendar-connection > summary { cursor: pointer; font-size: 13px; display: list-item; }
.calendar-connection > summary .small { margin-left: 12px; color: var(--muted); }
.calendar-connection[open] > summary { margin-bottom: 20px; }
[data-schedule-ui] .cw-wrap { max-height: 72vh; }
[data-schedule-ui] .cw-dh small { display: block; }
@media(max-width: 760px) {
 .inbox-detail { display: block; }
 .inbox-filters .grow { flex-basis: 100%; }
 .inbox-filters { flex-wrap: wrap; gap: 10px; }
 .inbox-filters > label:not(.grow) { flex: 1; min-width: 120px; }
 .inbox-filters select, .inbox-filters input { width: 100%; min-width: 0; min-height: 44px; }
 .inbox-table-wrap { overflow: visible; padding: 12px; }
 .inbox-table, .inbox-table tbody { display: block; width: 100%; }
 .inbox-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
 .inbox-table .inbox-row { display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "meta meta" "person person" "content content" "status action" "followup followup"; gap: 8px 12px; padding: 14px; margin: 0 0 12px; border: 1px solid var(--border); border-radius: var(--radius); background: white; }
 .inbox-table .inbox-row:last-child { margin-bottom: 0; }
 .inbox-table .inbox-row.unread { border-left: 3px solid var(--primary); }
 .inbox-table .inbox-row td { border: 0; padding: 0; min-width: 0; max-width: none; }
 table.inbox-table tr.inbox-row td:first-child { grid-area: meta; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; box-shadow: none; }
 .inbox-table .inbox-person { grid-area: person; }
 .inbox-person > a { font-size: 16px; }
 .inbox-table .inbox-content { grid-area: content; padding-bottom: 4px; }
 .inbox-table .inbox-row-status { grid-area: status; }
 .inbox-row-status::before { content: attr(data-label); display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
 .inbox-row-status select { min-height: 44px; }
 .inbox-table .inbox-row-actions { grid-area: action; align-self: end; }
 .inbox-row-actions .btn { min-height: 44px; }
 .inbox-table .inbox-followup-state { grid-area: followup; overflow-wrap: anywhere; }
 .inbox-table .inbox-source { display: none; }

 .schedule-agenda > section { grid-template-columns: 1fr; }
 .schedule-toolbar .inline { width: 100%; }
 .schedule-toolbar select { max-width: 100%; }
 .schedule-main { padding: 10px; }
}
[data-schedule-ui] .cw-dh b, [data-schedule-ui] .cw-dh.today b { display: block; width: auto; height: auto; line-height: 1.5; border-radius: 0; background: transparent; color: inherit; font-size: 14px; }
[data-schedule-ui] .cw-dh.today { background: var(--primary-soft); color: var(--primary-dark); }
[data-schedule-ui] .cw-sw.booking { background: #e7effc; border: 1px solid #204777; }
[data-schedule-ui] .cw-sw.event { background: #e8f6f0; border: 1px solid #174d3b; }
[data-schedule-ui] .cw-sw.google { background: #f0eafa; border: 1px solid #604580; }
.schedule-upcoming > summary { cursor: pointer; font-size: 13px; }

/* Help is a quiet, consistent secondary action; edited values stay in this tab. */
.help-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; line-height: 1.5; padding: 6px 2px; text-underline-offset: 3px; }
.help-link:hover { color: var(--primary); text-decoration: underline; }
.help-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 3px; }
.panel-actions > .help-link { margin-left: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.install-settings [hidden] { display: none !important; }
.install-sections { margin-bottom: 16px; }
.install-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 440px); align-items: start; gap: 20px; }
.install-fields { min-width: 0; }
.install-fields .card { padding: 20px; }
.install-fields .grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.install-fields .codebox { overflow-wrap: anywhere; }
.install-fields .tabs { flex-wrap: wrap; }
.install-preview { position: sticky; inset: auto; top: var(--install-top, 76px); margin: 0; padding: 12px; width: 100%; max-width: none; max-height: none; box-sizing: border-box; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--text); }
.install-preview[open] { display: flex; flex-direction: column; height: auto; }
.install-preview h2 { font-size: 14px; margin: 0; }
.install-preview .preview-controls { margin: 10px 0; }
.install-preview .preview-mini { width: 100%; }
.install-preview .help { margin: 8px 0 0; font-size: 12px; }
.preview-controls [aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.install-preview-actions, .install-preview-trigger, .install-preview-close { display: none; }
@media (max-width: 999px) {
 .install-layout { display: block; }
 .install-preview-trigger { display: block; position: fixed; right: 20px; bottom: 20px; z-index: 30; background: var(--primary); color: white; box-shadow: 0 4px 16px #0002; }
 .install-preview-actions { display:flex; justify-content:flex-end; position:fixed; inset:auto 0 0; z-index:30; padding:12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); background:var(--surface); border-top:1px solid var(--border); }
 .install-preview-actions .install-preview-trigger { position:static; min-height:44px; box-shadow:none; }
 .install-preview { position: fixed; inset: 0; margin: auto; width: calc(100% - 24px); max-width: 440px; }
 .install-preview[open] { max-height: calc(100dvh - 32px); overflow-y: auto; }
 .install-preview::backdrop { background: #10182880; }
 .install-preview-close { display: inline-flex; margin-left: auto; }
 .install-settings { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
 .install-fields :is(input,select,textarea,button,label,a) { scroll-margin-block:120px; }
}
@media (min-width: 861px) and (max-width: 999px) {
 .install-preview-actions { left:232px; }
}
@media (max-width: 600px) {
 .install-fields .grid.g2 { grid-template-columns: minmax(0, 1fr); }
 .install-sections { gap: 0; }
 .install-sections button { padding: 10px 8px; font-size: 13px; }
}
.install-settings .switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; z-index: 1; cursor: pointer; }
.install-settings .switch input:focus-visible + span { outline: 2px solid var(--primary-dark); outline-offset: 3px; }

.preview-mini[data-preview-size]::after, .device-frame[data-preview-size]::after { content: attr(data-preview-size); position: absolute; top: 6px; left: 8px; z-index: 6; padding: 2px 6px; border-radius: 4px; background: #ffffffed; color: var(--muted); font-size: 11px; pointer-events: none; }
.preview-mini[data-preview-size] > .label { display: none; }

/* Keep dashboard cards compact and long notification text readable. */
[data-home="react"] .grid > .card { min-width: 0; }
[data-home="react"] .home-columns { align-items: start; }
.home-recent td:nth-child(2) { min-width: 100px; overflow-wrap: anywhere; }
.home-notification-scroll { max-height: 360px; overflow: auto; }
.home-notifications { list-style: none; padding: 0; margin: 0; }
.home-notifications li { padding: 10px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.home-notifications li:last-child { border-bottom: 0; }
.home-notifications .inline { margin-bottom: 4px; }

[data-chat-editor] .split { align-items: start; }
.chat-editor-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.chat-choice-fields { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(0, 2fr); gap: 12px; }
.chat-warning { color: var(--warn); }
[data-chat-editor] .node-card .head input { min-width: 0; }
[data-chat-editor] .tree-node { margin-top: 10px; }
@media(max-width: 760px) { .chat-choice-fields { grid-template-columns: minmax(0,1fr); } [data-chat-editor] .node-card .head { flex-wrap: wrap; } [data-chat-editor] .node-card .head input { flex-basis: 65%; } [data-chat-editor] .tree-node { margin-left: 6px; padding-left: 8px; } }

/* React appearance keeps the installation preview geometry and compact fields. */
.appearance-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
[data-appearance-editor] .install-fields { min-width: 0; }
[data-appearance-editor] .codebox { overflow-wrap: anywhere; white-space: pre-wrap; }
[data-appearance-editor] .swatch { padding: 0; cursor: pointer; }
[data-appearance-editor] .install-fields > section > .card > .inline > input { flex: 1; min-width: 0; }
[data-appearance-editor] .chip { max-width: 100%; overflow-wrap: anywhere; }

/* Publication review retains compact cards and the shared public chat geometry. */
[data-publication] .publication-controls { margin-bottom: 12px; flex-wrap: wrap; }
[data-publication] .publication-primary { width: 100%; justify-content: center; margin-top: 10px; }
[data-publication] .badge { margin: 2px; }
[data-publication] .publication-review .alert { margin-top: 10px; margin-bottom: 8px; }
.publication-impact { margin-top: 14px; font-size: 13px; overflow-wrap: anywhere; }
.publication-impact ul { margin: 4px 0 12px; padding-left: 20px; }
[data-publication] .share-chat-card { margin-top: 20px; }
@media(max-width: 1000px) {
 [data-publication] .publication-layout { display: flex; flex-direction: column; }
 [data-publication] .publication-layout > * { width: 100%; }
 [data-publication] .publication-review { position: static; order: -1; }
}
[data-publication] .mock-site .nav { padding-top: 28px; }
@media(max-width: 1000px) { [data-publication] .mock-site .nav span { display: none; } }

.company-settings-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.company-settings-toolbar { margin: 0 0 16px; flex-wrap: wrap; }
.company-settings-links { margin-bottom: 16px; }
.company-weekdays { margin-top: 12px; flex-wrap: wrap; }
[data-company-settings] .grid > *, [data-company-settings] .row-item > * { min-width: 0; }
[data-company-settings] .row-item .grow { overflow-wrap: anywhere; }
[data-company-settings] td { overflow-wrap: anywhere; }
[data-withdraw-status][hidden] { display: none; }
@media(max-width: 1000px) { [data-company-settings] .grid.g2 { grid-template-columns: minmax(0,1fr); } }
.company-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; max-width: 360px; }
.company-weekdays .check { gap: 3px; }

/* Shared React navigation, preserving existing shell geometry. */
.navigation-close{display:none}.navigation-error{flex-basis:100%;margin:0;color:var(--danger);font-size:13px}
.navigation-backdrop{position:fixed;inset:0;z-index:49;background:rgba(15,23,42,.4);border:0;border-radius:0;cursor:pointer}
@media(max-width:860px){.sidebar .navigation-close{display:flex;margin:0 12px 12px;}.sidebar .navigation-close:focus-visible{outline:2px solid white;outline-offset:3px}}
.topbar:has(.navigation-error){flex-wrap:wrap}

.calendar-sync { margin-bottom:12px; }.calendar-sync-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:12px;color:var(--muted)}.calendar-sync-bar>span{flex:1;min-width:200px}.calendar-sync .calendar-connection{margin:6px 0 0;padding:8px 12px}.calendar-sync .calendar-connection>summary{font-size:12px}.calendar-sync .calendar-connection[open]{padding:14px}.calendar-job{padding:10px 0;border-bottom:1px solid var(--border);font-size:12px}.calendar-job p{margin:4px 0}.calendar-sync [data-calendar-ui]{margin-top:12px}
.notice-fields{border:0;padding:0;min-width:0}.notice-fields label,.external-link-fields label{display:block;margin:12px 0}.notice-preview{align-self:start;position:sticky;top:var(--editor-sticky-offset,100px)}.external-link-fields{min-width:0}.external-link-fields .grid{margin-top:10px}@media(max-width:800px){.notice-preview{position:static}}


/* Announcement templates are scoped to the announcement editor. */
[data-announcement-editor] .notice-templates { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:12px 0; }
[data-announcement-editor] .notice-template { min-width:0; border:1px solid var(--border); border-radius:12px; background:white; color:var(--text); padding:10px; text-align:left; cursor:pointer; font:inherit; }
[data-announcement-editor] .notice-template[aria-pressed=true] { border-color:var(--primary); box-shadow:0 0 0 2px var(--primary-soft); }
[data-announcement-editor] .notice-template b, [data-announcement-editor] .notice-template small { display:block; font-size:12px; }
[data-announcement-editor] .notice-template small { color:var(--muted); margin-top:4px; }
[data-announcement-editor] .notice-template-art { display:flex; align-items:center; gap:5px; height:44px; padding:8px; margin-bottom:8px; background:#edf1f5; border-radius:5px; }
[data-announcement-editor] .notice-template-art i { height:4px; width:30%; background:#0e9f6e; border-radius:4px; }
[data-announcement-editor] .notice-template-art i:last-child { height:12px; margin-left:auto; }
[data-announcement-editor] .notice-template.template-card .notice-template-art { margin-left:18%; background:white; border:1px solid #d1d5db; box-shadow:0 3px 8px #172b2714; }
[data-announcement-editor] .notice-template.template-slim .notice-template-art { background:#0e9f6e; height:24px; margin-top:10px; margin-bottom:18px; }
[data-announcement-editor] .notice-template.template-slim i { background:white; }
[data-announcement-editor] .notice-template.template-soft .notice-template-art { background:#ecfdf5; height:24px; margin-top:10px; margin-bottom:18px; }
[data-announcement-editor] .notice-customize { margin:10px 0; }
[data-announcement-editor] .notice-site-header { height:64px; display:flex; align-items:center; gap:14px; padding:0 18px; background:white; color:#172b27; font-weight:700; border-bottom:1px solid #d1d5db; }
[data-announcement-editor] .notice-site-header span { font-size:11px; font-weight:400; }
[data-announcement-editor] .notice-site-content { margin:24px; padding:24px 16px; border-radius:12px; background:#fff9; color:#61736d; }
@media(max-width:540px) { [data-announcement-editor] .notice-templates { grid-template-columns:1fr; } [data-announcement-editor] .notice-template-art { max-width:180px; } }

/* Launcher icon catalogue: native radios preserve keyboard and screen-reader behavior. */
.launcher-icon-picker { border:0; padding:0; margin:0 0 20px; min-width:0; }
.launcher-icon-picker legend { font-weight:600; margin-bottom:10px; }
.launcher-icon-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(90px,1fr)); gap:8px; }
.launcher-icon-option { position:relative; cursor:pointer; }
.launcher-icon-option input { position:absolute; opacity:0; width:1px; height:1px; margin:0; }
.launcher-icon-tile { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; min-height:88px; padding:10px 6px; border:2px solid #d1d5db; border-radius:10px; background:#fff; color:#374151; font-size:13px; }
.launcher-icon-tile svg { display:block; width:28px; height:28px; }
.launcher-icon-option input:checked + .launcher-icon-tile { border-color:#0e9f6e; background:#ecfdf5; color:#065f46; box-shadow:inset 0 0 0 1px #0e9f6e; }
.launcher-icon-option input:focus-visible + .launcher-icon-tile { outline:3px solid #1d4ed8; outline-offset:3px; }
.launcher-icon-option input:disabled + .launcher-icon-tile { opacity:.55; cursor:not-allowed; }

/* Virtual device previews keep layout dimensions independent of the editor viewport. */
.preview-viewport{min-width:0;width:100%}.preview-viewport-tools{display:flex;gap:8px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin:10px 0;font-size:12px;color:var(--muted)}.preview-viewport-window{position:relative;width:100%;max-width:100%;border:1px solid var(--border);border-radius:12px;background:#edf1f5}.preview-viewport-canvas{position:relative;isolation:isolate;max-width:none}.notice-template.template-popup .notice-template-art{background:#eef2f5}.notice-template.template-popup .notice-template-art i:first-child{width:55%;height:28px;margin:8px auto;border-radius:6px;background:white;box-shadow:0 2px 8px #172b2733}

/* A short, ordered notice workflow with optional details kept out of the main path. */
[data-announcement-editor] .notice-step > h2 { display:flex; align-items:center; gap:10px; }
[data-announcement-editor] .notice-preview-stages { margin-top:12px; flex-wrap:wrap; }
[data-announcement-editor] .notice-content-format { margin:0 0 20px; }
[data-announcement-editor] .notice-legacy-content { padding:12px; border-left:3px solid var(--primary); background:var(--primary-soft); }
[data-announcement-editor] .notice-text-tools { flex-wrap:wrap; gap:8px; }
[data-announcement-editor] .notice-link-insert { margin-top:12px; padding:0 12px 12px; border:1px solid var(--border); border-radius:8px; }
.notice-step-number { display:inline-grid; place-items:center; width:28px; height:28px; flex:none; border-radius:50%; background:var(--primary-soft); color:var(--primary); font-size:14px; }
[data-announcement-editor] .notice-templates { grid-template-columns:repeat(2,minmax(0,1fr)); }
[data-announcement-editor] .notice-template { min-height:128px; }
[data-announcement-editor] .btn[aria-pressed=true] { background:var(--primary-soft); border-color:var(--primary); color:var(--primary-dark); }
[data-announcement-editor] .notice-custom-colors, [data-announcement-editor] .notice-customize, .link-details { margin:14px 0; }
.notice-colors { margin-top:20px; padding-top:16px; border-top:1px solid var(--border); }
.notice-color-chip { display:inline-block; width:20px; height:20px; border:1px solid #0002; border-radius:50%; vertical-align:middle; margin-right:6px; }
.notice-brand-reference { overflow-wrap:anywhere; }
.notice-brand-reference a { display:inline-block; margin-left:8px; }
.notice-dismiss-policy { margin-top:20px; padding-top:16px; border-top:1px solid var(--border); }
.notice-redisplay-options { border:0; padding:0; margin:16px 0; min-width:0; }
.notice-redisplay-options legend { font-weight:600; margin-bottom:4px; }
.notice-fields .notice-redisplay-option { display:flex; align-items:flex-start; gap:10px; border:1px solid var(--border); border-radius:10px; padding:12px; margin:8px 0; cursor:pointer; }
.notice-redisplay-option:has(input:checked) { border-color:var(--primary); background:var(--primary-soft); }
.notice-redisplay-option:has(input:focus-visible) { outline:3px solid #2563eb; outline-offset:2px; }
.notice-redisplay-option input { flex:none; margin-top:4px; }
.notice-redisplay-option b, .notice-redisplay-option small { display:block; }
.notice-redisplay-option small { color:var(--muted); margin-top:3px; }
.notice-redisplay-options:disabled { opacity:.6; }
.notice-redisplay-detail { margin-bottom:14px; }
.brand-color-input { display:flex; align-items:center; gap:12px; }
.brand-color-input .field { margin-bottom:8px; }
.company-brand-settings .swatches { flex-wrap:wrap; }
.company-brand-settings .swatch[aria-pressed=true] { outline:3px solid var(--text); outline-offset:3px; }
@media(max-width:540px) { [data-announcement-editor] .notice-templates { grid-template-columns:repeat(2,minmax(0,1fr)); } [data-announcement-editor] .notice-template { padding:9px; min-height:132px; } }

/* Admin workspace hierarchy: shared brand tokens and route behavior stay intact. */
.sidebar .nav-group { color: #a3afbf; font-size: 11px; font-weight: 600; padding-top: 18px; }
.sidebar .nav a { min-height: 42px; gap: 11px; }
.sidebar .nav .ico { display: inline-flex; flex: 0 0 18px; align-items: center; justify-content: center; }
.sidebar .nav a.active { box-shadow: inset 3px 0 0 #b6f0d7; }
.sidebar .nav a:focus-visible { outline: 2px solid #b6f0d7; outline-offset: -2px; }
.page-head h1 { font-size: 24px; letter-spacing: -.025em; }
.page-head p { line-height: 1.8; }
.card h2 { font-size: 16px; }
.card h3 { font-size: 14px; }
.section-eyebrow { display: block; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; margin-bottom: 5px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.section-heading h2 { margin: 0; }
.btn { min-height: 40px; justify-content: center; }
.btn.sm { min-height: 34px; }
.btn.xs { min-height: 30px; }
.btn.primary { box-shadow: 0 1px 2px #102a2414; }
.btn:focus-visible, .seg button:focus-visible, summary:focus-visible, .home-action:focus-visible { outline: 3px solid var(--primary-dark); outline-offset: 3px; }
.btn:disabled { opacity: .55; box-shadow: none; }
.field > label, .lbl { font-size: 13px; line-height: 1.65; }
.field label > input, .field label > select, .field label > textarea { margin-top: 5px; }
.help { line-height: 1.75; }
.workspace-context { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; margin-bottom: 20px; border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: 8px; background: var(--surface); }
.workspace-context p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.home-priority { border-top: 3px solid var(--primary); }
.home-action { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px; border: 1px solid var(--border); border-radius: 10px; background: #f8fafb; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.home-action:hover { background: var(--primary-soft); border-color: var(--primary); }
.home-action > span:first-child { font-weight: 600; }
.home-action strong { font-size: 32px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.home-action small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.home-action-link { display: flex; width: 100%; justify-content: space-between; color: var(--primary-dark); font-size: 12px; font-weight: 600; }
.home-check-summary { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 16px; }
.schedule-heading { margin-bottom: 16px; }
.schedule-heading h2 { margin-bottom: 4px; }
.schedule-heading p { margin: 0; }
.schedule-toolbar { padding: 12px; background: #f8fafb; border: 1px solid var(--border); border-radius: 8px; gap: 12px; margin-bottom: 14px; }
.schedule-toolbar .seg button { min-height: 36px; }
.schedule-period { font-variant-numeric: tabular-nums; font-size: 14px; }
.schedule-empty { border: 1px dashed var(--border); border-radius: 8px; padding: 10px 12px; color: var(--muted); background: #fafbfc; font-size: 12px; }
.schedule-scroll-hint { display: none; }
[data-schedule-ui] .cw-dh { padding-top: 10px; padding-bottom: 10px; }
[data-schedule-ui] .cw-dh.today { box-shadow: inset 0 -3px 0 var(--primary); }
[data-schedule-ui] .cs th.today { box-shadow: inset 0 -3px 0 var(--primary); }
.schedule-agenda > section.today { border-left: 3px solid var(--primary); padding-left: 12px; background: var(--primary-soft); }
.schedule-event { border-radius: 6px; font-size: 12px; }
.schedule-event .schedule-kind { display: inline; font-size: 10px; font-weight: 600; }
.schedule-agenda .schedule-event, .cs .schedule-event, .cw-ad .schedule-event { min-height: 44px; padding: 6px 8px; }
.schedule-event:hover { filter: brightness(.97); box-shadow: inset 0 0 0 1px currentColor; }
[data-schedule-ui] .cw-wrap:focus-visible { outline: 2px solid var(--primary-dark); outline-offset: 3px; }
[data-schedule-ui] input[type=date], [data-schedule-ui] input[type=datetime-local], [data-booking-editor] input[type=time] { min-height: 44px; font-variant-numeric: tabular-nums; }
[data-booking-editor] .booking-days .check { min-height: 40px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 7px; }
[data-booking-editor] .booking-days .check:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); }
@media(max-width:860px) {
  .page-head h1 { font-size: 22px; }
  .btn, .btn.sm, .btn.xs, .seg button { min-height: 44px; }
  .topbar { gap: 8px; }
  .topbar .btn { min-height: 40px; }
  .schedule-toolbar { padding: 10px; }
  .schedule-toolbar .inline { gap: 8px; }
  .schedule-period { flex-basis: 100%; padding-top: 4px; }
  .schedule-toolbar select { min-height: 44px; }
  .schedule-toolbar .seg button { min-height: 44px; }
  .schedule-scroll-hint { display: block; }
  .schedule-main { padding: 14px; }
  .home-action { padding: 16px; }
  .field input, .field select, .field textarea { font-size: 16px; max-width: 100%; min-width: 0; }
  .workspace-context > .btn { width: 100%; white-space: normal; }
}
@media(prefers-reduced-motion:reduce) {
  .sidebar, .switch span, .switch span::before { transition: none; }
}
@media(max-width:860px) {
  [data-home] .home-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  [data-home] .home-metrics .card { padding: 16px; margin-bottom: 0; }
  [data-home] .home-metrics { margin-bottom: 20px; }
  [data-home] .home-priority .g2 { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  [data-home] .home-action { padding: 12px; }
  [data-home] .home-action-link { line-height: 1.7; }
}
@media(max-width:350px) {
  [data-home] .home-priority .g2 { grid-template-columns: 1fr; }
}
.booking-advanced > summary { cursor: pointer; font-size: 15px; font-weight: 600; }
.booking-advanced[open] > summary { margin-bottom: 12px; }
.home-settings h3 { margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.home-settings a { display: block; padding: 7px 0; font-size: 13px; text-underline-offset: 3px; }
.home-settings .grid > div { padding-left: 12px; border-left: 2px solid var(--border); }
@media(max-width:860px) {
  .home-settings .g4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-settings a { min-height: 44px; }
}

.home-action > span:first-child { min-height: 38px; }
.home-action > span:first-child small { display: block; margin-left: 0; white-space: nowrap; }
/* Column-layout editors must size to their viewport, not intrinsic control widths. */
@media(max-width:999px) {
  :is([data-form-editor], [data-booking-editor], [data-faq-editor], .engagement-panel) .split > * { width: 100%; max-width: 100%; min-width: 0; }
}
/* Keep the time axis visible when the weekly calendar is scrolled to today. */
[data-schedule-ui] .cw-times,
[data-schedule-ui] .cw-head > div:first-child,
[data-schedule-ui] .cw-allrow > .cw-tl { position: sticky; left: 0; z-index: 3; background: var(--surface); }
[data-schedule-ui] .cw-times { border-right: 1px solid var(--border); }
[data-schedule-ui] .cw-col .schedule-event b { white-space: nowrap; }

/* Form settings retain draft editors while switching information groups. */
[data-form-editor] [role="tabpanel"][hidden] { display:none !important; }
[data-form-editor] .form-tabs { gap:4px; }
[data-form-editor] .form-tabs button { min-height:44px; }
[data-form-editor] .form-tabs button:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }

/* Announcement settings keep context and the preview across accessible tabs. */
.notice-tabs{flex-wrap:wrap;gap:6px;margin-bottom:16px}.notice-tabs button{white-space:nowrap}.notice-flow-summary{padding:10px 14px;border:1px solid var(--border);border-radius:10px;background:var(--primary-soft);overflow-wrap:anywhere}.notice-fields [role=tabpanel][hidden]{display:none!important}.notice-fields [role=tabpanel]:focus-visible{outline:2px solid var(--primary);outline-offset:4px}.notice-fields [role=tabpanel]>.card:first-child{margin-top:0}

/* Contextual merge-field pickers stay readable on narrow form editors. */
.mail-field-picker { margin: 6px 0; }
.mail-field-picker summary { cursor: pointer; color: var(--primary); font-size: 13px; }
.mail-field-picker .btn { max-width: 100%; white-space: normal; overflow-wrap: anywhere; flex-wrap: wrap; text-align: left; }
.mail-field-picker .btn small { font-weight: 400; color: var(--muted); }
/* Published site sample reuses the publication preview in a separate tab. */
.publication-site-view { position: fixed; inset: 0; z-index: 2000; overflow: auto; background: #f5f7fa; padding: 24px; display: flex; flex-direction: column; }
.publication-site-view > :not(.preview-viewport) { flex-shrink: 0; }
.publication-site-view > .preview-viewport { max-width: 1440px; margin: 16px auto; }
@media (max-width: 600px) { .publication-site-view { padding: 12px; } }

[data-publication] .publication-controls label { min-width: 0; max-width: 100%; }
[data-publication] .publication-controls select, [data-publication] .publication-controls input { max-width: 100%; min-width: 0; width: 100%; }
[data-publication] .publication-review .alert { overflow-wrap: anywhere; min-width: 0; }

/* One review and save vocabulary across content editors. */
.settings-review { margin: 12px 0 20px; min-width: 0; }
.settings-review summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.settings-review summary span { margin-left: 12px; font-weight: 400; }
.settings-review dl { display: grid; gap: 10px; }
.settings-review dl > div { display: grid; grid-template-columns: minmax(120px, 180px) minmax(0, 1fr); gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.settings-review dt { color: var(--muted); }
.settings-review dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.engagement-panel .editor-toolbar { margin-top: 16px; }
.engagement-panel .split { margin-top: 16px; }
@media(max-width:600px){.settings-review dl > div{grid-template-columns:1fr;gap:4px}.settings-review summary span{display:block;margin:4px 0 0}.engagement-panel .editor-actions{width:100%}}
.editor-tabs button { min-height: 40px; }
.editor-tabs button:focus-visible, .settings-review summary:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.engagement-panel .eg-card > details > summary { cursor: pointer; font-size: 14px; font-weight: 600; }
