:root {
  --paper: #fff;
  --wash: #f2f2f2;
  --ink: #1a1a1a;
  --muted: #666;
  --line: #d9d9d9;
  --axis: #7f7f7f;
  --red: #cb0000;
  --gold: #b88a56;
  --link: #07275e;
  --body-font: system-ui, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --heading-font: "Hiragino Mincho ProN", "Yu Mincho", "Shippori Mincho", serif;
  --page-padding: 40px;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 14px/1.65 var(--body-font); }
.page, .header-inner { max-width: 1328px; margin: auto; padding-inline: var(--page-padding); }
.page { padding-block: 32px 48px; }
h1, h2 { margin: 0; font-family: var(--heading-font); font-weight: 600; letter-spacing: .025em; overflow-wrap: anywhere; }
h1 { font-size: 30px; line-height: 1.45; }
h2 { font-size: 18px; line-height: 1.5; border-bottom: 1px solid var(--red); padding-bottom: 8px; margin-bottom: 14px; }
section { margin-top: 28px; }
p { margin: 8px 0; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
::selection { background: var(--red); color: var(--paper); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .identity, .site-nav, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.header-inner { min-height: 72px; column-gap: 28px; }
.site-name { color: var(--ink); font: 600 19px var(--heading-font); text-decoration: none; white-space: nowrap; }
.site-nav { gap: 6px 18px; }
.site-nav a { color: var(--ink); padding: 8px 2px; border-bottom: 2px solid transparent; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current] { border-bottom-color: var(--red); }
.site-nav a[aria-current] { font-weight: 700; }
.identity { margin-left: auto; font-size: 12px; }
.identity strong { display: block; overflow-wrap: anywhere; }
.page-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; }
.page-heading { border-bottom: 1px solid var(--red); padding-bottom: 16px; margin-bottom: 16px; }
.page-heading p { margin: 2px 0 0; }
.section-heading { border-bottom: 1px solid var(--red); padding-bottom: 8px; margin-bottom: 14px; }
.section-heading h2 { border: 0; margin: 0; padding: 0; }
.breadcrumb { margin-bottom: 10px; }
button, .button, input, select, textarea {
  font: inherit;
  min-height: 44px;
  padding: 8px 10px;
  color: var(--ink);
  border: 1px solid var(--axis);
  border-radius: 0;
  background: var(--paper);
}
button, .button { display: inline-flex; align-items: center; justify-content: center; font-weight: 650; text-decoration: none; white-space: nowrap; cursor: pointer; }
button:hover, .button:hover { border-color: var(--red); }
button:disabled { color: var(--muted); cursor: default; }
.primary, .primary:hover { color: var(--paper); background: var(--red); border-color: var(--red); }
.primary:hover { filter: brightness(.85); }
.compact { min-height: 34px; padding: 4px 9px; font-size: 12px; }
label { display: block; min-width: 0; font-size: 13px; font-weight: 650; }
label input, .select-field select, .link-editor :is(input, textarea) { display: block; width: 100%; margin-top: 4px; }
.select-field { min-width: 0; }
.fields { display: grid; align-items: end; gap: 12px 16px; }
.filters { grid-template-columns: minmax(175px, 1.6fr) repeat(5, minmax(108px, 1fr)) auto; margin-block: 20px; }
.campaign-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.campaign-fields .muted { font-size: 11px; font-weight: 400; }
.upload { grid-template-columns: repeat(2, minmax(0, 300px)) auto; justify-content: start; margin-block: 12px; }
.form-end { margin-block: 16px 6px; }
.login { max-width: 420px; margin: 40px auto; }
.login button { margin-top: 14px; }
.table-scroll { max-width: 100%; overflow-x: auto; scrollbar-color: var(--axis) var(--wash); }
table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }
th { font-weight: 650; overflow-wrap: anywhere; }
td { overflow-wrap: anywhere; }
thead th { background: var(--wash); border-color: var(--gold); font-size: 12px; }
tbody tr:hover { background: var(--wash); }
.campaign-table { min-width: 970px; }
.campaign-table td:nth-last-child(4) { min-width: 98px; }
.date-range, .number { font-variant-numeric: tabular-nums; }
.date-range { min-width: 115px; white-space: nowrap; }
.number { text-align: right; white-space: nowrap; }
.issued-table { min-width: 920px; }
.copy-field { display: flex; gap: 6px; align-items: center; }
.copy-field input { width: 100%; min-width: 220px; min-height: 34px; padding-block: 4px; font-family: monospace; }
.link-editor { min-width: 820px; margin-bottom: 8px; }
.link-editor td { padding: 4px 5px; }
.link-editor :is(input, textarea) { margin: 0; }
.link-editor textarea { resize: vertical; }
.link-editor td:last-child { width: 32%; }
.row-count { margin-left: 8px; }
.summary { display: flex; flex-wrap: wrap; gap: 16px 32px; padding-block: 12px; }
.summary div { min-width: 115px; max-width: 100%; }
.summary dt { color: var(--muted); font-size: 12px; }
.summary dd { margin: 2px 0 0; font-weight: 650; overflow-wrap: anywhere; }
.pagination { display: flex; gap: 16px; align-items: center; margin-top: 8px; }
.result-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.state { display: inline-block; white-space: nowrap; font-size: 12px; font-weight: 650; padding: 2px 7px; border: 1px solid var(--line); background: var(--wash); }
.state-active, .state-committed { background: var(--paper); color: var(--link); border-color: var(--link); }
.state-rejected { background: var(--paper); color: var(--red); border-color: var(--red); }
.error, .notice, .empty { background: var(--wash); padding: 12px 16px; }
.error, .notice { border-inline-start: 1px solid var(--red); }
.error ul { margin: 6px 0 0; padding-inline-start: 20px; }
@media (max-width: 1170px) {
  :root { --page-padding: 24px; }
  .filters { grid-template-columns: minmax(160px, 1.5fr) repeat(3, minmax(115px, 1fr)); }
}
@media (max-width: 700px) {
  :root { --page-padding: 16px; }
  h1 { font-size: 25px; }
  .page { padding-top: 24px; }
  .header-inner { padding-block: 10px; }
  .identity { width: 100%; margin: 0; }
  .filters, .campaign-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .upload { grid-template-columns: minmax(0, 1fr); }
  .upload button { justify-self: start; }
}

.admin-nav { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.admin-fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.admin-fields button { justify-self: start; }
.admin-fields select { text-overflow: ellipsis; }
.admin-record { border-bottom: 1px solid var(--line); }
.admin-record summary { padding: 10px 4px; cursor: pointer; overflow-wrap: anywhere; }
.admin-record summary > * { margin-inline-end: 10px; }
.admin-record summary:hover, .admin-record[open] { background: var(--wash); }
.admin-record form, .admin-record p { padding: 6px 12px 16px; }
section > .admin-fields { margin-bottom: 16px; }
.audit-filters { margin: 24px 0 16px; }
.g_id_signin { min-height: 40px; }

.report-filters { display: flex; flex-wrap: wrap; align-items: flex-end; }
.report-filters > :not(button) { flex: 1 1 150px; }
.report-filters .report-unit { flex-basis: 235px; }
.report-filters input { min-width: 0; }
.report-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0; }
.report-total dd { margin: 0; font-variant-numeric: tabular-nums; }
.report-total strong { font-size: 28px; }
.report-chart { height: 258px; }
#report-days summary { padding-block: 4px; cursor: pointer; }
.report-daily { max-width: 360px; margin-top: 8px; }
.report-breakdown-campaign { min-width: 760px; }
.report-breakdown-creative { min-width: 1030px; }
.report-notes { margin-top: 22px; }
