:root {
  --bg: #f5f7fa;
  --bg-deep: #eef2f7;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --muted-light: #94a3b8;
  --line: #e5e9f0;
  --line-strong: #d8dee8;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff5ff;
  --danger: #dc2626;
  --danger-soft: #fff1f2;
  --success: #15803d;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.07), 0 2px 8px rgba(15, 23, 42, 0.035);
  --shadow-small: 0 8px 24px rgba(15, 23, 42, 0.08);
  --radius: 20px;
  --radius-small: 10px;
  --workspace-height: clamp(500px, 62vh, 580px);
  color-scheme: light;
  font-family:
    "Inter", "SF Pro Text", "PingFang SC", "Microsoft YaHei", "Noto Sans SC",
    sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -20%, rgba(37, 99, 235, 0.07), transparent 36%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button,
a,
input,
textarea,
select {
  outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

::selection {
  color: #fff;
  background: var(--primary);
}

.page {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(62px, 11.7vh, 118px) 20px 48px;
}

.page.page-auth {
  align-items: center;
  padding-block: 48px;
}

.page.page-dashboard {
  padding: clamp(18px, 4vh, 42px) 20px 22px;
}

.card {
  position: relative;
  width: min(100%, 720px);
  overflow: hidden;
  padding: 36px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: card-enter 360ms ease-out both;
}

.auth-card {
  min-height: 348px;
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-heading {
  margin: 0 0 7px;
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.7px;
}

.auth-subtitle {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
}

.auth-form {
  width: min(100%, 356px);
  margin: 30px auto 0;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0 0 16px -4px;
  padding: 3px 4px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 650;
}

.auth-back:hover {
  color: var(--primary);
}

.auth-back svg {
  width: 15px;
  height: 15px;
}

.auth-switch {
  margin: 17px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.auth-switch button {
  padding: 2px 3px;
  border: 0;
  color: var(--primary);
  background: transparent;
  font: inherit;
  font-weight: 700;
}

.auth-switch button:hover {
  text-decoration: underline;
}

.version-label {
  margin: 11px 0 0;
  color: var(--muted-light);
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.3px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.tab-button {
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  color: #27364a;
  background: var(--surface);
  font-size: 15px;
  font-weight: 700;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.tab-button:hover {
  border-color: #b9c4d3;
  background: #fbfcfe;
}

.tab-button.active {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
  box-shadow: 0 7px 18px rgba(37, 99, 235, 0.2);
}

.field-stack {
  display: grid;
  gap: 10px;
}

.field {
  display: grid;
  gap: 7px;
}

.field-label {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.username-status {
  min-height: 15px;
  color: var(--muted-light);
  font-size: 10px;
  line-height: 1.5;
}

.username-status[data-state="available"] {
  color: var(--success);
}

.username-status[data-state="taken"],
.username-status[data-state="reserved"] {
  color: var(--danger);
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  color: var(--text);
  background: #fff;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.input,
.select {
  height: 48px;
  padding: 0 13px;
}

.textarea {
  min-height: 112px;
  padding: 12px 13px;
  line-height: 1.7;
  resize: none;
}

.input::placeholder,
.textarea::placeholder {
  color: #9aa6b5;
}

.input:hover,
.textarea:hover,
.select:hover {
  border-color: #c4cdda;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.input.invalid,
.textarea.invalid {
  border-color: #ef4444;
  background: #fffafa;
}

.form-error {
  min-height: 20px;
  margin: 1px 0 -2px;
  color: var(--danger);
  font-size: 12px;
  line-height: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  transition:
    transform 150ms ease,
    color 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.button:active:not(:disabled) {
  transform: translateY(1px);
}

.button svg {
  width: 16px;
  height: 16px;
}

.button-primary {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
  box-shadow: 0 7px 16px rgba(37, 99, 235, 0.16);
}

.button-primary:hover:not(:disabled) {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
  box-shadow: 0 9px 20px rgba(37, 99, 235, 0.22);
}

.button-secondary {
  border-color: var(--line);
  color: #334155;
  background: #fff;
}

.button-secondary:hover:not(:disabled) {
  border-color: #cdd5e1;
  background: #f8fafc;
}

.button-danger {
  border-color: #f5d4d7;
  color: var(--danger);
  background: #fff;
}

.button-danger:hover:not(:disabled) {
  border-color: #f0b8bd;
  background: var(--danger-soft);
}

.button-danger-solid {
  border-color: var(--danger);
  color: #fff;
  background: var(--danger);
}

.button-danger-solid:hover:not(:disabled) {
  border-color: #b91c1c;
  background: #b91c1c;
}

.button-block {
  width: 100%;
  margin-top: 14px;
}

.button-wide {
  flex: 1;
}

.button-small {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 650;
}

.text-button {
  padding: 3px;
  border: 0;
  color: var(--primary);
  background: transparent;
  font-size: 12px;
  font-weight: 650;
}

.text-button:hover {
  text-decoration: underline;
}

.auth-note {
  margin: 16px 0 0;
  color: var(--muted-light);
  text-align: center;
  font-size: 11px;
  line-height: 1.6;
}

.auth-note.admin-note {
  color: #315daf;
  font-weight: 650;
}

.dashboard-card {
  min-height: min(700px, calc(100vh - 64px));
}

.card.dashboard-wide {
  width: min(100%, 1120px);
}

.dashboard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 40px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.dashboard-session-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.account {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: #475569;
  font-size: 13px;
}

.avatar {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #dce6fb;
  border-radius: 8px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 800;
}

.account-name {
  overflow: hidden;
  color: var(--text);
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-pill,
.account-role {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 2px 7px;
  border: 1px solid #dbe7ff;
  border-radius: 999px;
  color: #315da8;
  background: #f2f7ff;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.35;
  white-space: nowrap;
}

.account-role.admin {
  border-color: #d8ccff;
  color: #6d40c7;
  background: #f7f3ff;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 6px;
  border: 1px solid #f5d7a6;
  border-radius: 999px;
  color: #a16207;
  background: #fffbeb;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-tabs {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.dashboard-tabs .tab-button {
  min-width: 112px;
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.view {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding-top: 28px;
}

.workspace-view {
  padding-top: 18px;
}

.workspace-panel {
  display: flex;
  width: 100%;
  min-height: var(--workspace-height);
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0, rgba(37, 99, 235, 0.035), transparent 42%),
    #fbfcfe;
}

.manage-view {
  padding-top: 22px;
}

.manage-split {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: stretch;
  height: var(--workspace-height);
  gap: 20px;
}

.manage-pane {
  display: flex;
  height: 100%;
  min-height: var(--workspace-height);
  max-height: var(--workspace-height);
  flex-direction: column;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.composer-pane {
  background:
    radial-gradient(circle at 0 0, rgba(37, 99, 235, 0.045), transparent 42%),
    #fff;
}

.links-pane {
  background: #fbfcfe;
}

.composer-pane .composer {
  flex: 1;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: stretch;
  margin-top: 16px;
  gap: 12px;
}

.composer-pane .notes {
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-color: #cbd5e1 transparent;
  scrollbar-width: thin;
}

.composer-pane .notes .note-card {
  min-height: 100%;
  grid-template-rows: auto minmax(0, 1fr);
}

.composer-pane .notes:has(.note-card + .note-card) .note-card {
  min-height: 240px;
}

.composer-pane .note-body {
  height: 100%;
  min-height: 240px;
  resize: none;
}

.edit-heading-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.edit-heading-row .view-heading {
  margin-bottom: 7px;
}

.top-save {
  min-height: 38px;
  margin-bottom: 7px;
  margin-left: auto;
  padding-inline: 16px;
}

.edit-back {
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin-bottom: 7px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: #475569;
  background: #fff;
  font-size: 21px;
  line-height: 1;
}

.edit-back:hover {
  border-color: #b9cdf5;
  color: var(--primary);
  background: var(--primary-soft);
}

.preview-heading-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.preview-heading-row .view-heading {
  margin-bottom: 5px;
}

.preview-heading-row .edit-back {
  margin-top: 1px;
  margin-bottom: 0;
}

.link-preview-content {
  flex: 1;
  min-height: 0;
  max-height: 100%;
  margin-top: 15px;
  padding: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfcfe;
  scrollbar-color: #cbd5e1 transparent;
  scrollbar-width: thin;
}

.link-preview-note + .link-preview-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.link-preview-note h3 {
  margin: 0 0 8px;
  color: #1e293b;
  font-size: 14px;
  font-weight: 750;
}

.link-preview-note p {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.pane-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.links-search {
  flex: 0 0 auto;
  width: 165px;
}

.manage-link-list {
  max-height: 595px;
  overflow-y: auto;
  padding-right: 3px;
}

.manage-link-list .link-item {
  background: #fff;
}

.view-heading {
  margin: 0 0 7px;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.5px;
}

.view-description {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.composer {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.notes {
  display: grid;
  gap: 10px;
}

.note-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  animation: note-enter 180ms ease-out both;
}

@keyframes note-enter {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.note-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.note-title {
  flex: 1;
  height: 38px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 650;
}

.note-remove {
  flex: 0 0 auto;
  color: var(--muted);
}

.note-body {
  min-height: 112px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.8;
  white-space: pre-wrap;
}

.note-editor-wrap {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.note-editor-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.note-highlight-layer {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 10px;
  bottom: 0;
  left: 0;
  overflow: hidden;
  padding: 12px 13px;
  color: #111827;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.8;
  overflow-wrap: anywhere;
  pointer-events: none;
  white-space: pre-wrap;
}

.note-search-hit {
  border-radius: 2px;
  color: inherit;
  background: #fff0a8;
}

.note-search-hit.active {
  background: #fbbf24;
  box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.2);
}

.note-editor-wrap .note-body {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: 240px;
  border: 0;
  color: transparent;
  caret-color: #111827;
  background: transparent;
  scrollbar-color: #cbd5e1 transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.note-editor-wrap .note-body:focus {
  box-shadow: none;
}

.composer-actions {
  display: flex;
  gap: 16px;
  margin-top: auto;
}

.composer-actions .button {
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  margin-top: 0;
  padding-block: 0;
}

.note-content-search {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  padding: 0 8px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fbfcfe;
}

.note-content-search > svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  color: #94a3b8;
}

.note-content-search input {
  min-width: 0;
  height: 36px;
  flex: 1;
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 12px;
}

.note-content-search input::placeholder {
  color: #9aa6b5;
}

.note-search-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.note-search-nav {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #64748b;
  background: #fff;
  font-size: 12px;
}

.note-search-nav:hover {
  border-color: #b9cdf5;
  color: var(--primary);
  background: var(--primary-soft);
}

.edit-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding: 12px 14px;
  border: 1px solid #dbe7ff;
  border-radius: 10px;
  color: #31538a;
  background: #f5f9ff;
  font-size: 12px;
}

.edit-banner strong {
  color: #1e40af;
}

.section-heading {
  margin: 30px 0 12px;
  font-size: 16px;
  font-weight: 800;
}

.section-heading.compact {
  margin: 0;
}

.admin-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-badge {
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 4px 8px;
  border: 1px solid #d9e5ff;
  border-radius: 6px;
  color: var(--primary);
  background: #f5f9ff;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 1px;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.accounts-view .admin-summary {
  margin-top: 0;
}

.admin-summary-item {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfcfe;
}

.admin-summary-item.blue {
  border-color: #d9e6ff;
  background: linear-gradient(135deg, #f7faff, #eff5ff);
}

.summary-value {
  color: #1e293b;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.6px;
}

.admin-summary-item.blue .summary-value {
  color: var(--primary);
}

.summary-label {
  color: var(--muted);
  font-size: 11px;
}

.admin-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 26px 0 12px;
}

.accounts-view .admin-list-toolbar {
  margin-top: 20px;
}

.count-chip {
  display: inline-flex;
  min-width: 23px;
  height: 20px;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
  padding: 0 6px;
  border-radius: 999px;
  color: #64748b;
  background: #eef2f7;
  font-size: 9px;
  font-weight: 700;
  vertical-align: 1px;
}

.search-box {
  position: relative;
  display: block;
  width: min(100%, 190px);
}

.search-box svg {
  position: absolute;
  top: 50%;
  left: 10px;
  width: 14px;
  height: 14px;
  color: #94a3b8;
  pointer-events: none;
  transform: translateY(-50%);
}

.search-box input {
  width: 100%;
  height: 34px;
  padding: 0 10px 0 31px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  font-size: 11px;
}

.search-box input::placeholder {
  color: #9aa6b5;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.account-list {
  display: grid;
  gap: 8px;
}

.admin-account {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  min-height: 69px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.admin-account:hover {
  border-color: #ced9e8;
  box-shadow: 0 7px 20px rgba(15, 23, 42, 0.055);
  transform: translateY(-1px);
}

.admin-account-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.account-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.admin-account-copy {
  min-width: 0;
}

.admin-account-name {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #1e293b;
  font-size: 13px;
  font-weight: 750;
}

.admin-account-name > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-account-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.admin-account-stats {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.admin-account-stats strong {
  color: #334155;
  font-size: 12px;
}

.search-empty {
  margin-top: 2px;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 0 0 15px -4px;
  padding: 4px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 650;
}

.back-button:hover {
  color: var(--primary);
}

.back-button svg {
  width: 15px;
  height: 15px;
}

.account-profile {
  padding: 18px;
  border: 1px solid #dfe7f3;
  border-radius: 13px;
  background:
    radial-gradient(circle at 100% 0, rgba(37, 99, 235, 0.08), transparent 38%),
    #fbfdff;
}

.profile-top {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 14px;
}

.profile-main {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.profile-main > div {
  min-width: 0;
}

.profile-actions {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 7px;
}

.profile-avatar {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  font-size: 17px;
}

.profile-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.profile-name {
  flex: 0 0 auto;
  margin: 0;
  color: #1e293b;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.profile-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e8edf5;
}

.profile-stats > span {
  display: grid;
  gap: 2px;
  text-align: center;
}

.profile-stats strong {
  color: #27364a;
  font-size: 17px;
  font-weight: 800;
}

.profile-stats small {
  color: var(--muted);
  font-size: 9px;
}

.detail-list-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 25px 0 11px;
}

.detail-helper {
  margin: 5px 0 0;
  color: var(--muted-light);
  font-size: 10px;
}

.audit-section {
  margin-top: 5px;
}

.audit-list {
  display: grid;
  gap: 7px;
}

.audit-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfe;
}

.audit-item strong {
  color: #334155;
  font-size: 11px;
}

.audit-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.audit-item > span {
  flex: 0 0 auto;
  color: var(--muted-light);
  font-size: 9px;
  white-space: nowrap;
}

.audit-empty {
  padding: 18px;
  border: 1px dashed #dbe3ee;
  border-radius: 10px;
  color: var(--muted);
  background: #fbfcfe;
  text-align: center;
  font-size: 10px;
}

.temporary-password-box {
  margin-top: 0;
}

.temporary-password-box .input {
  color: #1e293b;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.admin-page-preview {
  overflow: hidden;
  margin: 0 0 6px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-page-item {
  align-items: stretch;
  flex-direction: column;
  gap: 9px;
}

.admin-page-item .action-link {
  flex: 0 0 auto;
}

.admin-page-item .link-main {
  flex: 1;
  width: 100%;
}

.link-list {
  display: grid;
  gap: 8px;
}

.link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.link-item:hover {
  border-color: #d4dce8;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.link-main {
  min-width: 0;
}

.link-title {
  overflow: hidden;
  margin: 0 0 5px;
  color: #1e293b;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.link-meta span + span::before {
  margin-right: 8px;
  color: #cbd5e1;
  content: "·";
}

.collaboration-hint {
  max-width: 100%;
  overflow: hidden;
  color: var(--success);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-badge {
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 5px;
  color: #7c3aed;
  background: #f4f0ff;
  font-size: 10px;
  font-weight: 700;
  vertical-align: 1px;
}

.link-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.link-row-actions {
  width: 100%;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  padding-top: 2px;
}

.manage-link-item {
  align-items: stretch;
  flex-direction: column;
  gap: 10px;
}

.link-card-footer {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.link-modified {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
}

.link-card-footer .link-row-actions {
  width: auto;
  margin-left: auto;
  padding-top: 0;
}

.admin-page-item .link-card-footer .link-actions {
  margin-left: auto;
}

.link-row-actions .action-link {
  min-width: 40px;
  padding-inline: 8px;
  background: #fbfcfe;
  white-space: nowrap;
}

.link-row-actions .action-link.copy {
  color: #7c3aed;
}

.link-row-actions .action-link.copy:hover {
  border-color: #ddd0ff;
  background: #f7f3ff;
}

.link-item.active-link {
  border-color: #bcd0f5;
  background: #f8fbff;
  box-shadow: 0 5px 18px rgba(37, 99, 235, 0.08);
}

.action-link {
  min-height: 29px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--primary);
  background: #fff;
  font-size: 11px;
  font-weight: 650;
}

.action-link:hover {
  border-color: #b9cdf5;
  background: var(--primary-soft);
}

.action-link.edit {
  color: #a16207;
}

.action-link.edit:hover {
  border-color: #f0d58d;
  background: #fffbeb;
}

.action-link.delete {
  color: var(--danger);
}

.action-link.delete:hover {
  border-color: #f5c2c7;
  background: var(--danger-soft);
}

.action-link.collab {
  color: var(--success);
}

.action-link.collab:hover {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.empty-state {
  display: grid;
  justify-items: center;
  padding: 28px 16px;
  border: 1px dashed #dbe3ee;
  border-radius: 12px;
  color: var(--muted);
  background: #fbfcfe;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 38px;
  height: 38px;
  margin-bottom: 10px;
  place-items: center;
  border-radius: 12px;
  color: var(--primary);
  background: var(--primary-soft);
}

.empty-icon svg {
  width: 19px;
  height: 19px;
}

.empty-title {
  margin: 0 0 4px;
  color: #334155;
  font-size: 13px;
  font-weight: 750;
}

.empty-copy {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
}

.stats-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.stats-view .stats-metrics {
  margin-top: 0;
}

.stats-view .chart-panel {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-top: 14px;
  background: #fff;
}

.stats-view .chart-wrap {
  flex: 1;
  height: auto;
  min-height: 300px;
}

.metric {
  display: grid;
  min-height: 72px;
  padding: 10px;
  place-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: center;
}

.metric.primary {
  border-color: var(--primary);
  color: #fff;
  background: linear-gradient(145deg, #2f6ef0, #2563eb);
  box-shadow: 0 9px 20px rgba(37, 99, 235, 0.19);
}

.metric-value {
  margin-bottom: 3px;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.7px;
}

.metric-label {
  color: var(--muted);
  font-size: 11px;
}

.metric.primary .metric-label {
  color: #e9f0ff;
}

.chart-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.chart-filter {
  width: min(100%, 225px);
  height: 41px;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  background-color: #fff;
}

.stats-link-picker {
  position: relative;
  width: min(100%, 260px);
}

.stats-link-input-wrap {
  position: relative;
}

.stats-link-search {
  height: 40px;
  padding-right: 34px;
  font-size: 12px;
}

.stats-link-chevron {
  position: absolute;
  top: 50%;
  right: 12px;
  color: #64748b;
  font-size: 16px;
  pointer-events: none;
  transform: translateY(-58%);
}

.stats-link-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  max-height: 230px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #dce4f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}

.stats-link-option {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  color: #334155;
  background: transparent;
  text-align: left;
}

.stats-link-option:hover,
.stats-link-option.selected {
  color: var(--primary);
  background: var(--primary-soft);
}

.stats-link-option span {
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-link-option small {
  flex: 0 0 auto;
  color: var(--muted-light);
  font-size: 9px;
}

.stats-link-no-match {
  padding: 16px 10px;
  color: var(--muted);
  text-align: center;
  font-size: 10px;
}

.range-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.range-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #475569;
  background: #fff;
  font-size: 11px;
  font-weight: 650;
}

.range-button.active {
  border-color: #c5d5f8;
  color: var(--primary);
  background: var(--primary-soft);
}

.chart-wrap {
  position: relative;
  width: 100%;
  height: clamp(270px, 38vh, 390px);
  min-height: 0;
}

.chart-svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: visible;
}

.chart-grid {
  stroke: #e8edf4;
  stroke-dasharray: 3 4;
  stroke-width: 1;
}

.chart-axis {
  fill: #8794a7;
  font-family: inherit;
  font-size: 10px;
}

.chart-area {
  fill: url("#areaGradient");
}

.chart-line {
  fill: none;
  stroke: var(--primary);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.chart-dot {
  cursor: pointer;
  fill: #fff;
  stroke: var(--primary);
  stroke-width: 1.8;
  transition: r 140ms ease;
}

.chart-dot:hover {
  r: 5px;
}

.chart-tooltip {
  position: absolute;
  z-index: 2;
  min-width: 96px;
  padding: 8px 10px;
  border: 1px solid #dce4f0;
  border-radius: 8px;
  color: #334155;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-small);
  font-size: 11px;
  line-height: 1.5;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 10px));
}

.chart-tooltip strong {
  display: block;
  color: var(--primary);
  font-size: 14px;
}

.chart-hint {
  margin: 4px 0 0;
  color: var(--muted-light);
  font-size: 10px;
}

.public-card {
  min-height: 420px;
}

.public-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
}

.public-heading {
  margin: 0 0 5px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.public-created {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.public-content {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid #edf0f4;
  border-radius: 11px;
  background: #fbfcfe;
}

.public-note {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.public-note:first-child {
  margin-top: 0;
}

.public-note-title {
  margin: 0 0 10px;
  color: #1e293b;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.5;
}

.public-note-body {
  margin: 0;
  color: #334155;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.85;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.public-note-body:empty::after {
  color: var(--muted-light);
  content: "（无正文）";
}

.public-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.public-footer-actions {
  display: flex;
  gap: 8px;
}

.error-card {
  display: grid;
  min-height: 360px;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.error-icon {
  display: grid;
  width: 50px;
  height: 50px;
  margin-bottom: 17px;
  place-items: center;
  border-radius: 16px;
  color: var(--muted);
  background: #f1f5f9;
}

.error-icon svg {
  width: 24px;
  height: 24px;
}

.error-title {
  margin: 0 0 8px;
  font-size: 21px;
}

.error-copy {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
}

.toast-region {
  position: fixed;
  z-index: 1000;
  top: 24px;
  left: 50%;
  display: grid;
  gap: 8px;
  width: min(calc(100vw - 32px), 360px);
  pointer-events: none;
  transform: translateX(-50%);
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border: 1px solid #dfe6ef;
  border-radius: 10px;
  color: #334155;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-small);
  font-size: 12px;
  font-weight: 600;
  animation: toast-enter 220ms ease-out both;
  backdrop-filter: blur(12px);
}

.toast::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  content: "";
}

.toast.error::before {
  background: var(--danger);
}

.toast.leaving {
  animation: toast-leave 180ms ease-in both;
}

@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@keyframes toast-leave {
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.modal-backdrop {
  position: fixed;
  z-index: 900;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
  background: rgba(15, 23, 42, 0.32);
  animation: fade-in 160ms ease-out both;
  backdrop-filter: blur(3px);
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.modal {
  width: min(100%, 430px);
  max-height: min(80vh, 640px);
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.2);
  animation: modal-enter 200ms ease-out both;
}

@keyframes modal-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 19px;
}

.modal-title {
  margin: 0 0 5px;
  font-size: 18px;
  font-weight: 800;
}

.modal-copy {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.modal-close {
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
}

.modal-close:hover {
  color: var(--text);
  background: #f8fafc;
}

.modal-close svg {
  width: 15px;
  height: 15px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

.collab-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.collab-form .input {
  min-width: 0;
  height: 40px;
}

.collab-form .button {
  min-height: 40px;
  flex: 0 0 auto;
}

.collab-list {
  display: grid;
  gap: 7px;
}

.collab-person {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 45px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.collab-person-info {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.collab-person-name {
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collab-role {
  color: var(--muted);
  font-size: 10px;
}

.collaboration-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.collaboration-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.collaboration-search-row .search-box {
  width: min(100%, 250px);
}

.collaboration-summary {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.collaboration-summary span {
  display: grid;
  min-width: 80px;
  justify-items: center;
  gap: 2px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.collaboration-summary strong {
  color: var(--text);
  font-size: 18px;
}

.collaboration-summary small {
  color: var(--muted);
  font-size: 9px;
}

.collaboration-list {
  display: grid;
  gap: 11px;
  margin-top: 14px;
}

.collaboration-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.collaboration-item-head,
.collaboration-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.collaboration-title,
.collaboration-card-head h2 {
  margin: 0;
  color: #1e293b;
  font-size: 14px;
  font-weight: 800;
}

.collaboration-notes,
.collaboration-card-notes {
  overflow: hidden;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collaboration-modified {
  margin: 9px 0 10px;
  color: var(--muted-light);
  font-size: 10px;
}

.collaborator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 7px;
}

.collaborator-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfe;
}

.collaborator-card > div {
  min-width: 0;
}

.collaborator-card strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collaborator-card p {
  overflow: hidden;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-box {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.share-box .input {
  min-width: 0;
  height: 40px;
  color: var(--muted);
  font-size: 11px;
  background: #f8fafc;
}

.share-box .button {
  flex: 0 0 auto;
}

.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  color: #334155;
  background: var(--bg);
}

@media (max-width: 700px) {
  .page {
    padding: 28px 12px 28px;
  }

  .page.page-auth {
    align-items: flex-start;
    padding-top: 52px;
  }

  .card {
    padding: 24px 20px;
    border-radius: 16px;
  }

  .auth-card {
    min-height: 0;
  }

  .auth-heading {
    font-size: 25px;
  }

  .dashboard-card {
    min-height: calc(100vh - 56px);
  }

  .dashboard-top {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }

  .dashboard-session-actions {
    gap: 5px;
  }

  .dashboard-session-actions .button {
    padding-inline: 9px;
    font-size: 11px;
  }

  .audit-item {
    flex-direction: column;
    gap: 6px;
  }

  .audit-item > span {
    white-space: normal;
  }

  .dashboard-tabs {
    width: 100%;
  }

  .dashboard-tabs .tab-button {
    flex: 1;
    min-width: 0;
    padding-inline: 8px;
    font-size: 13px;
  }

  .view {
    padding-top: 23px;
  }

  .composer-actions {
    gap: 9px;
  }

  .composer-actions .button {
    padding-inline: 10px;
    font-size: 13px;
  }

  .link-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .link-card-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .link-card-footer .link-row-actions,
  .admin-page-item .link-card-footer .link-actions {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .collaboration-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .collaboration-summary {
    width: 100%;
  }

  .collaboration-search-row .search-box {
    width: 100%;
  }

  .collaboration-summary span {
    flex: 1;
  }

  .collaborator-grid {
    grid-template-columns: 1fr;
  }

  .admin-account {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px 12px;
  }

  .admin-account-stats {
    grid-column: 1 / -1;
    padding-left: 46px;
  }

  .admin-account > .button {
    grid-column: 2;
    grid-row: 1;
  }

  .admin-account-name {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .admin-list-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .search-box {
    width: 100%;
  }

  .profile-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .profile-actions .button {
    flex: 1;
  }

  .admin-page-item .action-link {
    align-self: flex-end;
  }

  .link-actions {
    flex-wrap: wrap;
  }

  .stats-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric {
    min-height: 87px;
  }

  .metric-value {
    font-size: 24px;
  }

  .chart-panel {
    padding: 13px;
  }

  .chart-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .chart-filter,
  .stats-link-picker,
  .range-switch {
    width: 100%;
  }

  .range-button {
    flex: 1;
  }

  .chart-wrap {
    min-height: 215px;
    overflow-x: auto;
  }

  .chart-svg {
    min-width: 470px;
  }

  .public-brand {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 24px;
  }

  .public-content {
    padding: 10px;
  }

  .public-note {
    padding: 13px;
  }

  .public-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 88vh;
    border-radius: 18px 18px 0 0;
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 950px) {
  .manage-split {
    grid-template-columns: 1fr;
    height: auto;
  }

  .manage-link-list {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 700px) {
  .manage-pane {
    padding: 13px;
  }

  .pane-header {
    flex-direction: column;
    align-items: stretch;
  }

  .links-search {
    width: 100%;
  }
}

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