:root {
        --bg: #f5f7fa;
        --bg-alt: #ffffff;
        --accent: #0066aa;
        --accent-soft: #e5f2fb;
        --text: #023672;
        --text-muted: #666666;
        --border: #d0d6e0;
        --shadow-soft: 0 2px 6px rgba(0, 0, 0, 0.08);
        --radius: 8px;
        --radius-large: 10px;
      }

      * {
        box-sizing: border-box;
      }

      body {
        margin: 0;
        font-family:
          system-ui,
          -apple-system,
          BlinkMacSystemFont,
          "Segoe UI",
          sans-serif;
        background: var(--bg);
        color: var(--text);
      }

      a {
        color: var(--accent);
        text-decoration: none;
      }

      a:hover {
        text-decoration: underline;
      }

      .logo {
        height: 48px;
        margin-right: 0.5rem;
        display: block;
      }

      header {
        background: var(--bg-alt);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-soft);
        position: sticky;
        top: 0;
        z-index: 100;
      }

      .header-inner {
        max-width: 1200px;
        margin: 0 auto;
        padding: 1rem 1.5rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
      }

      .site-title {
        display: flex;
        align-items: center;
        gap: 0.6rem;
      }

      .site-title h1 {
        margin: 0;
        font-size: 1.4rem;
        font-weight: 600;
      }

      .site-title span {
        font-size: 0.9rem;
        color: var(--text-muted);
        display: block;
        margin-top: -4px;
      }

      nav.main-nav {
        display: flex;
        gap: 1rem;
        font-size: 0.95rem;
      }

      nav.main-nav a {
        padding: 0.4rem 0.6rem;
        border-radius: 999px;
      }

      nav.main-nav a:hover {
        background: var(--accent-soft);
        text-decoration: none;
      }

      .layout {
        max-width: 1200px;
        margin: 1.5rem auto;
        padding: 0 1.5rem 2rem;
        display: grid;
        grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
        gap: 1.5rem;
      }

      aside {
        align-self: flex-start;
        position: sticky;
        top: 5.5rem;
      }

      .side-card {
        background: var(--bg-alt);
        border-radius: var(--radius-large);
        padding: 1rem 1.1rem;
        border: 1px solid var(--border);
        box-shadow: var(--shadow-soft);
        margin-bottom: 1rem;
      }

      .side-card h2 {
        margin: 0 0 0.5rem;
        font-size: 1rem;
      }

      .side-card p {
        margin: 0.3rem 0;
        font-size: 0.9rem;
        color: var(--text-muted);
      }

      .side-nav {
        list-style: none;
        padding: 0;
        margin: 0.5rem 0 0;
        font-size: 0.9rem;
      }

      .side-nav li {
        margin-bottom: 0.25rem;
      }

      .side-nav a {
        display: block;
        padding: 0.3rem 0.4rem;
        border-radius: var(--radius);
      }

      .side-nav a:hover {
        background: var(--accent-soft);
        text-decoration: none;
      }

      main {
        display: flex;
        flex-direction: column;
        gap: 1.2rem;
      }

      .card {
        background: var(--bg-alt);
        border-radius: var(--radius-large);
        padding: 1.2rem 1.4rem;
        border: 1px solid var(--border);
        box-shadow: var(--shadow-soft);
      }

      .card h2 {
        margin-top: 0;
        font-size: 1.2rem;
      }

      .intro {
        font-size: 0.96rem;
        color: var(--text-muted);
        line-height: 1.5;
      }

      .object-header {
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
      }

      .object-title h1 {
        margin: 0;
        font-size: 1.5rem;
      }

      .object-title span {
        font-size: 0.9rem;
        color: var(--text-muted);
      }

      .object-meta {
        font-size: 0.85rem;
        color: var(--text-muted);
      }

      .meta-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1.2rem 1.2rem;
        margin-top: 0.3rem;
      }

      .meta-item-label {
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        color: var(--text-muted);
        margin-bottom: 0.1rem;
      }

      .meta-item-value {
        font-size: 0.9rem;
        color: var(--text);
      }

      .badge {
        display: inline-block;
        padding: 0.12rem 0.5rem;
        border-radius: 999px;
        background: var(--accent-soft);
        color: var(--accent);
        font-size: 0.78rem;
        margin-right: 0.3rem;
      }

      .pill {
        display: inline-block;
        padding: 0.12rem 0.5rem;
        border-radius: 999px;
        background: var(--accent-soft);
        color: var(--accent);
        font-size: 0.82rem;
        font-weight: 500;
        line-height: 1.4;
        text-decoration: none;
        white-space: nowrap;
      }

      a.pill:hover {
        background: var(--accent);
        color: #ffffff;
        text-decoration: none;
      }

      .cross-icon {
        color: #d32f2f;
        font-weight: 700;
        font-size: 1rem;
        line-height: 1;
      }

      .check-icon {
        color: #2e7d32;
        font-weight: 700;
        font-size: 1rem;
        line-height: 1;
      }

      .tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
        margin-top: 0.8rem;
      }

      .tab-btn {
        border: 1px solid var(--border);
        background: #f3f5fa;
        border-radius: 999px;
        padding: 0.35rem 0.8rem;
        font-size: 0.86rem;
        cursor: pointer;
      }

      .tab-btn:hover {
        background: var(--accent-soft);
      }

      .tab-btn.active {
        background: var(--accent);
        color: #ffffff;
        border-color: var(--accent);
      }

      .section-block {
        display: none;
      }

      .section-block.active {
        display: block;
      }

      .section-block h2 {
        margin-top: 0;
      }

      .section-block h3 {
        margin-top: 0.8rem;
        font-size: 1rem;
      }

      .section-block ul {
        padding-left: 1.1rem;
        font-size: 0.95rem;
      }

      #afbakening h3 + ul {
        color: var(--text-muted);
        line-height: 1.5;
      }

      .section-block li {
        margin-bottom: 0.25rem;
      }

      .highlight-box {
        background: #f6f8fc;
        border-radius: var(--radius);
        border: 1px solid var(--border);
        padding: 0.7rem 0.8rem;
        font-size: 0.9rem;
        margin-top: 0.6rem;
      }

      .iframe-menu-locked {
        position: relative;
      }

      .iframe-menu-click-blocker {
        position: absolute;
        inset: 0 auto 0 0;
        width: min(300px, 34%);
        z-index: 2;
        background: transparent;
        cursor: default;
      }

      @media (max-width: 700px) {
        .iframe-menu-click-blocker {
          display: none;
        }
      }

      .quality-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.9rem;
        margin-top: 0.7rem;
      }

      .quality-table th,
      .quality-table td {
        border-bottom: 1px solid #e0e4ec;
        padding: 0.4rem 0.3rem;
        text-align: left;
      }

      .quality-table th {
        background: #f6f7fb;
        font-weight: 600;
      }

      footer {
        border-top: 1px solid var(--border);
        padding: 0.8rem 1.5rem 1.2rem;
        font-size: 0.8rem;
        color: var(--text-muted);
        text-align: center;
      }

      @media (max-width: 880px) {
        .layout {
          grid-template-columns: minmax(0, 1fr);
        }

        aside {
          position: static;
        }
      }

      @media (max-width: 640px) {
        .header-inner {
          flex-direction: column;
          align-items: flex-start;
        }

        nav.main-nav {
          flex-wrap: wrap;
        }
      }
      .highlight-reading {
        background: #fff3a3;
        border-radius: 4px;
      }

	.header-inner {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.back-home-btn {
	display: inline-block;
	padding: 0.45rem 0.85rem;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent);
	font-size: 0.85rem;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	}

	.back-home-btn:hover {
		background: var(--accent);
	color: #ffffff;
	text-decoration: none;
	}
	
	.external-source-frame {
  border: 2px solid var(--border);
  border-radius: var(--radius-large);
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  margin-top: 0.8rem;
}

.external-source-label {
  background: #f6f7fb;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--border);
}

.iframe-scroll-wrapper {
  height: var(--iframe-window-height, 800px);
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  background: #ffffff;
}

.iframe-scroll-wrapper iframe {
  display: block;
  width: calc(100% + var(--iframe-extra-width, 600px));
  height: var(--iframe-content-height, 1600px);
  border: 0;
  transform:
    translateX(calc(-1 * var(--iframe-shift-x, 320px)))
    translateY(var(--iframe-shift-y, 0px));
  pointer-events: none;
}
