:root {
  color-scheme: light;
  --ink: #1b1c1b;
  --muted: #5f635e;
  --secondary-ink: #393b38;
  --hint-ink: #878b86;
  --axis-ink: #989e96;
  --faint: #6a6a65;
  --page: #fff;
  --surface: #fff;
  --subtle: #f7f7f6;
  --line: #dededd;
  --line-soft: #eeeeec;
  --accent: var(--brand-lemon);
  --accent-hover: var(--brand-lemon-hover);
  --accent-soft: var(--brand-lemon-soft);
  --accent-line: var(--brand-lemon-line);
  --accent-ink: var(--brand-lemon-ink);
  --focus: var(--brand-lemon-focus);
  --nav: #fafafa;
  --nav-active: #e9e9e9;
  --nav-line: #ececea;
  --nav-ink: var(--ink);
  --nav-muted: var(--muted);
  --success: #176647;
  --success-soft: #e8f6ef;
  --warning: #805317;
  --warning-soft: #fcf1da;
  --danger: #a52e42;
  --danger-soft: #fcecf0;
  --radius: 7px;
  --control-radius: 4px;
  --sidebar-width: 224px;
  --topbar-height: 68px;
  --shadow: 0 12px 34px rgb(20 20 19 / 14%);
  font: 400 14px/22px PretendardVariable-v1, Inter, "Helvetica Neue", "Apple SD Gothic Neo", "Malgun Gothic", 맑은고딕, Dotum, 돋움, Gulim, 굴림, Helvetica, Arial, sans-serif;
  letter-spacing: normal;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--page); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:enabled, select, input:is([type="checkbox"], [type="radio"]) { cursor: pointer; }
button:disabled, input:disabled, select:disabled, textarea:disabled { opacity: .55; cursor: not-allowed; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent-ink); text-underline-offset: .2em; }
img { display: block; max-width: 100%; }
svg { flex-shrink: 0; vertical-align: middle; }
::selection { color: var(--ink); background: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 24px; font-variant-numeric: tabular-nums; }

.shell { display: grid; min-height: 100dvh; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-width: 0;
  padding: 14px 12px 14px;
  border-inline-end: 1px solid var(--nav-line);
  color: var(--nav-ink);
  background: var(--nav);
}
#sidebar { display: flex; flex: 1; min-height: 0; flex-direction: column; }
.sidebar .mobile-menu-toggle { display: none; }
.sidebar, .sidebar :is(.brand, .nav-item, .nav-group-toggle) { font-variant-numeric: tabular-nums; }
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 40px;
  padding: 0 8px;
  margin-bottom: 19px;
  border: 0;
  border-radius: var(--control-radius);
  background: transparent;
  color: var(--nav-ink);
  text-align: start;
  text-decoration: none;
  font-weight: 400;
  font-size: 14px;
  line-height: 22px;
}
.brand small { display: block; margin-top: 3px; font-size: 11px; font-weight: 500; color: var(--nav-muted); }
.nav-label { margin: 17px 10px 5px; color: var(--nav-ink); font-size: 14px; font-weight: 400; line-height: 22px; }
.sidebar nav { min-width: 0; overflow-y: auto; padding: 2px; }
.nav-item {
  display: flex;
  width: 100%;
  min-height: 35px;
  align-items: center;
  gap: 10px;
  margin: 1px 0;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: var(--control-radius);
  background: transparent;
  color: var(--nav-ink);
  text-align: start;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  transition: color 130ms ease, background-color 130ms ease;
}
.nav-item:hover { color: var(--ink); background: #efefef; }
.nav-item:is([data-active="true"], [aria-current="page"], .active) { color: var(--ink); background: var(--nav-active); }
.nav-icon { display: inline-grid; flex: 0 0 17px; place-items: center; width: 17px; height: 17px; color: var(--ink); }
.nav-icon svg { width: 100%; height: 100%; max-width: 20px; max-height: 20px; }
.nav-count { margin-inline-start: auto; color: var(--nav-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.category-nav { display: grid; align-content: start; gap: 2px; }
.category-nav :is(.nav-item, .nav-group-toggle):focus-visible { outline-offset: -2px; }
.nav-group-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 35px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: var(--control-radius);
  background: transparent;
  color: var(--nav-ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  text-align: start;
}
.nav-group-toggle:hover { background: #efefef; }
.nav-group-toggle > svg:last-child {
  width: 13px;
  height: 13px;
  margin-inline-start: auto;
  color: var(--nav-muted);
  transition: transform 140ms ease;
}
.nav-group-toggle[aria-expanded="true"] > svg:last-child { transform: rotate(180deg); }
.nav-group-items { display: grid; gap: 1px; margin: 1px 0 3px; }
.nav-group-items .nav-item { min-height: 34px; margin: 0; padding-inline-start: 24px; }
.nav-group-items .nav-icon { display: none; }
.sidebar-footer { display: flex; align-items: flex-start; gap: 8px; margin-top: auto; padding: 13px 9px 2px; border-top: 1px solid var(--nav-line); color: var(--nav-ink); font-size: 12px; }
.sidebar-footer small { display: block; margin-top: 2px; color: var(--nav-muted); font-size: 11px; }
.storage-dot { flex: none; width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: var(--success); }
.sidebar-footer a { color: inherit; }

.workspace { min-width: 0; }
.topbar {
  display: flex;
  min-height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.crumb { display: flex; min-width: 0; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; line-height: 18px; font-variant-numeric: tabular-nums; }
.crumb svg { width: 14px; height: 14px; color: var(--faint); }
.crumb strong { color: var(--ink); font-weight: 400; }
.crumb-link { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; }
.crumb-link:hover { text-decoration: underline; text-underline-offset: .2em; }
.top-actions, .actions, .row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.top-actions, .row-actions { justify-content: flex-end; }
.main { width: 100%; margin: 0 auto; padding: 16px 24px 40px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-head > div:first-child { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 0; min-width: 0; }
.page-head h1 { color: #000; font-size: 16px; font-weight: 600; }
.subtitle { max-width: 66ch; color: var(--muted); font-size: 14px; line-height: 22px; }
.page-head .subtitle::before { content: "/"; display: inline-block; margin-inline: 8px; color: var(--faint); }

.dashboard-head { align-items: center; margin-bottom: 24px; }
.dashboard-head h1 { color: var(--ink); }
.dashboard-head :is(.dashboard-date, .subtitle) { color: var(--muted); font-size: 14px; font-weight: 400; line-height: 22px; }
.dashboard-head [data-action="calendar"] { color: var(--secondary-ink); }
.dashboard-section { min-width: 0; margin-bottom: 22px; }
.dashboard-section-head, .dashboard-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 9px 13px;
}
.dashboard-section-head { margin-bottom: 10px; }
.dashboard-section-head h2, .dashboard-panel-head h2 { font-size: 16px; font-weight: 600; }
.dashboard-campaigns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.dashboard-campaign {
  display: grid;
  justify-items: start;
  gap: 6px;
  min-width: 0;
  min-height: 87px;
  padding: 16px 20px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  text-align: start;
}
.dashboard-campaign:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.dashboard-campaign:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.dashboard-campaign + .dashboard-campaign { border-inline-start: 1px solid var(--line-soft); }
.dashboard-campaign:hover { background: var(--subtle); }
.dashboard-campaign > span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; line-height: 22px; }
.dashboard-campaign > span svg { width: 15px; height: 15px; color: var(--ink); }
.dashboard-campaign > strong { font-size: 16px; font-weight: 600; line-height: 24px; font-variant-numeric: tabular-nums; }
.dashboard-pulse { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin: -10px 0 15px; color: var(--muted); font-size: 12px; }
.dashboard-pulse-link { display: inline-flex; align-items: center; gap: 7px; padding: 4px 14px; border: none; border-radius: 4px; background: transparent; color: var(--ink); font: inherit; }
.dashboard-pulse-link:hover { background: var(--subtle); }
.dashboard-pulse-link > span { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.dashboard-pulse-link > svg { width: 13px; height: 13px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 16px; margin-bottom: 22px; }
.dashboard-grid:has(.dashboard-trend) {
  grid-template-columns: minmax(0, 1fr) minmax(265px, 34%);
  align-items: start;
  gap: 30px;
  margin-block: 36px 38px;
}
.dashboard-panel, .dashboard-top {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.dashboard-panel { display: flex; min-height: 230px; flex-direction: column; overflow: clip; }
.dashboard-panel-head { min-height: 48px; padding: 10px 15px; border-bottom: 1px solid var(--line-soft); }
.dashboard-panel-head .btn { min-height: 28px; padding-block: 4px; }
.dashboard-trend { min-height: 550px; padding: 24px; background: #f5f5f4; }
.dashboard-insights { display: grid; min-width: 0; gap: 24px; }
.dashboard-insights > .dashboard-panel { min-height: 0; }
.dashboard-insights > .dashboard-panel:first-child { min-height: 386px; padding: 24px; }
.dashboard-trend .dashboard-panel-head,
.dashboard-insights > .dashboard-panel:first-child .dashboard-panel-head {
  min-height: 34px;
  padding: 0;
  border: 0;
  margin-bottom: 14px;
}
.dashboard-period-value {
  margin-top: 12px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 600;
  line-height: 36px;
  font-variant-numeric: tabular-nums;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.dashboard-chart { display: grid; width: 100%; min-height: 245px; align-content: center; gap: 12px; margin: 0; }
.dashboard-trend #dashboard-chart { display: grid; flex: 1; align-content: start; padding-block-start: 24px; }
.dashboard-trend .dashboard-chart { min-height: 0; gap: 0; }
.dashboard-trend .chart-surface { max-height: 357px; aspect-ratio: 640 / 313; }
.chart-plot { display: block; width: 100%; height: auto; max-height: 370px; overflow: visible; }
.chart-surface { position: relative; width: min(100%, 1020.69px); aspect-ratio: 640 / 232; margin-inline: auto; }
.chart-surface .chart-plot { position: absolute; inset: 0; width: 100%; height: 100%; }
.chart-grid { stroke: #e0e0dc; stroke-width: 1; }
.chart-count { position: absolute; transform: translate(-100%, -50%); color: var(--axis-ink); font-size: 12px; font-weight: 400; line-height: 22px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-date { transform: translate(-50%, -50%); }
.chart-series { stroke: var(--brand-chart-lemon); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
path.chart-series, polyline.chart-series { fill: none; }
.chart-series-compare { stroke: #8d8d86; stroke-dasharray: 4 4; }
.chart-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 16px; color: var(--muted); font-size: 12px; }
.chart-key { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.chart-swatch { width: 13px; height: 3px; border-radius: 3px; background: var(--brand-chart-lemon); }
.chart-swatch-compare { background: #999992; }
.dashboard-insights .dashboard-breakdown { flex: 0; gap: 8px; margin-block: 36px 0; padding: 15px 0 0 24px; }
.dashboard-insights .dashboard-breakdown-row { grid-template-columns: minmax(64px, 32%) minmax(0, 1fr); }
.dashboard-insights .metric-track { height: 32px; border-radius: 3px; }
.dashboard-insights .metric-track > span { background: var(--brand-lemon-muted); }
.dashboard-journey { margin-bottom: 32px; }
.journey-items { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin: 0; padding: 0; list-style: none; }
.journey-items > .dashboard-metric {
  display: grid;
  flex: 1 1 110px;
  align-content: center;
  min-width: 0;
  min-height: 91px;
  gap: 7px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--surface);
  text-align: center;
}
.journey-items .dashboard-metric + .dashboard-metric { border-inline-start-color: var(--line); }
.dashboard-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-metric {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 4px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 14px;
  line-height: 22px;
}
.dashboard-metric + .dashboard-metric { border-inline-start: 1px solid var(--line-soft); }
.dashboard-metric strong { color: var(--ink); font-size: 20px; font-weight: 600; line-height: 30px; font-variant-numeric: tabular-nums; }
.dashboard-breakdown { display: grid; flex: 1; align-content: center; gap: 10px; margin: 0; padding: 15px; }
.dashboard-breakdown-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 10px; color: #1f2937; font-size: 14px; font-weight: 600; line-height: 22px; }
.dashboard-breakdown-row dd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(24px, auto); align-items: center; gap: 10px; margin: 0; }
.dashboard-breakdown-row strong { font-weight: inherit; text-align: end; font-variant-numeric: tabular-nums; }
.metric-track { overflow: hidden; height: 8px; border-radius: 2px; background: #ededec; }
.metric-track > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.dashboard-recent { margin: 0; padding: 0; list-style: none; }
.dashboard-row { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 15px; border-bottom: 1px solid var(--line-soft); }
.dashboard-row:last-child { border-bottom: 0; }
.dashboard-row :is(span, strong) { min-width: 0; overflow-wrap: anywhere; }
.dashboard-row .entry-name { flex: 1; min-width: 0; max-width: none; }
.dashboard-row .type-icon { width: 27px; height: 27px; }
.dashboard-row .type-icon svg { width: 15px; height: 15px; }
.dashboard-empty { display: grid; min-height: 112px; flex: 1; place-content: center; justify-items: center; gap: 8px; padding: 18px; background: var(--subtle); color: var(--muted); font-size: 12px; text-align: center; }
.dashboard-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.dashboard-top .dashboard-section-head { margin: 0; padding: 12px 15px; }
.dashboard-top #dashboard-ranking { min-width: 0; grid-column: 1 / -1; border-top: 1px solid var(--line-soft); }
.dashboard-top .dashboard-empty { border-radius: 0 0 var(--radius) var(--radius); }
.dashboard-top .table-scroll { border-end-start-radius: var(--radius); border-end-end-radius: var(--radius); }
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 14px;
}
.category-filter > button {
  min-height: 32px;
  padding: 5px 11px;
  border: 0;
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
}
.category-filter > button:hover { background: var(--subtle); color: var(--ink); }
.category-filter > button:is([data-active="true"], [aria-pressed="true"], [aria-current="page"]) {
  background: #e9e9e9;
  color: var(--secondary-ink);
  font-weight: 500;
}
.dashboard-panel-head .category-filter { margin-bottom: 0; border: 0; }
.dashboard-panel-head .category-filter > button { min-height: 31px; }
.dashboard-top .category-filter { margin: 5px 11px 5px 0; }
.analytics-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 17px;
}
.analytics-toolbar :is(label, fieldset) { min-width: 0; }
.analytics-toolbar :is(input[type="date"], select) { width: auto; min-width: 115px; }
.analytics-toolbar :is(label, .field) { color: #000; font-size: 14px; font-weight: 400; line-height: 22px; }
.analytics-toolbar .analytics-download { margin-inline-start: auto; color: var(--ink); }
.analytics-toolbar label.check { min-height: 35px; color: #000; font-size: 12px; font-weight: 400; line-height: 18px; }
.analytics-toolbar .btn[aria-pressed="true"] { background: var(--nav-active); color: var(--ink); }
.analytics-panel { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--control-radius); }
.analytics-panel .dashboard-panel-head { min-height: 0; padding: 0; border: 0; }
.analytics-panel + .table-card { margin-top: 20px; }
.analytics-panel .overview { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-block: 15px 20px; border: 0; }
.analytics-panel .summary-card { min-height: 100px; border: 1px solid var(--line); border-radius: var(--control-radius); }
.analytics-panel[data-metric="impressions"] .summary-card:nth-child(1),
.analytics-panel[data-metric="clicks"] .summary-card:nth-child(2),
.analytics-panel[data-metric="ctr"] .summary-card:nth-child(3) {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.analytics-panel .dashboard-chart { min-height: 230px; margin-block: 16px 10px; }
.analytics-panel h2 { color: #000; font-size: 16px; font-weight: 600; }

.btn, .icon-btn, .back-button {
  display: inline-flex;
  min-height: 35px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 21px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}
.btn svg, .icon-btn svg, .back-button svg { width: 16px; height: 16px; }
.btn:enabled:hover, .btn:is(a):hover, .icon-btn:enabled:hover, .back-button:enabled:hover { border-color: #c7c7c4; background: var(--subtle); }
.btn-primary { border-color: var(--accent); background: var(--accent); color: var(--ink); }
.btn-primary:enabled:hover, a.btn-primary:hover { border-color: var(--accent-hover); background: var(--accent-hover); }
.btn-ghost, .back-button { border-color: transparent; background: transparent; color: var(--muted); }
.btn-danger { border-color: #e9b9c3; background: var(--danger-soft); color: var(--danger); }
.btn-danger:enabled:hover { border-color: #ce8494; background: #f8dce4; }
.icon-btn { width: 34px; min-height: 34px; padding: 0; }
.icon-btn[title] { text-align: center; }
.back-button { min-width: 35px; min-height: 35px; padding: 5px; }

.overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); margin-bottom: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.summary-card { position: relative; min-width: 0; padding: 15px 18px; }
.summary-card + .summary-card { border-inline-start: 1px solid var(--line-soft); }
.summary-label { color: #000; font-size: 14px; font-weight: 400; line-height: 22px; }
.summary-number { display: block; margin-top: 4px; color: var(--ink); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 30px; }
.summary-icon { position: absolute; top: 17px; right: 17px; color: var(--muted); }
.summary-icon[data-tone="green"] { color: var(--success); }
.summary-icon[data-tone="amber"] { color: var(--warning); }
.summary-icon svg { width: 17px; height: 17px; }

.table-card, .panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.list-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; }
.search { display: flex; width: min(100%, 300px); min-width: 0; align-items: center; gap: 9px; }
.search svg { width: 16px; height: 16px; color: var(--faint); }
.search:has(input) { gap: 8px; min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--control-radius); color: var(--muted); background: var(--surface); }
.search:has(input):focus-within { border-color: var(--focus); box-shadow: 0 0 0 2px var(--accent-soft); }
.search input { flex: 1; min-width: 0; width: 100%; min-height: 34px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ink); outline: 0; }
.filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.list-toolbar .filter-group select { width: auto; min-width: 94px; color: var(--hint-ink); line-height: 21px; }
.table-scroll { position: relative; min-width: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; color: var(--ink); font-size: 13px; line-height: 18px; text-align: start; }
.table-scroll table { min-width: 690px; }
th, td { padding: 12px 14px; border-top: 1px solid var(--line-soft); vertical-align: middle; text-align: start; }
th:first-child, td:first-child { padding-inline-start: 17px; }
th:last-child, td:last-child { padding-inline-end: 17px; }
th { color: var(--ink); background: var(--subtle); font-size: 13px; font-weight: 400; line-height: 18px; white-space: nowrap; }
:is(.main[data-view="stats"], .dashboard-top) thead th:nth-child(n + 3) { font-weight: 600; }
td { min-height: 57px; }
tbody tr:hover { background: var(--subtle); }
tbody th[scope="row"] { background: transparent; color: var(--ink); font-size: 13px; white-space: normal; }
table:has(th[scope="row"]) :is(th, td):nth-child(n + 3) { text-align: end; font-variant-numeric: tabular-nums; }
td:has(.row-actions), th:last-child { text-align: end; }
.name-cell { display: flex; min-width: 180px; align-items: center; gap: 10px; text-align: start; }
.name-cell > :last-child { min-width: 0; }
.type-icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 6px; background: var(--subtle); color: var(--ink); line-height: 1; }
.type-icon svg { width: 17px; height: 17px; }
.entry-name { display: block; max-width: 42ch; color: var(--ink); font-weight: 700; text-align: start; overflow-wrap: anywhere; }
button.entry-name { padding: 0; border: 0; background: transparent; }
a.entry-name { text-decoration: none; }
.entry-name:is(a, button):hover { color: var(--accent-ink); text-decoration: underline; }
.entry-note { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.schedule-cell { color: var(--muted); font-variant-numeric: tabular-nums; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 999px; background: #efefed; color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status:is([data-status="active"], [data-status="live"], [data-status="published"], [data-status="공개"]) { background: var(--success-soft); color: var(--success); }
.status:is([data-status="scheduled"], [data-status="예약"]) { background: var(--accent-soft); color: var(--accent-ink); }
.status:is([data-status="paused"], [data-status="expired"], [data-status="중지"]) { background: var(--warning-soft); color: var(--warning); }
.row-actions { flex-wrap: nowrap; gap: 4px; }
.row-actions .btn { min-height: 31px; padding: 5px 9px; font-size: 12px; }
.row-actions .icon-btn { width: 31px; min-height: 31px; }
.list-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; }
.empty { display: grid; justify-items: center; align-content: center; gap: 10px; min-height: 220px; padding: 24px; color: var(--muted); text-align: center; }
.empty :is(h2, h3, strong) { color: var(--ink); font-size: 16px; font-weight: 600; line-height: 24px; }
.empty p { max-width: 52ch; }
.empty > .btn { margin-top: 5px; }
.empty.is-blank-list {
  min-height: clamp(390px, calc(100dvh - 340px), 650px);
  gap: 16px;
  padding: 24px 16px;
}
.empty.is-blank-list h2 { color: var(--muted); font-size: 14px; font-weight: 400; line-height: 22px; }
.empty.is-blank-list p { color: #000; }
.empty.is-blank-list .type-icon { width: 48px; height: 48px; border-radius: 8px; }
.empty.is-blank-list .type-icon svg { width: 25px; height: 25px; }

.shell[data-page="editor"] { grid-template-columns: minmax(0, 1fr); }
.shell[data-page="editor"] .sidebar { display: none; }
.shell[data-page="editor"] .topbar { padding-inline: 24px; }
.main[data-view="editor"] { padding: 0; }
.editor-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 60px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.editor-title { display: flex; flex: 0 1 415px; align-items: center; min-width: 0; gap: 9px; }
.editor-title #editor-name { width: min(100%, 295px); min-height: 34px; padding: 5px 8px; color: var(--ink); font-size: 14px; font-weight: 400; line-height: 22px; }
.editor-title #editor-status { display: inline-flex; flex: none; }
.editor-head > .actions { margin-inline-start: auto; }
.editor-head .actions .btn { font-size: 13px; font-weight: 400; line-height: 19.5px; }
.editor-head .btn-primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.editor-head .btn-primary:enabled:hover { border-color: #393938; background: #393938; }
.editor-grid {
  display: grid;
  grid-template-columns: minmax(244px, min(27.42%, 416px)) minmax(352px, min(37.97%, 576px)) minmax(0, 1fr);
  align-items: stretch;
  min-height: calc(100dvh - var(--topbar-height) - 60px);
  background: #f2f3f2;
}
.test-layout { display: grid; grid-template-columns: minmax(250px, 310px) minmax(0, 1fr); gap: 16px; align-items: start; }
.editor-panel, .preview-panel { overflow: clip; }
.editor-settings {
  align-self: stretch;
  min-width: 0;
  padding: 24px 24px 32px;
  border-inline-end: 1px solid var(--line);
  background: var(--nav);
}
.editor-settings > h2, .detail-toolbar h2 { font-size: 14px; font-weight: 600; line-height: 22px; }
.settings-section { display: grid; gap: 8px; margin-top: 22px; }
.settings-section h3 { margin-bottom: 7px; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 22px; }
:is(.settings-device, .settings-mode) {
  min-inline-size: 0;
  margin: 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--surface);
}
:is(.settings-device, .settings-mode) legend { padding: 0 4px; color: #000; font-size: 14px; font-weight: 600; line-height: 22px; }
.settings-device :is(select, button) { max-width: 100%; }
.settings-radio-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 15px; color: #1b1c1a; font-size: 12px; font-weight: 400; line-height: 18px; }
.settings-radio-row label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.setting-card {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  min-height: 64px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  text-align: start;
}
.setting-card:hover { border-color: #a3a3a1; }
.setting-card:is([data-active="true"], [aria-selected="true"], [aria-pressed="true"]) {
  border-color: #727270;
  background: #fff;
  box-shadow: inset 0 0 0 1px #727270;
}
.setting-copy { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.setting-copy strong { display: block; color: #000; font-size: 14px; font-weight: 600; line-height: 22px; }
.setting-copy small { display: block; margin-top: 2px; color: var(--hint-ink); font-size: 13px; font-weight: 400; line-height: 18px; }
.setting-value { max-width: 42%; color: var(--secondary-ink); font-size: 12px; font-weight: 400; line-height: 18px; text-align: end; overflow-wrap: anywhere; }
.setting-card > svg:last-child { width: 14px; height: 14px; color: var(--muted); }
.setting-diagram { display: grid; flex: 0 0 36px; min-height: 27px; place-items: center; color: #555552; }
.setting-diagram svg { width: 18px; height: 18px; }
.setting-layout-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "diagram diagram arrow" "copy value arrow";
}
.setting-layout-card .setting-diagram { grid-area: diagram; place-items: start; }
.setting-layout-card .setting-copy { grid-area: copy; }
.setting-layout-card .setting-value { grid-area: value; max-width: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.setting-layout-card > svg:last-child { grid-area: arrow; }
.setting-layout-card .placement-shape {
  width: min(152px, 100%);
  height: 126px;
  padding: 12px;
  border-color: #e3e3e1;
  background: #f0f0ef;
}
.setting-layout-card .placement-shape::before { width: 52%; height: 56%; }
.setting-layout-card .placement-shape:is([data-placement="strip"], [data-placement="inline"], [data-placement="top"], [data-placement="bottom"])::before { width: 100%; height: 24%; }
.setting-layout-card .placement-shape[data-placement="floating"]::before { width: 34%; height: 42%; }
.setting-layout-card .placement-shape[data-placement="mini"]::before { width: 25%; height: 24%; }
.editor-panel {
  align-self: stretch;
  border: 0;
  border-inline-end: 1px solid var(--line);
  border-radius: 0;
}
.detail-toolbar { display: flex; align-items: center; min-height: 47px; padding: 9px 24px; border-bottom: 1px solid var(--line-soft); background: var(--surface); }
.editor-body { min-width: 0; padding: 22px 24px 30px; }
.editor-body > * + * { margin-top: 16px; }
.editor-body:has(> .placement-fieldset) > * + * { margin-block-start: 24px; }
.section-title, .section-title h3 { color: var(--ink); font-size: 14px; font-weight: 600; line-height: 22px; }
.section-title p { margin-top: 4px; color: var(--hint-ink); font-size: 13px; font-weight: 400; line-height: 18px; }
.card-form + .section-title { margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--line-soft); }
.section-with-action { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.section-with-action > .btn { min-height: 31px; }
.card-form { display: grid; min-width: 0; gap: 15px; }
.card-form + .card-form { border-top: 1px solid var(--line-soft); padding-top: 18px; }
.field { display: grid; min-width: 0; gap: 5px; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 22px; }
.field small, .field .hint, .hint, .help-text { color: var(--hint-ink); font-size: 13px; font-weight: 400; line-height: 18px; }
.field-row { display: flex; min-width: 0; align-items: start; gap: 9px; }
.field-row > * { min-width: 0; flex: 1; }
.placement-fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.placement-fieldset legend { padding: 6px 0; margin-bottom: 16px; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 22px; }
.placement-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 8px; }
.placement-option {
  position: relative;
  display: grid;
  min-width: 0;
  justify-items: stretch;
  align-content: start;
  gap: 10px;
  border-radius: var(--control-radius);
  background: var(--surface);
  color: var(--muted);
  text-align: start;
  cursor: pointer;
}
.placement-option:hover .placement-shape { background: #eaeae8; }
.placement-option:is(:has(input[type="radio"]:checked), [data-active="true"]) {
  border-color: transparent;
  background: var(--surface);
  color: var(--ink);
}
.placement-option:has(input[type="radio"]:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.placement-option input[type="radio"] { flex: none; width: 14px; height: 14px; }
.placement-shape {
  display: grid;
  width: 32px;
  height: 24px;
  place-items: center;
  padding: 2px;
  border: 1px solid #a4a4a0;
  border-radius: 3px;
}
.placement-shape::before { content: ""; width: 14px; height: 9px; border-radius: 2px; background: #aaa9a5; }
.placement-option > .placement-shape {
  position: relative;
  width: 100%;
  height: 126px;
  padding: 17px 16px;
  border-color: #e7e7e5;
  border-radius: 4px;
  background: #f2f3f2;
}
.placement-option:has(input[type="radio"]:checked) > .placement-shape { border-color: #989e96; background: #989e96; }
.placement-option > .placement-shape::before { width: 47%; height: 61%; border: 1px solid #949490; background: #fff; }
.placement-option:has(input[type="radio"]:checked) .placement-shape::before { border-color: #fff; background: #fff; }
.placement-shape:is([data-placement="top"], [data-placement="strip"]) { align-items: start; }
.placement-shape:is([data-placement="bottom"], [data-placement="floating"], [data-placement="mini"]) { align-items: end; }
.placement-shape:is([data-placement="floating"], [data-placement="mini"]) { justify-items: end; }
.placement-shape:is([data-placement="top"], [data-placement="bottom"], [data-placement="strip"], [data-placement="inline"])::before { width: 100%; height: 5px; }
.placement-option > .placement-shape:is([data-placement="top"], [data-placement="bottom"], [data-placement="strip"], [data-placement="inline"])::before { width: 100%; height: 29%; }
.placement-option > .placement-shape[data-placement="floating"]::before { width: 38%; height: 42%; }
.placement-option > .placement-shape[data-placement="mini"]::before { width: 26%; height: 25%; }
.placement-caption { display: flex; align-items: center; min-height: 22px; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 400; line-height: 18px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.placement-option:has(input[type="radio"]:checked) .placement-caption { color: var(--ink); font-weight: 600; }
.placement-option .placement-shape[data-shape="auto"]::before { width: 47%; height: 72%; }
.placement-option .placement-shape[data-shape="custom"]::before { width: 55%; height: 56%; border-style: dashed; }
.placement-option .placement-shape[data-shape="thin"]::before { width: 73%; height: 23%; }
.placement-option .placement-shape[data-shape="square"]::before { width: min(55%, 60px); height: auto; aspect-ratio: 1; }
.placement-option .placement-shape[data-shape="long"]::before { width: 43%; height: 87%; }
.placement-option .placement-shape[data-shape="circle"]::before { width: 30%; height: auto; aspect-ratio: 1; border-radius: 50%; box-shadow: none; }
.placement-option .placement-shape[data-shape="strip"]::before { width: 82%; height: 15%; }
.placement-option .placement-shape[data-shape="middle"]::before { width: 82%; height: 27%; }
.placement-option .placement-shape[data-shape="thick"]::before { width: 82%; height: 52%; }
.placement-option .placement-shape[data-slide]::before { width: 79%; height: 49%; }
.placement-option .placement-shape:is([data-slide="a" i], [data-slide="b" i])::after {
  content: "";
  position: absolute;
  inset: 24% 13%;
  --slide-up: linear-gradient(135deg, transparent 40%, #878984 40% 60%, transparent 60%);
  --slide-down: linear-gradient(45deg, transparent 40%, #878984 40% 60%, transparent 60%);
  --slide-dot: radial-gradient(circle closest-side, #a8aaa5 88%, transparent);
  background:
    var(--slide-up) 4px calc(50% - 2px) / 4px 4px no-repeat,
    var(--slide-down) 4px calc(50% + 1px) / 4px 4px no-repeat,
    var(--slide-down) calc(100% - 4px) calc(50% - 2px) / 4px 4px no-repeat,
    var(--slide-up) calc(100% - 4px) calc(50% + 1px) / 4px 4px no-repeat,
    var(--slide-dot) calc(50% - 6px) calc(100% - 4px) / 3px 3px no-repeat,
    var(--slide-dot) center calc(100% - 4px) / 3px 3px no-repeat,
    var(--slide-dot) calc(50% + 6px) calc(100% - 4px) / 3px 3px no-repeat;
}
.placement-option .placement-shape[data-slide="b" i]::after { inset-block: 15%; }
.placement-option .placement-shape[data-slide="c" i]::after {
  content: "1/3";
  position: absolute;
  inset: auto 16% 28% auto;
  padding: 0 3px;
  border-radius: 2px;
  background: #ededeb;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}
.placement-option .placement-shape[data-slide="d" i]::after {
  content: "";
  position: absolute;
  inset: auto 19% 23% auto;
  width: 17px;
  height: 7px;
  border-radius: 5px;
  background: #a8aaa5;
}
.placement-option .placement-shape[data-choice="cta"]::before,
.placement-option .placement-shape[data-choice="close"]::before {
  width: 48%;
  height: 61%;
  box-shadow: inset 0 -13px #d8d9d6;
}
.placement-option .placement-shape:is([data-cta="none"], [data-close="none"])::before { box-shadow: none; }
.placement-option .placement-shape:is([data-cta="link"], [data-close="b" i])::before { box-shadow: inset 0 -5px #d8d9d6; }
.placement-option .placement-shape[data-close="c" i]::before { box-shadow: inset 0 10px #d8d9d6; }
.placement-option .placement-shape[data-close="d" i]::before { box-shadow: inset -10px 0 #d8d9d6; }
.placement-option .placement-shape[data-close="e" i]::before { box-shadow: inset 8px 0 #d8d9d6; }

:is(.group-shapes, .group-slides) .placement-grid { gap: 8px; }
:is(.group-shapes, .group-slides) .placement-option { gap: 0; border: 1px solid #dedfdb; }
:is(.group-shapes, .group-slides) .placement-option:has(input:checked) { border-color: var(--brand-lemon-line); background: var(--brand-lemon-soft); }
:is(.group-shapes, .group-slides) .placement-shape { height: 128px; border: 0; border-radius: 3px 3px 0 0; }
:is(.group-shapes, .group-slides) .placement-caption { min-height: 27px; justify-content: center; border-top: 1px solid #e5e6e3; padding: 3px; }
.group-shapes .placement-option:nth-child(3) { grid-column: 1; }
.group-shapes .placement-shape[data-shape="auto"]::before { display: none; }
.group-shape-auto { font-size: 12px; line-height: 1.6; text-align: center; color: var(--ink); }
.group-shapes .placement-shape:is([data-shape="thin"], [data-shape="square"], [data-shape="long"])::before {
  width: 70%; height: 80%; aspect-ratio: auto; border: 0; border-radius: 5px; background: white;
}
.editor-grid:has(.editor-stage[data-device="mobile"]) .group-shapes .placement-shape:is([data-shape="thin"], [data-shape="square"], [data-shape="long"])::before {
  width: 49%; height: calc(100% + 12px); align-self: end;
}
.group-shapes .placement-shape:is([data-shape="thin"], [data-shape="square"], [data-shape="long"])::after {
  content: ''; position: absolute; left: 50%; top: 32px; transform: translateX(-50%); width: 51%; height: var(--diagram-height, 34px); background: #d9dad7;
}
.editor-grid:has(.editor-stage[data-device="mobile"]) .group-shapes .placement-shape:is([data-shape="thin"], [data-shape="square"], [data-shape="long"])::after { width: 41%; }
.group-shapes .placement-shape[data-shape="square"] { --diagram-height: 52px; }
.group-shapes .placement-shape[data-shape="long"] { --diagram-height: 70px; }
.group-slides .placement-shape[data-slide]::before { width: min(100%, 84px); height: 80px; border-color: #e0e2de; }
.group-slides .placement-shape:is([data-slide="a"], [data-slide="b"])::after { inset: 23px calc(50% - 40px); }
.group-slides .placement-shape[data-slide="b"]::after { inset-block-end: 17px; }
.group-slides .placement-shape[data-slide="c"]::after { content: '1/2'; inset: 29px calc(50% - 34px) auto auto; }
.group-slides .placement-shape[data-slide="d"]::after {
  content: '‹     ›'; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 75px; height: auto;
  color: #797e77; background: transparent; white-space: pre; text-align: center;
}

.banner-shapes > legend { position: absolute; width: 1px; height: 1px; overflow: hidden; padding: 0; clip-path: inset(50%); white-space: nowrap; }
.banner-tiles { max-inline-size: 512px; }
.banner-tiles .placement-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 135px), 1fr)); }
.banner-tiles .placement-option { gap: 8px; }
.banner-tiles .placement-option > .placement-shape { height: 128px; }
.banner-template-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
  max-height: 100%;
  margin: auto;
  border-radius: inherit;
  object-fit: contain;
  visibility: hidden;
}
.banner-template-image[data-art-ready] { visibility: visible; }
.banner-tiles .placement-shape:has(> .banner-template-image[data-art-ready])::before,
.banner-tiles .placement-shape:has(> .banner-template-image[data-art-ready])::after { display: none; }
.banner-shapes .placement-option > [data-shape] {
  --band-start: 36%;
  --band-height: 12%;
  --device-width: 70%;
  --device-start: 22%;
}
.editor-grid:has(.editor-stage[data-device="mobile"]) .banner-shapes .placement-option > [data-shape] {
  --device-width: 45%;
  --device-start: 12%;
}
.banner-shapes .placement-option > [data-shape="middle"] { --band-height: 25%; }
.banner-shapes .placement-option > [data-shape="thick"] { --band-height: 38%; }
.banner-shapes .placement-option > [data-shape="square"] { --band-start: 26%; --band-height: 60%; }
.banner-shapes .placement-option > [data-shape="long"] { --band-start: 20%; --band-height: 72%; }
.banner-shapes .placement-option > [data-shape]::before,
.banner-shapes .placement-option > [data-shape]::after {
  content: "";
  position: absolute;
  inset-inline-start: 50%;
  width: var(--device-width);
  transform: translateX(-50%);
  border: 0;
}
.banner-shapes .placement-option > [data-shape]::before {
  top: var(--device-start);
  height: calc(100% - var(--device-start));
  border-radius: 5px 5px 0 0;
  background: #fff;
}
.banner-shapes .placement-option > [data-shape]::after {
  top: var(--band-start);
  height: var(--band-height);
  background: #d9dad8;
}
.banner-tiles .placement-option > .banner-custom-size {
  grid-template-rows: minmax(18px, 24px) repeat(2, minmax(24px, 36px));
  align-content: start;
  align-items: stretch;
  justify-items: stretch;
  gap: 4px;
  padding: 12px 15px 8px;
  cursor: default;
}
.banner-custom-size::before { content: none; }
.banner-custom-size > .check { min-height: 0; font-weight: 400; }
.banner-custom-size > .field {
  min-height: 0;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
}
.banner-custom-size input[type="number"] { height: 100%; min-height: 0; padding-block: 0; }
.gallery-toolbar .category-filter { flex-wrap: nowrap; gap: 8px; margin: 0; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; }
.gallery-toolbar .category-filter > button {
  flex: none;
  min-height: 24px;
  padding: 0 8px;
  background: #e9e9e9;
  color: var(--secondary-ink);
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  white-space: nowrap;
}
.gallery-toolbar .category-filter > button:focus-visible { outline-offset: -2px; }
.gallery-toolbar .category-filter > button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 8px; }
.template-card {
  display: grid;
  min-width: 0;
  aspect-ratio: 4 / 3;
  padding: 8px;
  border: 1px solid #fff;
  border-radius: var(--control-radius);
  background: #f2f3f2;
  text-align: start;
}
.template-card:is(:hover, [aria-pressed="true"]) { background: #989e96; }
.template-thumb {
  position: relative;
  display: flex;
  min-height: 0;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  isolation: isolate;
  overflow: hidden;
  padding: 8px;
  border-radius: 2px;
  background: var(--template-bg, #f3f2ee);
  color: var(--template-ink, var(--ink));
}
.template-thumb-image { display: grid; place-items: center; padding: 0; background: transparent; }
.template-thumb-image img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.template-thumb-model { display: grid; place-items: center; container-type: size; padding: 0; background: transparent; }
.template-source-model-viewport { position: relative; display: block; pointer-events: none; }
.template-source-model-stage { position: absolute; display: block; inset: 0 auto auto 0; transform-origin: top left; font-size: 14px; line-height: 1.5; }
.template-source-model-stage p { margin: 0; }
.template-source-model-stage :is(strong, b) { font-weight: bolder; }
.template-source-model-stage img { display: block; max-width: 100%; height: auto; }
.template-source-model-stage video { display: block; }
.template-canvas-tile { position: relative; display: block; width: min(140px, 100cqw, calc(var(--template-ratio) * 100cqh));
  aspect-ratio: var(--template-ratio); container-type: inline-size; overflow: hidden; border-radius: 2px; }
.template-canvas-tile-layer { position: absolute; display: block; overflow: hidden;
  text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.25; }
.template-canvas-tile-layer[data-template-layer-type="button"] { display: grid; place-items: center; }
.template-canvas-tile-layer[data-template-frame] { display: block; }
.template-canvas-tile-layer :is(img, video) { display: block; width: 100%; height: 100%; }
.template-art {
  position: absolute;
  z-index: -1;
  inset: 10% -8% auto auto;
  width: 52%;
  height: 56%;
  border: 1px solid var(--template-accent, var(--line));
  border-radius: 4px 0 0 4px;
  opacity: .22;
  transform: rotate(-14deg);
}
.template-thumb[data-pattern="thin"] .template-art { inset: 24% 0 auto 0; width: 100%; height: 43%; border-radius: 0; transform: none; }
.template-thumb[data-pattern="square"] .template-art { inset: auto -12% -26% auto; width: 68%; height: auto; aspect-ratio: 1; border-radius: 50%; transform: none; }
.template-thumb[data-pattern="long"] .template-art { inset: 0 10% 0 auto; width: 30%; height: 100%; border-width: 0 1px; border-radius: 0; transform: skewX(-10deg); }
.template-kicker { font-size: 10px; font-weight: 650; line-height: 1.3; }
.template-headline { font-size: 13px; font-weight: 750; line-height: 1.22; letter-spacing: -.02em; word-break: keep-all; overflow-wrap: anywhere; }
.template-cta { padding: 3px 6px; border-radius: 3px; background: var(--template-accent, var(--ink)); color: var(--template-cta-ink, #fff); font-size: 10px; font-weight: 700; line-height: 1.3; }
input:not([type="checkbox"], [type="radio"], [type="range"]), select, textarea {
  width: 100%;
  min-width: 0;
  min-height: 37px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  color: #000;
  background: var(--surface);
  caret-color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
}
.search input:not([type="checkbox"]) { min-height: 34px; padding: 0; border: 0; background: transparent; }
input:is([type="number"], [type="date"], [inputmode="numeric"]) { font-variant-numeric: tabular-nums; }
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
textarea { min-height: 70px; resize: vertical; }
input:is([type="checkbox"], [type="radio"], [type="range"]) { accent-color: var(--accent-ink); }
input:is([type="checkbox"], [type="radio"]) { width: 15px; height: 15px; margin: 0; }
input[type="file"] { padding: 5px; }
input::file-selector-button { margin-inline-end: 8px; padding: 5px 8px; border: 0; border-radius: 4px; background: var(--accent-soft); color: var(--accent-ink); font: inherit; cursor: pointer; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.checks label, label.check { display: inline-flex; min-height: 32px; align-items: center; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 550; }
.creative-list { display: grid; gap: 6px; }
.area-countdown-editor { margin-top: 18px; }
.area-timer-fields { display: grid; gap: 12px; }
.modal.area-schedule-modal { width: min(1100px, calc(100% - 28px)); }
.area-schedule-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.area-schedule-scroll { overflow: auto; max-height: 42vh; border: 1px solid var(--line-soft); border-radius: 7px; margin-block: 12px 16px; }
.area-schedule { width: 100%; min-width: 890px; table-layout: fixed; border-collapse: separate; border-spacing: 0; user-select: none; }
.area-schedule :is(th, td) { height: 38px; border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); text-align: center; }
.area-schedule th:first-child { position: sticky; left: 0; width: 155px; background: var(--surface, white); z-index: 1; }
.area-schedule thead th { position: sticky; top: 0; background: var(--surface, white); z-index: 2; }
.area-schedule thead th:first-child { z-index: 3; }
.area-schedule tbody th button { width: 100%; border: 0; background: transparent; cursor: pointer; color: inherit; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.area-schedule tbody th button span { font-variant-numeric: tabular-nums; color: #626563; margin-right: 4px; }
.area-schedule tbody tr[data-selected] th { background: #eff0e9; }
.area-schedule td[data-area-date] { background: white; cursor: cell; }
.area-schedule td[data-area-date]:hover { background: var(--brand-lemon-soft); }
.area-schedule td[data-reserved] { background: var(--brand-lemon-muted); }
.area-schedule-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.area-schedule-form > strong { flex-basis: 100%; }
.creative-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--surface);
  text-align: start;
  overflow-wrap: anywhere;
}
.creative-item:hover { background: var(--subtle); }
.creative-item:is([data-active="true"], [aria-selected="true"], .active) { border-color: var(--accent-line); background: var(--accent-soft); color: var(--ink); }
.creative-item small { margin-inline-start: auto; color: var(--muted); font-size: 10px; }
.creative-item .row-actions { margin-inline-start: auto; }
.creative-order { display: inline-grid; place-items: center; flex: 0 0 23px; width: 23px; height: 23px; border-radius: 5px; background: #ededeb; color: var(--muted); font-size: 11px; font-weight: 720; font-variant-numeric: tabular-nums; }
.creative-item[data-active="true"] .creative-order { background: var(--brand-lemon-muted); color: var(--accent-ink); }
.creative-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.creative-actions .icon-btn { width: 31px; min-height: 31px; }
.creative-rules { border: 1px solid var(--line-soft); border-radius: var(--control-radius); }
.creative-rules summary { padding: 9px 10px; color: var(--ink); font-size: 12px; font-weight: 680; cursor: pointer; }
.creative-rules > .card-form { padding: 12px 10px; border-top: 1px solid var(--line-soft); }
.upload-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.upload-row small { color: var(--muted); font-size: 11px; }
.upload-control { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 35px; padding: 5px 9px; border: 1px solid var(--line); border-radius: var(--control-radius); color: var(--ink); background: var(--surface); font-size: 12px; font-weight: 680; cursor: pointer; }
.upload-control svg { width: 15px; height: 15px; }
.upload-control input[type="file"] { position: absolute; width: 1px; height: 1px; min-height: 0; overflow: hidden; clip-path: inset(50%); padding: 0; border: 0; }
.upload-control:hover { border-color: #c7c7c4; background: var(--subtle); }
.upload-control:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }

.test-control { padding: 17px; }
.test-control h2 { font-size: 15px; font-weight: 750; line-height: 1.3; }
.test-control form { display: grid; justify-items: start; gap: 12px; margin-top: 14px; }
.test-control form > .field { width: 100%; }
.test-result { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; }
.test-result strong { color: var(--ink); font-size: 13px; }
.test-result p { margin-top: 4px; }
.test-result ul { margin: 6px 0 0; padding-inline-start: 18px; overflow-wrap: anywhere; }

.preview-panel { position: sticky; top: 16px; }
.preview-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 9px; min-height: 47px; padding: 7px 13px; border-bottom: 1px solid var(--line); }
.preview-toolbar h2 { color: #000; font-size: 16px; font-weight: 600; }
.preview-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.zoom-control { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--control-radius); background: var(--surface); }
.zoom-control .icon-btn { width: 28px; min-height: 29px; border: 0; border-radius: 2px; }
.zoom-control .icon-btn svg { width: 13px; height: 13px; }
.zoom-control #preview-zoom {
  width: 48px;
  min-width: 45px;
  min-height: 29px;
  padding: 2px 0;
  border: 0;
  border-radius: 2px;
  background: var(--surface);
  color: #000;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
  font-variant-numeric: tabular-nums;
}
.zoom-control .zoom-value:focus-visible { outline-offset: -2px; }
.segmented { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 3px; border-radius: var(--control-radius); background: #ededeb; }
.segmented > button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 28px; padding: 4px 8px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 400; line-height: 18px; white-space: nowrap; }
.segmented > button:hover { color: var(--ink); }
.segmented > button:is([data-active="true"], [aria-pressed="true"], [aria-selected="true"], .active):is(:enabled, :hover) { color: var(--ink); background: var(--surface); box-shadow: 0 1px 3px rgb(24 24 24 / 13%); }
.metric-switch > button { font-size: 13px; }
.metric-switch > button[aria-pressed="true"] { font-weight: 600; }
.segmented svg { width: 14px; height: 14px; }
.preview-wrap { display: grid; justify-items: center; align-items: start; min-height: 450px; min-width: 0; padding: 21px; background: #f1f2f1; }
.editor-preview { display: flex; flex-direction: column; border: 0; border-radius: 0; background: #f2f3f2; }
.editor-preview .preview-toolbar { flex: none; padding-inline: 24px; border-bottom-color: transparent; background: #f2f3f2; }
.editor-preview .preview-wrap { flex: 1 0 auto; align-items: center; min-height: 370px; padding: 18px 20px; background: #f2f3f2; }
.editor-stage {
  --preview-width: 720px;
  --preview-height: 550px;
  display: flex;
  width: 100%;
  min-width: 0;
  max-width: min(100%, calc(var(--preview-width) * var(--preview-zoom, .7)));
  min-height: calc(var(--preview-height) * var(--preview-zoom, .7));
  border: 1px solid #e1e2df;
  border-radius: 3px;
  overflow: hidden;
  background: var(--surface);
}
.editor-stage[data-device="mobile"] {
  --preview-width: 360px;
  --preview-height: 796px;
  border-block-width: calc(34px * var(--preview-zoom, .7));
  border-block-color: #dedfdd;
  border-radius: 21px;
}
.editor-grid[data-campaign-type="popup"] .editor-stage[data-device="desktop"] {
  --preview-width: 1984px;
  --preview-height: 1280px;
}
.editor-preview-surface { position: relative; display: flex; flex: 1; flex-direction: column; min-width: 0; zoom: var(--preview-zoom, .7); }
.editor-preview-surface .banner-slot:not(.strip-slot) { margin-block: auto; }
.editor-grid[data-campaign-type="banner"] .editor-preview-surface .strip-slot { margin-block-start: 80px; }
.editor-preview .preview-footer { background: #f2f3f2; }
.device-frame { position: relative; display: flex; flex-direction: column; overflow: hidden; width: 100%; min-width: 0; max-width: 900px; min-height: 405px; border: 1px solid #d0d0ce; border-radius: 7px; background: white; }
.device-frame:is([data-device="mobile"], [data-device="Mobile"], [data-device="모바일"]) { max-width: 336px; min-height: 534px; border: 6px solid #343432; border-radius: 21px; }
.browser-frame { display: flex; align-items: center; gap: 11px; min-height: 32px; padding: 4px 12px; border-bottom: 1px solid var(--line); background: #f0f0ef; color: var(--muted); font-size: 10px; }
.browser-dots { display: inline-flex; align-items: center; flex: none; gap: 4px; }
.browser-dots i { width: 5px; height: 5px; border-radius: 50%; background: #a5a5a1; }
.browser-address { display: block; min-width: 0; width: min(74%, 260px); overflow: hidden; border: 1px solid var(--line); border-radius: 4px; padding: 1px 7px; background: var(--surface); text-overflow: ellipsis; white-space: nowrap; }
.mock-page { position: relative; display: flex; flex: 1; flex-direction: column; width: 100%; background: var(--surface); color: var(--ink); }
.mock-scroll { flex: 1; min-width: 0; }
.mock-scroll.is-scrollable { max-height: min(440px, 65dvh); overflow: auto; overscroll-behavior: contain; }
.mock-scroll.is-scrollable .mock-content { min-height: var(--test-content-height, 1800px); }
#test-address-background iframe { display: block; width: 100%; min-height: 340px; border: 0; background: var(--surface); }
#test-address-background .hint { margin: 0; padding: 8px 16px; border-top: 1px solid var(--line); }
:is(.test-context, .test-audience) { padding: 8px 0; }
:is(.test-context, .test-audience) > summary { cursor: pointer; }
:is(.test-context, .test-audience) > :is(.field, .hint) { margin-top: 8px; }
#test-scroll-field { margin-block-start: 12px; }
.mock-nav { display: flex; gap: 10px; align-items: center; justify-content: space-between; min-height: 44px; padding: 8px 17px; border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: 11px; }
.mock-nav strong { color: var(--ink); font-size: 13px; font-weight: 780; }
.mock-hero { position: relative; display: grid; align-content: center; gap: 7px; min-height: 152px; overflow: hidden; padding: 24px; background: #ededeb; }
.mock-hero > :not(.mock-decoration) { position: relative; z-index: 1; }
.mock-hero > span { color: var(--muted); font-size: 10px; font-weight: 680; }
.mock-hero :is(h1, h2, strong) { max-width: 24ch; color: var(--ink); font-size: 24px; font-weight: 750; line-height: 1.25; letter-spacing: -.026em; }
.mock-hero p { max-width: 53ch; color: var(--muted); font-size: 12px; }
.mock-decoration { position: absolute; inset: 0 4% 0 auto; display: grid; align-content: center; justify-items: end; gap: 6px; width: min(37%, 182px); pointer-events: none; }
.mock-decoration i { display: block; width: 85%; height: 24px; border: 1px solid #d0d0ce; border-radius: 5px; background: #f7f7f6; }
.mock-decoration i:nth-child(2) { width: 71%; margin-inline-end: 13%; background: #deded9; }
.mock-decoration i:nth-child(3) { width: 58%; margin-inline-end: 26%; }
.mock-content { display: grid; align-content: start; gap: 8px; min-height: 150px; padding: 17px; color: var(--muted); font-size: 12px; }
.mock-content :is(h2, h3, strong) { color: var(--ink); font-size: 15px; }
.mock-lines { display: grid; gap: 8px; width: min(70%, 310px); margin-top: 6px; }
.mock-lines i { display: block; height: 7px; border-radius: 2px; background: #ebebea; }
.mock-lines i:nth-child(2) { width: 84%; }
.mock-lines i:nth-child(3) { width: 61%; }
.banner-slot { position: relative; min-width: 0; }
.banner-slot:empty { min-height: 0; }
.widget-host { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.preview-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; min-height: 38px; padding: 6px 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.preview-footer .btn { min-height: 30px; font-size: 11px; }

.modal {
  --modal-inset: clamp(16px, 4vw, 32px);
  width: min(416px, calc(100% - 32px));
  max-height: calc(100dvh - 30px);
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.modal::backdrop { background: rgb(0 0 0 / 45%); }
.modal-head, .modal-actions { display: flex; align-items: center; gap: 8px; }
.modal-head { justify-content: space-between; padding: 24px var(--modal-inset) 0; }
.modal-head h2 { font-size: 16px; font-weight: 600; }
.modal-head .icon-btn { width: 36px; min-height: 36px; margin: -8px -8px -8px 0; border-color: transparent; }
.modal-body { display: grid; gap: 14px; padding: 24px var(--modal-inset); }
.modal-actions { justify-content: flex-end; flex-wrap: wrap; padding: 0 var(--modal-inset) 24px; }
.modal-actions .btn { min-height: 36px; padding-inline: 16px; border-radius: 4px; }
.modal .btn-primary { color: #fff; border-color: var(--ink); background: var(--ink); }
.modal .btn-primary:hover:enabled { border-color: #393b38; background: #393b38; }
.modal.open-layer-modal {
  --modal-inset: 32px;
  max-width: none;
  box-shadow: 0 1px 3px rgb(0 0 0 / 10%), 0 1px 2px -1px rgb(0 0 0 / 10%);
}
.open-layer-modal::backdrop { background: rgb(27 28 27 / 50%); }
.open-layer-modal .modal-head { min-height: 52px; padding-block: 32px 0; }
.open-layer-modal .modal-head h2 { line-height: 16px; }
.open-layer-modal .modal-head .icon-btn { padding: 8px; border: 0; }
.open-layer-modal .modal-head .icon-btn svg { width: 20px; height: 20px; }
.open-layer-modal .modal-body { padding-block: 32px; }
.open-layer-modal .modal-actions { padding-block-end: 32px; }
.open-layer-modal .modal-actions .btn { min-height: 36px; padding-block: 0; }
.open-layer-modal .modal-actions [data-action="close-modal"] {
  min-width: 96px;
  border-color: var(--muted);
  color: var(--secondary-ink);
}
.open-layer-modal .modal-actions .btn-primary { border: 0; }
@media (max-width: 447px) {
  .modal.open-layer-modal { --modal-inset: 16px; }
}
.modal.create-modal { width: min(620px, calc(100% - 32px)); }
.modal.schedule-modal {
  --calendar-inset: clamp(16px, 3vw, 32px);
  width: min(904px, calc(100% - 2 * var(--calendar-inset)));
  height: min(904px, calc(100dvh - 2 * var(--calendar-inset)));
  border-radius: var(--control-radius);
}
.modal.schedule-modal[open] { display: flex; flex-direction: column; }
.schedule-modal .modal-head {
  position: absolute;
  inset: var(--calendar-inset) var(--calendar-inset) auto auto;
  z-index: 2;
  padding: 0;
  border: 0;
}
.schedule-modal .modal-head .btn { width: 24px; min-height: 24px; padding: 0; border-color: transparent; }
.schedule-modal .modal-body { flex: 1 1 auto; min-width: 0; min-height: 0; padding: var(--calendar-inset) var(--calendar-inset) 0; overflow: auto; }
.schedule-modal .modal-actions { flex: none; padding: 24px var(--calendar-inset) var(--calendar-inset); border: 0; }
.schedule-modal .schedule-close { width: 96px; min-height: 36px; padding: 0 16px; }
.schedule-calendar { min-width: 0; }
.schedule-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-inline-end: 32px; }
.schedule-month { font-size: 16px; font-weight: 600; line-height: 16px; font-variant-numeric: tabular-nums; }
.schedule-controls { display: flex; align-items: center; gap: 4px; }
.schedule-controls .btn { min-height: 24px; padding: 0 8px; }
.schedule-controls button:is([data-action="calendar-prev"], [data-action="calendar-next"]) { width: 24px; padding: 0; border-color: transparent; font-size: 0; }
.schedule-controls button:is([data-action="calendar-prev"], [data-action="calendar-next"])::before {
  content: "";
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 1px 1px 0 0;
  transform: rotate(45deg);
}
.schedule-controls button[data-action="calendar-prev"]::before { transform: rotate(-135deg); }
.schedule-legend { display: flex; flex-wrap: wrap; gap: 4px; margin: 32px 0 24px; }
.schedule-key { display: inline-flex; align-items: center; min-height: 24px; padding: 0 6px; border-radius: 4px; font-size: 13px; font-weight: 500; }
.schedule-occasion { display: block; overflow: hidden; margin-top: 3px; padding: 2px 5px; border-radius: 3px; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.schedule-calendar [data-occasion="holiday"] { background: #ffe8e7; color: #922a2a; }
.schedule-calendar [data-occasion="anniversary"] { background: #fff1ce; color: #735514; }
.schedule-calendar [data-occasion="marketing"] { background: var(--brand-sky-soft); color: var(--brand-sky-ink); }
.schedule-calendar [data-occasion="solar"] { background: var(--brand-sky-soft); color: var(--brand-sky-ink); }
.schedule-calendar [data-occasion="other"] { background: #eef0f3; color: #444b59; }
.schedule-grid-wrap {
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #d9dae4;
}
.schedule-grid { min-width: 590px; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.schedule-grid tbody tr:hover { background: var(--surface); }
.schedule-grid :is(th, td) { padding: 3px 6px; border: 0; }
.schedule-grid :is(th, td):not(:last-child) { border-inline-end: 1px solid #d9dae4; }
.schedule-grid th {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
  height: 24px;
  border-block-end: 1px solid #d9dae4;
  background: var(--surface);
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
}
.schedule-grid th:first-child, .schedule-cell:first-child .schedule-day { color: #ff4a60; }
.schedule-grid td { height: 127px; vertical-align: top; }
.schedule-grid tr:not(:last-child) td { border-block-end: 1px solid #d9dae4; }
.schedule-cell.is-other-month { background: var(--subtle); }
.schedule-cell.is-today { background: var(--brand-lemon-soft); }
.schedule-day {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  padding-inline: 3px;
  place-items: center;
  color: var(--axis-ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  font-variant-numeric: tabular-nums;
}
.schedule-cell.is-today .schedule-day { border-radius: 4px; background: var(--accent); color: var(--ink); }
.schedule-events { display: grid; gap: 4px; padding: 0; margin: 3px 0 0; list-style: none; }
.schedule-event {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 3px 5px;
  border: 1px solid var(--brand-lemon-line);
  border-radius: 3px;
  background: var(--brand-lemon-soft);
  color: var(--brand-lemon-ink);
  text-align: start;
}
.schedule-key[data-type="popup"] { background: var(--brand-lemon-soft); color: var(--brand-lemon-ink); }
:is(.schedule-event, .schedule-key)[data-type="banner"] { border-color: var(--brand-sky-line); background: var(--brand-sky-soft); color: var(--brand-sky-ink); }
:is(.schedule-event, .schedule-key)[data-type="group"] { border-color: var(--brand-sky-line); background: var(--brand-sky-soft); color: var(--brand-sky-ink); }
.schedule-event:hover { border-color: currentColor; }
.schedule-event:focus-visible { outline-offset: 1px; }
.schedule-event-title, .schedule-event-detail {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.schedule-event-title { font-size: 13px; font-weight: 500; line-height: 18px; }
.schedule-event-detail { font-size: 10px; }
.schedule-more { color: var(--muted); font-size: 11px; }
.schedule-more > summary { min-height: 22px; padding: 2px 3px; cursor: pointer; }
.schedule-more > summary:hover { color: var(--ink); }
.schedule-empty { margin-top: 11px; color: var(--muted); font-size: 12px; }
.type-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.type-option { display: grid; min-width: 0; justify-items: start; gap: 6px; min-height: 102px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--control-radius); background: var(--surface); text-align: start; }
.type-option:hover, .type-option:is([data-active="true"], [aria-pressed="true"], :has(input:checked)) { border-color: var(--accent-line); background: var(--accent-soft); }
.type-option strong { display: block; }
.type-option :is(small, p) { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.help-list { display: grid; gap: 7px; margin: 0; padding-inline-start: 19px; }
.toast {
  position: fixed;
  inset: 12px auto auto 50%;
  z-index: 1000;
  width: max-content;
  max-width: min(500px, calc(100% - 32px));
  margin: 0;
  padding: 10px 17px;
  transform: translateX(-50%);
  border: 0;
  border-radius: 9999px;
  background: #1b1c1a;
  color: #f2f3f2;
  box-shadow: 0 3px 10px rgb(0 0 0 / 14%);
  font-size: 14px;
  line-height: 21px;
  pointer-events: none;
}
.toast[hidden], .toast:empty { display: none; }
.action-popover {
  position: fixed;
  inset: auto;
  z-index: 50;
  min-width: 96px;
  max-width: calc(100vw - 16px);
  max-height: min(360px, var(--menu-space, calc(100dvh - 24px)));
  overflow: auto;
  margin: 0;
  padding: 4px 0;
  border: 0;
  border-radius: 5px;
  background: var(--surface);
  color: #1b1c1a;
  box-shadow: 0 3px 6px -4px rgb(0 0 0 / 12%), 0 6px 16px rgb(0 0 0 / 8%), 0 9px 28px 8px rgb(0 0 0 / 5%);
}
.action-popover[hidden] { display: none; }
.action-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 32px;
  padding: 5px 12px;
  border: 0;
  background: transparent;
  font-size: 14px;
  line-height: 22px;
  text-align: start;
  white-space: normal;
  overflow-wrap: anywhere;
}
.action-menu-item:is(:hover, :focus-visible) { background: #f2f3f2; }
.action-menu-item:focus-visible { outline-offset: -2px; }
.action-popover:is(.site-menu, .profile-menu) { min-width: 224px; }
.action-popover hr { margin: 4px 0; border: 0; border-top: 1px solid var(--line-soft); }
.profile-menu-label { padding: 7px 12px; color: var(--muted); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.site-trigger-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-wordmark { display: flex; align-items: center; width: min(100%, 98px); height: 24px; }
.site-wordmark .brand-logo { width: min(100%, 84px); }
.site-trigger > svg:last-child { width: 14px; height: 14px; flex: none; }
.profile-trigger { display: flex; align-items: center; gap: 10px; padding: 0 2px 0 7px; border: 0; background: transparent; text-align: end; font-size: 13px; line-height: 18px; }
.profile-trigger small { display: block; color: var(--muted); font-size: 11px; line-height: 14px; }
.profile-trigger i { display: grid; width: 32px; height: 32px; flex: none; place-items: center; border-radius: 50%; background: #e9ebe9; color: #393b38; }
.profile-trigger i svg { width: 16px; height: 16px; }
.dashboard-title-date { color: var(--muted); font-size: 14px; font-weight: 400; }
.campaign-list-head > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.campaign-list-head > div .subtitle { margin: 0; }
.campaign-list-toolbar { padding: 0 0 14px; gap: 10px; }
.campaign-list-toolbar :is(select, input[type=search], .btn) { min-height: 36px; border-radius: 4px; }
.campaign-list-toolbar .btn { padding-inline: 16px; }
.list-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.list-filters :is(select, input[type=search]) { width: auto; }
.list-primary-actions { flex: 1; justify-content: flex-end; }
.list-policy { display: inline-flex; align-items: center; gap: 6px; margin-inline-end: 4px; white-space: nowrap; font-size: 13px; }
.list-policy-info { display: inline-flex; color: var(--muted); }
.list-policy-info svg { width: 14px; height: 14px; }
.list-policy input, .list-switch { position: relative; display: block; width: 32px; min-height: 18px; height: 18px; flex: none; padding: 0; margin: 0; border: 0; border-radius: 20px; appearance: none; background: #c8cac7; cursor: pointer; }
.list-policy input::after, .list-switch::after { position: absolute; inset: 2px auto auto 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; content: ''; }
.list-policy input:checked, .list-switch[aria-checked="true"] { background: #262725; }
.list-policy input:checked::after, .list-switch[aria-checked="true"]::after { inset-inline-start: 16px; }
.observed-list { min-width: 775px; }
.observed-list thead { background: #f8f8f8; }
.observed-list :is(th, td) { padding-inline: 12px; }
.observed-list .icon-btn { width: 36px; min-height: 36px; padding: 0; border-color: transparent; }
.observed-list .icon-btn svg { width: 16px; height: 16px; }
.observed-list .entry-name { font-weight: 500; }
.observed-list .list-dates { color: var(--muted); font-size: 12px; white-space: nowrap; }
.observed-list .list-dates span { color: var(--ink); }
.list-thumbnail { display: block; width: 56px; height: 38px; object-fit: contain; border-radius: 4px; background: #f2f3f2; }
.list-thumbnail-fallback { display: grid; place-items: center; color: #575c54; }
.list-menu-cell { text-align: end; }
.site-settings-panel { max-width: 660px; padding: 24px; }
.site-settings-panel form, .dialog-fields { display: grid; gap: 16px; }
.site-settings-panel .actions { justify-content: flex-end; }
.test-popup-layer { position: absolute; inset: 0; pointer-events: none; }
.ranking-controls, .stats-session { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.ranking-controls .check, .stats-session .check { font-size: 13px; }
.ranking-controls { justify-content: space-between; }
.stats-filter-rail { margin-block-end: 9px; }
.stats-filter-rail .btn { min-height: 36px; border-radius: 4px; }
.stats-session { justify-content: flex-end; margin-block-end: 12px; }
.modal.stats-period-modal {
  --stats-period-sidebar: 220px;
  width: min(860px, calc(100% - 32px));
  height: min(550px, calc(100dvh - 32px));
  overflow: hidden;
  background: linear-gradient(to right, #fafafa var(--stats-period-sidebar), var(--surface) var(--stats-period-sidebar));
}
.stats-period-modal[open] { display: flex; flex-direction: column; }
.stats-period-modal .modal-head { min-height: 68px; padding: 20px 32px; border-bottom: 1px solid var(--line-soft); background: var(--surface); }
.stats-period-modal .modal-body { display: block; flex: 1 1 auto; min-height: 0; padding: 0; overflow: auto; }
.stats-period-modal .modal-actions { flex: 0 0 auto; justify-content: space-between; margin-inline-start: var(--stats-period-sidebar); padding: 16px 32px; border-top: 1px solid var(--line-soft); }
.stats-period-modal .modal-actions .btn-primary { min-width: 96px; }
.stats-period-form { display: grid; grid-template-columns: var(--stats-period-sidebar) minmax(0, 1fr); min-height: 100%; }
.stats-period-options { display: grid; align-content: start; padding: 32px 24px; background: #fafafa; }
.stats-period-presets { display: grid; gap: 4px; padding-block-end: 16px; border-bottom: 1px solid var(--line); }
.stats-period-presets .btn { justify-content: flex-start; min-height: 36px; padding-inline: 12px; border-color: transparent; background: transparent; }
.stats-period-presets .btn:is(:hover, [aria-pressed="true"]) { background: #eee; }
.stats-period-presets .btn[aria-pressed="true"] { font-weight: 600; }
.stats-compare-switch { display: flex; align-items: center; justify-content: space-between; min-height: 36px; margin-block: 12px 4px; font-weight: 600; }
.stats-compare-switch input { appearance: none; display: flex; align-items: center; width: 30px; height: 17px; margin: 0; padding: 2px; border: 0; border-radius: 20px; background: #a3a4a0; }
.stats-compare-switch input:checked { background: var(--ink); }
.stats-compare-switch input::before { width: 13px; height: 13px; border-radius: 50%; background: #fff; content: ''; }
.stats-compare-switch input:checked::before { transform: translateX(13px); }
.stats-compare-choices { display: grid; min-width: 0; margin: 0; padding: 0; border: 0; }
.stats-compare-choices label { display: flex; align-items: center; gap: 7px; min-height: 36px; padding-inline: 3px; font-size: 13px; cursor: pointer; }
.stats-compare-choices:disabled { color: var(--muted); }
.stats-compare-choices input { width: 14px; height: 14px; margin: 0; accent-color: var(--ink); }
.stats-period-content { min-width: 0; padding: 32px; background: var(--surface); }
.stats-period-ranges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.stats-date-pair, .stats-period-compare-summary { display: flex; align-items: center; gap: 4px; min-height: 36px; max-width: 100%; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; font-size: 13px; }
.stats-date-pair input { width: 120px; min-width: 0; min-height: 30px; padding: 0 4px; border-color: transparent; background: transparent; border-radius: 4px; }
.stats-period-compare-summary { color: var(--muted); }
.stats-calendar-scope { display: flex; flex-wrap: wrap; gap: 6px; margin: -8px 0 8px; }
.stats-calendar-scope .btn { min-height: 25px; padding: 0 8px; font-size: 12px; }
.stats-calendar-scope .btn[aria-pressed="true"] { border-color: var(--ink); background: var(--subtle); }
.stats-calendar-months { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.stats-calendar-month { min-width: 0; border: 1px solid var(--line); border-radius: 4px; }
.stats-calendar-month-head { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: center; min-height: 44px; border-bottom: 1px solid var(--line-soft); }
.stats-calendar-month h3 { grid-area: 1 / 2; margin: 0; text-align: center; font-size: 14px; font-weight: 600; }
.stats-calendar-month-head .icon-btn { grid-area: 1 / 3; width: 28px; height: 28px; border: 0; }
.stats-calendar-month-head [data-target="-1"] { grid-column: 1; justify-self: end; }
.stats-calendar-month-head [data-target="-1"] svg { transform: rotate(180deg); }
.stats-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding: 0 6px 8px; }
.stats-calendar-weekday { display: grid; place-items: center; min-height: 27px; color: var(--muted); font-size: 12px; }
.stats-calendar-day { min-width: 0; min-height: 36px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--ink); font-size: 13px; cursor: pointer; }
.stats-calendar-day:hover { background: #f3f4f1; }
.stats-calendar-day[aria-current="date"] { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.stats-calendar-day[data-range="within"] { border-radius: 0; background: var(--brand-lemon-soft); }
.stats-calendar-day:is([data-range="start"],[data-range="end"],[data-range="single"]) { background: var(--ink); color: #fff; }
.stats-calendar-day[data-range="start"] { border-radius: 4px 0 0 4px; }
.stats-calendar-day[data-range="end"] { border-radius: 0 4px 4px 0; }
.stats-calendar-day:focus-visible { position: relative; outline: 2px solid var(--brand-lemon-focus); outline-offset: -2px; }

@media (max-width: 760px) {
  .modal.stats-period-modal { --stats-period-sidebar: 170px; }
  .stats-period-content, .stats-period-options { padding-inline: 16px; }
  .stats-calendar-months { gap: 10px; }
  .stats-period-modal .modal-head, .stats-period-modal .modal-actions { padding-inline: 16px; }
}
@media (max-width: 550px) {
  .modal.stats-period-modal { --stats-period-sidebar: 0px; height: min(720px, calc(100dvh - 32px)); }
  .stats-period-form, .stats-calendar-months { grid-template-columns: minmax(0, 1fr); }
  .stats-period-modal .modal-head { min-height: 54px; padding-block: 12px; }
  .stats-period-modal .modal-actions, .stats-period-options, .stats-period-content { padding-block: 12px; }
  .stats-period-presets { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-block-end: 6px; }
  .stats-period-presets .btn { justify-content: center; padding-inline: 2px; font-size: 13px; }
  .stats-compare-switch { margin-block: 3px 0; }
  .stats-compare-choices { grid-template-columns: max-content minmax(0, 1fr) max-content; gap: 5px; }
  .stats-compare-choices label { gap: 4px; padding-inline: 0; font-size: 12px; }
  .stats-period-ranges { margin-bottom: 9px; }
  .stats-calendar-day { min-height: 33px; }
}
@media (max-width: 680px) {
  .profile-trigger > span { display: none; }
  .campaign-list-toolbar { padding: 0 0 12px; }
  .list-filters { flex: 1 0 100%; }
  .list-filters input[type=search] { width: auto; min-width: 120px; flex: 1; }
  .list-primary-actions { justify-content: flex-start; }
  .table-scroll .campaign-table.observed-list { min-width: 775px; }
  .campaign-table.observed-list :is(th, td):is(:nth-child(3), :nth-child(4)) { display: table-cell; }
  .stats-session { justify-content: flex-start; }
}
.empty + .list-footer { border-top: 1px solid var(--line-soft); }
.metric, .metric-value, td[data-numeric] { font-variant-numeric: tabular-nums; }
.demo-page { min-height: 100dvh; background: var(--surface); }

@media (min-width: 921px) {
  .shell[data-page="editor"] { height: 100dvh; }
  .shell[data-page="editor"] .workspace { display: flex; min-height: 0; flex-direction: column; }
  .shell[data-page="editor"] .topbar, .editor-head { flex: none; }
  .main[data-view="editor"] { display: flex; min-height: 0; flex: 1; flex-direction: column; }
  .editor-grid { min-height: 0; flex: 1; }
  .editor-grid > :is(.editor-settings, .editor-panel, .editor-preview) {
    min-height: 0;
    overflow: hidden auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #babdb7 transparent;
  }
  .detail-toolbar, .editor-preview .preview-toolbar { position: sticky; inset-block-start: 0; z-index: 5; }
  .editor-panel { scroll-padding-block-start: 68px; }
}

@media (max-width: 1120px) {
  :root { --sidebar-width: 186px; }
  .sidebar { padding-inline: 10px; }
  .test-layout { grid-template-columns: minmax(225px, 265px) minmax(0, 1fr); gap: 13px; }
  .preview-wrap { padding: 15px; }
}
@media (max-width: 950px) {
  :root { --sidebar-width: 167px; }
  .brand { padding-inline: 4px; font-size: 14px; }
}
@media (max-width: 920px) {
  .editor-grid { grid-template-columns: minmax(212px, 35%) minmax(0, 1fr); }
  .editor-panel { border-inline-end: 0; }
  .editor-preview { position: static; grid-column: 1 / -1; border-block-start: 1px solid var(--line); }
  .dashboard-grid, .dashboard-grid:has(.dashboard-trend) { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .dashboard-trend { min-height: 395px; }
  .dashboard-insights { gap: 15px; }
  .dashboard-insights > .dashboard-panel:first-child { min-height: 240px; }
}
@media (max-width: 830px) {
  .test-layout { grid-template-columns: minmax(0, 1fr); }
  .test-layout .preview-panel { position: static; }
  .preview-wrap { min-height: 340px; }
  .editor-head > .actions { flex-wrap: wrap; }
}
@media (max-width: 740px) {
  .shell { display: block; }
  .sidebar { position: relative; z-index: 2; display: block; height: auto; padding: 6px 14px; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  #sidebar { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
  #sidebar > .brand { min-height: 44px; margin: 0; padding: 0; }
  .sidebar .mobile-menu-toggle { display: inline-flex; min-height: 44px; }
  .sidebar nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; gap: 5px; padding: 2px; }
  #sidebar > .category-nav {
    position: absolute;
    inset: 100% 0 auto;
    display: none;
    max-height: calc(100dvh - 57px);
    overflow: auto;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    padding: 8px 14px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--nav);
    box-shadow: 0 6px 12px rgb(27 28 27 / 8%);
  }
  #sidebar > .mobile-menu-toggle[aria-expanded="true"] + .category-nav { display: grid; }
  .category-nav > .nav-item, .nav-group-toggle { min-height: 44px; padding: 5px 7px; }
  .nav-group-items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; padding-inline-start: 10px; }
  .nav-group-items .nav-item { padding-inline-start: 6px; }
  .nav-label, .sidebar-footer { display: none; }
  .nav-item { width: auto; min-height: 44px; gap: 6px; margin: 0; padding: 6px; }
  .nav-icon { width: 15px; height: 15px; flex-basis: 15px; }
  .nav-count { display: none; }
  .topbar { min-height: 48px; padding: 8px 14px; }
  .main { padding: 22px 14px 30px; }
  .page-head { align-items: flex-start; flex-direction: column; margin-bottom: 17px; }
  .page-head > div:first-child { display: block; }
  .page-head .subtitle { margin-top: 5px; }
  .page-head .subtitle::before { display: none; }
  .dashboard-head .subtitle { margin-inline-start: 6px; }
  .dashboard-head { align-items: stretch; }
  .dashboard-head .actions { justify-content: flex-start; }
  .dashboard-campaign { min-height: 71px; padding: 10px; }
  .dashboard-campaign > span { gap: 4px; }
  .summary-card { padding: 12px; }
  .summary-icon { display: none; }
  .list-toolbar { align-items: stretch; padding: 11px; }
  .search { width: 100%; }
  .table-scroll .campaign-table { min-width: 0; }
  .table-scroll .campaign-table.observed-list { min-width: 775px; }
  .campaign-table .name-cell { min-width: 0; }
  .campaign-table .row-actions > .btn { display: none; }
  .editor-head { padding-inline: 14px; }
  .btn { min-height: 42px; }
  .preview-wrap { padding: 11px; }
  .editor-body { padding-inline: 13px; }
  .analytics-panel { padding: 12px; }
  .dashboard-trend, .dashboard-insights > .dashboard-panel:first-child { padding: 16px; }
  .modal .type-options { grid-template-columns: 1fr; }
  .modal .type-option { min-height: 60px; }
  .schedule-legend { margin-block: 20px 16px; }
  .schedule-grid-wrap { max-height: 55dvh; }
}
@media (max-width: 720px) {
  .editor-grid { grid-template-columns: minmax(0, 1fr); }
  .editor-settings { padding: 13px 14px 16px; border-inline-end: 0; border-block-end: 1px solid var(--line); }
  .settings-section { grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr)); margin-top: 12px; }
  .settings-section h3, .settings-device, .settings-mode { grid-column: 1 / -1; }
  .setting-card { min-height: 52px; padding: 8px; }
  .setting-card .setting-value { display: none; }
  .setting-layout-card {
    grid-column: 1 / -1;
    grid-template-columns: 82px minmax(0, 1fr) auto;
    grid-template-areas: "diagram copy arrow";
  }
  .setting-layout-card .placement-shape { width: 80px; height: 58px; }
  .editor-preview .preview-toolbar { padding-inline: 12px; }
  .editor-stage { --preview-height: 500px; }
  .editor-stage[data-device="mobile"] { --preview-height: 650px; }
  .editor-head > .actions { margin-inline-start: 0; }
  .shell[data-page="editor"] .topbar { flex-wrap: wrap; row-gap: 5px; padding-inline: 14px; }
  .shell[data-page="editor"] .top-actions { margin-inline-start: auto; }
  .editor-title { flex: 1 1 240px; }
}
@media (max-width: 440px) {
  .overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary-card { padding-inline: 9px; }
  .field-row:has(input[type="datetime-local"]) { flex-direction: column; }
  .field-row:has(input[type="datetime-local"]) > * { width: 100%; }
  .placement-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-panel .overview { gap: 5px; }
  .analytics-panel .summary-card { min-height: 76px; }
  .dashboard-trend { min-height: 325px; }
  .dashboard-chart { min-height: 200px; }
  .dashboard-top { grid-template-columns: minmax(0, 1fr); }
  .dashboard-top .dashboard-section-head { padding-block-end: 4px; }
  .dashboard-top .category-filter { margin: 0 11px 9px; }
  .device-frame:is([data-device="mobile"], [data-device="Mobile"], [data-device="모바일"]) { min-height: 490px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .icon-btn, .back-button, .nav-item, .nav-group-toggle > svg:last-child { transition: none; }
}

/* Dashboard spacing follows the desktop Code&Butter reference. */
.shell[data-page="dashboard"] .topbar { min-height: 68px; }
.shell[data-page="dashboard"] .top-actions > :is(.btn, .icon-btn) { min-height: 36px; }
.shell[data-page="dashboard"] .top-actions > .btn { padding-block: 0; }
.shell[data-page="dashboard"] .top-actions > .icon-btn { width: 36px; }
.main[data-view="dashboard"] { --dashboard-line: #d9dae4; padding-block-start: 0; }
.dashboard-head { min-height: 36px; margin-bottom: 12px; }
.dashboard-head .btn { min-height: 36px; padding: 0 16px; }
.dashboard-head [data-action="calendar"] { min-width: 112px; }

.dashboard-section:not(.dashboard-journey, .dashboard-top) { margin-bottom: 32px; }
.dashboard-section-head { margin-bottom: 16px; }
.dashboard-campaigns, .dashboard-panel, .dashboard-top {
  border-color: var(--dashboard-line);
  border-radius: 4px;
}
.dashboard-campaign {
  display: flex;
  min-height: 86px;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px;
}
.dashboard-campaign:first-child { border-radius: 3px 0 0 3px; }
.dashboard-campaign:last-child { border-radius: 0 3px 3px 0; }
.dashboard-campaign + .dashboard-campaign { border-inline-start-color: var(--dashboard-line); }
.dashboard-campaign > span { gap: 8px; }
.dashboard-campaign > span svg { width: 16px; height: 16px; }

.dashboard-pulse { min-height: 36px; margin: 0 0 8px; }
.dashboard-pulse-link {
  min-width: 148px;
  min-height: 36px;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid var(--dashboard-line);
  background: var(--surface);
}
.dashboard-pulse-period { display: flex; align-items: center; gap: 16px; }
.dashboard-pulse-period .icon-btn { width: 36px; min-height: 36px; }
.dashboard-grid:has(.dashboard-trend) {
  grid-template-columns: minmax(0, 1fr) minmax(265px, min(38%, 420px));
  gap: 32px;
  margin-block: 0 32px;
}
.dashboard-trend { min-height: 559px; background: #f2f3f2; }
.dashboard-insights > .dashboard-panel:first-child { min-height: 421px; }
.dashboard-trend .dashboard-panel-head,
.dashboard-insights > .dashboard-panel:first-child .dashboard-panel-head { min-height: 36px; margin-bottom: 0; }
.dashboard-trend .metric-switch { gap: 4px; padding: 4px; }
.dashboard-trend .metric-switch > button { min-height: 28px; padding: 5px 16px; border-radius: 4px; }
.dashboard-period-value { margin-top: 24px; }
.dashboard-breakdown-action { display: flex; justify-content: center; margin-block-start: auto; }
.dashboard-breakdown-action .btn { min-height: 36px; flex-direction: row-reverse; padding-block: 0; }

.dashboard-journey .dashboard-section-head { min-height: 36px; }
.journey-items {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 8px;
}
.journey-followup {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--dashboard-line);
  border-radius: 4px;
  background: var(--surface);
}
.journey-items > .dashboard-metric { border-color: var(--dashboard-line); }
.journey-followup > .dashboard-metric {
  min-height: 91px;
  gap: 7px;
  border-block-end: 0;
  text-align: center;
}

@media (min-width: 921px) {
  .dashboard-insights > .dashboard-panel:last-child { height: 114px; }
  .dashboard-insights > .dashboard-panel:last-child .dashboard-panel-head { flex: none; }
  .dashboard-insights .dashboard-empty { min-height: 0; padding: 8px 15px; }
  .dashboard-recent { flex: 1; min-height: 0; overflow: auto; }
  .journey-items { grid-template-columns: 175px minmax(0, 1fr); min-height: 236px; gap: 16px; }
}

@media (min-width: 741px) {
  :root:has(.shell[data-page="dashboard"]) { scrollbar-gutter: stable; }
  .shell[data-page] .brand { margin-bottom: 7px; }
  .shell[data-page] .sidebar nav { gap: 4px; padding: 0; scrollbar-gutter: auto; scrollbar-width: none; }
  .shell[data-page] .sidebar nav::-webkit-scrollbar { width: 0; }
  .shell[data-page] .nav-group-items { gap: 4px; margin-block-start: 9px; }
  .shell[data-page] .category-nav > .nav-item,
  .shell[data-page] .nav-group-toggle,
  .shell[data-page] .nav-group-items .nav-item {
    min-height: 34px;
    margin-block: 0;
    padding-block: 5px;
  }
}

@media (min-width: 1121px) {
  .shell[data-page] .sidebar { padding-inline-end: 11px; }
}

@media (max-width: 920px) {
  .dashboard-grid:has(.dashboard-trend) { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .dashboard-trend { min-height: 395px; }
  .dashboard-insights > .dashboard-panel:first-child { min-height: 240px; }
  .dashboard-insights .dashboard-breakdown { margin-block-start: 16px; padding: 0; }
  .dashboard-insights .metric-track { height: 20px; }
}

@media (max-width: 740px) {
  .shell[data-page="dashboard"] .topbar { min-height: 48px; }
  .shell[data-page="dashboard"] .top-actions > .btn { min-height: 42px; }
  .main[data-view="dashboard"] { padding-block-start: 16px; }
  .dashboard-head .btn { min-height: 42px; padding-inline: 12px; }
  .dashboard-campaign { min-height: 71px; gap: 4px; padding: 10px; }
  .dashboard-campaign > span { gap: 4px; }
}

@media (max-width: 440px) {
  .dashboard-trend { min-height: 325px; }
  .dashboard-trend .metric-switch > button { padding-inline: 10px; }
}

@media (max-width: 390px) {
  .shell[data-page="dashboard"] .topbar { flex-wrap: wrap; gap: 8px; }
  .shell[data-page="dashboard"] .top-actions { width: 100%; justify-content: flex-start; }
}

/* Editor pane and control geometry. */
.editor-title #editor-name {
  width: min(100%, 245px);
  padding: 5px 12px 7px;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.editor-title #editor-name:hover,
.editor-title #editor-name:focus {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.detail-toolbar {
  gap: 8px;
}

.detail-toolbar .detail-back {
  width: 24px;
  min-height: 24px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.detail-toolbar .detail-back svg {
  transform: rotate(180deg);
}

.editor-preview .zoom-control {
  padding: 3px;
  border-radius: 8px;
}

.editor-preview .zoom-control .icon-btn,
.editor-preview .zoom-control #preview-zoom {
  min-height: 24px;
  padding-block: 0;
}

.settings-choice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 6px;
  min-height: 44px;
}

.settings-choice .setting-copy {
  flex: 1 1 120px;
}

.settings-choice .settings-radio-row {
  flex: none;
  gap: 6px;
  max-width: 100%;
}

.settings-choice .settings-radio-row label {
  gap: 4px;
}

.settings-choice .settings-radio-row input {
  width: 14px;
  height: 14px;
}

.setting-layout-card:has(.setting-chips) {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "diagram arrow" "metadata arrow";
  gap: 16px;
}

.setting-layout-card:has(.setting-chips) .placement-shape {
  width: min(150px, 100%);
  height: 50px;
  padding: 6px 10px;
}

.setting-chips {
  display: flex;
  grid-area: metadata;
  flex-wrap: wrap;
  gap: 6px;
}

.setting-layout-card .setting-chips > span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding-inline: 8px;
  border-radius: 4px;
  background: #f2f3f2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
}

.banner-setting-sample {
  position: relative;
  display: grid;
  width: 150px;
  max-width: 100%;
  height: 50px;
  place-items: center;
  border-radius: 4px;
  background: #d9d9d9;
}
.setting-layout-card .banner-setting-sample .setting-value {
  grid-area: auto;
  color: #575b54;
  font-size: 12px;
  text-align: center;
}
.banner-setting-dimensions { display: inline-flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 0 4px; }
.banner-setting-dimensions small { color: #575b54; font-size: 10px; }
.banner-setting-sample:is([data-slide="a"], [data-slide="b"])::before,
.banner-setting-sample:is([data-slide="a"], [data-slide="b"])::after {
  position: absolute;
  inset-block-start: calc(50% - 3px);
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  border: solid #fff;
  content: "";
}
.banner-setting-sample:is([data-slide="a"], [data-slide="b"])::before { inset-inline-start: 8px; border-width: 0 0 1px 1px; }
.banner-setting-sample:is([data-slide="a"], [data-slide="b"])::after { inset-inline-end: 8px; border-width: 1px 1px 0 0; }
.banner-setting-sample:is([data-slide="a"], [data-slide="b"]) i {
  position: absolute;
  inset-block-end: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: -9px 0 #fff8, 9px 0 #fff8;
}
.setting-layout-card .setting-chips span > svg { width: 13px; height: 13px; margin-inline-end: 5px; }

.setting-layout-card:has(.template-thumb) {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "diagram arrow";
}

.setting-layout-card:has(.template-thumb) :is(.setting-copy, .setting-value) {
  display: none;
}

.setting-layout-card .template-thumb {
  width: min(104px, 100%);
  min-height: 160px;
  padding: 8px;
}

.editor-stage[data-device="mobile"] {
  --preview-width: 366px;
  border-inline-width: 0;
  border-block-width: calc(36px * var(--preview-zoom, .7));
  border-radius: calc(33px * var(--preview-zoom, .7));
}

.editor-grid[data-campaign-type="banner"] .editor-stage[data-device="mobile"] {
  --preview-width: 368px;
  border-block-width: 0;
}

@media (min-width: 641px) {
  .shell[data-page="editor"] .topbar {
    min-height: 68px;
  }

  .editor-head {
    min-height: 55px;
    padding: 4px 24px 16px;
  }

  .editor-title {
    gap: 8px;
  }

  .editor-title .back-button {
    width: 24px;
    min-width: 24px;
    min-height: 32px;
    padding: 0;
  }

  .editor-head .actions .btn {
    min-height: 33px;
    padding: 0 16px;
    border-radius: 8px;
  }

  .editor-head .actions .btn-primary {
    min-width: 102px;
    gap: 4px;
  }

  .editor-grid > :is(.editor-settings, .editor-panel) {
    scrollbar-width: auto;
    scrollbar-color: auto;
  }

  .editor-grid:not([data-campaign-type="banner"]) > .editor-settings,
  .editor-grid > .editor-panel:not(:has([data-template-gallery], .banner-shapes)) {
    scrollbar-gutter: stable;
  }

  .editor-grid > :is(.editor-settings, .editor-panel)::-webkit-scrollbar {
    width: 17px;
  }

  .editor-grid > .editor-panel:has([data-template-gallery], .banner-shapes)::-webkit-scrollbar {
    width: 0;
  }

  .editor-grid > .editor-panel:has([data-template-gallery], .banner-shapes) {
    scrollbar-width: none;
  }

  .editor-grid > :is(.editor-settings, .editor-panel)::-webkit-scrollbar-thumb {
    border: 5px solid transparent;
    border-radius: 12px;
    background: #babdb7;
    background-clip: padding-box;
  }

  .editor-settings {
    padding-block-start: 16px;
    background: #fafafa;
  }

  .editor-settings > h2 {
    min-height: 36px;
    padding-block: 6px;
  }

  .editor-settings > h2 + .settings-section {
    margin-top: 16px;
  }

  .editor-settings .settings-section {
    margin-top: 24px;
  }

  .editor-settings .settings-section h3 {
    margin-bottom: 8px;
    padding-block: 6px;
  }

  .editor-settings .setting-card {
    min-height: 78px;
    padding: 16px;
  }

  .editor-settings .setting-copy small {
    margin-top: 4px;
  }

  .editor-settings :is(.settings-device, .settings-mode) {
    padding: 16px;
  }

  .editor-settings .setting-layout-card:not(:has(.setting-chips)) {
    gap: 8px;
  }

  .editor-settings .setting-layout-card:not(:has(.setting-chips)) .placement-shape {
    height: 108px;
  }

  .detail-toolbar {
    min-height: 52px;
    padding: 16px 16px 0;
    border-bottom: 0;
  }

  .detail-toolbar h2 {
    min-height: 36px;
    padding-block: 6px;
  }

  .editor-body {
    padding-block-start: 16px;
  }

  .editor-preview .preview-toolbar {
    min-height: 60px;
    padding: 16px 24px 0;
    align-content: center;
    border-bottom: 0;
  }

  .editor-preview .preview-wrap {
    min-height: 0;
    padding: 16px 24px 0;
  }

  .editor-preview .preview-footer {
    min-height: 32px;
    padding: 0 24px;
    border-top: 0;
  }

  .editor-preview .preview-footer .btn {
    padding: 4px 0;
  }

  .editor-grid[data-campaign-type="banner"] .editor-stage[data-device="mobile"] {
    --preview-height: 800px;
  }
}

@media (min-width: 1366px) {
  .editor-grid {
    grid-template-columns: 416px 576px minmax(0, 1fr);
  }
}

@media (min-width: 1600px) {
  .editor-grid {
    grid-template-columns: 576px 576px minmax(0, 1fr);
  }
}


/* Campaign condition, schedule and trigger controls. */
.targeting-choice { margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--control-radius); }
.targeting-choice legend { padding: 0 6px; color: var(--ink); font-weight: 600; }
.targeting-options { gap: 12px; }
.targeting-options h3 { font-size: 14px; font-weight: 600; }
.targeting-control { max-width: 360px; }
.targeting-choice:has(.targeting-switches) { padding: 0; border: 0; }
.targeting-switches.settings-radio-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.targeting-switches.settings-radio-row > label { min-height: 54px; justify-content: space-between; flex-direction: row-reverse; padding: 0 16px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.targeting-switches.settings-radio-row input { position: relative; appearance: none; flex: none; width: 34px; height: 20px; margin: 0; border: 0; border-radius: 12px; background: #d8dad6; cursor: pointer; }
.targeting-switches.settings-radio-row input:checked { background: #1b1c1b; }
.targeting-switches.settings-radio-row input::before { position: absolute; inset: 2px auto auto 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; content: ''; }
.targeting-switches.settings-radio-row input:checked::before { transform: translateX(14px); }
.targeting-toggle { display: grid; gap: 8px; }
.targeting-unit { align-items: end; }
.targeting-unit > :last-child { flex: 0 0 64px; }
.targeting-options select { padding-block: 6px; }
.schedule-days { display: flex; flex-wrap: wrap; gap: 6px; }
.schedule-days .btn { width: 34px; min-height: 34px; padding: 0; }
.schedule-days .btn[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.schedule-upcoming:empty { display: none; }
.schedule-upcoming ul { margin: 6px 0 0; padding-inline-start: 19px; color: var(--muted); }
.schedule-date-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.schedule-date-field { min-width: 0; }
.schedule-date-control { display: grid; grid-template-columns: minmax(0, 1fr) 36px; min-width: 0; align-items: center; gap: 4px; }
.schedule-date-control input { width: 100%; min-width: 0; }
.schedule-date-control input::-webkit-calendar-picker-indicator { display: none; }
.schedule-date-control .icon-btn { width: 36px; height: 36px; border-radius: 4px; }
.schedule-picker {
  position: fixed;
  inset: auto;
  width: min(328px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: 0;
  padding: 16px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.schedule-picker-heading { display: grid; grid-template-columns: 32px minmax(0, 1fr) 32px; align-items: center; margin-bottom: 8px; }
.schedule-picker-heading h3 { margin: 0; text-align: center; font-size: 14px; font-weight: 600; }
.schedule-picker-heading .icon-btn { width: 32px; height: 32px; border-color: transparent; }
.schedule-picker-heading [data-target="-1"] svg { transform: rotate(180deg); }
.schedule-picker-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.schedule-picker-grid > span { color: var(--muted); font-size: 12px; }
.schedule-picker-day { min-height: 34px; padding: 0; border: 0; border-radius: 4px; background: transparent; font-size: 13px; }
.schedule-picker-day:hover { background: var(--subtle); }
.schedule-picker-day[aria-current="date"] { font-weight: 700; }
.schedule-picker-day[aria-pressed="true"] { background: var(--ink); color: #fff; }
.schedule-picker-time { display: flex; align-items: center; gap: 5px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.schedule-picker-time label { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; }
.schedule-picker-time input { width: 53px; min-height: 32px; padding: 0 7px; }
.schedule-picker-time-zone { margin-inline-start: auto; color: var(--muted); font-size: 12px; }
.schedule-picker-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.schedule-picker-actions .btn { min-height: 36px; border-radius: 4px; }
.schedule-picker-actions .btn-primary { min-width: 80px; border-color: var(--ink); background: var(--ink); color: #fff; }
.schedule-picker-actions .btn-primary:hover { background: #393b38; }

@media (max-width: 540px) {
  .schedule-date-fields { grid-template-columns: minmax(0, 1fr); }
}

.condition-builder, .condition-group { display: grid; min-width: 0; gap: 12px; }
.condition-group { padding: 16px; border: 1px solid var(--line); border-radius: 4px; }
.condition-tips { display: grid; gap: 6px; padding: 16px; border: 1px solid #e7e9d3; border-radius: 4px; background: var(--brand-lemon-soft); }
.condition-tips h3 { font-size: 14px; font-weight: 600; }
.condition-tips p { font-size: 13px; color: var(--muted); }
.condition-tips > div { display: flex; flex-wrap: wrap; gap: 6px; }
.condition-tips .btn { min-height: 28px; padding-inline: 9px; border: 1px solid #e2e4ce; background: #fff; font-size: 12px; }
.condition-group > .btn, .condition-footer { justify-self: start; }
.condition-join { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.condition-join::before, .condition-join::after { flex: 1; height: 1px; background: var(--line); content: ''; }
.condition-join strong { padding: 1px 7px; border: 1px solid var(--line); border-radius: 4px; font-weight: 500; }
.condition-rule { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 6px; }
.condition-field-name { grid-column: 1 / -1; padding-block-end: 3px; font-weight: 600; }
.condition-rule-controls { display: flex; min-width: 0; flex-wrap: wrap; gap: 6px; }
.condition-rule-controls > :is(input, select, .condition-page-choice) { flex: 1 1 94px; width: auto; max-width: 100%; font-size: 13px; }
.condition-window { display: flex; flex: 1 1 122px; align-items: center; gap: 5px; white-space: nowrap; font-size: 13px; }
.condition-window input { width: 100%; min-width: 46px; }
.condition-rule-controls [data-rule-field="effect"] { flex: 0 0 78px; }
.condition-rule-actions { display: flex; align-items: center; gap: 4px; }
.condition-rule-actions .btn { min-height: 36px; padding-inline: 7px; font-size: 12px; }
.condition-page-choice { display: grid; min-width: 0; gap: 6px; }
.condition-page-choice .condition-page-trigger { justify-content: space-between; width: 100%; min-height: 38px; padding-inline: 9px; font-size: 13px; }
.condition-page-trigger svg { width: 14px; height: 14px; }
.condition-page-popover { position: fixed; inset: auto; width: min(168px, calc(100vw - 16px)); max-width: none; margin: 0; padding: 6px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); box-shadow: 0 5px 18px rgb(0 0 0 / 12%); }
.condition-page-popover p { padding: 1px 8px; font-size: 12px; color: var(--muted); }
.condition-page-popover .btn { display: flex; justify-content: start; width: 100%; min-height: 31px; padding: 3px 8px; font-size: 13px; }
.modal.condition-modal { inset: 0; width: calc(100% - 16px); height: calc(100dvh - 16px); max-width: none; max-height: none; margin: 0; border-radius: 0; background: transparent; box-shadow: none; }
.modal.condition-modal[open] { overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.modal.condition-modal::-webkit-scrollbar { width: 17px; height: 17px; }
.modal.condition-modal::-webkit-scrollbar-thumb { border: 4px solid transparent; border-radius: 12px; background: #8a8a8a; background-clip: padding-box; }
.modal.condition-modal::backdrop { background: rgb(27 28 27 / 50%); }
.condition-dialog-card { width: min(1200px, calc(100% - 64px)); margin: 32px auto; border-radius: 4px; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 12%); }
.modal.condition-modal :is(.modal-head, .modal-body, .modal-actions) { padding-inline: 32px; }
.modal.condition-modal .modal-head { min-height: 44px; padding-block: 24px 0; border-bottom: 0; }
.modal.condition-modal .modal-head h2 { line-height: 16px; }
.modal.condition-modal .modal-head .icon-btn { width: 36px; height: 36px; }
.modal.condition-modal .modal-body { padding: 24px 0 0; }
.modal.condition-modal .modal-actions { padding-block: 16px 32px; }
.modal.condition-modal .modal-actions .btn { min-width: 96px; min-height: 36px; padding-inline: 24px; }
.condition-chooser { display: grid; grid-template-columns: minmax(0, 1fr) 280px; border-block-start: 1px solid var(--line); }
.condition-catalog-list { display: grid; min-width: 0; gap: 32px; padding: 32px; }
.condition-catalog { min-width: 0; padding: 0; border: 0; }
.condition-catalog legend, .condition-choice h3 { color: var(--ink); font-size: 14px; font-weight: 600; }
.condition-catalog legend { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; margin-block-end: 24px; padding: 0; }
.condition-catalog legend > span { padding: 4px 16px; border-radius: 24px; background: #f3f3f3; font-size: 12px; line-height: 20px; }
.condition-catalog legend a { color: var(--muted); font-size: 12px; font-weight: 400; }
.condition-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); min-width: 0; gap: 8px; }
.condition-type { position: relative; display: flex; min-height: 84px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.condition-type:hover { border-color: #999b95; }
.condition-type:has(input:checked) { border-color: var(--ink); background: var(--subtle); }
.condition-type:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.condition-type input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; }
.condition-type-copy { display: grid; gap: 8px; min-width: 0; }
.condition-type strong { font-size: 14px; font-weight: 600; }
.condition-type small, .condition-choice p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.condition-beta { display: inline-block; margin-inline-start: 4px; padding: 0 4px; border-radius: 4px; background: var(--brand-lemon-soft); color: var(--brand-lemon-ink); font-size: 10px; line-height: 16px; vertical-align: middle; }
.condition-catalog[data-compact] .condition-types { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.condition-catalog[data-compact] .condition-type { min-height: 40px; padding-block: 6px; }
.condition-catalog[data-compact] .condition-type small { display: none; }
.condition-choice { display: flex; min-width: 0; flex-direction: column; align-items: stretch; gap: 16px; padding: 32px; background: #fafafa; }
.condition-choice h3 { margin-block-end: 0; }
.condition-choice > .btn-primary { min-height: 36px; margin-top: auto; border-radius: 4px; font-size: 14px; font-weight: 400; }
.condition-variant { width: min(240px, 100%); }
.condition-choice ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; padding: 0; list-style: none; }
.condition-choice li { padding: 2px 8px; border: 1px solid var(--line); border-radius: 4px; background: #fafafa; font-size: 13px; }
.condition-choice .condition-pending { display: flex; flex-direction: column; align-items: start; gap: 8px; margin: 0 0 16px; }
.condition-pending li { display: grid; max-width: 100%; gap: 8px; padding: 0; border: 0; background: transparent; }
.condition-pending li > span { display: inline-flex; width: fit-content; max-width: 100%; min-height: 24px; align-items: center; gap: 8px; padding: 0 8px; border-radius: 4px; background: #eee; font-size: 12px; font-weight: 600; }
.condition-pending .icon-btn { width: 24px; min-height: 24px; margin-inline-end: -8px; padding: 4px; border: 0; background: transparent; }
.condition-pending .icon-btn svg { width: 14px; height: 14px; }
.condition-pending .field { font-size: 12px; }
.condition-pending select { min-height: 32px; font-size: 12px; }

@media (max-width: 782px) {
  .modal.condition-modal { width: 100%; height: 100dvh; }
  .condition-dialog-card { width: calc(100% - 32px); margin-block: 16px; }
  .modal.condition-modal :is(.modal-head, .modal-body, .modal-actions) { padding-inline: 16px; }
  .modal.condition-modal .modal-body { padding-inline: 0; }
  .condition-chooser { grid-template-columns: minmax(0, 1fr); }
  .condition-catalog-list, .condition-choice { padding: 16px; }
  .condition-choice > .btn-primary { margin-top: 8px; }
  .condition-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .condition-type { padding-inline: 10px; }
  .condition-catalog[data-compact] .condition-types { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .condition-types { grid-template-columns: minmax(0, 1fr); }
  .condition-rule { grid-template-columns: minmax(0, 1fr); }
  .condition-rule-actions { justify-self: end; }
  .targeting-options > .field-row { flex-wrap: wrap; }
  .targeting-options > .field-row > * { flex: 1 1 100%; }
  .fatigue-fields > * { flex-basis: 85px; }
}

.editor-head .actions .btn { border-radius: 4px; }
.editor-head .actions .area-register { min-width: 102px; }
.editor-preview .preview-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.editor-preview .preview-title h2 { font-size: 14px; line-height: 22px; }
.editor-preview .preview-title .zoom-control { border-radius: 4px; }
.editor-body .creative-advanced { min-width: 86px; min-height: 36px; border-radius: 4px; padding: 0 16px; }
.editor-settings .setting-card > svg:last-child { width: 24px; height: 24px; }
.editor-settings .setting-card[hidden] { display: none; }
.area-preview-tip {
  flex: 1 1 240px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
}
.placement-controls { padding: 0; border: 0; }
.placement-control-block { display: grid; min-width: 0; gap: 12px; padding: 12px 0 16px; border-bottom: 1px solid var(--line-soft); }
.placement-control-block:last-child { border-bottom: 0; }
.placement-control-block h3, .carousel-appearance h3 { margin: 0; font-size: 14px; font-weight: 600; }
.placement-control-block p { margin: 0; }
.placement-adjustment { display: grid; grid-template-columns: minmax(48px, 1fr) minmax(0, 205px); align-items: end; gap: 12px; }
.placement-adjustment .placement-slider { min-width: 0; min-height: 38px; margin: 0; padding: 0; accent-color: var(--ink); }
.placement-unit > :last-child { flex: 0 0 80px; }
.placement-animation { align-items: end; }
.placement-animation > .btn { flex: 0 0 auto; }
.carousel-appearance { display: grid; gap: 12px; }
.carousel-appearance .card-form { border-radius: 4px; }
.area-design-actions { justify-content: flex-end; }
.carousel-colors { display: grid; gap: 8px; }
.carousel-colors .field { display: flex; align-items: center; justify-content: space-between; }
.color-field > [data-color-trigger] { justify-self: start; }
.corner-controls > summary { width: max-content; cursor: pointer; color: var(--muted); }
.corner-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-block-start: 8px; }
.material-empty { display: grid; justify-items: center; gap: 6px; padding: 24px 12px; border-radius: 4px; background: var(--subtle); text-align: center; }
.material-empty > span { color: var(--muted); }
.material-empty p { margin: 0; color: var(--muted); }

.shell[data-page="group-detail"] { grid-template-columns: minmax(0, 1fr); }
.shell[data-page="group-detail"] .sidebar { display: none; }
.main[data-view="group-detail"] { padding: 0; }
.group-detail {
  display: grid;
  gap: 28px;
  min-width: 0;
  padding: 24px 24px 40px;
}
.group-detail-head,
.group-detail-title,
.group-detail-head-actions,
.group-detail-public,
.group-detail-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.group-detail-head,
.group-detail-section-head {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.group-detail-head {
  justify-content: flex-start;
  min-height: 36px;
}
.group-detail-title { flex: 0 1 auto; }
.group-detail-title h1,
.group-detail-section-head h2 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  overflow-wrap: anywhere;
}
.group-detail-title .back-button,
.group-detail-head-actions .icon-btn {
  flex: none;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border-color: transparent;
}
.group-detail-public { color: var(--secondary-ink); white-space: nowrap; }
.group-detail-public .list-switch { width: 36px; height: 20px; }
.group-detail-public .list-switch::after { width: 16px; height: 16px; }
.group-detail-public .list-switch[aria-checked="true"]::after { inset-inline-start: 18px; }
.group-detail-section { min-width: 0; }
.group-detail-section-head { min-height: 36px; margin-bottom: 12px; }
.group-detail :is(.group-detail-area-actions, .group-detail-section-head) .btn {
  min-height: 36px;
  padding: 0 16px;
}
.group-detail-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  min-width: 0;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
}
.group-detail-facts {
  display: flex;
  align-items: stretch;
  flex: 1 1 420px;
  flex-wrap: wrap;
  gap: 14px 24px;
  min-width: 0;
  margin: 0;
}
.group-detail-facts > div { display: grid; gap: 4px; min-width: 0; }
.group-detail-facts dt { color: var(--muted); font-size: 13px; line-height: 18px; }
.group-detail-facts dd { margin: 0; overflow-wrap: anywhere; }
.group-detail-facts dd > svg { width: 16px; height: 16px; margin-inline-end: 4px; }
.group-detail-area-actions { justify-content: flex-end; margin-inline-start: auto; }
.group-material-filters { padding-bottom: 12px; }
.group-material-filters input[type="search"] { flex: 1 1 150px; max-width: 240px; min-width: 112px; }
.group-detail-table { border-bottom: 1px solid var(--line-soft); }
.group-detail-table table { min-width: 770px; }
.group-detail-table thead { background: #f8f8f8; }
.group-detail-table :is(th, td) { padding-block: 10px; }
.group-detail-table :is(th, td):nth-child(3) { min-width: 130px; }
.group-detail-table :is(th, td):is(:nth-child(1), :nth-child(5), :nth-child(6), :nth-child(7), :nth-child(8)) { white-space: nowrap; }
.group-detail-table td .entry-name { padding: 0; border: 0; text-align: start; font-weight: 500; overflow-wrap: anywhere; }
.group-detail-table .icon-btn { width: 36px; min-height: 36px; border-color: transparent; }
.group-detail-table :is(.list-dates, .group-material-period small) { color: var(--muted); font-size: 12px; }
.group-detail-table .list-dates span { color: var(--ink); }
.group-material-period-count { color: var(--muted); font-size: 12px; }
.group-material-metrics { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 0; }
.group-material-metrics div { min-width: 96px; }
.group-material-metrics dt { color: var(--muted); }
.group-material-metrics dd { margin: 4px 0 0; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.group-detail :is(.group-detail-empty, .material-empty) {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  min-height: 258px;
  padding: 20px 16px;
  background: var(--surface);
  text-align: center;
}
.group-detail :is(.group-detail-empty, .material-empty) > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
  border-radius: 8px;
  color: var(--muted);
  background: var(--subtle);
}
.group-detail :is(.group-detail-empty, .material-empty) > span svg { width: 25px; height: 25px; }
.group-detail :is(.group-detail-empty, .material-empty) strong { color: var(--muted); font-weight: 400; }
.group-detail :is(.group-detail-empty, .material-empty) p { color: var(--ink); }
.group-material-view {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0;
  padding: 4px;
  border-radius: 6px;
  background: var(--nav-active);
}
.group-detail .group-material-view :is(button, .btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-inline-size: 75px;
  min-block-size: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--control-radius);
  color: var(--secondary-ink);
  background: transparent;
  font-size: 13px;
  line-height: 20px;
  white-space: nowrap;
}
.group-detail .group-material-view button:last-child { min-inline-size: 88px; }
.group-material-view button svg { width: 16px; height: 16px; }
.group-detail .group-material-view button:is([aria-pressed="true"], [aria-selected="true"]) { color: var(--ink); background: var(--surface); }
.group-detail .group-material-view button:not(:is([aria-pressed="true"], [aria-selected="true"])):hover { background: var(--line-soft); }
.group-material-view button:focus-visible { outline-offset: -2px; }
.group-calendar { min-inline-size: 0; }
.group-calendar-toolbar,
.group-calendar-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.group-calendar-toolbar { justify-content: space-between; margin-block-end: 12px; }
.group-calendar-controls { min-inline-size: 0; }
.group-calendar-controls strong { margin-inline: 4px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.group-calendar-toolbar .btn { min-block-size: 36px; padding-block: 0; }
.group-calendar-toolbar .icon-btn { inline-size: 36px; min-block-size: 36px; }
.group-calendar-toolbar :is(.btn-primary, [data-action="save"]) { min-inline-size: 96px; margin-inline-start: auto; }
.group-calendar-toolbar [data-group-calendar-save]:disabled { border-color: var(--line); background: var(--line); color: var(--muted); opacity: 1; }
.group-calendar-grid {
  --calendar-resource-width: 222px;
  max-block-size: min(528px, 60vh);
  margin-block: 0 16px;
  border-color: var(--line);
  border-radius: 4px;
}
.group-calendar-grid .area-schedule { table-layout: fixed; inline-size: calc(var(--calendar-resource-width) + 10752px); min-inline-size: calc(var(--calendar-resource-width) + 10752px); }
.group-calendar-resource { inline-size: var(--calendar-resource-width); }
.group-calendar-hour { inline-size: 64px; }
.group-calendar-grid .area-schedule :is(th, td) { padding: 0; }
.group-calendar-grid .area-schedule thead th { height: 32px; color: var(--secondary-ink); font-size: 13px; font-weight: 400; text-align: center; }
.group-calendar-grid .area-schedule thead tr:first-child th { top: 0; }
.group-calendar-day { display: inline-block; position: sticky; left: calc(50% - 30px); right: 0; width: 60px; margin-inline: 5px; font-size: 14px; font-weight: 600; text-align: center; }
.group-calendar-grid .area-schedule .group-calendar-hours th { top: 32px; inline-size: 64px; padding: 0; text-align: center; }
.group-calendar-grid .area-schedule .group-calendar-hours th:first-child { left: auto; z-index: 2; }
.group-calendar-grid .area-schedule :is(thead tr:first-child th:first-child, tbody th) {
  position: sticky;
  left: 0;
  z-index: 4;
  inline-size: var(--calendar-resource-width);
  padding-inline: 12px;
  background: var(--surface);
  text-align: start;
}
.group-calendar-grid .area-schedule thead tr:first-child th:first-child { z-index: 7; }
.group-calendar-grid .area-schedule tbody :is(th, td) { height: 64px; }
.group-calendar-grid .area-schedule tbody td { position: relative; }
.group-calendar-grid .area-schedule .group-calendar-live :is(th, td) { height: 32px; }
.group-calendar-grid .area-schedule .group-calendar-live .btn { min-height: 28px; padding: 0; border: 0; background: transparent; font-size: 12px; }
.group-calendar-grid .area-schedule .group-calendar-empty td { background: repeating-linear-gradient(to right, transparent 0 63px, var(--line) 63px 64px); }
.group-calendar-grid .area-schedule tr:last-child > * { border-block-end: 0; }
.group-calendar-grid .area-schedule tr > :last-child { border-inline-end: 0; }
.group-calendar-live { color: var(--secondary-ink); font-size: 12px; font-weight: 600; }
.group-calendar-grid .area-schedule :is(tr[data-selected], .group-calendar-empty) > th { background: var(--surface); }
.group-calendar-live-heading::after { content: ''; width: 6px; height: 6px; margin-inline-start: 6px; border-radius: 50%; background: var(--danger, #d92d20); }
.group-calendar-resource-cell { min-width: 0; }
.group-calendar-grid .area-schedule tbody th { padding-inline: 16px 10px; }
.group-calendar-grid .area-schedule .group-calendar-slot span { margin: 0; color: inherit; }
.group-calendar-slot, .group-calendar-slot-empty { display: flex; align-items: center; gap: 8px; min-width: 0; width: 100%; height: 63px; padding: 0; font-size: 12px; font-weight: 400; color: var(--secondary-ink); }
.group-calendar-thumbnail { display: flex; flex: 0 0 80px; align-items: center; justify-content: center; width: 80px; height: 48px; overflow: hidden; border-radius: 4px; background: var(--subtle); }
.group-calendar-thumbnail .list-thumbnail { width: 100%; height: 100%; margin: 0; border: 0; border-radius: 0; object-fit: cover; }
.group-calendar-thumbnail > svg { flex: none; width: 16px; height: 16px; margin: 0; }
.group-calendar-live-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-calendar-slot > svg { width: 14px; height: 14px; margin-inline-start: auto; flex: none; opacity: 0; }
.group-calendar-slot:is(:hover, :focus-visible) > svg { opacity: 1; }
.group-calendar-resource-cell[data-live="true"] .group-calendar-live-label { color: var(--ink); }
.group-calendar-grid .area-schedule td[data-reserved] { position: relative; background: var(--surface); }
.group-calendar-event-shell {
  position: absolute;
  z-index: 2;
  inset-block-start: 5px;
  inset-inline-start: var(--event-left);
  inline-size: max(4px, var(--event-width));
  block-size: 54px;
  touch-action: none;
}
.group-calendar-event {
  display: block;
  inline-size: 100%;
  block-size: 52px;
  min-inline-size: 0;
  padding: 4px 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--subtle);
  color: var(--ink);
  text-align: start;
  cursor: grab;
}
.group-calendar-event:enabled:hover { background: var(--line); }
.group-calendar-event:focus-visible { outline-offset: -2px; }
.group-calendar-event-copy { position: sticky; inset-inline-start: calc(var(--calendar-resource-width) + 10px); display: block; inline-size: max-content; max-inline-size: min(380px, calc(100vw - 280px)); padding-inline: 10px; }
.group-calendar-event :is(.group-calendar-event-title, .group-calendar-event-period) {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.group-calendar-event-title { font-size: 13px; font-weight: 400; line-height: 18.2px; }
.group-calendar-event-period { color: var(--secondary-ink); font-size: 13px; font-weight: 400; font-variant-numeric: tabular-nums; line-height: 18.2px; }
.group-calendar-resizer { position: absolute; top: 0; bottom: 2px; z-index: 3; width: 7px; padding: 0; border: 0; border-radius: 0; background: transparent; cursor: ew-resize; touch-action: none; }
.group-calendar-resizer[data-edge="start"] { left: 0; }
.group-calendar-resizer[data-edge="end"] { right: 0; }
.group-calendar-resizer:is(:hover, :focus-visible) { background: var(--accent); outline-offset: -2px; }
.group-calendar-event-shell[data-moving] .group-calendar-event { cursor: grabbing; }
.group-calendar-now { position: absolute; top: 0; z-index: 3; width: 1px; background: var(--danger, #d92d20); pointer-events: none; }
.group-calendar-fields { margin-block: 8px 16px; }
.group-calendar-fields > summary { cursor: pointer; color: var(--secondary-ink); font-size: 13px; }
.group-calendar-fields[open] > summary { margin-bottom: 12px; }
.group-material-grid {
  grid-template-columns: minmax(0, min(50%, 576px)) minmax(0, 1fr);
}
.group-material-grid .editor-panel { border-inline-end: 1px solid var(--line); }
.group-material-grid .editor-preview { grid-column: auto; border-block-start: 0; }
.group-material-steps { justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.group-material-steps .btn { min-height: 36px; }
.group-material-steps .actions .btn { border-color: transparent; }
.group-material-steps .actions .btn[aria-pressed="true"] { background: var(--nav-active); font-weight: 600; }
.group-material-grid #detail-title { font-size: 16px; font-weight: 600; line-height: 24px; }
.group-material-footer { justify-content: flex-end; margin-block-start: 24px; }
.group-material-footer .btn { min-width: 76px; min-height: 36px; padding: 0 16px; }
.group-material-footer .btn-primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.group-material-footer .btn-primary:enabled:hover { border-color: var(--secondary-ink); background: var(--secondary-ink); }
.editor-workspace { min-width: 0; min-height: 0; flex: 1; }
.shell[data-page="editor"] .workspace > .topbar { display: none; }
.shell[data-page="editor"] .editor-head { min-height: 70px; padding: 8px 24px; }
.editor-head .editor-title { gap: 20px; }
.editor-head .editor-title .back-button { width: 40px; min-width: 40px; min-height: 40px; }
.editor-head #editor-status { display: none; }
.editor-head .actions .btn { border-radius: 4px; }
.editor-head .actions .btn-primary { min-width: 102.5px; }
.material-editor-body { display: flex; min-width: 0; min-height: 0; flex: 1; }
.editor-phone-front, .editor-phone-bottom { display: none; }
.editor-grid[data-campaign-type] .editor-stage[data-device="mobile"] {
  --preview-width: 420px;
  --preview-height: 880px;
  position: relative;
  flex: none;
  width: calc(420px * var(--preview-zoom, .7));
  min-width: calc(420px * var(--preview-zoom, .7));
  max-width: none;
  height: calc(880px * var(--preview-zoom, .7));
  min-height: calc(880px * var(--preview-zoom, .7));
  padding: calc(65px * var(--preview-zoom, .7)) calc(15px * var(--preview-zoom, .7)) calc(75px * var(--preview-zoom, .7));
  overflow: visible;
  border: 0;
  border-radius: calc(50px * var(--preview-zoom, .7));
  background: #fff;
}
.editor-stage[data-device="mobile"] .editor-preview-surface { background: #f1f1f1 url("preview-assets/website-mobile.jpg") left top / cover no-repeat; }
.editor-stage[data-device="mobile"] .editor-phone-front {
  position: absolute;
  z-index: 10;
  top: 50%;
  left: 50%;
  display: block;
  width: calc(522px * var(--preview-zoom, .7));
  height: calc(975px * var(--preview-zoom, .7));
  transform: translate(-50%, -50%);
  background: url("preview-assets/phone-front.png") center / contain no-repeat;
  pointer-events: none;
}
.editor-phone-front > span { position: absolute; top: calc(80px * var(--preview-zoom, .7)); left: calc(80px * var(--preview-zoom, .7)); color: #111; font-size: calc(14px * var(--preview-zoom, .7)); line-height: 1.57; }
.editor-phone-front > img { position: absolute; top: calc(82px * var(--preview-zoom, .7)); right: calc(95px * var(--preview-zoom, .7)); width: calc(70px * var(--preview-zoom, .7)); height: auto; }
.editor-stage[data-device="mobile"] .editor-phone-bottom { position: absolute; inset: auto 0 0; display: flex; height: calc(75px * var(--preview-zoom, .7)); align-items: center; flex-direction: column; padding-top: calc(12px * var(--preview-zoom, .7)); border-radius: 0 0 calc(50px * var(--preview-zoom, .7)) calc(50px * var(--preview-zoom, .7)); background: #efefef; color: #111; font-size: calc(14px * var(--preview-zoom, .7)); line-height: 1.57; pointer-events: none; }
.editor-phone-bottom > i { width: calc(150px * var(--preview-zoom, .7)); height: calc(6px * var(--preview-zoom, .7)); margin-top: calc(8px * var(--preview-zoom, .7)); border-radius: 10px; background: #111; }
.editor-preview[data-material-preview] { position: relative; background: #999; }
.editor-preview[data-material-preview] .preview-wrap { padding: 0; background: #999; }
.editor-preview[data-material-preview] > .preview-toolbar { position: absolute; inset: 0 0 auto; z-index: 15; opacity: 0; background: rgb(255 255 255 / 92%); }
.editor-preview[data-material-preview] > .preview-footer { position: absolute; inset: auto 0 0; z-index: 15; opacity: 0; background: rgb(255 255 255 / 92%); }
.editor-preview[data-material-preview]:is(:hover, :focus-within) > :is(.preview-toolbar, .preview-footer) { opacity: 1; }
.material-step-rail { width: 80px; flex: none; padding-top: 24px; background: #fafafa; }
.basic-content-fields, .layer-exposed-fields { display: grid; gap: 32px; }
.basic-content-section { display: grid; min-width: 0; gap: 16px; }
.basic-content-section :is(h3, h4) { font-size: 14px; font-weight: 600; line-height: 22px; }
.basic-content-section h4 { margin-top: 8px; }
.basic-content-section .field { margin: 0; }
.basic-radius { display: grid; gap: 8px; }
.basic-radius > .field, .basic-layer-radius { grid-template-columns: minmax(0, 1fr) 112px; align-items: center; }
.basic-content-section .field:has([data-field="buttonRadius"]) { grid-template-columns: minmax(0, 1fr) 112px; align-items: center; }
.basic-media-upload { position: relative; display: grid; min-height: 120px; place-items: center; overflow: hidden; border: 1px dashed var(--line); border-radius: 4px; background: #fafafa; cursor: pointer; }
.basic-media-upload:has(:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.basic-media-upload > input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.basic-media-upload > img { width: 100%; max-height: 160px; object-fit: contain; }
.basic-media-upload > svg { width: 24px; height: 24px; color: var(--muted); }
.basic-media-actions { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; background: rgb(0 0 0 / 3%); opacity: 0; transition: opacity 120ms ease-out; }
.basic-media-upload:is(:hover, :focus-within) .basic-media-actions { opacity: 1; }
.basic-media-actions .icon-btn { position: relative; width: 42px; height: 42px; min-height: 42px; padding: 10px; border: 0; border-radius: 50%; background: #666b73; color: #fff; }
.basic-media-actions .icon-btn:disabled { opacity: .5; }
.basic-media-file > input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.basic-media-preview { display: block; width: 100%; max-height: calc(100dvh - 200px); object-fit: contain; }
.modal.basic-media-modal { width: min(720px, calc(100% - 32px)); }
.basic-media-beta { margin-top: -8px; font-size: 12px; line-height: 18px; }
.basic-media-beta > span { margin-inline-end: 4px; color: var(--brand-lemon-ink); font-size: 10px; }
.basic-extra-options { padding: 0; border: 0; }
.basic-extra-options > summary { cursor: pointer; color: var(--secondary-ink); font-size: 13px; }
.basic-extra-options[open] > summary { margin-bottom: 16px; }
.basic-extra-options > .field + .field { margin-top: 16px; }
.basic-content-section .basic-button-copy { min-height: 64px; text-align: center; font-weight: 600; }
.basic-detail-action { justify-content: center; margin-top: 32px; }
.material-navigation { display: grid; gap: 24px; padding: 24px; }
.group-material-steps { display: flex; flex-direction: column; align-items: stretch; gap: 20px; counter-reset: material-step; }
.group-material-steps > .btn { flex: none; flex-direction: column; gap: 8px; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 13px; line-height: 20px; }
.group-material-steps > .btn::before { display: grid; width: 36px; height: 36px; place-items: center; border: 2px solid var(--brand-lemon); border-radius: 50%; background: var(--brand-lemon); content: counter(material-step); counter-increment: material-step; font-size: 12px; }
.group-material-steps > .btn[aria-pressed="true"] { color: var(--ink); }
.group-material-steps > .btn[aria-pressed="true"]::before { background: #292929; color: #fff; }
.material-mode { display: flex; padding: 5px; border-radius: 22px; background: #f8f8f8; }
.material-mode .btn { flex: 1; min-height: 32px; padding: 5px 0; border: 0; background: transparent; color: var(--brand-sky-ink); font-size: 14px; font-weight: 400; line-height: 22px; }
.material-mode .btn { border-radius: 18px; }
.material-mode .btn[aria-pressed="true"] { background: var(--brand-sky); color: #fff; }
.group-material-grid .editor-panel { display: flex; flex-direction: column; }
.editor-grid.group-material-grid > .editor-panel { overflow: hidden; scrollbar-gutter: auto; }
.group-material-grid .editor-body { flex: 1; min-height: 0; padding-top: 0; overflow: auto; }
.group-material-grid .editor-body:has(> h2.sr-only) > #editor-form { margin-top: 0; }
.group-material-grid .group-material-footer { flex: none; margin: auto 0 0; padding: 24px; }
.group-material-footer { gap: 12px; }
.group-material-footer .btn { flex: 1; min-height: 33px; border-radius: 4px; font-size: 13px; font-weight: 400; }
.group-material-footer .btn:disabled { background: #dcdcdc; color: var(--ink); opacity: 1; }
.group-material-footer .btn-primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.group-material-grid .basic-media-upload { min-height: 192px; }
.slide-playback-options {
  display: grid;
  container-type: inline-size;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
}
.slide-range {
  display: grid;
  grid-template-columns: minmax(76px, 1fr) minmax(44px, 112px) 132px;
  align-items: center;
  gap: 8px;
}
.slide-range > input[type="range"] { min-width: 0; width: 100%; accent-color: var(--ink); }
.slide-range-value { display: grid; width: 132px; grid-template-columns: minmax(0, 1fr) 59px; align-items: center; }
.slide-range-value > .field { min-width: 0; margin: 0; }
.slide-range-value > .field > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.slide-range-value input[type="number"] {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  height: 32px;
  border-radius: 5px 0 0 5px;
  font-variant-numeric: tabular-nums;
}
.slide-playback-switches { display: grid; gap: 6px; }
.slide-playback-switches > label { flex-direction: row-reverse; justify-content: space-between; }
.slide-playback-video { display: grid; gap: 4px; }
@container (max-width: 267px) {
  .slide-range { grid-template-columns: minmax(0, 1fr) 132px; }
  .slide-range > label { grid-column: 1 / -1; }
}
@media (min-width: 921px) {
  .editor-workspace { display: flex; overflow: auto hidden; overscroll-behavior-x: contain; }
  .editor-workspace > .editor-grid { min-width: 1280px; min-height: 0; width: 100%; flex: 1 0 auto; grid-template-columns: 416px 576px minmax(288px, 1fr); }
  .editor-workspace > .group-material-grid { min-width: 1200px; grid-template-columns: 430px minmax(770px, 1fr); }
}
@media (min-width: 1536px) {
  .editor-workspace > .editor-grid:not(.group-material-grid) { min-width: 1440px; grid-template-columns: 576px 576px minmax(288px, 1fr); }
}
@media (max-width: 720px) {
  .shell[data-page="group-detail"] .topbar { flex-wrap: wrap; row-gap: 5px; }
  .shell[data-page="group-detail"] .top-actions { margin-inline-start: auto; }
  .group-material-grid { grid-template-columns: minmax(0, 1fr); }
  .group-material-grid .editor-panel { border-inline-end: 0; }
  .group-material-grid .editor-preview { border-block-start: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .group-detail { gap: 24px; padding: 16px 14px 28px; }
  .group-detail-area { align-items: stretch; padding: 16px; }
  .group-detail-facts { gap: 12px 20px; }
  .group-detail-area-actions { margin-inline-start: 0; justify-content: flex-start; }
  .group-detail :is(.group-detail-empty, .material-empty) { min-height: 220px; }
}
.material-status { padding: 2px 6px; border-radius: 4px; background: var(--subtle); white-space: nowrap; }
.material-status[data-live="true"] { background: #e4f4dc; color: #265020; }
.basic-video-media { display: grid; gap: 7px; }

@media (max-width: 480px) {
  .editor-preview .preview-toolbar > .preview-title { flex-basis: 100%; }
  .material-controls .actions { flex-wrap: wrap; }
}


/* 2026-11-23: narrow desktop editor keeps the source's three columns. */
@media (min-width: 641px) {
  .editor-workspace { display:flex; overflow:auto hidden; min-height:0; }
  .editor-workspace > .editor-grid { display:grid; width:100%; flex:1 0 auto; min-width:1280px;
    min-height:0; grid-template-columns:416px 576px minmax(288px,1fr); }
  .editor-grid > :is(.editor-settings,.editor-panel,.editor-preview) {grid-column:auto;grid-row:1;min-height:0;max-height:100%;overflow-y:auto;}
  .editor-grid > .editor-settings {padding:24px;border-inline-end:1px solid var(--line);border-block-end:0;}
  .editor-settings .settings-section h3 {min-height:34px;display:flex;align-items:center;}
  .editor-grid.group-material-grid {min-width:1200px;grid-template-columns:430px minmax(770px,1fr);}
  .editor-grid[data-panel-open="false"]:not(.group-material-grid) {grid-template-columns:416px minmax(864px,1fr);}
  .editor-grid[data-panel-open="false"] > .editor-panel {display:none;}
}
@media (min-width:1536px) {
 .editor-workspace>.editor-grid:not(.group-material-grid) {min-width:1440px;grid-template-columns:576px 576px minmax(288px,1fr);}
 .editor-workspace>.editor-grid[data-panel-open="false"] {grid-template-columns:576px minmax(864px,1fr);}
}
@media (min-width:641px) and (max-width:1024px) {
 .condition-types {grid-template-columns:repeat(2,minmax(0,1fr));}
 .condition-type {min-height:118px;}
}
.condition-type-copy {overflow-wrap:anywhere;}
.editor-header [data-action="save"] {height:33px;min-height:33px;}
.editor-panel :is(input#field-slideLoop,input#field-autoplay,input#field-waitForVideo) {appearance:none;width:34px;height:20px;border:0;border-radius:20px;background:#d9d9d9;position:relative;vertical-align:middle;flex:none;cursor:pointer;}
.editor-panel :is(input#field-slideLoop,input#field-autoplay,input#field-waitForVideo)::after {content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:white;box-shadow:0 1px 3px #0002;transition:transform .15s;}
.editor-panel :is(input#field-slideLoop,input#field-autoplay,input#field-waitForVideo):checked {background:#242424;}
.editor-panel :is(input#field-slideLoop,input#field-autoplay,input#field-waitForVideo):checked::after {transform:translateX(14px);}
.schedule-modal .modal-head,.schedule-modal .schedule-empty {display:none;}

.document-workspace {display:block;width:100%;height:calc(100dvh - 104px);min-height:500px;border:0;background:#fff;}
main:has(>.document-workspace) {padding:0;overflow:hidden;}
.dashboard-campaigns {grid-template-columns:repeat(4,minmax(0,1fr));}
.observed-list[data-area-type="banner"] {min-width:1200px;}
.observed-list[data-area-type="banner"] :is(th,td) {width:auto;min-width:0;padding-inline:12px;}
.observed-list[data-area-type="banner"] :is(th,td):nth-child(1) {width:64px;}
.observed-list[data-area-type="banner"] :is(th,td):nth-child(2) {min-width:180px;}
.observed-list[data-area-type="banner"] :is(th,td):nth-child(4) {min-width:150px;}
.banner-code-modal {width:min(680px,calc(100% - 32px));}
.banner-code-box {display:grid;gap:12px;padding:16px;border:1px solid var(--line);border-radius:4px;margin:16px 0;}
.banner-code-box pre {margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;}
.banner-code-box .btn {justify-self:end;}
.banner-code-guide {margin-top:24px;border-top:1px solid var(--line);padding-top:16px;}
.editor-panel input[role="switch"] {appearance:none;width:34px;height:20px;border:0;border-radius:20px;background:#d9d9d9;position:relative;vertical-align:middle;flex:none;cursor:pointer;}
.editor-panel input[role="switch"]::after {content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:white;box-shadow:0 1px 3px #0002;}
.editor-panel input[role="switch"]:checked {background:#242424;}
.editor-panel input[role="switch"]:checked::after {left:16px;}
@media(max-width:640px) {.dashboard-campaigns{grid-template-columns:repeat(2,minmax(0,1fr));}}

.editor-head .actions .area-register,.layer-header [data-layer-action="save"] {height:33px;min-height:33px;}
.banner-code-steps{margin:20px 0;padding-inline-start:22px;line-height:1.7;font-size:14px}.banner-code-steps li+li{margin-top:12px}.banner-code-options{display:grid;gap:12px;margin-top:20px}.banner-code-options .btn{min-height:40px}#banner-guide-content{margin-top:20px;padding:16px;background:var(--subtle);border-radius:4px}#banner-guide-content h3{font-size:14px;margin-bottom:8px}
.editor-panel input[role="switch"] {width:36px;min-width:36px;background:#d9d9d9}.editor-panel input[role="switch"]:checked{background:#1b1c1a}.editor-panel input[role="switch"]:checked::after{left:18px;transform:none;}
.condition-type small {line-height:18px;}.condition-types {grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));}.condition-catalog[data-compact] .condition-types{grid-template-columns:repeat(6,minmax(0,1fr));}@media(max-width:640px){.condition-catalog[data-compact] .condition-types{grid-template-columns:repeat(3,minmax(0,1fr));}}
.modal.condition-modal {width:100%;height:100dvh;}
.modal.banner-code-modal{width:512px;max-width:calc(100vw - 64px);max-height:calc(100dvh - 32px);border-radius:4px;overflow:auto}.banner-code-modal .modal-head{min-height:52px;padding:32px 32px 0;border:0}.banner-code-modal .modal-head h2{font-size:16px;line-height:16px;font-weight:600}.banner-code-modal .modal-body{padding:32px}.banner-code-instructions{padding:32px;background:#fafafa;font-size:13px;line-height:21px}.banner-code-instructions>p:first-child{text-align:center;color:var(--muted)}.banner-code-box{position:relative;display:block;margin:20px 0 24px;padding:16px;border:0;background:#282a36;color:#f4f4f4}.banner-code-box pre{padding-right:24px;font-family:monospace;font-size:12px;line-height:20px;font-weight:600}.banner-code-box .icon-btn{position:absolute;right:8px;top:8px;width:40px;height:40px;min-height:40px;border:0;border-radius:5px;background:#111;color:#fff}.banner-code-steps{margin:0;padding-left:16px;font-size:13px;line-height:21px}.banner-code-steps li+li{margin-top:8px}.banner-code-local-note{margin-top:12px;font-size:11px;color:var(--muted)}.banner-code-pill{width:max-content;max-width:100%;margin:32px auto;padding:6px 16px;border-radius:32px;background:#f4f4f4;text-align:center;font-size:12px;font-weight:600;line-height:18px}.banner-code-options{gap:8px;margin:0}.banner-code-options .btn{min-height:58px;justify-content:flex-start;padding:16px;font-size:13px;font-weight:400;border-radius:4px}.banner-code-options .btn>span{flex:1;text-align:left}.banner-code-options .btn>svg{width:16px;height:16px}.banner-code-options .btn>svg:last-child{margin-left:auto}
