:root {
  color-scheme: light dark;
  --paper: #f3f4f6;
  --card: #fffefd;
  --group: #f0f2f4;
  --input: #fff;
  --ink: #262e39;
  --muted: #53606c;
  --hint: #626e79;
  --line: #d9dfe5;
  --field-line: #82909c;
  --green: #21573f;
  --on-green: #fff;
  --action-ink: #28583f;
  --wash: #e8efe4;
  --on-action: #fff;
  --info-ink: #305a80;
  --info-wash: #eaf2fa;
  --danger: #9d342b;
  --danger-wash: #fbeee9;
  --gold: #ae6d38;
  --draft-ink: #614b7d;
  --draft-wash: #f0eaf7;
  --live-ink: #2e6044;
  --live-wash: #e5f0e5;
  --pending-ink: #77501d;
  --pending-wash: #faedcf;
  --hero: #e1eadb;
  --hero-light: #faecd9;
  --hero-ink: #284a36;
  --soft-shadow: 0 1px 3px rgb(36 58 39 / 6%);
  --bar: rgb(255 254 252 / 94%);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #181c21;
    --card: #22272e;
    --group: #2c323a;
    --input: #1e232a;
    --ink: #edf0f4;
    --muted: #bdc6d0;
    --hint: #aab5c0;
    --line: #404852;
    --field-line: #75828e;
    --green: #acd9ae;
    --on-green: #12321e;
    --action-ink: #b5dbb5;
    --wash: #2b3c2e;
    --on-action: #19202a;
    --info-ink: #b9d8fb;
    --info-wash: #27384b;
    --danger: #ffaaa1;
    --danger-wash: #432c29;
    --gold: #e0ac74;
    --draft-ink: #ddc9f1;
    --draft-wash: #3c3248;
    --live-ink: #b8e1bd;
    --live-wash: #294334;
    --pending-ink: #f1ce8e;
    --pending-wash: #423622;
    --hero: #2b3c2f;
    --hero-light: #433b31;
    --hero-ink: #e1eddc;
    --soft-shadow: 0 1px 3px rgb(0 0 0 / 12%);
    --bar: rgb(33 38 45 / 94%);
  }
}

/* Shared by the navigation entry, its page, and dialogs opened outside that page. */
:where(#module-life-stories, [data-module="life-stories"], .story-dialog, .image-picker,
       .subscription-service, #subscription-dialog, .system-row:has(#configure-story-ai)) {
  --action-ink: light-dark(#674891, #d4b7f2);
  --wash: light-dark(#f3eef9, #332c40);
}
:where(#module-users, [data-module="users"], [data-system-page="wechat"], .login-service,
       #integration-dialog:has(#wechat-fields:not([hidden]))) {
  --action-ink: light-dark(#285988, #a8cffa);
  --wash: light-dark(#eef4fb, #253345);
}
:where(#module-system, [data-module="system"], #weather-dialog, #integration-dialog:has(#cos-fields:not([hidden]))) {
  --action-ink: light-dark(#21686e, #9edade);
  --wash: light-dark(#e9f4f3, #233839);
}
:where(#module-ads, [data-module="ads"]) {
  --action-ink: light-dark(#924c2f, #f1bb9d);
  --wash: light-dark(#faf0e9, #40312c);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p { margin: 0; }
body { min-width: 0; }
button, input, textarea, select { font: inherit; }
button {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  color: inherit;
  background: transparent;
  transition: background-color 140ms ease, color 140ms ease, transform 100ms ease;
  -webkit-tap-highlight-color: transparent;
}
button:disabled { opacity: .45; cursor: default; }
:where(button, input, textarea, select, a, [tabindex]):focus-visible {
  outline: 3px solid var(--action-ink);
  outline-offset: 3px;
}
h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.18;
  font-weight: 720;
  letter-spacing: -.045em;
}
h2 { font-size: clamp(1.2rem, 1.6vw, 1.4rem); line-height: 1.32; font-weight: 690; letter-spacing: -.025em; }
h3 { font-size: 1rem; font-weight: 650; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--bar);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(10px)) {
  .topbar { backdrop-filter: blur(10px); }
}
.topinner, main {
  max-width: 1232px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 56px);
}
.topinner, .brand, .account, .toolbar, .pager, .pager > div, .edit-heading, .choice-top,
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topinner, .pager, .toolbar, .choice-top, .dialog-actions { justify-content: space-between; }
.topinner { min-height: 64px; }
.brand, .account { min-width: 0; }
.brand img { border-radius: 12px; }
.brand strong { font-size: 1.05rem; letter-spacing: -.025em; white-space: nowrap; }
.brand span { padding-left: 12px; border-left: 1px solid var(--field-line); }
.brand span, .account, .note, .intro { color: var(--muted); }
.brand span, .account { font-size: .85rem; }
.account span { max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.primary, .secondary, .text-button {
  min-height: 44px;
  padding: 8px 16px;
  font-size: .91rem;
  line-height: 1.35;
  font-weight: 650;
}
.primary { background: var(--action-ink); color: var(--on-action); box-shadow: var(--soft-shadow); }
.secondary { border: 1px solid var(--field-line); background: var(--card); color: var(--action-ink); }
.text-button { color: var(--action-ink); padding-inline: 8px; }
.primary:disabled, .secondary:disabled {
  opacity: 1;
  color: var(--muted);
  background: var(--group);
  border: 1px dashed var(--line);
  box-shadow: none;
}
.danger, .choice-top .text-button { color: var(--danger); }
.wide { display: block; width: 100%; }
button:is(.primary, .secondary):active:not(:disabled) { transform: scale(.985); }
@media (hover: hover) {
  .primary:hover:not(:disabled) { background: color-mix(in srgb, var(--action-ink), var(--ink) 18%); }
  .secondary:hover:not(:disabled), .text-button:hover:not(:disabled) { background: var(--wash); }
  button.danger:hover:not(:disabled), .choice-top .text-button:hover:not(:disabled) { background: var(--danger-wash); }
}

.center-message { padding: 16vh 0; text-align: center; color: var(--muted); }
.login-layout {
  margin: clamp(32px, 7vh, 80px) auto 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: min(600px, 74vh);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--soft-shadow);
}
.cover {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--hero-light), var(--hero));
  color: var(--hero-ink);
}
.cover { min-height: 496px; padding: clamp(32px, 4vw, 60px); }
.cover h1 {
  position: relative;
  z-index: 1;
  font: 650 clamp(3rem, 5.1vw, 4.6rem)/1.2 'Songti SC', 'STSong', serif;
  letter-spacing: -.06em;
}
.title-dot { color: var(--gold); }
.diorama { position: absolute; right: 5%; bottom: 5%; width: 86%; }
.house { width: 100%; display: block; }
.kid { position: absolute; bottom: 9.5%; left: 48%; width: 19%; }
.login-panel { display: grid; align-items: center; padding: clamp(28px, 5vw, 72px); }
.login-panel form { width: 100%; max-width: 380px; margin: auto; }
.login-panel h2 { font-size: clamp(1.9rem, 3vw, 2.35rem); letter-spacing: -.045em; }
.intro { font-size: .94rem; margin: 8px 0 32px; }
.login-panel label, .form-section label {
  display: block;
  font-size: .89rem;
  font-weight: 600;
  margin: 16px 0 8px;
}
input, select, textarea {
  max-width: 100%;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--field-line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--input);
  color: var(--ink);
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--hint); opacity: 1; }
select:disabled { color: var(--muted); background: var(--group); }
.price, .version, .pager, #body-size { font-variant-numeric: tabular-nums; }
.login-panel .primary { margin-top: 24px; display: flex; justify-content: space-between; padding: 12px 16px; }
.feedback {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--info-wash);
  color: var(--info-ink);
  font-size: .875rem;
  overflow-wrap: anywhere;
}
.feedback.error { background: var(--danger-wash); color: var(--danger); }
.feedback.success { background: var(--live-wash); color: var(--live-ink); }
.feedback.pending { background: var(--pending-wash); color: var(--pending-ink); }
.feedback.neutral { background: var(--group); color: var(--muted); }

.workspace { padding-block: clamp(24px, 3.6vw, 44px) 64px; }
.sheet { border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: var(--soft-shadow); }
.toolbar { flex-wrap: wrap; margin-bottom: 16px; }

.name { font-weight: 640; line-height: 1.45; overflow-wrap: anywhere; }
.arrow { justify-self: end; color: var(--hint); font-size: 1.25rem; }
.status-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.badge, .unsaved {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  justify-self: start;
  width: max-content;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.badge { background: var(--group); color: var(--muted); }
.badge::before { content: ''; flex: none; width: 6px; height: 6px; border: 1.5px solid currentColor; border-radius: 50%; }
.badge.draft { background: var(--draft-wash); color: var(--draft-ink); }
.badge.draft::before { border-radius: 1px; }
.badge.error { background: var(--danger-wash); color: var(--danger); }
.badge.error::before { border-radius: 1px; background: currentColor; }
.badge.live { background: var(--live-wash); color: var(--live-ink); }
.badge.live::before { background: currentColor; }
.badge.pending, .unsaved { background: var(--pending-wash); color: var(--pending-ink); }
.badge.pending::before { border-radius: 2px; transform: rotate(45deg); background: currentColor; }

.empty { padding: 48px 12px; color: var(--muted); text-align: center; }
.pager { flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
.pager > div { gap: 8px; font-size: .82rem; color: var(--muted); }
.pager .secondary { padding: 6px 12px; }
.back { margin: 0 0 8px -8px; }
.edit-heading { flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.edit-heading h1 { font-size: clamp(1.9rem, 3.6vw, 2.65rem); overflow-wrap: anywhere; margin-right: 4px; }
.edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(248px, 29%); align-items: start; gap: 20px; }
.edit-main, .edit-aside { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.edit-aside { position: sticky; top: 80px; }
.form-section { padding: clamp(20px, 2.4vw, 28px); min-width: 0; }
.note { font-size: .84rem; line-height: 1.6; margin-top: 8px; overflow-wrap: anywhere; }
.choice { background: var(--group); border-radius: 12px; margin-top: 16px; padding: 12px 16px; }
.choice:last-child { margin-bottom: 16px; }
.choice-top h3 { color: var(--action-ink); }
.choice-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(96px, 28%); gap: 12px; }
.choice-fields label, .choice > label { margin-top: 8px; margin-bottom: 0; }
.choice label :is(input, textarea) { margin-top: 4px; font-weight: 400; }
.actions :is(.primary, .secondary, .danger) { width: 100%; margin-top: 12px; }
.actions .danger { margin-top: 16px; border: 1px solid var(--danger); color: var(--danger); }
dialog {
  max-width: min(640px, calc(100% - 32px));
  width: 100%;
  max-height: min(80vh, 720px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--soft-shadow);
}
dialog::backdrop { background: rgb(17 24 34 / 52%); }
dialog :is(.service-heading, .art-dialog-heading, .image-picker-header, .image-picker-filters) {
  background: var(--wash);
}
dialog :is(.service-heading, .art-dialog-heading, .image-picker-header) h2 { color: var(--action-ink); }
dialog p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 12px 0; }
.dialog-actions { flex-wrap: wrap; margin-top: 20px; }
.dialog-actions button { flex: 1 1 auto; }

@media (max-width: 760px) {
  .edit-grid { grid-template-columns: minmax(0, 1fr); }
  .edit-aside, .topbar { position: static; }
  .topinner { min-height: 60px; }
  .brand { gap: 8px; }
  .brand img { width: 32px; height: 32px; }
  .brand span { display: none; }
  .account { gap: 4px; }
  .account span { max-width: 9ch; }
  .login-layout { grid-template-columns: minmax(0, 1fr); max-width: 520px; min-height: auto; margin: 24px auto 40px; }
  .cover { min-height: 184px; padding: 24px; }
  .cover h1 { max-width: 56%; font-size: clamp(2rem, 5.8vw, 3rem); }
  .diorama { width: 41%; right: 4%; bottom: 8%; }
  .login-panel { padding: 24px; }
  .intro { margin-bottom: 20px; }

}
@media (max-width: 440px) {
  .topinner, main { padding-inline: 16px; }
  .account .text-button { padding-inline: 4px; font-size: .82rem; }
  .cover { min-height: 156px; }
  .login-panel { padding: 24px 20px; }
  .toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .toolbar .primary { padding-inline: 12px; }
  .form-section { padding: 16px; }
  .choice { padding: 12px; }
  .choice-fields { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .dialog-actions { align-items: stretch; flex-direction: column; }
}
@media (max-width: 350px) {
  .toolbar { grid-template-columns: minmax(0, 1fr); }
  .toolbar .primary { justify-self: end; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
  button:is(.primary, .secondary):active:not(:disabled) { transform: none; }
}

/* Desktop console navigation and account/configuration forms use the existing iOS surface tokens. */
.module-panel {
  scroll-margin-top: 75px;
}
.module-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0 22px;
}
.module-heading h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
}
.searchbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.searchbar label {
  min-width: 125px;
  margin: 0;
}
.searchbar label:first-child {
  flex: 1 1 200px;
}
.searchbar :is(input, select) {
  margin-top: 6px;
}
.user-list-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.user-row {
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 2fr) 88px minmax(145px, 1fr) 16px;
  gap: 12px;
  align-items: center;
  border-radius: 0;
  padding: 15px 6px;
}
.user-row:hover {
  background: var(--group);
}
.user-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.user-avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--group);
  color: var(--muted);
  font-size: .7rem;
  vertical-align: middle;
}
.user-avatar img {
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  object-fit: cover;
}
.identity-labels {
  min-width: 0;
}
.user-row :is(.name, .user-note, .id-copy) {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-note {
  font-size: .84rem;
  color: var(--muted);
}
.user-weather { display: block; margin-top: 3px; font-size: .82rem; color: var(--muted); line-height: 1.5; }
.user-row .cell {
  display: block;
}
.id-copy {
  font:
    0.82rem/1.6 ui-monospace,
    monospace;
  overflow-wrap: anywhere;
  color: var(--muted);
}
.info-list {
  margin: 12px 0 0;
}
.info-list > div,
.record-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.info-list dt {
  flex-shrink: 0;
}
.info-list dt,
.record-row small {
  color: var(--muted);
  font-size: 0.84rem;
}
.info-list dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
  min-width: 0;
}
.record-row span,
.record-row small {
  display: block;
}
.record-row strong {
  text-align: right;
  white-space: nowrap;
}
.record-row span {
  overflow-wrap: anywhere;
}
.ledger-total {
  font-size: 1.65rem;
  letter-spacing: -0.03em;
  color: var(--live-ink);
  font-variant-numeric: tabular-nums;
}
.config-form {
  max-width: 760px;
}
.form-section label.switch-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
  margin: 8px 0;
  border-bottom: 1px solid var(--line);
}
.switch-row small {
  display: block;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--muted);
}
.switch-row input {
  appearance: none;
  flex: 0 0 auto;
  width: 48px;
  height: 29px;
  min-height: 29px;
  border-radius: 18px;
  border: 1px solid var(--field-line);
  background: var(--group);
  position: relative;
  cursor: pointer;
  padding: 0;
  margin: 0;
}
.switch-row input:before {
  content: '';
  display: block;
  position: absolute;
  left: 3px;
  top: 3px;
  width: 21px;
  height: 21px;
  background: var(--field-line);
  border-radius: 50%;
}
.switch-row input:checked {
  background: var(--green);
  border-color: var(--green);
}
.switch-row input:checked:before {
  background: var(--on-green);
  left: 22px;
}
#cos-clear-token:checked { background: var(--danger); border-color: var(--danger); }
.config-save {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 17px;
}
#note-form .primary {
  margin: 10px 0 6px;
}
#toggle-account.danger {
  color: var(--danger);
}
@media (max-width: 760px) {
  .user-row {
    grid-template-columns: minmax(0, 1fr) auto 12px;
  }
  .user-last-login {
    display: none !important;
  }
  .module-panel .edit-aside {
    position: static;
  }
  .record-row {
    align-items: flex-start;
  }
  .searchbar .primary {
    margin-left: auto;
  }
}


.subscription-fields { min-width: 0; border: 0; border-top: 1px solid var(--line); padding: 0; margin: 20px 0; }
.user-batch { padding-block: 14px; border-block: 1px solid var(--line); }
.user-batch h2 { margin: 0 0 4px; }
.user-batch-actions, .user-batch-selection { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.user-batch-actions { margin-top: 10px; }
.user-batch-selection { margin-top: 6px; }
.user-batch-selection label, .user-list-entry .user-batch-check { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; margin: 0; cursor: pointer; }
.user-list-entry .user-batch-check { justify-content: center; min-width: 32px; }
.user-batch-selection input, .user-batch-check input { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; accent-color: var(--action-ink); }
#user-batch-result { white-space: pre-line; }
.user-today { grid-column: 2 / -1; min-width: 0; padding: 0 6px 6px; }
.user-today summary { width: fit-content; padding-block: 8px; color: var(--action-ink); cursor: pointer; font-weight: 600; }
.user-today-list { margin: 6px 0; padding-inline-start: 22px; overflow-wrap: anywhere; }
.user-today-list li { padding-block: 5px; }
.user-today-list .badge { margin-inline-end: 6px; }
.user-today-list small { display: block; margin-top: 2px; }
@media (max-width: 460px) {
  .user-list-entry { gap: 3px; }
}
.subscription-fields legend { padding-right: 8px; font-weight: 650; }
.subscription-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(95px, 28%); align-items: start; gap: 12px; padding-block: 12px; border-top: 1px solid var(--line); }
#subscription-rows label { margin: 0; }
.subscription-row small { display: block; margin-top: 4px; color: var(--muted); font-size: .82rem; font-weight: 400; }
.integration-form label:not(.clear-token) {
  display: block;
  margin: 13px 0 4px;
  font-size: .9rem;
  font-weight: 600;
}
.integration-form input[readonly] { background: var(--group); color: var(--muted); }
#ai-text-model-presets button[aria-pressed="true"] { background: var(--wash); border-color: var(--action-ink); }
.integration-form .clear-token { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block: 14px; }
.integration-form .note { margin-block: 9px; }
.cos-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
}
.cos-addresses {
  margin: 14px 0;
  padding: 12px;
  border-radius: 12px;
  background: var(--group);
  font-size: .85rem;
}
.cos-addresses > div + div { margin-top: 8px; }
.cos-addresses dt, #cos-test-steps small { color: var(--muted); }
.cos-addresses dd { margin: 2px 0 0; overflow-wrap: anywhere; }
#cos-test-steps { list-style: none; padding: 0; margin: 0; }
#cos-test-steps li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding-block: 6px;
  border-bottom: 1px solid var(--line);
  font-size: .9rem;
}
#cos-test-steps small { grid-column: 1 / -1; overflow-wrap: anywhere; }
#cos-test-steps [data-status="passed"] strong { color: var(--live-ink); }
#cos-test-steps [data-status="failed"] strong { color: var(--danger); }
#cos-test-steps [data-status="skipped"] strong { color: var(--muted); }
@media (max-width: 600px) {
  .cos-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Keep the action for the current service in view while its fields scroll. */
dialog.service-dialog {
  --dialog-inset: clamp(16px, 3vw, 28px);
  width: min(600px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: hidden;
  box-shadow: 0 18px 64px rgb(16 35 25 / 18%);
}
.service-dialog > form {
  display: flex;
  flex-direction: column;
  max-height: min(784px, calc(100vh - 28px));
  max-height: min(784px, calc(100dvh - 28px));
}
.service-dialog .service-heading {
  flex: none;
  padding: 20px var(--dialog-inset) 16px;
  border-bottom: 1px solid var(--line);
}
.service-dialog .service-heading .note { margin: 4px 0 0; }
.service-dialog .service-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 16px var(--dialog-inset);
  scroll-padding-block: 16px;
}
.service-body > :first-child,
.service-body > div:first-child > :first-child { margin-top: 0; }
.service-context {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--group);
  color: var(--ink);
  font-size: .875rem;
}
.service-field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.service-dialog .service-disclosure {
  margin: 16px 0 0;
  padding-inline: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.service-dialog details[open] { padding-bottom: 12px; }
.service-dialog details summary {
  cursor: pointer;
  padding-block: 12px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--action-ink);
}
.service-subheading { margin: 20px 0 0; }
.service-dialog .service-footer {
  flex: none;
  padding: 12px var(--dialog-inset);
  border-top: 1px solid var(--line);
  background: var(--card);
}
.service-footer .dialog-actions {
  justify-content: flex-end;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0;
}
.service-footer .dialog-actions button { flex: 0 1 auto; }
.service-footer .feedback, .service-footer #cos-test-hint {
  margin: 0 0 8px;
  max-height: 20vh;
  overflow-y: auto;
}
.service-dialog #cos-test-steps:not(:empty) { margin-top: 16px; }
.service-dialog :is(input, select)[aria-invalid="true"] { border-color: var(--danger); }
@media (max-width: 600px) {
  .service-dialog .service-heading { padding-block: 14px 12px; }
  .service-field-pair { gap: 8px; }
  .service-footer .dialog-actions .primary { flex: 1; }
}
