@font-face {
  font-family: CustomTitle;
  src: url("/fonts/font.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
:root {
  --endspace-bg-base: #fafafa;
  --endspace-bg-primary: #fff;
  --endspace-bg-secondary: #f4f4f5;
  --endspace-bg-tertiary: #e4e4e7;
  --endspace-text-primary: #18181b;
  --endspace-text-secondary: #52525b;
  --endspace-text-muted: #a1a1aa;
  --endspace-accent-yellow: #fbfb45;
  --endspace-accent-yellow-dim: rgb(251, 251, 69, 0.15);
  --endspace-accent-cyan: #fbfb45;
  --endspace-accent-cyan-dim: rgb(251, 251, 69, 0.1);
  --endspace-list-marker: #18181b;
  --endspace-border-base: #e4e4e7;
  --endspace-border-active: #fbfb45;
  --endspace-grid-color: rgb(0, 0, 0, 0.03);
  --endspace-shadow-base:
    0 1px 2px rgb(0, 0, 0, 0.04), 0 2px 4px rgb(0, 0, 0, 0.04), 0 4px 8px rgb(0, 0, 0, 0.04);
  --endspace-shadow-hover:
    0 4px 8px rgb(0, 0, 0, 0.08), 0 8px 16px rgb(0, 0, 0, 0.06), 0 16px 32px rgb(0, 0, 0, 0.04),
    0 0 0 1px var(--endspace-accent-yellow);
}

.dark {
  --endspace-bg-base: #09090b;
  --endspace-bg-primary: #18181b;
  --endspace-bg-secondary: #27272a;
  --endspace-bg-tertiary: #3f3f46;
  --endspace-text-primary: #fafafa;
  --endspace-text-secondary: #a1a1aa;
  --endspace-text-muted: #71717a;
  --endspace-accent-yellow: #fbfb45;
  --endspace-accent-yellow-dim: rgb(251, 251, 69, 0.15);
  --endspace-accent-cyan: #fbfb45;
  --endspace-accent-cyan-dim: rgb(251, 251, 69, 0.1);
  --endspace-list-marker: #fbfb45;
  --endspace-border-base: #27272a;
  --endspace-border-active: #fbfb45;
  --endspace-grid-color: rgb(255, 255, 255, 0.02);
  --endspace-shadow-base:
    0 1px 2px rgb(0, 0, 0, 0.2), 0 2px 4px rgb(0, 0, 0, 0.15), 0 4px 8px rgb(0, 0, 0, 0.1);
  --endspace-shadow-hover:
    0 4px 8px rgb(0, 0, 0, 0.3), 0 8px 16px rgb(0, 0, 0, 0.25), 0 16px 32px rgb(0, 0, 0, 0.2),
    0 0 0 1px var(--endspace-accent-yellow);
}

html {
  font-size: clamp(14px, calc(16px * (100vw / 1440)), 24px);
}

@media (orientation: portrait), (width <= 767px) {
  html {
    font-size: clamp(14px, calc(16px * (100vw / 390)), 20px);
  }
}
#theme-endspace {
  background-color: var(--endspace-bg-base);
  color: var(--endspace-text-primary);
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}
#theme-endspace::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(var(--endspace-grid-color) 1px, transparent 1px), linear-gradient(90deg, var(--endspace-grid-color) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -1;
  pointer-events: none;
}

.tech-text {
  font-family: "JetBrains Mono", "Courier New", monospace;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 500;
}

.tech-num {
  font-family: Oswald, "JetBrains Mono", sans-serif;
  letter-spacing: 1px;
}

.endspace-frame {
  background: var(--endspace-bg-primary);
  border: 1px solid var(--endspace-border-base);
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 10;
}
.endspace-frame::before, .endspace-frame::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 20;
}
.endspace-frame::before {
  top: -1px;
  left: -1px;
  border-top: 3px solid var(--endspace-text-primary);
  border-left: 3px solid var(--endspace-text-primary);
}
.endspace-frame::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 3px solid var(--endspace-text-primary);
  border-right: 3px solid var(--endspace-text-primary);
}
.endspace-frame:hover {
  border-color: var(--endspace-border-active);
  box-shadow: var(--endspace-shadow-hover);
  transform: translateY(-2px);
}
.endspace-frame:hover::before, .endspace-frame:hover::after {
  opacity: 1;
  width: 16px;
  height: 16px;
}

.endspace-card {
  background: var(--endspace-bg-primary);
  border: 1px solid var(--endspace-border-base);
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--endspace-shadow-base);
}
.endspace-card:hover {
  border-color: var(--endspace-border-active);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04), 0 0 0 1px var(--endspace-accent-yellow);
  transform: translateY(-4px) scale(1.01);
  z-index: 20;
}

.endspace-btn {
  background: transparent;
  border: 2px solid var(--endspace-border-active);
  color: var(--endspace-text-primary);
  padding: 0.6rem 1.5rem;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85em;
  cursor: pointer;
  transition: all 0.2s;
}
.endspace-btn:hover {
  background: var(--endspace-border-active);
  color: #000;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.endspace-button-primary {
  background: var(--endspace-border-active);
  border: none;
  color: #000;
  padding: 0.75rem 1.5rem;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85em;
  cursor: pointer;
  transition: all 0.2s;
}
.endspace-button-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.spectrum-bar {
  height: 2px;
  background: linear-gradient(90deg, var(--endspace-accent-cyan) 0%, var(--endspace-accent-yellow) 50%, var(--endspace-accent-cyan) 100%);
}

.scan-line {
  width: 100%;
  height: 1px;
  background: var(--endspace-border-base);
  margin: 1rem 0;
}

.tech-corner {
  position: relative;
}
.tech-corner::before, .tech-corner::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
}
.tech-corner::before {
  top: 0;
  left: 0;
  border-top: 2px solid var(--endspace-accent-cyan);
  border-left: 2px solid var(--endspace-accent-cyan);
}
.tech-corner::after {
  bottom: 0;
  right: 0;
  border-bottom: 2px solid var(--endspace-accent-cyan);
  border-right: 2px solid var(--endspace-accent-cyan);
}

.search-hit {
  background-color: var(--endspace-accent-yellow-dim);
  color: var(--endspace-text-primary);
  padding: 0 2px;
  border-radius: 2px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 9999px;
  border: 1px solid var(--endspace-border-base);
  color: var(--endspace-text-secondary);
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.tag-pill:hover {
  border-color: var(--endspace-border-active);
  box-shadow: 0 0 0 1px var(--endspace-accent-yellow);
  transform: translateY(-1px);
}

.tag-pill-hot {
  padding: 0.35rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--endspace-text-primary);
  background: var(--endspace-bg-secondary);
}
.tag-pill-hot .tag-count {
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0.5;
}
.tag-pill-hot:hover {
  background: var(--endspace-accent-cyan-dim);
}

.tag-pill-normal {
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 500;
  background: transparent;
}
.tag-pill-normal .tag-count {
  font-size: 0.65rem;
  opacity: 0.4;
}

.tag-pill-rare {
  padding: 0.15rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 400;
  opacity: 0.5;
  border-color: transparent;
  background: transparent;
}
.tag-pill-rare:hover {
  opacity: 1;
  border-color: var(--endspace-border-base);
  background: var(--endspace-bg-secondary);
}

.friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.friend-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  background: var(--endspace-bg-secondary);
  border: 1px solid var(--endspace-border-base);
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s;
}
.friend-card:hover {
  border-color: var(--endspace-border-active);
  box-shadow: 0 0 0 1px var(--endspace-accent-yellow);
  transform: translateY(-2px);
}

.friend-name {
  color: var(--endspace-text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
}

.friend-status {
  color: var(--endspace-text-secondary);
  font-size: 0.75rem;
  margin-top: 0.3rem;
  opacity: 0.6;
}

.friend-inactive {
  opacity: 0.5;
}

.promotion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.promotion-card {
  display: block;
  padding: 0.75rem;
  background: var(--endspace-bg-secondary);
  border: 1px solid var(--endspace-border-base);
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s;
}
.promotion-card:hover {
  border-color: var(--endspace-border-active);
  box-shadow: 0 0 0 1px var(--endspace-accent-yellow);
  transform: translateY(-2px);
}

.promotion-img {
  max-width: 100%;
  border-radius: 2px;
  margin-bottom: 0.5rem;
}

.promotion-name {
  color: var(--endspace-text-primary);
  font-weight: 600;
}

.promotion-desc {
  color: var(--endspace-text-secondary);
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

#notion-article {
  color: var(--endspace-text-primary);
  font-size: 1.05rem;
  line-height: 1.75;
}
#notion-article mjx-container {
  display: inline !important;
}
#notion-article mjx-container svg {
  display: inline !important;
}
#notion-article h1,
#notion-article h2,
#notion-article h3,
#notion-article h4 {
  color: var(--endspace-text-primary);
  margin-top: 2em;
  margin-bottom: 1em;
  font-weight: bold;
}
#notion-article h1 {
  font-size: 1.75rem;
  font-weight: 800;
}
#notion-article h2 {
  font-size: 1.5rem;
  font-weight: 700;
}
#notion-article h3 {
  font-size: 1.25rem;
  font-weight: 600;
}
#notion-article h4 {
  font-size: 1.1rem;
  font-weight: 600;
}
#notion-article blockquote {
  background: var(--endspace-bg-secondary);
  border-left: 3px solid var(--endspace-text-primary);
  color: var(--endspace-text-secondary);
  padding: 1.2rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
}
#notion-article ul,
#notion-article ol {
  padding-left: 1.5rem;
  margin: 1rem 0;
}
#notion-article ul {
  list-style-type: disc !important;
}
#notion-article ol {
  list-style-type: decimal !important;
}
#notion-article ul li,
#notion-article ol li {
  margin-bottom: 0.5em;
  color: var(--endspace-text-secondary);
  overflow-wrap: anywhere;
}
#notion-article ul li::marker,
#notion-article ol li::marker {
  color: var(--endspace-list-marker);
}
#notion-article p {
  margin: 1rem 0;
}
#notion-article a {
  color: var(--endspace-text-primary);
  text-decoration: none;
  border-bottom: 2px solid var(--endspace-accent-cyan-dim);
  transition: all 0.2s;
  font-weight: 600;
}
#notion-article a:hover {
  background: var(--endspace-accent-cyan-dim);
  border-bottom-color: var(--endspace-accent-cyan);
}
#notion-article img {
  max-width: 100%;
  height: auto;
  border-radius: 2px;
  box-shadow: var(--endspace-shadow-base);
  margin: 1.2rem 0;
}
#notion-article table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
#notion-article .table-container {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
}
#notion-article .table-container table {
  margin: 0;
}
#notion-article th,
#notion-article td {
  border: 1px solid var(--endspace-border-base);
  padding: 0.6rem 0.9rem;
  text-align: left;
}
#notion-article th {
  background: var(--endspace-bg-secondary);
  font-weight: 700;
}

#notion-article.full-table table {
  display: inline-table;
}

.old-post-warning {
  background: var(--endspace-bg-secondary);
  border: 1px solid var(--endspace-accent-cyan-dim);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  color: var(--endspace-text-secondary);
  font-size: 0.9rem;
  text-align: center;
}

.donation-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  border: 1px solid var(--endspace-border-base);
  background: var(--endspace-bg-secondary);
  color: var(--endspace-text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.donation-btn:hover, .donation-btn.active {
  background: var(--endspace-accent-cyan-dim);
  color: var(--endspace-text-primary);
  border-color: var(--endspace-text-primary);
}

.dark .donation-btn:hover,
.dark .donation-btn.active {
  color: var(--endspace-accent-cyan);
  border-color: var(--endspace-accent-cyan);
}

.donation-qrcode-panel {
  display: flex;
  justify-content: center;
  gap: 1rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin-top 0.3s ease;
  margin-top: 0;
}
.donation-qrcode-panel.open {
  max-height: 220px;
  opacity: 1;
  margin-top: 1rem;
}

.donation-qr {
  width: 160px;
  height: 160px;
  border-radius: 4px;
  box-shadow: var(--endspace-shadow-base);
}

#notion-article figure.highlight {
  margin: 1.5rem 0;
  border-radius: 6px;
  overflow-x: auto;
  background: #f6f8fa;
  border: 1px solid #d0d7de;
}
#notion-article figure.highlight table {
  width: 100%;
  border-spacing: 0;
  margin: 0;
  background: transparent;
}
#notion-article figure.highlight tbody,
#notion-article figure.highlight tr {
  background: transparent;
}
#notion-article figure.highlight td {
  padding: 0;
  border: none;
  vertical-align: top;
}
#notion-article figure.highlight .code {
  padding: 16px;
}
#notion-article figure.highlight .code pre {
  margin: 0;
  padding: 0;
  background: transparent;
  color: #24292f;
  font-size: 14px;
  line-height: 1.6;
}
#notion-article figure.highlight .code code {
  background: transparent;
  padding: 0;
  font-size: inherit;
}

.dark #notion-article figure.highlight {
  background: #161b22;
  border-color: #30363d;
}

.dark #notion-article figure.highlight .code pre {
  color: #c9d1d9;
}

#notion-article .hljs-comment {
  color: #6e7781;
}

#notion-article .hljs-string {
  color: #0a3069;
}

#notion-article .hljs-keyword {
  color: #cf222e;
}

#notion-article .hljs-function {
  color: #8250df;
}

#notion-article .hljs-variable {
  color: #953800;
}

#notion-article .hljs-number {
  color: #0550ae;
}

#notion-article .hljs-built_in {
  color: #953800;
}

.dark #notion-article .hljs-comment {
  color: #8b949e;
}

.dark #notion-article .hljs-string {
  color: #a5d6ff;
}

.dark #notion-article .hljs-keyword {
  color: #ff7b72;
}

.dark #notion-article .hljs-function {
  color: #d2a8ff;
}

.dark #notion-article .hljs-variable {
  color: #ffa657;
}

.dark #notion-article .hljs-number {
  color: #79c0ff;
}

.dark #notion-article .hljs-built_in {
  color: #ffa657;
}

#notion-article code {
  background: #f6f8fa;
  padding: 0.2em 0.4em;
  border-radius: 6px;
  font-size: 85%;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  border: 1px solid #d0d7de;
}

.dark #notion-article code {
  background: #161b22;
  border-color: #30363d;
}

#notion-article pre {
  background: #f6f8fa;
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

.dark #notion-article pre {
  background: #161b22;
}

#notion-article pre code {
  background: transparent;
  padding: 0;
  font-size: inherit;
  border: none;
}

.nier-nav-item {
  position: relative;
  overflow: hidden;
  transition: color 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1;
  color: var(--endspace-text-muted);
  border-radius: 1px;
  margin-bottom: 2px;
}
.nier-nav-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: #e0e0e0;
  transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: -1;
}
.nier-nav-item:hover, .nier-nav-item.active {
  color: var(--endspace-text-primary) !important;
}
.nier-nav-item:hover::before {
  width: 100%;
}
.nier-nav-item.active::before {
  width: 100%;
  background: #ebebeb;
}

.dark .nier-nav-item::before {
  background: #27272a;
}

.dark .nier-nav-item.active::before {
  background: #3f3f46;
}

.dark .nier-nav-item:hover,
.dark .nier-nav-item.active {
  color: #fafafa !important;
}

.ef-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem 0.5rem 0.75rem;
  background-color: #3f3f46 !important;
  border-radius: 1px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: fit-content;
  min-width: min-content;
  border: 1px solid transparent;
  text-decoration: none !important;
  position: relative;
  z-index: 10;
  color: #e4e4e7;
}
.ef-btn:hover {
  background-color: #27272a !important;
  border-radius: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.ef-btn-indicator {
  display: block;
  width: 4px;
  height: 18px;
  background-color: #fbfb45;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.ef-btn:hover .ef-btn-indicator {
  width: 12px;
  height: 12px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.ef-btn-text {
  color: #e4e4e7 !important;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.ef-btn:hover .ef-btn-text {
  color: #fff !important;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.loading-radar {
  width: 24px;
  height: 24px;
  border: 2px solid var(--endspace-border-base);
  border-top-color: var(--endspace-text-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-cover {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #0f1419;
  z-index: 99999;
  overflow: hidden;
  transition: opacity 0.6s ease-out;
}
.loading-cover.fadeout {
  opacity: 0;
}
.loading-cover.hidden {
  opacity: 0;
  pointer-events: none;
}
.loading-cover .progress-container {
  position: absolute;
  left: 0;
  top: 0;
  width: 12px;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
}
.loading-cover .progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: #fbfb45;
  transition: height 0.1s linear;
}
.loading-cover .center-content {
  position: absolute;
  top: 50%;
  right: 12%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  z-index: 10;
}
.loading-cover .loading-image {
  max-width: 240px;
  max-height: 240px;
  opacity: 0.9;
}
.loading-cover .site-name {
  font-family: "JetBrains Mono", Consolas, Monaco, monospace;
  font-size: clamp(0.75rem, 1.5vw, 1rem);
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  user-select: none;
}
.loading-cover .progress-info {
  position: absolute;
  left: 24px;
  top: 0%;
  transform: translateY(-100%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  transition: top 0.1s linear;
  padding-bottom: 12px;
}
.loading-cover .progress-percent {
  font-family: "JetBrains Mono", Consolas, Monaco, monospace;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: #fbfb45;
  letter-spacing: 2px;
  line-height: 1;
}
.loading-cover .status-line {
  display: flex;
  align-items: center;
  gap: 8px;
}
.loading-cover .status-dot {
  width: 6px;
  height: 6px;
  background: #fbfb45;
  border-radius: 50%;
  animation: lc-blink 0.8s ease-in-out infinite;
}
.loading-cover .status-text {
  font-family: "JetBrains Mono", Consolas, Monaco, monospace;
  font-size: 11px;
  font-weight: 500;
  color: rgba(251, 251, 70, 0.8);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.loading-cover .sweep-overlay {
  position: absolute;
  inset: 0;
  background: #fbfb45;
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
  z-index: 50;
}
.loading-cover.sweeping .sweep-overlay {
  animation: lc-sweep 0.4s ease-in-out forwards;
}
.loading-cover.fadeout .sweep-overlay {
  transform: scaleX(1);
}

@keyframes lc-blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}
@keyframes lc-sweep {
  0% {
    transform: scaleX(0);
    transform-origin: left;
  }
  100% {
    transform: scaleX(1);
    transform-origin: left;
  }
}
@media (width <= 768px) {
  .loading-cover .center-content {
    top: 50%;
    right: auto;
    left: 50%;
    transform: translate(-50%, -50%);
    gap: 16px;
  }
  .loading-cover .loading-image {
    max-width: 160px;
    max-height: 160px;
  }
  .loading-cover .site-name {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
  }
  .loading-cover .progress-container {
    width: calc(100% - 6rem);
    height: 8px;
    top: auto;
    bottom: 30px;
    left: 0;
  }
  .loading-cover .progress-fill {
    width: 0%;
    height: 100%;
    transition: width 0.1s linear;
  }
  .loading-cover .progress-info {
    top: auto;
    bottom: 24px;
    left: 12px;
    transform: none;
    flex-direction: row;
    gap: 8px;
    padding-bottom: 0;
  }
  .loading-cover .progress-percent {
    font-size: 14px;
  }
  .loading-cover .status-line {
    display: none;
  }
}
.fc-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: #f7f9fe;
  border-top: 1px solid var(--endspace-border-base);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.2);
  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0s 0.4s;
  z-index: 40;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}
.fc-drawer.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0s 0s;
}

@media (width >= 1024px) {
  .fc-drawer {
    bottom: 2rem;
    right: 5rem;
    left: auto;
    width: 20rem;
    max-width: calc(100vw - 2rem);
    border-radius: 12px;
    border: 1px solid var(--endspace-border-base);
    max-height: 70vh;
    transform: translateX(1rem);
  }
  .fc-drawer.open {
    transform: translateX(0);
  }
}
.dark .fc-drawer {
  background: #18181b;
  color: var(--endspace-text-primary);
}

.fc-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--endspace-border-base);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--endspace-text-primary);
  font-size: 0.85rem;
  gap: 0.5rem;
}

.fc-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.fc-capsule {
  position: fixed;
  right: 1rem;
  bottom: 2rem;
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  padding: 0.375rem;
  background: rgba(160, 160, 160, 0.8);
  backdrop-filter: blur(6px);
  border-radius: 9999px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  z-index: 50;
}

@media (width >= 1024px) {
  .fc-capsule {
    flex-direction: column;
    bottom: 2rem;
  }
}
.fc-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  cursor: pointer;
  border: none;
  color: #000;
  transition: transform 0.15s ease;
}
.fc-btn:active {
  transform: scale(0.95);
}
.fc-btn[data-fc-action=toc] {
  opacity: 0;
}
.fc-btn[data-fc-action=toc]:not([style*="display: none"], [style*="display:none"]) {
  animation: fc-btn-fade-in 0.3s ease forwards;
}
.fc-btn[data-fc-action=toc].fc-btn-exit {
  animation: fc-btn-fade-out 0.3s ease forwards;
}

@keyframes fc-btn-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes fc-btn-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
.fc-btn-inner {
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.fc-btn:hover .fc-btn-inner,
.fc-btn.active .fc-btn-inner {
  background: #fbfb45;
}

.fc-btn svg {
  width: 20px;
  height: 20px;
}

.fc-btn .fc-percent {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  color: #52525b;
}

.fc-btn:hover .fc-percent,
.fc-btn.active .fc-percent {
  display: none;
}

.fc-btn:hover .fc-icon-hover,
.fc-btn.active .fc-icon-hover {
  display: flex;
}

.fc-btn .fc-icon-hover {
  display: none;
}

.fc-toc-item {
  display: block;
  padding: 0.35rem 0.5rem;
  margin: 0 -0.5rem;
  font-size: 0.8rem;
  color: var(--endspace-text-secondary);
  border-radius: 4px;
  transition: all 0.15s ease;
  text-decoration: none;
}
.fc-toc-item:hover {
  color: #000;
  background: var(--endspace-accent-yellow);
}
.fc-toc-item.active {
  color: #fff;
  font-weight: 700;
  background: #000;
}

.dark .fc-toc-item:hover {
  color: #000;
  background: var(--endspace-accent-yellow);
}
.dark .fc-toc-item.active {
  color: #000;
  background: #fff;
}

@keyframes bg-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
.bg-watermark-scroll {
  display: inline-block;
  animation: bg-marquee 30s linear infinite;
  white-space: nowrap;
  line-height: 1;
}

.fade-enter {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.fade-enter.ready {
  opacity: 1;
  transform: translateY(0);
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.transition-fade {
  opacity: 1;
  transition: opacity 0.15s ease-out;
}

html.is-changing .transition-fade {
  opacity: 0;
}

html.is-rendering .transition-fade {
  opacity: 0;
}

html.is-popstate .transition-fade {
  transition: none;
}

.swup-spinner {
  position: fixed;
  inset: 0 0 0 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 30;
  opacity: 0;
  transition: opacity 0.3s ease;
}

@media (width <= 767px) {
  .swup-spinner {
    left: 0;
  }
}
.swup-spinner-ring {
  width: 200px;
  height: 200px;
  border: 5px solid var(--endspace-border-base);
  border-top-color: var(--endspace-accent-yellow);
  border-radius: 50%;
  animation: swup-spin 0.6s linear infinite;
}

@keyframes swup-spin {
  to {
    transform: rotate(360deg);
  }
}
.safe-area-top {
  padding-top: env(safe-area-inset-top);
}

.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom);
}

@media (width <= 767px) {
  #theme-endspace::before {
    background-size: 30px 30px;
  }
  .tech-text {
    font-size: 0.75rem;
    letter-spacing: 0.3px;
  }
  #notion-article {
    font-size: 1rem;
    line-height: 1.7;
  }
  #notion-article p {
    margin-bottom: 1.25em;
  }
  #notion-article table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }
  #notion-article figure.highlight {
    max-width: 100%;
  }
  #notion-article pre {
    max-width: 100%;
    overflow-x: auto;
  }
}
