:root {
  color-scheme: light;
  --bg: #f7f7f8;
  --surface: #ececee;
  --surface-soft: #e2e2e5;
  --surface-raised: #f7f7f8;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #98989d;
  --line: rgba(0, 0, 0, 0.07);
  --line-strong: rgba(0, 0, 0, 0.11);
  --accent: #1688ed;
  --accent-hover: #0878da;
  --accent-soft: rgba(22, 136, 237, 0.13);
  --danger: #ff3b30;
  --danger-soft: rgba(255, 59, 48, 0.1);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.025), 0 5px 16px rgba(0, 0, 0, 0.025);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.16);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --content-width: 1180px;
  --header-height: 68px;
  --nav-height: 66px;
  --control-height: 42px;
  --panel-padding: 16px;
  --section-gap: 12px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111214;
  --surface: #1c1d20;
  --surface-soft: #26272b;
  --surface-raised: #222327;
  --text: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-tertiary: #77777d;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.13);
  --accent: #2997ff;
  --accent-hover: #64b5ff;
  --accent-soft: rgba(41, 151, 255, 0.15);
  --danger: #ff453a;
  --danger-soft: rgba(255, 69, 58, 0.12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.16);
  --shadow-lg: 0 22px 70px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.52;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 2px;
}

.zz-shell {
  min-height: 100vh;
}

.zz-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: var(--header-height);
  padding: max(10px, env(safe-area-inset-top)) max(24px, calc((100vw - var(--content-width)) / 2));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

.zz-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.zz-brand-logo {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.zz-brand-title {
  overflow: hidden;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zz-icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.zz-icon-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.zz-icon-button:active {
  transform: scale(0.94);
}

.zz-theme-toggle {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.zz-theme-toggle:hover {
  border-color: transparent;
  background: var(--accent-soft);
}

.zz-theme-icon {
  width: 25px;
  height: 25px;
  fill: none;
  color: var(--accent);
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  transition: color 180ms ease, transform 180ms ease;
}

.zz-theme-icon-half {
  fill: currentColor;
  stroke: none;
}

html[data-theme="dark"] .zz-theme-icon {
  color: #f5f5f7;
  transform: rotate(180deg);
}

.zz-main {
  width: min(calc(100% - 48px), var(--content-width));
  margin: 0 auto;
  padding: 20px 0 calc(var(--nav-height) + 28px + env(safe-area-inset-bottom));
}

.zz-page {
  display: none;
  animation: zz-page-in 220ms ease both;
}

.zz-page.is-active {
  display: block;
}

@keyframes zz-page-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.zz-notice-panel,
.zz-upload-card,
.zz-query-card,
.zz-member-card,
.zz-form-card,
.zz-action-list,
.zz-help-card,
.zz-empty,
.zz-record-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.zz-notice-panel {
  margin-bottom: var(--section-gap);
  padding: 14px var(--panel-padding);
  border-radius: var(--radius-md);
}

.zz-notice-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 15px;
}

.zz-notice-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.zz-notice-list {
  color: var(--text-secondary);
  font-size: 13px;
}

.zz-notice-list p {
  margin: 3px 0 0;
}

.zz-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.zz-search {
  display: flex;
  min-width: 0;
  height: var(--control-height);
  flex: 1;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.zz-search span {
  color: var(--text-tertiary);
  font-size: 20px;
  line-height: 1;
}

.zz-search input,
.zz-query-line input,
.zz-field-list input,
.zz-field-list textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.zz-search input {
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.zz-search input::-webkit-search-cancel-button {
  opacity: 0.55;
}

.zz-search input::placeholder,
.zz-query-line input::placeholder,
.zz-field-list input::placeholder,
.zz-field-list textarea::placeholder {
  color: var(--text-tertiary);
}

.zz-query-line input:focus,
.zz-field-list input:focus,
.zz-field-list textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.zz-primary,
.zz-outline,
.zz-sign-btn {
  display: inline-flex;
  min-height: var(--control-height);
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 10px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.zz-primary,
.zz-sign-btn {
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
}

.zz-primary:hover,
.zz-sign-btn:hover {
  background: var(--accent-hover);
}

.zz-outline {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--accent);
}

.zz-outline:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.zz-primary:active,
.zz-outline:active,
.zz-sign-btn:active {
  filter: brightness(0.94);
}

.zz-primary.full {
  width: 100%;
}

.zz-primary.large {
  min-height: 46px;
  font-size: 15px;
}

.zz-outline.small {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.zz-chip-row {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  padding: 2px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.zz-chip-row::-webkit-scrollbar {
  display: none;
}

.zz-chip {
  min-height: 32px;
  flex: 0 0 auto;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.zz-chip:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.zz-chip.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.zz-upload-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: var(--radius-md);
}

.zz-upload-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 25px;
  font-weight: 300;
}

.zz-upload-body {
  min-width: 0;
  flex: 1;
}

.zz-upload-title {
  margin-bottom: 3px;
  font-size: 15px;
  font-weight: 650;
}

.zz-upload-desc {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zz-list,
.zz-record-list,
.zz-help-list {
  display: grid;
  gap: var(--section-gap);
}

.zz-app-card {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.zz-app-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

html[data-theme="dark"] .zz-app-card:hover {
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
}

.zz-app-icon {
  width: 60px;
  height: 60px;
  border: 1px solid var(--line);
  border-radius: 15px;
  object-fit: cover;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.1);
}

.zz-app-info {
  min-width: 0;
}

.zz-app-title-row {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 10px;
}

.zz-app-title-row h3 {
  overflow: hidden;
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zz-app-title-row span {
  flex: 0 0 auto;
  color: var(--text-tertiary);
  font-size: 12px;
}

.zz-app-meta {
  overflow: hidden;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zz-app-info p {
  display: -webkit-box;
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.zz-sign-btn {
  min-width: 76px;
  border-radius: 999px;
  font-weight: 600;
}

.zz-sign-btn.is-disabled {
  background: var(--surface-soft);
  color: var(--text-tertiary);
  pointer-events: none;
}

.zz-query-card,
.zz-form-card {
  margin-bottom: var(--section-gap);
  padding: var(--panel-padding);
  border-radius: var(--radius-md);
}

.zz-query-card > label,
.zz-form-card > label,
.zz-field-list > label {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.zz-query-line {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 6px;
}

.zz-query-line input {
  height: var(--control-height);
  flex: 1;
  padding: 0 12px;
}

.zz-record-card {
  padding: var(--panel-padding);
  border-radius: var(--radius-md);
}

.zz-record-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.zz-record-card p {
  margin: 4px 0;
  color: var(--text-secondary);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.zz-record-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.zz-record-actions a,
.zz-record-actions button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
}

.zz-record-actions button {
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
  background: transparent;
  color: var(--danger);
}

.zz-help-card {
  overflow: hidden;
  border-radius: var(--radius-md);
}

.zz-help-card h2 {
  margin: 0;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
}

.zz-help-card p {
  margin: 0;
  padding: 15px 18px 17px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-line;
}

.zz-member-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--section-gap);
  padding: var(--panel-padding);
  border-radius: var(--radius-md);
}

.zz-member-logo {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border: 1px solid var(--line);
  border-radius: 13px;
  object-fit: cover;
}

.zz-member-card > div {
  min-width: 0;
  flex: 1;
}

.zz-member-card h2 {
  margin: 0 0 3px;
  font-size: 17px;
}

.zz-member-card p {
  overflow: hidden;
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zz-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: var(--section-gap);
}

.zz-stat {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.zz-stat span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 12px;
}

.zz-stat strong {
  display: block;
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zz-form-card > label:not(:first-child) {
  margin-top: 14px;
}

.zz-action-list {
  overflow: hidden;
  border-radius: var(--radius-md);
}

.zz-action-list > a,
.zz-action-list > button {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.zz-action-list > :last-child {
  border-bottom: 0;
}

.zz-action-list > a:hover,
.zz-action-list > button:hover {
  background: var(--surface-soft);
}

.zz-action-list em {
  color: var(--text-tertiary);
  font-size: 20px;
  font-style: normal;
}

.zz-empty {
  padding: 42px 18px;
  border-radius: var(--radius-md);
  text-align: center;
}

.zz-empty.compact {
  padding-block: 34px;
}

.zz-empty-icon {
  position: relative;
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--surface-soft);
}

.zz-empty-icon::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid var(--text-tertiary);
  border-radius: 50%;
  content: "";
  transform: translate(-58%, -58%);
}

.zz-empty-icon::after {
  position: absolute;
  top: 29px;
  left: 28px;
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-tertiary);
  content: "";
  transform: rotate(45deg);
}

.zz-empty h2 {
  margin: 0 0 6px;
  font-size: 16px;
}

.zz-empty p {
  max-width: 520px;
  margin: 0 auto;
  color: var(--text-secondary);
}

.zz-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.zz-bottom-nav {
  position: fixed;
  z-index: 40;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  padding: 5px max(16px, calc((100vw - var(--content-width)) / 2)) env(safe-area-inset-bottom);
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.04);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
}

.zz-bottom-nav button {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
}

.zz-bottom-nav button:hover {
  color: var(--text);
}

.zz-bottom-nav button.is-active {
  color: var(--accent);
}

.zz-nav-mask {
  display: block;
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.zz-nav-home { -webkit-mask-image: url('../img/nav/nav-home.png'); mask-image: url('../img/nav/nav-home.png'); }
.zz-nav-records { -webkit-mask-image: url('../img/nav/nav-records.png'); mask-image: url('../img/nav/nav-records.png'); }
.zz-nav-help { -webkit-mask-image: url('../img/nav/nav-help.png'); mask-image: url('../img/nav/nav-help.png'); }
.zz-nav-member { -webkit-mask-image: url('../img/nav/nav-member.png'); mask-image: url('../img/nav/nav-member.png'); }

.zz-mask,
.zz-dialog-mask {
  position: fixed;
  z-index: 60;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.zz-sheet {
  position: fixed;
  z-index: 70;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, 720px);
  max-height: min(88vh, 920px);
  margin: auto;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  background: var(--surface-raised);
  box-shadow: var(--shadow-lg);
  transform: translateY(105%);
  transition: transform 240ms cubic-bezier(.2, .8, .2, 1);
}

.zz-sheet.is-open {
  transform: translateY(0);
}

.zz-sheet-handle {
  width: 42px;
  height: 5px;
  margin: 0 auto 10px;
  border-radius: 4px;
  background: var(--line-strong);
}

.zz-sheet-head,
.zz-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.zz-sheet-head {
  margin-bottom: 14px;
}

.zz-sheet-head h2,
.zz-dialog-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.zz-sheet-head p {
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.zz-sheet-head .zz-icon-button,
.zz-dialog-head .zz-icon-button {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  box-shadow: none;
  font-size: 22px;
}

.zz-segment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  border-radius: 13px;
  background: var(--surface-soft);
}

.zz-segment.zz-segment-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.zz-segment label {
  cursor: pointer;
}

.zz-segment input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.zz-segment span {
  display: grid;
  min-height: 34px;
  place-items: center;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.zz-segment input:checked + span {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.zz-sign-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.zz-sign-preview img {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  object-fit: cover;
}

.zz-field-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.zz-field-list > label:last-child,
.zz-field-list > .zz-field-udid,
.zz-field-list > .zz-field-exchange,
.zz-field-list > .zz-field-selfsign {
  grid-column: 1 / -1;
}

.zz-field-list input,
.zz-field-list textarea {
  display: block;
  min-height: 40px;
  margin-top: 6px;
  padding: 9px 11px;
  resize: vertical;
}

.zz-field-list textarea {
  min-height: 72px;
}

.zz-field-list input[type="file"] {
  height: auto;
  padding: 9px;
  font-size: 13px;
}

.zz-field-is-hidden {
  display: none !important;
}

.zz-udid-line,
.zz-exchange-line {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.zz-udid-line input,
.zz-exchange-line input {
  min-width: 0;
  flex: 1;
}

.zz-udid-get,
.zz-buy-cert {
  min-height: 40px;
  flex: 0 0 auto;
  padding-inline: 14px;
}

.zz-dialog {
  position: fixed;
  z-index: 80;
  top: 50%;
  left: 50%;
  width: min(calc(100% - 32px), 520px);
  max-height: min(78vh, 720px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, -50%);
}

.zz-dialog-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.zz-dialog-body {
  max-height: calc(min(78vh, 720px) - 72px);
  padding: 16px;
  overflow-y: auto;
  color: var(--text-secondary);
  line-height: 1.75;
  white-space: pre-line;
}

.zz-cert-download-tip {
  margin: 0 0 14px;
}

.zz-cert-actions {
  display: flex;
  gap: 10px;
}

.zz-cert-actions > * {
  flex: 1;
}

.zz-toast {
  position: fixed;
  z-index: 100;
  top: calc(max(14px, env(safe-area-inset-top)) + 4px);
  left: 50%;
  display: flex;
  max-width: min(calc(100% - 28px), 380px);
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(36, 36, 38, 0.94);
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  animation: zz-toast-in 180ms ease-out both;
}

.zz-toast::before {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(41, 151, 255, 0.14);
  content: "";
}

@keyframes zz-toast-in {
  from { opacity: 0; transform: translate(-50%, -7px) scale(0.98); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@media (max-width: 700px) {
  :root {
    --header-height: 60px;
    --nav-height: 58px;
    --radius-md: 14px;
    --control-height: 40px;
    --panel-padding: 13px;
    --section-gap: 10px;
  }

  .zz-header {
    padding-right: 14px;
    padding-left: 14px;
  }

  .zz-brand-logo {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 9px;
  }

  .zz-brand-title {
    font-size: 16px;
  }

  .zz-icon-button {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .zz-main {
    width: calc(100% - 24px);
    padding-top: 14px;
  }

  .zz-toolbar {
    gap: 8px;
  }

  .zz-search {
    height: var(--control-height);
    padding-inline: 12px;
  }

  .zz-toolbar .zz-primary {
    min-height: var(--control-height);
    padding-inline: 13px;
  }

  .zz-upload-card {
    gap: 10px;
    padding: 12px;
  }

  .zz-upload-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 10px;
  }

  .zz-upload-card .zz-outline {
    padding-inline: 12px;
  }

  .zz-app-card {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 0;
    padding: 12px;
  }

  .zz-app-icon {
    width: 52px;
    height: 52px;
    border-radius: 13px;
  }

  .zz-sign-btn {
    grid-column: auto;
    width: auto;
    min-width: 64px;
    min-height: 36px;
    padding-inline: 12px;
    font-size: 13px;
  }

  .zz-app-info p {
    -webkit-line-clamp: 1;
  }

  .zz-help-card h2,
  .zz-help-card p {
    padding-right: 14px;
    padding-left: 14px;
  }

  .zz-help-card h2 {
    padding-block: 13px;
    font-size: 14px;
  }

  .zz-help-card p {
    padding-block: 13px 15px;
    font-size: 12px;
  }

  .zz-query-card,
  .zz-form-card {
    padding: var(--panel-padding);
  }

  .zz-query-line {
    gap: 8px;
  }

  .zz-query-line .zz-primary {
    padding-inline: 13px;
  }

  .zz-member-card {
    padding: var(--panel-padding);
  }

  .zz-stat {
    padding: 12px;
  }

  .zz-stat strong {
    font-size: 15px;
  }

  .zz-bottom-nav {
    padding-right: 6px;
    padding-left: 6px;
  }

  .zz-nav-mask {
    width: 19px;
    height: 19px;
  }

  .zz-sheet {
    padding-right: 14px;
    padding-left: 14px;
  }

  .zz-field-list {
    grid-template-columns: 1fr;
  }

  .zz-field-list > label,
  .zz-field-list > label:last-child,
  .zz-field-list > .zz-field-udid,
  .zz-field-list > .zz-field-exchange,
  .zz-field-list > .zz-field-selfsign {
    grid-column: auto;
  }

  .zz-udid-line,
  .zz-exchange-line {
    align-items: flex-end;
    flex-direction: row;
  }

  .zz-udid-get,
  .zz-buy-cert {
    min-height: 40px;
  }
}

@media (max-width: 420px) {
  .zz-upload-desc {
    white-space: normal;
  }

  .zz-cert-actions {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
