@font-face {
  font-family: "FanAiri Maiyuan";
  src: url("/res/items/Kingnammm-Maiyuan-II-Regular-2.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;

  --pink: #ffaacc;
  --pink-strong: #ff6fa8;
  --pink-deep: #b4416f;
  --pink-soft: #ffe3ee;
  --pink-mist: #fff2f7;
  --teal: #33ccbb;
  --leaf: #88dd44;
  --peach: #ffccaa;
  --sky: #99ccff;
  --mint: #99eedd;

  --ink: #3a2b36;
  --ink-soft: #6e5a67;
  --ink-mute: #94808c;
  --bg: #fff8fb;
  --bg-alt: #fff1f6;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --line: rgba(180, 65, 111, 0.16);
  --line-soft: rgba(58, 43, 54, 0.08);

  --shadow-lg: 0 30px 60px -32px rgba(180, 65, 111, 0.38);
  --shadow-md: 0 18px 40px -26px rgba(58, 43, 54, 0.36);
  --shadow-sm: 0 8px 22px -14px rgba(58, 43, 54, 0.3);

  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --font-display: "FanAiri Maiyuan", "Hiragino Maru Gothic ProN", "Zen Maru Gothic", "Yuanti SC",
    "Hiragino Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "FanAiri Maiyuan", "PingFang SC", "Hiragino Sans GB", "Hiragino Sans",
    "Noto Sans SC", "Microsoft YaHei", "Heiti SC", sans-serif;

  --maxw: 1180px;
  --header-h: 74px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 12% -8%, rgba(255, 170, 204, 0.32), transparent 60%),
    radial-gradient(900px 520px at 92% 4%, rgba(153, 238, 221, 0.28), transparent 58%),
    linear-gradient(180deg, #fff9fc 0%, #fff6fa 45%, #fffaf7 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

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

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

button {
  cursor: pointer;
  border: 0;
  background: none;
}

a {
  color: var(--pink-deep);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

p {
  margin: 0;
}

ul,
ol,
dl,
dd {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

code {
  padding: 0.12em 0.46em;
  border-radius: 6px;
  background: rgba(255, 170, 204, 0.2);
  color: #9c3b63;
  font-size: 0.86em;
}

::selection {
  background: rgba(255, 170, 204, 0.55);
  color: #5b2038;
}

:focus-visible {
  outline: 3px solid rgba(51, 204, 187, 0.65);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 背景装饰 ---------- */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: blob-drift 18s ease-in-out infinite alternate;
}

.blob-a {
  top: -8vh;
  left: -6vw;
  width: 38vw;
  height: 38vw;
  background: radial-gradient(circle at 30% 30%, rgba(255, 170, 204, 0.85), rgba(255, 204, 170, 0.1) 70%);
}

.blob-b {
  top: 30vh;
  right: -10vw;
  width: 42vw;
  height: 42vw;
  background: radial-gradient(circle at 60% 40%, rgba(153, 238, 221, 0.7), rgba(153, 204, 255, 0.08) 70%);
  animation-delay: -6s;
}

.blob-c {
  bottom: -16vh;
  left: 22vw;
  width: 36vw;
  height: 36vw;
  background: radial-gradient(circle at 50% 50%, rgba(255, 204, 170, 0.7), rgba(255, 170, 204, 0.05) 70%);
  animation-delay: -11s;
}

.bg-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(180, 65, 111, 0.16) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 55%, rgba(0, 0, 0, 0.35));
  opacity: 0.5;
}

@keyframes blob-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(3vw, 4vh, 0) scale(1.12);
  }
}

/* ---------- 布局与通用 ---------- */
.container {
  width: min(100% - 40px, var(--maxw));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translate(-50%, -160%);
  z-index: 200;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: #fff;
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

/* ---------- 面板与区块 ---------- */
.panel {
  position: relative;
  padding: 26px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: var(--panel);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 19px;
}

.panel-title::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--pink), var(--peach));
  transform: rotate(45deg);
  box-shadow: 0 0 0 4px rgba(255, 170, 204, 0.2);
}

.section {
  position: relative;
  padding: 96px 0;
}

.section-tinted {
  background:
    linear-gradient(180deg, rgba(255, 228, 239, 0.6), rgba(255, 248, 251, 0) 70%),
    radial-gradient(600px 260px at 85% 10%, rgba(153, 238, 221, 0.22), transparent 70%);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}

.section-title {
  font-size: clamp(27px, 3.6vw, 40px);
  letter-spacing: 0.02em;
}

.section-title .title-accent {
  color: var(--pink-deep);
}

.section-sub {
  margin-top: 10px;
  max-width: 64ch;
  color: var(--ink-soft);
}

.section-footnote {
  margin-top: 26px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-mute);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--pink-deep);
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 4px rgba(255, 170, 204, 0.25);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 26px;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-wrap {
  align-items: center;
}

.toolbar-count {
  font-size: 12.5px;
  color: var(--ink-mute);
  white-space: nowrap;
}

.head-actions,
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- 滚动出现动画 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* 页面控件 / 动态卡片的入场动画 */
@keyframes page-item-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.js #mainContent .toolbar,
.js #mainContent .section-head:not([data-reveal]),
.js #mainContent .work-card,
.js #mainContent .card-tile,
.js #mainContent .card-group,
.js #mainContent .event-timeline-item,
.js #mainContent .event-featured,
.js #mainContent .event-progress,
.js #mainContent .posts-toolbar,
.js #mainContent .post-composer,
.js #mainContent .post-card,
.js #mainContent .friend-link-card,
.js #mainContent .announcement,
.js #mainContent .announcement-empty-card,
.js #mainContent .comic-group,
.js #mainContent .comic-page,
.js #mainContent .airi-emoji-card,
.js #mainContent .airi-emoji-actions .btn,
.js #mainContent .chibi-profile-panel,
.js #mainContent .chibi-profile-room,
.js #mainContent .sponsor-list,
.js #mainContent .chat-online,
.js #mainContent .work-comment {
  animation: page-item-in 0.55s var(--ease) backwards;
}

.js #mainContent :is(.masonry, .card-grid, .friend-links-grid, .event-timeline, .airi-emoji-grid) > :nth-child(2) {
  animation-delay: 0.04s;
}

.js #mainContent :is(.masonry, .card-grid, .friend-links-grid, .event-timeline, .airi-emoji-grid) > :nth-child(3) {
  animation-delay: 0.08s;
}

.js #mainContent :is(.masonry, .card-grid, .friend-links-grid, .event-timeline, .airi-emoji-grid) > :nth-child(4) {
  animation-delay: 0.12s;
}

.js #mainContent :is(.masonry, .card-grid, .friend-links-grid, .event-timeline, .airi-emoji-grid) > :nth-child(5) {
  animation-delay: 0.16s;
}

.js #mainContent :is(.masonry, .card-grid, .friend-links-grid, .event-timeline, .airi-emoji-grid) > :nth-child(n + 6) {
  animation-delay: 0.2s;
}

@keyframes float-y {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(51, 204, 187, 0.5);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(51, 204, 187, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(51, 204, 187, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(255, 170, 204, 0.6);
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 111, 168, 0.75);
  background-clip: content-box;
}

