.ad-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ad-stat {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 16px;
  border-radius: 22px;
  background: var(--card);
}

.ad-stat b {
  font-weight: 600;
  font-size: clamp(18px, 5.4vw, 22px);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-stat-label {
  color: var(--hint);
  font-size: 13.5px;
}

.ad-stat-sub {
  color: var(--hint);
  font-size: 12.5px;
  opacity: .85;
}

.ad-count {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--warn);
  color: #000;
  font-weight: 700;
  font-size: 13px;
  line-height: 24px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.ad-line {
  display: grid;
  gap: 12px;
}

.ad-line-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ad-line .chip {
  justify-self: start;
}

.ad-input {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--fill);
  font-size: 14.5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ad-input .hint {
  font-size: 12px;
}

.ad-lines {
  display: grid;
  gap: 14px;
}

.ad-line-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ad-line-row + .ad-line-row {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.ad-line-row .ad-input {
  margin-top: 8px;
}

.ad-order .row-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ad-order .row-end {
  color: var(--text);
  font-weight: 600;
}

.seg {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  height: 40px;
  padding: 3px;
  border-radius: 999px;
  background: var(--card);
}

.seg::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / var(--n));
  border-radius: 999px;
  background: var(--card-2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
  transform: translateX(calc(100% * var(--i)));
  transition: transform .42s cubic-bezier(.34, 1.36, .5, 1);
}

:root[data-theme="light"] .seg::before {
  background: #fff;
}

.seg button {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 0;
  text-align: center;
  border-radius: 999px;
  color: var(--hint);
  font-weight: 600;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .2s var(--ease);
}

.seg button.is-on {
  color: var(--text);
}

.ad-user {
  display: grid;
  gap: 14px;
}

.ad-user-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar.sm {
  width: 48px;
  height: 48px;
  font-size: 20px;
  box-shadow: none;
}

.ad-kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 16px;
  font-size: 14.5px;
}

.ad-kv span {
  color: var(--hint);
}

.ad-kv b {
  justify-self: end;
  font-weight: 600;
  text-align: right;
}

.ad-cat {
  margin-left: calc(var(--depth, 0) * 12px);
}

.ad-cat .sec-head .h2 {
  font-size: 17px;
}

.row.is-muted {
  opacity: .5;
}

.ad-form {
  display: grid;
  gap: 14px;
}

.ad-field {
  display: grid;
  gap: 6px;
}

.ad-field > span {
  padding-left: 4px;
  color: var(--hint);
  font-size: 13px;
}

.ad-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.field.area {
  height: auto;
  min-height: 120px;
  padding: 14px 16px;
  resize: vertical;
  line-height: 1.45;
  font-family: var(--font);
}

.tgl-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  cursor: pointer;
}

.tgl {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: none;
  width: 51px;
  height: 31px;
  margin: 0;
  border-radius: 999px;
  background: var(--fill-2);
  transition: background .25s var(--ease);
  cursor: pointer;
}

.tgl::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .25);
  transition: transform .32s cubic-bezier(.34, 1.4, .5, 1);
}

.tgl:checked {
  background: var(--success);
}

.tgl:checked::after {
  transform: translateX(20px);
}

.sheet-body > .field,
.sheet-body > .field.area {
  margin-top: 4px;
}
