.container {
  max-width: 55rem;
  padding-inline: 1rem;
  margin-inline: auto;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin-block: 2rem;
}

.web-logo {
  width: 20rem;
  height: auto;
}

.main-logo {
  width: 15rem;
  height: auto;
}

.search-section {
  margin: 2.5rem 0 1.5rem;
}

.search-form {
  display: flex;
  align-items: center;
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 0.25rem;
}

.search-form:hover, .search-form:focus {
  border-color: var(--line-3);
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.75rem 0.5rem 0.75rem 1rem;
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
  min-width: 0;
}

.search-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  margin-left: 0.25rem;
  background: var(--surface);
  border: none;
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.search-button svg {
  flex-shrink: 0;
}

.recommend-section {
  margin: 3rem 0;
}

.recommend-title {
  margin-bottom: 1.2rem;
}

.recommend-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
}

.recommend-card {
  flex: 0 0 280px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-3);
}

.recommend-card:hover {
  border-color: var(--line-2);
}

.card-media {
  height: 180px;
  mask-image: radial-gradient(120% 110% at 50% 42%, #000 55%, transparent 88%);
  background-color: var(--surface);
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.card-body {
  padding: 1rem 0.5rem;
}

.card-title {
  margin-bottom: 0.25rem;
}

.card-desc {
  font-size: 0.875rem;
  color: #777;
}

.history-today {
  margin: 3rem 0;
}

.history-title {
  margin-bottom: 1.2rem;
}

.history-date {
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 0.8rem;
  background: var(--surface);
  margin-left: 0.5rem;
  padding: 0.12rem;
  border-radius: 4px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.history-item {
  display: flex;
  gap: 1.2rem;
}

.history-item dt {
  min-width: 4rem;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--faint);
  font-family: monospace;
  text-align: right;
}

.history-item dd > p {
  margin-bottom: 0.5rem;
}

.history-item dd {
  line-height: 1.6;
  font-size: 0.95rem;
}

.footer-card {
  background: var(--surface);
  padding-block: 2rem;
  margin-top: 4rem;
}

.footer-logo {
  width: 8rem;
}

.footer-brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--faint-2);
  font-size: 0.875rem;
}

.footer-links {
  color: var(--faint);
  margin-block: 1rem;
}

.footer-links a {
  color: var(--text);
}

.c-banner {
    margin-top: 2rem;
    display: flex;
    gap: 2rem;
    padding: 1.3rem;
    border: 1px solid var(--line);
    background-color: var(--surface-3);
    background-image: radial-gradient(var(--faint-3) 1.4px, transparent 1.6px);
    background-size: 18px 18px;
    overflow: hidden;
    border-radius: 12px;
}

.banner-text {
  flex: 1 1 auto;
}

.c-banner .arrow {
  flex: 0 0 auto;
  align-self: center;
  border-radius: 50%;
  padding: 6px;
  border: 1px solid var(--line-2);
}

.c-banner .arrow svg {
  width: 18px;
  height: 18px;
}

.c-banner .card-title {
  margin-bottom: 0.6rem;
}

.c-banner .card-desc {
  font-size: 0.95rem;
  color: var(--faint-2);
}

.nav-toggle {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.site-head {
  display: flex;
  position: relative;
    gap: 1rem;
    margin-top: 2rem;
    align-items: center;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 11rem;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 0.4rem;
  z-index: 50;
  white-space: nowrap;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.18);
}

.dropdown-menu > ul {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.dropdown-menu a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--faint-2);
}

.dropdown-menu a:hover {
  background: var(--surface);
  color: var(--text);
}

body:has(.nav-toggle:checked) .dropdown-menu {
  display: block;
}

.news-section {
  margin-top: 3rem;
}

.news-section .section-title {
  margin-bottom: 1.2rem;
}

.news-banner {
  --banner-image: url("/images/fm.jpg");
  position: relative;
  margin-top: 3rem;
  min-block-size: 12rem;
  display: flex;
  align-items: flex-end;
  padding: 1.8rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  overflow: hidden;
  background-image: var(--banner-image), linear-gradient(120deg, var(--accent), var(--blue-1));
  background-size: cover;
  background-position: center;
  color: #fff;
}

.news-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 60%, transparent 100%);
}

.news-banner .banner-content {
  position: relative;
  max-inline-size: 40rem;
}

.news-banner .banner-tag {
  display: inline-block;
  margin-bottom: 0.6rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  font-size: 0.78rem;
}

.news-banner h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.news-banner p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.9);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 1.2rem;
}

.section-head .section-title {
  margin-bottom: 0;
}

.date-picker {
  margin-inline-start: auto;
  display: flex;
  gap: 0.5rem;
}

.date-picker select {
  appearance: none;
  padding: 0.35rem 2rem 0.35rem 0.7rem;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
}

.date-picker select:hover {
  border-color: var(--line-3);
}

.site-title .title-sub {
  font-size: 0.6em;
  font-weight: 400;
  color: var(--faint-2);
  margin-inline-start: 0.15em;
  vertical-align: 0.1em;
}

.menu-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.menu-group + .menu-group {
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--line-2);
}

.menu-label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--faint);
  padding-inline: 0.7rem;
  margin-bottom: 0.15rem;
}

.era-timeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0;
  margin-block: 1.5rem;
}

.era-pill {
  flex: 0 0 auto;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg);
  color: var(--faint-2);
  font-size: 0.82rem;
  white-space: nowrap;
  cursor: default;
}

.era-pill.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 500;
}

.era-link {
  flex: 0 0 auto;
  inline-size: 0.9rem;
  block-size: 1px;
  background: var(--line-3);
}

.article {
  margin-top: 2rem;
}

.article-header {
  margin-bottom: 2rem;
}

.article-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.article-lead {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--faint-2);
}

.article-body {

  max-inline-size: 40rem;
}

.article-body h2 {
  font-size: 1.35rem;
  margin-top: 2.5rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line-2);
}

.article-body h3 {
  font-size: 1.1rem;
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
}

.article-body p {
  line-height: 1.8;
  margin-bottom: 1.1rem;
}

.article-body blockquote {
  margin: 1.3rem 0;
  padding: 0.6rem 1.2rem;
  border-inline-start: 3px solid var(--accent);
  background: var(--surface-3);
  color: var(--faint-2);
}

.article-body blockquote p {
  margin-bottom: 0;
}

.infobox {
  margin-bottom: 2rem;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--surface-3);
  overflow: hidden;
  max-inline-size: 22rem;
}

.infobox-figure {
  margin: 0;
  position: relative;
}

.infobox-figure img {
  inline-size: 100%;
  block-size: 11rem;
  object-fit: cover;
  display: block;
}

.infobox-figure figcaption {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  padding: 1.5rem 1rem 0.6rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(0deg, rgba(0,0,0,0.65), transparent);
}

.infobox-body {
  padding: 1rem 1.2rem 1.2rem;
}

.infobox-sub {
  font-size: 0.85rem;
  color: var(--faint-2);
  margin-bottom: 0.9rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line-2);
}

.infobox-table {
  inline-size: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.infobox-table th,
.infobox-table td {
  padding: 0.4rem 0;
  text-align: start;
  vertical-align: top;
}

.infobox-table th {
  inline-size: 5.5rem;
  color: var(--faint-2);
  font-weight: 500;
  padding-inline-end: 1rem;
  white-space: nowrap;
}

.auth-wrap {
  min-block-size: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding-block: 3rem;
}

.magic-circle {
  inline-size: 11rem;
  block-size: 11rem;
}

.magic-circle .ring {
  fill: none;
  stroke: var(--accent);
  transform-origin: center;
}

.magic-circle .ring-outer {
  stroke-width: 1;
  stroke-dasharray: 6 4;
  animation: spin 24s linear infinite;
}

.magic-circle .ring-mid {
  stroke-width: 0.8;
  stroke-dasharray: 2 6;
  animation: spin 16s linear infinite reverse;
}

.magic-circle .ring-inner {
  stroke-width: 1.2;
  animation: spin 10s linear infinite;
}

.magic-circle .glyph {
  fill: none;
  stroke: var(--accent);
  stroke-width: 0.8;
  transform-origin: center;
  animation: spin 20s linear infinite;
  opacity: 0.7;
}

.magic-circle .core {
  fill: var(--accent);
  transform-origin: center;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.9); }
  50%      { opacity: 0.8; transform: scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  .magic-circle * { animation: none !important; }
}

.auth-card {
  inline-size: 22rem;
  max-inline-size: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-card h1 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 0.3rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-field label {
  font-size: 0.85rem;
  color: var(--faint-2);
}

.auth-field input {
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--accent);
}

.auth-submit {
  margin-top: 0.5rem;
  padding: 0.7rem;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}

.auth-submit:hover {
  filter: brightness(1.05);
}

.auth-alt {
  text-align: center;
  font-size: 0.85rem;
  color: var(--faint-2);
}

.auth-alt a {
  color: var(--accent);
}

.profile-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem;
  margin-top: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line-2);
}

.profile-avatar {
  inline-size: 4rem;
  block-size: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  border: 1px solid var(--line-2);
  overflow: hidden;
  flex: 0 0 auto;
}

.profile-avatar img {
    object-fit: contain;
    height: 100px;
  }

.profile-meta {
  flex: 1 1 auto;
  min-inline-size: 0;
}

.profile-name {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
}

.profile-role {
  font-size: 0.72rem;
  font-weight: 400;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in oklch, var(--accent) 15%, transparent);
  color: var(--accent);
}

.profile-handle {
  color: var(--faint-2);
  font-size: 0.88rem;
}

.profile-bio {
  margin-top: 1.2rem;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.7;
  max-inline-size: 40rem;
}

.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1.8rem;
  padding: 1rem 0;
}

.stat-card {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.stat-num {
  font-size: 1.3rem;
  font-weight: 700;
  font-family: monospace;
  color: var(--text);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--faint-2);
}

.profile-section {
  margin-top: 2.5rem;
}

.profile-section h2 {
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
}

.contrib-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.contrib-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-3);
}

.contrib-date {
  flex: 0 0 auto;
  font-family: monospace;
  font-size: 0.82rem;
  color: var(--faint);
}

.contrib-text {
  flex: 1 1 auto;
  font-size: 0.92rem;
}

.contrib-text a {
  color: var(--accent);
}

.article-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: start;
}

.article-toc {
  flex: 1 1 11rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface-3);
}

.toc-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--faint);
  margin-bottom: 0.6rem;
}

.article-toc ul {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.article-toc a {
  display: block;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  font-size: 0.88rem;
  color: var(--faint-2);
}

.article-toc a:hover {
  background: var(--surface);
  color: var(--text);
}

.article-layout .article-body {
  flex: 999 1 20rem;
  max-inline-size: none;
}

@media (min-width: 48rem) {
  .article-toc {
    order: 2;
    position: sticky;
    top: 1rem;
  }
}
