/* ========================================
   CSS Variables / Theme
   ======================================== */
:root {
  --color-bg: #F3F6FA;
  --color-surface: #FFFFFF;
  --color-primary: #1B2D4F;
  --color-accent: #2A6496;
  --color-gold: #4A9BC5;
  --color-purchase: #B7791F;
  --color-purchase-hover: #8E5714;
  --color-purchase-soft: #F4E7D3;
  --color-purchase-border: #B08A4A;
  --color-purchase-text: #8A6A2C;
  --color-text: #1E2835;
  --color-text-muted: #57697D;
  --color-border: #C9D7E8;
  --color-hover: #E8EFF8;

  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 2px 12px rgba(27, 45, 79, 0.08);
  --shadow-hover: 0 6px 24px rgba(27, 45, 79, 0.16);

  --max-width: 1100px;
  --header-height: 54px;
  --books-nav-height: 42px;
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

a:hover {
  text-decoration: underline;
}

p + p {
  margin-top: 0.75rem;
}

/* ========================================
   Layout
   ======================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  flex: 1;
}

/* ========================================
   Site Header
   ======================================== */
.site-header {
  background: var(--color-primary);
  color: #fff;
  padding: 0.9rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  font-size: 1.15rem;
  font-weight: bold;
  color: var(--color-gold);
  letter-spacing: 0.04em;
}

.site-logo:hover {
  text-decoration: none;
  opacity: 0.85;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--color-gold);
  text-decoration: none;
}

.lang-switch {
  font-size: 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.38);
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.lang-switch:hover {
  background: rgba(255, 255, 255, 0.15);
  text-decoration: none !important;
}

/* ========================================
   Breadcrumb
   ======================================== */
.breadcrumb {
  padding: 0.85rem 0;
  font-size: 0.83rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

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

.breadcrumb-sep {
  color: var(--color-border);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  background: linear-gradient(140deg, var(--color-primary) 0%, #2A3F6F 60%, #152340 100%);
  color: #fff;
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--color-gold);
  margin-bottom: 0.85rem;
}

.hero-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: bold;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.hero-format {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-purchase-hover);
  background: var(--color-purchase-soft);
  border: 1px solid rgba(183, 121, 31, 0.35);
  padding: 0.3rem 1.1rem;
  border-radius: 100px;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 560px;
  margin: 0 auto;
}

.hero-ku {
  margin-top: 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.03em;
}

.hero-ku strong {
  color: #F4C98D;
  font-weight: 700;
}

.hero-ku a {
  color: inherit;
  text-decoration: none;
}

.hero-ku a:hover {
  text-decoration: underline;
}

/* ========================================
   Generic Section
   ======================================== */
.section {
  padding: 3.5rem 0;
}

.section-title {
  font-size: 1.45rem;
  font-weight: bold;
  color: var(--color-primary);
  margin-bottom: 1.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 3px solid var(--color-gold);
  display: inline-block;
}

.section-lead {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  max-width: 660px;
}

/* ========================================
   Book Cards (grid / list page)
   ======================================== */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.book-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  color: var(--color-text);
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
  color: var(--color-text);
}

.book-card-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.book-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder cover (no image) */
.book-card-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #1B2D4F 0%, #2A3F6F 100%);
  color: var(--color-gold);
  text-align: center;
  padding: 1.5rem;
  gap: 0.75rem;
}

.book-card-cover-placeholder .piece {
  font-size: 3rem;
  line-height: 1;
}

.book-card-cover-placeholder .title {
  font-size: 0.85rem;
  line-height: 1.5;
  opacity: 0.9;
}

.book-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.book-card-title {
  font-size: 1rem;
  font-weight: bold;
  color: var(--color-primary);
  line-height: 1.4;
}

.book-card-subtitle {
  font-size: 0.83rem;
  color: var(--color-text-muted);
}

.book-card-desc {
  font-size: 0.88rem;
  color: var(--color-text);
  line-height: 1.65;
  flex: 1;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

.book-card-link {
  align-self: flex-start;
  color: var(--color-accent);
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: auto;
}

.book-card-link::after {
  content: " \2192";
}

/* ========================================
   Book Detail — Hero
   ======================================== */
.book-hero {
  padding: 3rem 0;
  border-bottom: 1px solid var(--color-border);
}

.book-hero-inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
}

.book-cover-wrap {
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(27, 45, 79, 0.22);
}

.book-cover-placeholder {
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #1B2D4F 0%, #2A3F6F 100%);
  color: var(--color-gold);
  text-align: center;
  padding: 2rem;
  gap: 1rem;
}

.book-cover-placeholder .piece {
  font-size: 4.5rem;
  line-height: 1;
}

.book-cover-placeholder .title {
  font-size: 0.95rem;
  line-height: 1.55;
  font-weight: bold;
}

.book-meta {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.book-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--color-gold);
  font-weight: bold;
}

.book-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: bold;
  color: var(--color-primary);
  line-height: 1.3;
}

.book-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.kindle-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #F4C98D;
  background: #232F3E;
  border: 1px solid rgba(244, 201, 141, 0.35);
  padding: 0.28rem 0.8rem;
  border-radius: 4px;
  letter-spacing: 0.03em;
  width: fit-content;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.kindle-badge::before {
  content: "";
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  background: currentColor;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 2H5a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zm-7 14l-5-5 1.41-1.41L12 13.17l7.59-7.59L21 7l-9 9z'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 2H5a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zm-7 14l-5-5 1.41-1.41L12 13.17l7.59-7.59L21 7l-9 9z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.book-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.tag {
  font-size: 0.73rem;
  padding: 0.18rem 0.65rem;
  border-radius: 100px;
  background: var(--color-hover);
  border: 1px solid var(--color-border);
  color: var(--color-accent);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.book-purchase {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
  letter-spacing: 0.02em;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: #F6E6B8;
  color: var(--color-purchase-text);
  border: 1.5px solid var(--color-purchase-border);
}

.btn-primary:hover {
  background: #F1DFA7;
  box-shadow: 0 4px 16px rgba(176, 138, 74, 0.28);
  color: #75581F;
}

.btn-primary:focus-visible {
  outline: 3px solid var(--color-purchase-soft);
  outline-offset: 2px;
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-hover);
  color: var(--color-accent);
}

/* ========================================
   Book Detail — Content Sections
   ======================================== */
.book-sections {
  display: flex;
  flex-direction: column;
}

.book-section {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.book-section:last-child {
  border-bottom: none;
}

.book-section-title {
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--color-primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

/* ========================================
   Lists
   ======================================== */
.styled-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.styled-list li {
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.95rem;
}

.styled-list li::before {
  content: "\25B8";
  position: absolute;
  left: 0;
  color: var(--color-gold);
  font-size: 0.85em;
  top: 0.15em;
}

/* ========================================
   Table of Contents
   ======================================== */
.toc-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.toc-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.93rem;
  transition: background 0.15s;
}

.toc-item:last-child {
  border-bottom: none;
}

.toc-item:nth-child(even) {
  background: var(--color-bg);
}


.toc-num {
  font-size: 0.77rem;
  color: var(--color-gold);
  font-weight: bold;
  min-width: 4.5rem;
  flex-shrink: 0;
}

/* Expandable TOC */
.toc-expandable {
  display: block;
  padding: 0;
}

.toc-expandable summary {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  cursor: pointer;
  list-style: none;
  transition: background 0.15s;
}

.toc-expandable summary::-webkit-details-marker {
  display: none;
}

.toc-expandable summary::after {
  content: "\25B8";
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.toc-expandable[open] summary::after {
  transform: rotate(90deg);
}

.toc-expandable summary:hover {
  background: var(--color-hover);
}

.toc-sub {
  list-style: none;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 0.5rem 0;
  overflow: hidden;
}

.toc-sub li {
  padding: 0.45rem 1.1rem 0.45rem 5.8rem;
  font-size: 0.87rem;
  color: var(--color-text-muted);
  position: relative;
}

.toc-sub li::before {
  content: "–";
  position: absolute;
  left: 4.5rem;
  color: var(--color-border);
}

/* ========================================
   Author Box
   ======================================== */
.author-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
  box-shadow: var(--shadow);
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold);
  font-size: 1.8rem;
  flex-shrink: 0;
  overflow: hidden;
  border: 3px solid #C8922A;
  box-shadow: 0 4px 12px rgba(27, 45, 79, 0.2);
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-name {
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 0.4rem;
  color: var(--color-primary);
}

.author-bio {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.75;
}

.author-bio .books-link {
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.author-bio .books-link:hover {
  opacity: 0.75;
  text-decoration: underline;
}

/* ========================================
   Related Books (compact grid)
   ======================================== */
.related-books {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

/* ========================================
   Language Selector (root page)
   ======================================== */
.lang-selector {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background: var(--color-bg);
}

.lang-selector-icon {
  font-size: 5rem;
  line-height: 1;
  color: var(--color-primary);
  margin-bottom: 1.25rem;
  font-weight: bold;
}

.lang-selector-title {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: bold;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.lang-selector-subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 3rem;
  letter-spacing: 0.05em;
}

.lang-buttons {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.lang-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1.5rem 2.75rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow);
  transition: all 0.25s;
  color: var(--color-text);
  min-width: 168px;
}

.lang-btn:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  text-decoration: none;
  color: var(--color-primary);
}

.lang-btn .label {
  font-size: 1.15rem;
  font-weight: bold;
}

.lang-btn .sub {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.65);
  padding: 1.75rem 0;
  text-align: center;
  font-size: 0.83rem;
  margin-top: auto;
}

.site-footer a {
  color: var(--color-gold);
}

.site-footer a:hover {
  color: #7CC0E0;
  text-decoration: none;
}

.affiliate-notice {
  font-size: 0.75rem;
  opacity: 0.5;
  margin-bottom: 0.5rem;
}

/* ========================================
   X Share Button
   ======================================== */
.article-share {
  margin: 2rem 0 1rem;
  display: flex;
  justify-content: center;
}

.btn-x-share {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #000;
  color: #fff;
  font-size: 0.88rem;
  font-weight: bold;
  padding: 0.55rem 1.2rem;
  border-radius: 9999px;
  transition: opacity 0.2s;
}

.btn-x-share:hover {
  opacity: 0.8;
  text-decoration: none;
  color: #fff;
}

/* ========================================
   Books Nav (single-page anchor navigation)
   ======================================== */
.books-nav {
  background: #162847;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: var(--header-height);
  z-index: 99;
}

.books-nav .container {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
}

.books-nav .container::-webkit-scrollbar {
  display: none;
}

.books-nav a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  padding: 0.68rem 1.2rem;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s;
  text-decoration: none;
}

.books-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-gold);
  text-decoration: none;
}

.books-nav .nav-num {
  font-size: 0.68rem;
  color: var(--color-gold);
  font-weight: bold;
  opacity: 0.8;
}

/* ========================================
   Book Page Section (single-page view)
   ======================================== */
.book-page-section {
  padding: 3.5rem 0;
  border-bottom: 2px solid var(--color-border);
  scroll-margin-top: calc(var(--header-height) + var(--books-nav-height) + 12px);
}

.book-page-section:last-child {
  border-bottom: none;
}

.book-page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.25rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(90deg, var(--color-hover) 0%, transparent 100%);
  border-left: 4px solid var(--color-gold);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.book-num-badge {
  font-size: 2rem;
  font-weight: bold;
  color: var(--color-gold);
  opacity: 0.55;
  line-height: 1;
  flex-shrink: 0;
}

.book-page-title {
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  font-weight: bold;
  color: var(--color-primary);
  line-height: 1.3;
}

.book-intro {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 2.5rem;
}

.book-details {
  display: flex;
  flex-direction: column;
}

.book-detail-section {
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.book-detail-section:last-child {
  margin-bottom: 0;
}

/* Jump links to other books */
.other-books-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.other-books-links a {
  font-size: 0.85rem;
  color: var(--color-accent);
  font-weight: 600;
  padding: 0.4rem 1rem;
  border: 1.5px solid var(--color-accent);
  border-radius: 100px;
  transition: all 0.2s;
}

.other-books-links a::after {
  content: " \2192";
}

.other-books-links a:hover {
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
}

/* ========================================
   Blog Post List
   ======================================== */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
  display: block;
  color: var(--color-text);
}

.post-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  text-decoration: none;
  color: var(--color-text);
}

.post-card.has-thumb {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.25rem 1.5rem;
}

.post-card-thumb {
  width: 160px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--color-hover);
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-card-body {
  flex: 1;
  min-width: 0;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.post-card-category {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-hover);
  border: 1px solid var(--color-border);
  padding: 0.15rem 0.6rem;
  border-radius: 100px;
  letter-spacing: 0.02em;
}

.post-card-title {
  font-size: 1.15rem;
  font-weight: bold;
  color: var(--color-primary);
  line-height: 1.45;
  margin-bottom: 0.6rem;
}

.post-card-excerpt {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.post-card-readmore {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
}

.post-card-readmore::after {
  content: " \2192";
}

/* ========================================
   Blog Article Page
   ======================================== */
.article-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2.5rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.article-category {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-hover);
  border: 1px solid var(--color-border);
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
}

.article-title {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: bold;
  color: var(--color-primary);
  line-height: 1.35;
  margin-bottom: 0.75rem;
}

.article-lead {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.75;
  max-width: 680px;
}

.article-body {
  max-width: 720px;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--color-text);
}

.article-body h2 {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--color-primary);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-gold);
  display: inline-block;
}

.article-body h3 {
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--color-primary);
  margin-top: 1.75rem;
  margin-bottom: 0.65rem;
}

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

.article-body ul,
.article-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.article-body ul li {
  list-style: none;
  padding-left: 1.2rem;
  position: relative;
  font-size: 0.97rem;
}

.article-body ul li::before {
  content: "\25B8";
  position: absolute;
  left: 0;
  color: var(--color-gold);
  font-size: 0.8em;
  top: 0.2em;
}

.article-body ol li {
  list-style: decimal;
  font-size: 0.97rem;
}

.article-body strong {
  color: var(--color-primary);
}

.article-thumb {
  width: 100%;
  max-height: 380px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ========================================
   Glossary inline links
   ======================================== */
.glossary-link {
  border-bottom: 1px dotted var(--color-primary);
  text-decoration: none;
  color: inherit;
}
.glossary-link:hover {
  border-bottom-style: solid;
  color: var(--color-primary);
}

/* ========================================
   Link Card (OGP preview)
   ======================================== */
.link-card {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 1.5rem 0;
  transition: box-shadow 0.2s, transform 0.2s;
  color: var(--color-text);
  background: var(--color-surface);
  text-decoration: none !important;
}

.link-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.link-card-thumb {
  width: 160px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--color-hover);
}

.link-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.link-card-body {
  padding: 1rem 1.25rem;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  justify-content: center;
}

.link-card-title {
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--color-primary);
  line-height: 1.45;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.link-card-desc {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.link-card-host {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin: 0;
}

@media (max-width: 480px) {
  .link-card {
    flex-direction: column;
  }
  .link-card-thumb {
    width: 100%;
    height: 140px;
  }
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.25rem;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.btn-ghost:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  text-decoration: none;
}

.obfuscated-email {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.copy-email-btn {
  margin-left: 0.45rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 0.75rem;
  line-height: 1.4;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-email-btn:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: var(--color-hover);
}

.btn-nav {
  display: inline-flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem 1.25rem;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s;
  max-width: 300px;
}

.btn-nav:hover {
  background: var(--color-hover);
  text-decoration: none;
}

.btn-nav-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1;
}

.btn-nav-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-accent);
  line-height: 1.5;
}

.article-body blockquote {
  background: var(--color-hover);
  border-left: 4px solid var(--color-gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.93rem;
  color: var(--color-text-muted);
}

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

.article-body a {
  color: var(--color-accent);
}

.article-body code {
  background: var(--color-hover);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-size: 0.88em;
}

.article-body .note {
  background: var(--color-hover);
  border-left: 4px solid var(--color-gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.93rem;
  color: var(--color-text-muted);
}

.article-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}


/* ========================================
   Back to Top Button
   ======================================== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s, transform 0.2s;
  box-shadow: var(--shadow-hover);
  z-index: 100;
}

.back-to-top.is-visible {
  opacity: 0.85;
  visibility: visible;
}

.back-to-top:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  .post-card.has-thumb {
    flex-direction: column;
  }

  .post-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .book-hero-inner,
  .book-intro {
    grid-template-columns: 1fr;
  }

  .book-cover-wrap {
    max-width: 190px;
    margin: 0 auto;
  }

  .author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .site-nav {
    gap: 0.9rem;
  }

  .hero {
    padding: 2.75rem 0;
  }
}

@media (max-width: 480px) {
  .books-grid {
    grid-template-columns: 1fr;
  }

  .related-books {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 2.5rem 0;
  }

  .book-section {
    padding: 2rem 0;
  }

  .book-page-section {
    padding: 2.5rem 0;
  }

  .lang-btn {
    min-width: 140px;
    padding: 1.25rem 2rem;
  }
}
