:root {
  color-scheme: light;
  --background: #f6f7f9;
  --surface: #ffffff;
  --ink: #202a3b;
  --muted: #596579;
  --line: #dce1e8;
  --accent: #2459ba;
  --accent-hover: #194795;
  --danger: #b12832;
  --radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--background); line-height: 1.6; }
::selection { background: #d6e4ff; color: #163a78; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
input { caret-color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 10; left: 16px; top: 8px; padding: 12px; background: var(--surface); }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1184px; min-height: 76px; padding: 12px 32px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: baseline; gap: 12px; color: var(--ink); font-size: 22px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand span { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .02em; }
.topbar nav { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.topbar form { margin: 0; }
.account { color: var(--muted); max-width: 180px; overflow-wrap: anywhere; }
.text-button { border: 0; background: transparent; padding: 8px 0; color: var(--muted); min-height: 40px; }
.text-button:hover { color: var(--accent); }
.container { max-width: 1184px; padding: 48px 32px 40px; margin: 0 auto; }
.narrow { max-width: 460px; }
.auth-layout { padding-top: 80px; }
.form-layout { max-width: 744px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: 28px; line-height: 1.35; font-weight: 650; letter-spacing: -.02em; }
h2 { font-size: 18px; line-height: 1.5; font-weight: 600; }
.muted, .intro { color: var(--muted); }
.intro { margin-bottom: 32px; font-size: 15px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 32px; }
.page-heading p { font-size: 14px; margin-bottom: 0; }
.separator { margin: 0 12px; color: #7c8798; }
.button { display: inline-flex; min-height: 44px; padding: 10px 18px; align-items: center; justify-content: center; border: 1px solid #bac3d0; border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.5; white-space: nowrap; transition: background-color 160ms ease, border-color 160ms ease; }
.button:hover { background: #edf0f5; border-color: #8997ab; text-decoration: none; }
.button:active { background: #e2e8f1; }
.button:disabled { opacity: .6; cursor: wait; }
.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.primary:hover, .primary:active { background: var(--accent-hover); border-color: var(--accent-hover); }
.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.danger:hover { background: #8e2028; border-color: #8e2028; }
.full-width { width: 100%; }
.compact { min-height: 36px; padding: 6px 12px; }
input:not([type="hidden"]) { width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1px solid #aeb9c9; border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: 15px; }
input::placeholder { color: #647085; opacity: 1; }
input:hover { border-color: #7c8da5; }
input[aria-invalid="true"] { border-color: var(--danger); }
.searchbar { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.searchbar input { max-width: 440px; }
.quiet-link { font-size: 14px; padding: 10px 6px; white-space: nowrap; }
.search-result { margin-bottom: 18px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; background: var(--surface); }
table { width: 100%; border-collapse: collapse; text-align: left; table-layout: fixed; }
th { background: #f0f3f7; color: var(--muted); font-weight: 500; font-size: 12px; padding: 13px 18px; }
th:first-child { width: 42%; }
th:nth-child(2) { width: 18%; }
th:nth-child(3) { width: 8%; }
th:nth-child(4) { width: 17%; }
th:last-child { width: 15%; }
td { border-top: 1px solid var(--line); padding: 18px; font-size: 14px; vertical-align: middle; }
tbody tr:hover { background: #fafbfd; }
.link-title { display: block; font-weight: 600; overflow-wrap: anywhere; margin-bottom: 3px; }
.target-url { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--muted); }
.short-code, .code-input { font-family: Consolas, "SFMono-Regular", monospace; font-size: 16px; font-weight: 600; }
.short-cell { white-space: nowrap; }
.copy-button { background: transparent; border: 0; color: var(--muted); font-size: 12px; padding: 9px 6px; min-height: 36px; margin-left: 4px; border-radius: 4px; }
.copy-button:hover { color: var(--accent); background: #eaf0fb; }
.number, .date, time { font-variant-numeric: tabular-nums; }
.date { font-size: 12px; color: var(--muted); }
.row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.row-actions a { display: inline-block; padding: 7px 0; white-space: nowrap; }
.danger-text { color: var(--danger); }
.list-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 20px; font-size: 13px; }
.pagination { display: flex; align-items: center; gap: 12px; }
.empty-state { text-align: center; padding: 64px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.empty-state h2 { margin-bottom: 8px; }
.empty-state p { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.footnote { font-size: 12px; color: var(--muted); margin-top: 28px; }
.stack-form { display: flex; flex-direction: column; gap: 24px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.required-label, .optional-label { font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 10px; }
.field-help { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.info-line { padding: 16px; border-radius: var(--radius); background: #eaf0f9; color: #38516f; font-size: 13px; }
code { font-family: Consolas, "SFMono-Regular", monospace; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.back-link { display: inline-block; margin-bottom: 28px; padding: 4px 0; font-size: 14px; }
.heading-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.sunflower-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 56px; }
.sunflower-preview { margin: 0; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.sunflower-preview img { display: block; width: 100%; height: auto; }
.sunflower-preview figcaption { text-align: center; font-size: 12px; color: var(--muted); padding: 12px 0 4px; }
.sunflower-details { margin-bottom: 24px; }
.api-key-value { margin: 12px 0; overflow-wrap: anywhere; }
.link-details { border-top: 1px solid var(--line); padding-top: 28px; margin-top: 40px; }
.link-details h2 { font-size: 16px; }
dl { margin: 0; font-size: 14px; }
dl > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 16px; padding: 8px 0; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.delete-details { padding: 20px 0; margin-bottom: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.notice { padding: 13px 16px; margin-bottom: 24px; border: 1px solid #9cc8ae; background: #edf7f1; color: #205d3b; border-radius: var(--radius); font-size: 14px; overflow-wrap: anywhere; }
.notice.error { border-color: #e4b4b6; background: #fff0f0; color: #94252e; }
.copy-status:empty { display: none; }
.copy-status { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 10px 18px; border-radius: var(--radius); background: var(--ink); color: #fff; font-size: 14px; z-index: 20; }
@media (max-width: 760px) {
  .sunflower-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .sunflower-preview { max-width: 360px; width: 100%; justify-self: center; grid-row: 1; }
  .heading-actions { gap: 4px; }
  .topbar-inner { padding: 12px 20px; min-height: 66px; }
  .brand span { display: none; }
  .topbar nav { gap: 16px; }
  .account { max-width: 100px; }
  .container { padding: 32px 20px; }
  .auth-layout { padding-top: 48px; }
  h1 { font-size: 24px; }
  .page-heading { align-items: flex-start; gap: 12px; margin-bottom: 24px; }
  .page-heading .button { padding: 10px 12px; }
  .page-heading p { font-size: 12px; }
  .separator { margin: 0 6px; }
  .searchbar input { flex: 1; width: 0; }
  .table-wrap { overflow: visible; }
  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tbody tr { display: grid; grid-template-columns: 1fr 1fr; padding: 16px; border-top: 1px solid var(--line); gap: 8px 16px; }
  tbody tr:first-child { border-top: 0; }
  td { display: block; padding: 0; border: 0; min-width: 0; }
  .destination { grid-column: 1 / -1; padding-bottom: 4px; }
  .number { text-align: right; font-size: 13px; }
  .number::before { content: attr(data-label) " "; color: var(--muted); font-size: 12px; }
  td:last-child { text-align: right; }
  .row-actions { justify-content: flex-end; }
  .list-footer { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .empty-state { padding: 48px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
.badge-warn { display: inline-block; margin-top: 6px; padding: 3px 8px; border: 1px solid #e4b4b6; border-radius: 999px; background: #fff0f0; color: #94252e; font-size: 12px; }
.domain-multi { display: block; }
.check-line { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink); }
.check-line input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; margin: 3px 0 0; flex: 0 0 auto; }
