@import url('https://fonts.googleapis.com/css2?family=BIZ+UDPGothic:wght@400;700&family=Inter:wght@400;600;700&family=Noto+Serif+Hentaigana&display=swap');

:root {
  /* Clean Color Palette */
  --color-primary: #0f4b26;
  /* Deep green border/theme */
  --color-primary-light: #1b6637;
  --color-bg-pickup: #f3faf9;
  /* Extremely subtle, clean mint */
  --color-bg-links: #fdfbf3;
  /* Extremely subtle, clean warm beige */
  --color-text-main: #1e293b;
  /* Clean slate grey */
  --color-text-muted: #64748b;
  --color-link: #0f4b26;
  /* Using primary color for links for a cleaner look */
  --color-link-hover: #1b6637;
  --color-white: #ffffff;

  /* Spacing & Sizing */
  --header-height: 80px;
  --content-max-width: 1000px;
  /* Slightly narrower for a cleaner, focused read */
  --border-radius: 12px;
  /* Softer, modern round corners */

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.08);
  --shadow-header: 0 10px 30px rgba(15, 75, 38, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'BIZ UDPGothic', 'Inter', 'Noto Sans JP', 'Noto Serif Hentaigana', sans-serif;
  color: var(--color-text-main);
  background-color: #fafbfa;
  /* Slightly off-white for premium look */
  line-height: 1.7;
  padding-top: 116px;
  /* Floating header offset */
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: all 0.25s ease;
}

a:hover {
  color: var(--color-link-hover);
  opacity: 0.85;
}

.container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Sections */
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 32px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 30px;
  height: 3px;
  background-color: var(--color-primary);
  border-radius: 2px;
}

.section-pickup {
  background-color: var(--color-bg-pickup);
  padding: 80px 0;
}

.section-links {
  background-color: var(--color-bg-links);
  padding: 80px 0;
}

/* Utilities */
.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mt-4 {
  margin-top: 1rem;
}

/* Grid Layouts */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

@media (max-width: 640px) {
  .links-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Futuristic City Page Styles */
.cyber-grid-bg {
  background-image: radial-gradient(rgba(15, 75, 38, 0.04) 1px, transparent 0);
  background-size: 20px 20px;
  background-color: #fafbfa;
}

.city-header-section {
  padding: 60px 0 20px 0;
  border-bottom: 1px dashed rgba(15, 75, 38, 0.2);
  margin-bottom: 40px;
}

.city-meta {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--color-primary);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.city-meta::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--color-primary);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.toc-box {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 75, 38, 0.15);
  border-left: 5px solid var(--color-primary);
  border-radius: 8px;
  padding: 24px;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(15, 75, 38, 0.03);
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
}

.toc-box::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, transparent 50%, rgba(15, 75, 38, 0.1) 50%);
}

.toc-box-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px 20px;
  list-style: none;
}

.toc-list a {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.toc-list a::before {
  content: '■';
  font-size: 0.6rem;
  color: rgba(15, 75, 38, 0.4);
  transition: color 0.2s ease;
}

.toc-list a:hover {
  color: var(--color-primary);
  padding-left: 4px;
}

.toc-list a:hover::before {
  color: var(--color-primary);
}

/* Button */
.btn {
  display: inline-block;
  background: var(--color-primary);
  color: white;
  padding: 12px 28px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(15, 75, 38, 0.15);
  text-align: center;
}

.btn:hover {
  background: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 75, 38, 0.2);
  color: white;
  opacity: 1;
}

/* Footer */
.site-footer {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 40px 0;
}

.site-footer .footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.site-footer .footer-nav a {
  margin: 0 8px;
  color: var(--color-white);
  text-decoration: none;
}

.site-footer .footer-nav a:hover {
  text-decoration: underline;
}

/* Sticky Bottom TOC */
.sticky-toc-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(15, 75, 38, 0.15);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
  z-index: 999;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sticky-toc-container.visible {
  transform: translateY(0);
}

.sticky-toc-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

.sticky-toc-list {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding-bottom: 4px;
  /* for scrollbar */
  scrollbar-width: none;
  /* Firefox */
}

.sticky-toc-list::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari */
}

.sticky-toc-list a {
  background: var(--color-bg-pickup);
  color: var(--color-primary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid rgba(15, 75, 38, 0.1);
}

.sticky-toc-list a:hover {
  background: var(--color-primary);
  color: white;
}