:root {
  color-scheme: light;
  --paper: #f3ede1;
  --paper-soft: #fff9ee;
  --ink: #10231c;
  --ink-muted: rgba(16, 35, 28, 0.66);
  --ink-faint: rgba(16, 35, 28, 0.38);
  --jade: #2f7d5d;
  --jade-dark: #173c31;
  --gold: #b38d55;
  --line: rgba(16, 35, 28, 0.16);
  --shadow: 0 20px 70px rgba(26, 41, 32, 0.16), 0 2px 12px rgba(26, 41, 32, 0.08);
  --serif: "Songti SC", "Noto Serif CJK SC", "STSong", "SimSun", Georgia, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background:
    linear-gradient(180deg, rgba(243, 237, 225, 0.3), rgba(243, 237, 225, 0.88)),
    url("/assets/ink-jade-bg.png") top right / cover no-repeat,
    var(--paper);
  overflow-x: hidden;
}

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

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

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 252, 242, 0.78), transparent 34%),
    radial-gradient(circle at 70% 38%, rgba(47, 125, 93, 0.08), transparent 36%),
    linear-gradient(90deg, rgba(243, 237, 225, 0.88), rgba(243, 237, 225, 0.2));
  mix-blend-mode: soft-light;
}

.ink-stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  filter: saturate(0.92);
  mix-blend-mode: multiply;
}

.ink-drop,
.ink-ripple,
.ink-trace {
  position: absolute;
  display: block;
  border-radius: 999px;
  pointer-events: none;
}

.ink-drop {
  opacity: 0.2;
  background:
    radial-gradient(circle at 38% 34%, rgba(47, 125, 93, 0.2), transparent 0 16%, rgba(47, 125, 93, 0.07) 17% 33%, transparent 34%),
    radial-gradient(circle at 50% 52%, rgba(16, 35, 28, 0.18), transparent 0 48%, rgba(16, 35, 28, 0.04) 50% 62%, transparent 64%);
  filter: blur(12px);
  transform-origin: center;
  animation:
    ink-drift 18s cubic-bezier(0.44, 0, 0.56, 1) infinite alternate,
    ink-breathe 8s cubic-bezier(0.44, 0, 0.56, 1) infinite alternate;
}

.ink-drop-a {
  width: clamp(280px, 32vw, 520px);
  height: clamp(280px, 32vw, 520px);
  left: 8vw;
  top: 12vh;
  animation-delay: -3s, -1s;
}

.ink-drop-b {
  width: clamp(360px, 42vw, 680px);
  height: clamp(360px, 42vw, 680px);
  right: -7vw;
  bottom: -10vh;
  opacity: 0.16;
  animation-duration: 22s, 9s;
  animation-delay: -9s, -4s;
}

.ink-drop-c {
  width: clamp(180px, 22vw, 340px);
  height: clamp(180px, 22vw, 340px);
  left: 49vw;
  top: 58vh;
  opacity: 0.12;
  animation-duration: 20s, 7s;
  animation-delay: -14s, -2s;
}

.ink-ripple {
  left: var(--x);
  top: var(--y);
  width: 18px;
  height: 18px;
  z-index: 2;
  opacity: 0.46;
  background:
    radial-gradient(circle, rgba(47, 125, 93, 0.32), transparent 0 30%, rgba(16, 35, 28, 0.16) 31% 48%, transparent 54%);
  transform: translate(-50%, -50%) scale(0.25);
  filter: blur(1px);
  animation: ink-ripple 760ms cubic-bezier(0.2, 0, 0, 1) forwards;
}

.ink-trace {
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  z-index: 2;
  opacity: 0.28;
  background:
    radial-gradient(circle at 42% 38%, rgba(47, 125, 93, 0.22), transparent 0 24%, rgba(16, 35, 28, 0.12) 25% 48%, transparent 58%);
  filter: blur(1.5px);
  transform: translate(-50%, -50%) scale(0.4);
  animation: ink-trace 1120ms cubic-bezier(0.2, 0, 0, 1) forwards;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1280px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(26px, env(safe-area-inset-top)) clamp(22px, 5vw, 72px)
    max(24px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto 1fr auto auto;
}

.masthead {
  display: grid;
  gap: clamp(54px, 9vw, 96px);
  padding-top: clamp(22px, 5vw, 48px);
}

.seal {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(23, 60, 49, 0.48);
  border-radius: 999px;
  color: var(--jade-dark);
  font-family: Georgia, serif;
  font-size: 27px;
  line-height: 1;
  letter-spacing: -0.08em;
  background: rgba(255, 251, 240, 0.28);
  box-shadow: inset 0 0 0 5px rgba(255, 251, 240, 0.2);
  transition:
    transform 180ms cubic-bezier(0.2, 0, 0, 1),
    box-shadow 180ms cubic-bezier(0.2, 0, 0, 1);
}

.seal:active {
  transform: scale(0.96);
}

.hero {
  max-width: 620px;
}

.domain {
  margin: 0 0 10px;
  color: rgba(23, 60, 49, 0.78);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 8vw, 50px);
  letter-spacing: 0.16em;
  line-height: 1;
  overflow-wrap: normal;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(58px, 19vw, 168px);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: 0.03em;
  text-wrap: balance;
}

.headline {
  position: relative;
  width: fit-content;
  margin: clamp(30px, 7vw, 48px) 0 0;
  padding-top: 22px;
  font-family: var(--serif);
  font-size: clamp(25px, 6.8vw, 43px);
  letter-spacing: 0.38em;
  line-height: 1.25;
}

.headline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: min(58vw, 380px);
  height: 1px;
  background: linear-gradient(90deg, var(--jade), rgba(23, 60, 49, 0.14));
}

.headline::after {
  content: "";
  position: absolute;
  left: 0;
  top: -4px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--jade);
  box-shadow: 0 0 0 5px rgba(47, 125, 93, 0.12);
}

.intro {
  max-width: 28em;
  margin: 20px 0 0;
  color: var(--ink-muted);
  font-family: var(--serif);
  font-size: clamp(15px, 3.8vw, 19px);
  line-height: 1.9;
  letter-spacing: 0.1em;
  text-wrap: pretty;
}

.index-panel {
  position: relative;
  margin-top: clamp(64px, 13vh, 130px);
  padding-left: clamp(70px, 17vw, 150px);
}

.rail {
  position: absolute;
  left: clamp(46px, 10vw, 84px);
  top: 7px;
  bottom: 28px;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(23, 60, 49, 0.32) 8%,
    rgba(23, 60, 49, 0.28) 72%,
    transparent
  );
}

.link-list {
  display: grid;
}

.service-row {
  position: relative;
  min-height: clamp(142px, 28vw, 192px);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 26px 0 30px;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(14px);
  animation: rise 560ms cubic-bezier(0.2, 0, 0, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

.service-row:last-child {
  border-bottom-color: rgba(16, 35, 28, 0.08);
}

.service-row:focus-visible {
  outline: 1px dashed rgba(47, 125, 93, 0.42);
  outline-offset: 8px;
}

.number {
  position: absolute;
  left: calc(-1 * clamp(70px, 17vw, 150px));
  top: 50%;
  transform: translateY(-50%);
  width: clamp(46px, 10vw, 86px);
  color: rgba(23, 60, 49, 0.88);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(43px, 11vw, 72px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.service-main {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.service-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(45px, 12vw, 80px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.service-subtitle {
  font-family: var(--serif);
  font-size: clamp(20px, 5.2vw, 30px);
  letter-spacing: 0.28em;
}

.service-domain {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 11px;
  color: var(--ink-muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(12px, 3.35vw, 18px);
  letter-spacing: 0.035em;
  overflow-wrap: anywhere;
}

.status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--jade);
  box-shadow: 0 0 0 5px rgba(47, 125, 93, 0.11);
}

.arrow {
  width: clamp(58px, 15vw, 76px);
  height: clamp(58px, 15vw, 76px);
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--jade-dark);
  background: rgba(255, 252, 241, 0.55);
  box-shadow:
    0 16px 32px rgba(26, 41, 32, 0.14),
    inset 0 0 0 1px rgba(23, 60, 49, 0.13);
  transition:
    transform 180ms cubic-bezier(0.2, 0, 0, 1),
    background-color 180ms cubic-bezier(0.2, 0, 0, 1);
}

.arrow svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-row:hover .arrow,
.service-row:focus-visible .arrow {
  transform: translateX(5px);
  background: rgba(255, 252, 241, 0.64);
}

.skeleton {
  pointer-events: none;
}

.skeleton .number,
.skeleton .arrow {
  opacity: 0.34;
}

.skeleton-line {
  display: block;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      rgba(16, 35, 28, 0.06),
      rgba(47, 125, 93, 0.16),
      rgba(16, 35, 28, 0.06)
    );
  background-size: 220% 100%;
  animation: skeleton-ink 1.8s cubic-bezier(0.44, 0, 0.56, 1) infinite;
}

.skeleton-title {
  width: min(58%, 230px);
  height: clamp(36px, 10vw, 68px);
}

.skeleton-subtitle {
  width: min(42%, 180px);
  height: 26px;
}

.skeleton-domain {
  width: min(68%, 260px);
  height: 18px;
  opacity: 0.7;
}

.add-entry {
  width: fit-content;
  min-height: 42px;
  margin: 22px 0 0 auto;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  color: rgba(23, 60, 49, 0.48);
  background: rgba(255, 252, 241, 0.12);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.16em;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(23, 60, 49, 0.08);
  transition:
    transform 180ms cubic-bezier(0.2, 0, 0, 1),
    color 180ms cubic-bezier(0.2, 0, 0, 1),
    background-color 180ms cubic-bezier(0.2, 0, 0, 1),
    box-shadow 180ms cubic-bezier(0.2, 0, 0, 1);
}

.add-entry:hover,
.add-entry:focus-visible {
  color: rgba(23, 60, 49, 0.82);
  background: rgba(255, 252, 241, 0.46);
  box-shadow: inset 0 0 0 1px rgba(23, 60, 49, 0.14);
}

.add-entry:active {
  transform: scale(0.96);
}

.add-mark {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23, 60, 49, 0.2);
  border-radius: 999px;
  font-family: Georgia, serif;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0;
}

.site-footer {
  margin-top: clamp(56px, 9vh, 96px);
  width: fit-content;
  margin-inline: auto;
  padding: 8px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 13px;
  color: rgba(16, 35, 28, 0.58);
  background: rgba(255, 252, 241, 0.22);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 252, 241, 0.16);
  font-family: var(--serif);
  font-size: clamp(13px, 3.2vw, 16px);
  letter-spacing: 0.24em;
  text-align: center;
}

.footer-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
}

.config-dialog {
  width: min(calc(100% - 32px), 560px);
  padding: 0;
  border: 0;
  border-radius: 28px;
  color: var(--ink);
  background: transparent;
}

.config-dialog::backdrop {
  background: rgba(8, 20, 16, 0.46);
  backdrop-filter: blur(8px);
}

.dialog-card {
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 250, 238, 0.94);
  box-shadow: 0 30px 90px rgba(8, 20, 16, 0.34);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.dialog-kicker {
  margin: 0 0 8px;
  color: var(--jade);
  font-size: 13px;
  letter-spacing: 0.18em;
}

.dialog-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(23, 60, 49, 0.08);
  font-size: 27px;
  cursor: pointer;
}

.dialog-copy {
  color: var(--ink-muted);
  line-height: 1.8;
  text-wrap: pretty;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

pre {
  margin: 18px 0;
  padding: 18px;
  overflow-x: auto;
  border-radius: 18px;
  background: rgba(16, 35, 28, 0.92);
  color: #f7f0e5;
  font-size: 13px;
  line-height: 1.7;
}

.copy-button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fffaf0;
  background: var(--jade-dark);
  font-size: 15px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition:
    transform 180ms cubic-bezier(0.2, 0, 0, 1),
    background-color 180ms cubic-bezier(0.2, 0, 0, 1);
}

.copy-button:active {
  transform: scale(0.96);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ink-drift {
  from {
    transform: translate3d(-1.8vw, -1.2vh, 0) rotate(-4deg);
  }

  to {
    transform: translate3d(2.4vw, 1.8vh, 0) rotate(5deg);
  }
}

@keyframes ink-breathe {
  from {
    border-radius: 46% 54% 58% 42% / 46% 44% 56% 54%;
    scale: 0.96;
  }

  to {
    border-radius: 58% 42% 48% 52% / 54% 60% 40% 46%;
    scale: 1.06;
  }
}

@keyframes ink-ripple {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(8.5);
  }
}

@keyframes ink-trace {
  to {
    opacity: 0;
    transform: translate(calc(-50% + var(--drift-x)), calc(-50% + var(--drift-y))) scale(2.8);
  }
}

@keyframes skeleton-ink {
  from {
    background-position: 120% 0;
  }

  to {
    background-position: -120% 0;
  }
}

@media (min-width: 760px) {
  html,
  body {
    height: 100%;
  }

  body {
    background-size: cover;
    overflow: hidden;
  }

  .site-shell {
    height: 100svh;
    min-height: 0;
    padding-block: clamp(34px, 5vh, 58px);
    grid-template-columns: minmax(450px, 0.96fr) minmax(460px, 0.76fr);
    grid-template-rows: 1fr;
    column-gap: clamp(36px, 5vw, 76px);
    align-items: center;
  }

  .masthead {
    gap: clamp(36px, 6vh, 64px);
    padding-top: 0;
    align-self: center;
  }

  .domain {
    max-width: none;
    font-size: clamp(34px, 3.6vw, 46px);
    letter-spacing: 0.13em;
    white-space: nowrap;
  }

  h1 {
    font-size: clamp(102px, 9vw, 132px);
  }

  .headline {
    margin-top: clamp(24px, 4vh, 38px);
    font-size: clamp(28px, 3vw, 38px);
  }

  .intro {
    margin-top: 14px;
    font-size: clamp(15px, 1.35vw, 17px);
    line-height: 1.75;
  }

  .index-panel {
    margin-top: 0;
    padding-left: 86px;
    align-self: center;
  }

  .rail {
    left: 54px;
    top: 12px;
    bottom: 22px;
  }

  .number {
    left: -86px;
    width: 56px;
    font-size: clamp(40px, 3.5vw, 52px);
  }

  .service-row {
    min-height: clamp(120px, 14vh, 140px);
    gap: 18px;
    padding: 14px 0 16px;
  }

  .service-title {
    font-size: clamp(36px, 3.25vw, 48px);
    letter-spacing: -0.035em;
  }

  .service-subtitle {
    font-size: clamp(17px, 1.65vw, 22px);
    letter-spacing: 0.2em;
  }

  .service-domain {
    max-width: 24ch;
    min-height: 22px;
    font-size: 14px;
    letter-spacing: 0.04em;
    overflow-wrap: normal;
    word-break: normal;
  }

  .status-dot {
    width: 9px;
    height: 9px;
  }

  .arrow {
    width: clamp(50px, 4.5vw, 58px);
    height: clamp(50px, 4.5vw, 58px);
  }

  .arrow svg {
    width: 24px;
    height: 24px;
  }

  .add-entry {
    position: absolute;
    right: clamp(38px, 5vw, 72px);
    bottom: clamp(58px, 8vh, 84px);
    min-height: 34px;
    padding-inline: 9px;
    font-size: 12px;
    opacity: 0.7;
  }

  .site-footer {
    position: absolute;
    left: 50%;
    bottom: clamp(18px, 3vh, 28px);
    margin-top: 0;
    transform: translateX(-50%);
    font-size: 12px;
    opacity: 0.78;
  }
}

@media (max-width: 430px) {
  body {
    background-position: 54% top;
    background-size: auto 100%;
  }

  .site-shell {
    padding-inline: 24px;
  }

  .masthead {
    gap: 50px;
  }

  .domain {
    font-size: clamp(25px, 7vw, 30px);
  }

  h1 {
    font-size: clamp(64px, 20vw, 82px);
  }

  .index-panel {
    margin-top: 58px;
    padding-left: 76px;
  }

  .rail {
    left: 52px;
  }

  .service-row {
    min-height: 150px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
  }

  .number {
    left: -76px;
    width: 52px;
  }

  .arrow {
    width: 58px;
    height: 58px;
  }

  .site-footer {
    color: rgba(243, 237, 225, 0.82);
  }
}

@media (max-width: 360px) {
  .site-shell {
    padding-inline: 18px;
  }

  .index-panel {
    padding-left: 62px;
  }

  .rail {
    left: 42px;
  }

  .number {
    left: -62px;
    font-size: 39px;
  }

  .service-title {
    font-size: 40px;
  }

  .service-domain {
    font-size: 13px;
  }

  .arrow {
    width: 50px;
    height: 50px;
  }
}

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