/* ==========================================================================
   阿貴編譯工作室 / St. Paul Workshop
   Complete Bilingual Website Stylesheet — Modern & Vibrant (現代活潑風)
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  /* ---- Color palette ---- */
  --primary:       #1E6BB8;
  --primary-rgb:   30, 107, 184;
  --dark:          #0B1D3A;
  --dark-rgb:      11, 29, 58;
  --accent1:       #3D9BE9;   /* bright blue   */
  --accent2:       #E8A817;   /* gold           */
  --accent3:       #E74C3C;   /* coral / red    */
  --accent4:       #27AE60;   /* green          */
  --accent5:       #8E44AD;   /* purple         */
  --accent6:       #00899B;   /* teal           */
  --light:         #F8FAFC;
  --light-blue:    #EEF5FC;
  --white:         #FFFFFF;
  --text:          #2D2D2D;
  --text-light:    #4A4A4A;
  --border:        #D6E4F0;

  /* ---- Category tag colors ---- */
  --tag-foundation:   var(--primary);    /* 基礎打底  */
  --tag-writing:      var(--accent4);    /* 寫作實力  */
  --tag-professional: var(--accent6);    /* 專業英語  */

  /* ---- Typography ---- */
  --ff: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
  --ff-heading: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
  --fs-xs:   0.75rem;    /* 12px */
  --fs-sm:   0.875rem;   /* 14px */
  --fs-base: 1rem;       /* 16px */
  --fs-lg:   1.25rem;    /* 20px */
  --fs-xl:   1.5rem;     /* 24px */
  --fs-2xl:  2rem;       /* 32px */
  --fs-3xl:  2.5rem;     /* 40px */
  --fs-4xl:  3.25rem;    /* 52px */
  --lh:      1.7;

  /* ---- Spacing ---- */
  --sp-xs:  0.25rem;
  --sp-sm:  0.5rem;
  --sp-md:  1rem;
  --sp-lg:  1.5rem;
  --sp-xl:  2rem;
  --sp-2xl: 3rem;
  --sp-3xl: 4rem;
  --sp-4xl: 6rem;

  /* ---- Radii & Shadows ---- */
  --r-sm:   6px;
  --r-md:   12px;
  --r-lg:   20px;
  --r-xl:   28px;
  --r-full: 50%;

  --shadow-xs:  0 1px 3px rgba(0,0,0,0.04);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:  0 8px 30px rgba(0,0,0,0.14);
  --shadow-xl:  0 14px 44px rgba(0,0,0,0.18);
  --shadow-card: 0 12px 36px rgba(var(--primary-rgb), 0.18);
  --shadow-glow: 0 0 0 1px rgba(var(--primary-rgb), 0.08),
                 0 8px 32px rgba(var(--primary-rgb), 0.16),
                 0 2px 6px rgba(0,0,0,0.04);

  /* ---- Transitions ---- */
  --ease-fast:   0.2s ease;
  --ease-base:   0.35s ease;
  --ease-slow:   0.5s ease;
  --ease-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-spring: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* ---- Layout ---- */
  --nav-h:          72px;
  --nav-h-scrolled: 60px;
  --container-max:  1200px;
  --container-wide: 1400px;
}


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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--ff);
  color: var(--text);
  background:
    radial-gradient(1200px 280px at 50% -10%, rgba(var(--primary-rgb), 0.08), transparent),
    var(--white);
  line-height: var(--lh);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--ease-fast);
}

a:hover { color: var(--accent1); }

ul, ol { list-style: none; }

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-heading);
  line-height: 1.3;
  color: var(--dark);
  font-weight: 700;
  letter-spacing: 0;
  font-style: normal;
}

p,
li,
summary,
a,
.book-card-title,
.book-card-desc,
.book-meta li,
.book-title,
.book-title-en,
.contact-item p,
.channel-details li,
.footer-links li {
  overflow-wrap: anywhere;
  word-break: break-word;
}

::selection {
  background: var(--accent1);
  color: var(--white);
}


/* --------------------------------------------------------------------------
   2. Utility — Container
   -------------------------------------------------------------------------- */
.container {
  width: 90%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--sp-md);
  min-width: 0;
}


/* --------------------------------------------------------------------------
   3. Navigation — Sticky Navbar + Hamburger
   -------------------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.16);
  transition: height var(--ease-base),
              box-shadow var(--ease-base),
              background var(--ease-base);
}

.navbar.scrolled {
  height: var(--nav-h-scrolled);
  box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.14);
  background: rgba(255,255,255,0.95);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 1400;
  background: linear-gradient(90deg, var(--accent2), var(--accent1));
  box-shadow: 0 0 10px rgba(61, 155, 233, 0.45);
  transition: width 0.15s linear;
}

/* Nav container */
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 90%;
  max-width: var(--container-wide);
  margin: 0 auto;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-shrink: 0;
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  font-weight: 700;
  color: var(--dark);
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--ease-bounce);
}

.nav-logo:hover {
  color: var(--dark);
  transform: scale(1.03);
}

.nav-logo span {
  color: var(--primary);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.nav-logo img {
  height: 40px;
  width: auto;
}

/* Menu list */
.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Nav links */
.nav-link {
  position: relative;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  padding: var(--sp-xs) 0;
  transition: color var(--ease-fast);
  letter-spacing: 0.02em;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--accent2), var(--primary));
  border-radius: 2px;
  transition: width var(--ease-base), left var(--ease-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
  left: 0;
}

/* Language toggle button */
.lang-toggle {
  padding: 5px 16px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--primary);
  background: transparent;
  border: 2px solid rgba(var(--primary-rgb), 0.72);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--ease-fast),
              color var(--ease-fast),
              transform var(--ease-bounce);
  margin-left: var(--sp-sm);
  letter-spacing: 0.05em;
}

.lang-toggle:hover {
  background: var(--primary);
  color: var(--white);
  transform: scale(1.05);
}

.lang-toggle:active {
  transform: scale(0.98);
}

/* Hamburger button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  z-index: 1001;
  background: none;
  border: none;
  padding: 0;
}

.nav-toggle .hamburger-line {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--dark);
  border-radius: 3px;
  transition: transform var(--ease-base),
              opacity var(--ease-fast);
  transform-origin: center;
}

.nav-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}


/* --------------------------------------------------------------------------
   4. Hero — Full-screen Homepage
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + var(--sp-3xl)) var(--sp-xl) var(--sp-3xl);
  background: linear-gradient(160deg, #070E1A 0%, #0B1D3A 30%, #132F5C 60%, #1A4070 100%);
  overflow: hidden;
}

/* Overlay — radial gradients for depth */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 600px at 20% 50%, rgba(61,155,233,0.28), transparent),
    radial-gradient(ellipse 500px 500px at 80% 30%, rgba(181, 216, 255, 0.14), transparent),
    radial-gradient(ellipse 420px 420px at 60% 85%, rgba(128, 156, 223, 0.10), transparent);
  pointer-events: none;
  z-index: 1;
}

.hero-dynamic-layers {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero [data-parallax] {
  --mx: 0px;
  --my: 0px;
  --sy: 0px;
  transform: translate3d(var(--mx), calc(var(--my) + var(--sy)), 0);
  will-change: transform;
}

.hero-orb,
.hero-grid {
  position: absolute;
}

.hero-orb {
  border-radius: 50%;
  filter: blur(2px);
  mix-blend-mode: screen;
  opacity: 0.6;
}

.hero-orb-a {
  width: clamp(240px, 34vw, 460px);
  height: clamp(240px, 34vw, 460px);
  top: 8%;
  left: -8%;
  background: radial-gradient(circle, rgba(96, 174, 255, 0.30) 0%, rgba(90, 165, 242, 0.10) 66%, transparent 100%);
  animation: heroOrbFloatA 11s ease-in-out infinite;
}

.hero-orb-b {
  width: clamp(200px, 26vw, 340px);
  height: clamp(200px, 26vw, 340px);
  right: -6%;
  top: 14%;
  background:
    radial-gradient(circle at 34% 36%, rgba(223, 240, 255, 0.36) 0%, rgba(176, 214, 255, 0.22) 32%, rgba(111, 173, 243, 0.10) 68%, transparent 100%);
  animation: heroOrbFloatB 13s ease-in-out infinite;
}

.hero-orb-c {
  width: clamp(180px, 24vw, 320px);
  height: clamp(180px, 24vw, 320px);
  bottom: -10%;
  right: 22%;
  background: radial-gradient(circle, rgba(126, 150, 226, 0.20) 0%, rgba(126, 150, 226, 0.04) 72%, transparent 100%);
  animation: heroOrbFloatA 15s ease-in-out infinite reverse;
}

.hero-grid {
  inset: 0;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.9) 24%, rgba(0, 0, 0, 0.8) 82%, transparent 100%);
  animation: heroGridDrift 22s linear infinite;
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  animation: fadeSlideUp 0.9s ease both;
}

/* Academic badge above title */
.hero-badge {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--sp-lg);
  backdrop-filter: blur(8px);
  animation: fadeSlideUp 0.7s ease both;
}

.hero-title {
  font-size: clamp(2.4rem, 5.6vw, 3.8rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: var(--sp-md);
  letter-spacing: -0.02em;
}

.hero-title span {
  background: linear-gradient(180deg, #FFFFFF 0%, #D4E8FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.18));
}

/* Decorative divider line under title */
.hero-divider {
  width: 56px;
  height: 2px;
  margin: 0 auto var(--sp-lg);
  background: linear-gradient(90deg, transparent, var(--accent2), transparent);
  border-radius: 2px;
  opacity: 0.7;
}

.hero-subtitle {
  font-size: var(--fs-lg);
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--sp-md);
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0.01em;
  animation: fadeSlideUp 0.9s 0.12s ease both;
}

.hero-author {
  font-size: var(--fs-base);
  color: var(--accent2);
  font-weight: 600;
  margin-bottom: var(--sp-xl);
  letter-spacing: 0.04em;
  animation: fadeSlideUp 0.9s 0.24s ease both;
}

.hero-lede {
  max-width: 640px;
  margin: 0 auto var(--sp-lg);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
  line-height: 1.85;
  font-weight: 400;
}

/* Hero CTA button group */
.hero-cta-group {
  display: flex;
  justify-content: center;
  gap: var(--sp-md);
  flex-wrap: wrap;
  animation: fadeSlideUp 0.9s 0.32s ease both;
}

.btn-hero-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: 13px 32px;
  font-size: var(--fs-base);
  font-weight: 600;
  border-radius: var(--r-sm);
  border: 1.5px solid rgba(255, 255, 255, 0.40);
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  cursor: pointer;
  text-decoration: none;
  min-height: 48px;
  transition: transform var(--ease-bounce),
              background var(--ease-fast),
              border-color var(--ease-fast),
              color var(--ease-fast);
}

.btn-hero-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.60);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-hero-ghost:active {
  transform: translateY(0) scale(0.98);
}

.hero-metrics {
  margin-top: var(--sp-xl);
  display: flex;
  justify-content: center;
  gap: var(--sp-md);
  flex-wrap: wrap;
  animation: fadeSlideUp 0.9s 0.44s ease both;
}

.hero-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 24px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  min-width: 110px;
  transition: background var(--ease-fast),
              border-color var(--ease-fast);
}

.hero-metric:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.28);
}

.hero-metric strong {
  color: var(--accent2);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
}

.hero-metric span {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  opacity: 0.85;
}

.home-map {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.14);
  padding: var(--sp-sm) 0;
  position: sticky;
  top: var(--nav-h-scrolled);
  z-index: 180;
  backdrop-filter: blur(8px);
}

.home-map-label {
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.home-map-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.home-map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid rgba(var(--primary-rgb), 0.22);
  background: #F8FBFF;
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 700;
  transition: transform var(--ease-fast),
              background var(--ease-fast),
              color var(--ease-fast),
              border-color var(--ease-fast);
}

.home-map-link:hover {
  transform: translateY(-1px);
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.home-map-link.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.28);
}


/* --------------------------------------------------------------------------
   5. Page Hero — Subpages
   -------------------------------------------------------------------------- */
.page-hero {
  padding: calc(var(--nav-h) + var(--sp-3xl)) var(--sp-xl) var(--sp-2xl);
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 500px 300px at 80% 20%, rgba(61,155,233,0.25), transparent),
    radial-gradient(ellipse 400px 300px at 20% 80%, rgba(232,168,23,0.12), transparent);
  pointer-events: none;
}

.page-hero h1 {
  font-size: var(--fs-3xl);
  font-weight: 800;
  color: var(--white);
  margin-bottom: var(--sp-sm);
  position: relative;
}

.page-hero .hero-subtitle {
  font-size: var(--fs-lg);
  color: rgba(255,255,255,0.82);
  position: relative;
  margin-bottom: 0;
}


/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: 13px 32px;
  font-size: var(--fs-base);
  font-weight: 600;
  border-radius: var(--r-sm);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--ease-bounce),
              box-shadow var(--ease-base),
              background var(--ease-fast),
              color var(--ease-fast),
              border-color var(--ease-fast);
}

.btn:hover {
  transform: translateY(-3px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.1s;
}

/* Primary — Gold */
.btn-primary {
  background: linear-gradient(135deg, var(--accent2), #d49a0e);
  color: var(--dark);
  border-color: var(--accent2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #d49a0e, var(--accent2));
  box-shadow: 0 6px 24px rgba(232,168,23,0.40);
  color: var(--dark);
}

/* Secondary — Outline */
.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb),0.30);
}

/* Large */
.btn-lg {
  padding: 16px 40px;
  font-size: var(--fs-lg);
  border-radius: var(--r-md);
}


/* --------------------------------------------------------------------------
   7. Section Titles
   -------------------------------------------------------------------------- */
.section-title {
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--dark);
  text-align: center;
  margin-bottom: var(--sp-lg);
  position: relative;
  padding-bottom: var(--sp-md);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent2), var(--primary));
  border-radius: 3px;
}

.section-title-left {
  text-align: left;
}

.section-title-left::after {
  left: 0;
  transform: none;
}

.section-subtitle {
  font-size: var(--fs-lg);
  color: var(--text-light);
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: var(--sp-2xl);
  line-height: 1.6;
}

.book-card,
.book-card-body,
.book-info,
.book-detail,
.purchase-card,
.contact-item,
.footer-brand,
.footer-links,
.brand-story-main,
.brand-story-side,
.bridge-copy,
.bridge-point {
  min-width: 0;
}

.purchase-detail a,
.contact-item a,
.footer-brand a,
.channel-details a {
  word-break: break-all;
}


/* --------------------------------------------------------------------------
   8. About Brief — Homepage
   -------------------------------------------------------------------------- */
/* Legacy .about-brief grid removed — layout now via .about-brief-grid */


/* --------------------------------------------------------------------------
   9. Filter Buttons
   -------------------------------------------------------------------------- */
.filter-buttons,
.book-filters {
  display: flex;
  justify-content: center;
  gap: var(--sp-md);
  flex-wrap: wrap;
  margin-bottom: var(--sp-2xl);
}

.filter-btn {
  padding: 8px 22px;
  border: 2px solid var(--primary);
  border-radius: 100px;
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: all var(--ease-fast);
  letter-spacing: 0.02em;
}

.filter-btn:hover {
  background: rgba(var(--primary-rgb),0.08);
  border-color: var(--accent1);
  color: var(--accent1);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(var(--primary-rgb),0.30);
}

.filter-result {
  margin-top: calc(var(--sp-md) * -0.5);
  margin-bottom: var(--sp-lg);
  text-align: center;
  color: #5F6F82;
  font-size: var(--fs-sm);
  font-weight: 600;
}

.search-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  max-width: 680px;
  margin: 0 auto var(--sp-md);
}

.search-input {
  width: min(100%, 520px);
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(var(--primary-rgb), 0.24);
  background: var(--white);
  color: var(--text);
  font-size: var(--fs-sm);
  transition: border-color var(--ease-fast), box-shadow var(--ease-fast);
}

.search-input::placeholder {
  color: #7F8CA0;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.16);
  outline: none;
}

.search-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(var(--primary-rgb), 0.24);
  background: #F4F8FD;
  color: var(--primary);
  font-size: var(--fs-sm);
  font-weight: 700;
  transition: transform var(--ease-fast),
              background var(--ease-fast),
              color var(--ease-fast),
              border-color var(--ease-fast);
}

.search-clear:hover {
  transform: translateY(-1px);
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.filter-empty {
  margin-top: calc(var(--sp-sm) * -1);
  margin-bottom: var(--sp-lg);
  text-align: center;
  color: #8A2F2F;
  font-size: var(--fs-sm);
  font-weight: 600;
}


/* --------------------------------------------------------------------------
   10. Book Cards Grid — Homepage
   -------------------------------------------------------------------------- */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: var(--sp-xl);
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--sp-xl);
}

.book-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease-bounce),
              box-shadow var(--ease-base);
}

.book-card > a {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  text-decoration: none;
  color: inherit;
}

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

/* Book card cover */
.book-card-cover,
.book-card .book-card-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--light-blue);
  transition: transform var(--ease-slow);
}

.book-card:hover .book-card-cover {
  transform: scale(1.04);
}

/* Book card body */
.book-card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: var(--sp-lg);
}

/* Category tag */
.category-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 100px;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--sp-sm);
  align-self: flex-start;
  letter-spacing: 0.03em;
}

.category-tag.foundation   { background: var(--tag-foundation); }
.category-tag.writing      { background: var(--tag-writing); }
.category-tag.professional { background: var(--tag-professional); }

/* Book card title */
.book-card-title {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: var(--sp-xs);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Book card description */
.book-card-desc {
  font-size: var(--fs-sm);
  color: var(--text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--sp-md);
}

/* Book card footer */
.book-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-sm);
  border-top: 1px solid var(--border);
}

.book-card-price {
  font-size: var(--fs-base);
  font-weight: 800;
  color: var(--accent3);
}


/* --------------------------------------------------------------------------
   11. Book Detail — books.html (per-book sections)
   -------------------------------------------------------------------------- */
.book-detail {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: var(--sp-3xl);
  align-items: start;
  padding: var(--sp-2xl) 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-2xl);
}

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

/* Book cover */
.book-cover {
  position: sticky;
  top: calc(var(--nav-h) + var(--sp-xl));
}

.book-cover img {
  width: 100%;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  transition: transform var(--ease-base);
}

.book-cover:hover img {
  transform: scale(1.02);
}

/* Book info panel */
.book-info {
  min-width: 0;
}

.book-category-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 100px;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--white);
  background: var(--primary);
  margin-bottom: var(--sp-md);
  letter-spacing: 0.03em;
}

.book-title {
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: var(--sp-xs);
  line-height: 1.25;
}

.book-title-en {
  font-size: var(--fs-base);
  color: var(--primary);
  font-weight: 500;
  margin-bottom: var(--sp-lg);
  font-style: italic;
}

.book-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-sm) var(--sp-lg);
  margin-bottom: var(--sp-xl);
  font-size: var(--fs-sm);
  color: var(--text-light);
  padding: var(--sp-md) var(--sp-lg);
  background: var(--light);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}

.book-meta li {
  display: flex;
  align-items: baseline;
  gap: var(--sp-xs);
}

.book-meta li strong {
  color: var(--text);
}

.book-description {
  font-size: var(--fs-base);
  line-height: 1.85;
  color: var(--text-light);
  margin-bottom: var(--sp-xl);
}

.book-description p {
  margin-bottom: var(--sp-md);
}

/* Book highlights */
.book-highlights {
  margin-bottom: var(--sp-xl);
  background: var(--light-blue);
  border-radius: var(--r-md);
  padding: var(--sp-xl);
}

.book-highlights h3 {
  font-size: var(--fs-lg);
  color: var(--dark);
  margin-bottom: var(--sp-md);
}

.book-highlights ul {
  list-style: none;
  padding: 0;
}

.book-highlights li {
  position: relative;
  padding-left: var(--sp-xl);
  margin-bottom: var(--sp-sm);
  font-size: var(--fs-sm);
  color: var(--text);
  line-height: 1.7;
}

.book-highlights li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--primary), var(--accent1));
}

/* Book TOC */
.book-toc {
  margin-bottom: var(--sp-xl);
}

.book-toc h3 {
  font-size: var(--fs-lg);
  color: var(--dark);
  margin-bottom: var(--sp-md);
}

.book-toc ul {
  list-style: none;
  padding: 0;
  counter-reset: toc-counter;
}

.book-toc li {
  counter-increment: toc-counter;
  position: relative;
  padding-left: var(--sp-xl);
  margin-bottom: var(--sp-sm);
  font-size: var(--fs-sm);
  color: var(--text-light);
  line-height: 1.7;
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--sp-sm);
}

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

.book-toc li::before {
  content: counter(toc-counter, decimal-leading-zero);
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--primary);
  font-size: var(--fs-xs);
}

.book-toc ul ul {
  margin-top: var(--sp-sm);
  margin-left: var(--sp-sm);
  counter-reset: none;
}

.book-toc ul ul li {
  counter-increment: none;
  border-bottom: none;
  margin-bottom: 0.35rem;
  padding-bottom: 0;
  padding-left: var(--sp-md);
}

.book-toc ul ul li::before {
  content: '•';
  color: var(--accent1);
  font-size: 0.95rem;
  font-weight: 700;
}

/* Book actions */
.book-actions {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
  padding-top: var(--sp-md);
}


/* --------------------------------------------------------------------------
   12. Recommendation Grid — (legacy .recommend-* removed; now uses .rec-grid/.rec-card in section 28)
   -------------------------------------------------------------------------- */


/* --------------------------------------------------------------------------
   13. Purchase Grid
   -------------------------------------------------------------------------- */
.purchase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--sp-xl);
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--sp-xl);
}

.purchase-card {
  background: var(--white);
  border-radius: var(--r-md);
  padding: var(--sp-2xl);
  box-shadow: var(--shadow-sm);
  text-align: center;
  border-top: 4px solid var(--primary);
  transition: transform var(--ease-bounce),
              box-shadow var(--ease-base);
  position: relative;
  overflow: hidden;
}

.purchase-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(var(--primary-rgb),0.02) 0%, transparent 40%);
  pointer-events: none;
}

.purchase-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.purchase-card h3 {
  font-size: var(--fs-xl);
  color: var(--dark);
  margin-bottom: var(--sp-md);
  position: relative;
}

.purchase-card p {
  color: var(--text-light);
  margin-bottom: var(--sp-md);
  line-height: 1.7;
  position: relative;
}

.purchase-card a {
  color: var(--primary);
  font-weight: 700;
  position: relative;
  transition: color var(--ease-fast);
}

.purchase-card a:hover {
  color: var(--accent1);
}


/* --------------------------------------------------------------------------
   14. Author Profile — about.html
   -------------------------------------------------------------------------- */
.author-profile {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--sp-3xl);
  align-items: start;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--sp-3xl) var(--sp-xl);
}

.author-photo {
  width: 100%;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  transition: transform var(--ease-base);
  position: relative;
}

.author-photo:hover {
  transform: scale(1.02);
}

.author-info h2 {
  font-size: var(--fs-2xl);
  color: var(--dark);
  margin-bottom: var(--sp-xs);
}

.author-title {
  font-size: var(--fs-lg);
  color: var(--primary);
  font-weight: 600;
  margin-bottom: var(--sp-lg);
  position: relative;
  padding-bottom: var(--sp-md);
}

.author-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent2), var(--primary));
  border-radius: 3px;
}

.author-bio {
  font-size: var(--fs-base);
  line-height: 1.9;
  color: var(--text-light);
}

.author-bio p {
  margin-bottom: var(--sp-md);
}

/* School cards */
.school-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--sp-lg);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--sp-2xl) var(--sp-xl);
}

.school-card {
  background: var(--white);
  border-radius: var(--r-md);
  padding: var(--sp-xl);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--primary);
  transition: transform var(--ease-bounce),
              box-shadow var(--ease-base);
}

.school-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.school-card:nth-child(2) { border-top-color: var(--accent2); }
.school-card:nth-child(3) { border-top-color: var(--accent4); }
.school-card:nth-child(4) { border-top-color: var(--accent6); }
.school-card:nth-child(5) { border-top-color: var(--accent5); }

.school-card h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-sm);
}

.school-card p {
  font-size: var(--fs-sm);
  color: var(--text-light);
  line-height: 1.6;
}


/* --------------------------------------------------------------------------
   15. Research List — research.html
   -------------------------------------------------------------------------- */
.research-list {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--sp-2xl) var(--sp-xl);
}

.research-card {
  background: var(--white);
  border-radius: var(--r-md);
  padding: var(--sp-xl) var(--sp-2xl);
  margin-bottom: var(--sp-lg);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary);
  transition: transform var(--ease-bounce),
              box-shadow var(--ease-base),
              border-color var(--ease-fast);
}

.research-card:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
  border-left-color: var(--accent2);
}

.research-date {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--primary);
  background: var(--light-blue);
  padding: 2px 10px;
  border-radius: 100px;
  margin-bottom: var(--sp-sm);
  letter-spacing: 0.03em;
}

.research-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: var(--sp-sm);
  line-height: 1.4;
}

.research-excerpt {
  font-size: var(--fs-sm);
  color: var(--text-light);
  line-height: var(--lh);
}


/* --------------------------------------------------------------------------
   16. Services Grid — services.html
   -------------------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-xl);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--sp-2xl) var(--sp-xl);
}

.service-card {
  position: relative;
  background: var(--white);
  border-radius: var(--r-md);
  padding: var(--sp-2xl);
  text-align: center;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--ease-bounce),
              box-shadow var(--ease-base);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent1));
  transition: height var(--ease-base);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.service-card:hover::before {
  height: 6px;
}

.service-card:nth-child(2)::before {
  background: linear-gradient(90deg, var(--accent2), #F2C94C);
}

.service-card:nth-child(3)::before {
  background: linear-gradient(90deg, var(--accent6), #26C6DA);
}

.service-card:nth-child(4)::before {
  background: linear-gradient(90deg, var(--accent5), #BB6BD9);
}

.service-card h3 {
  font-size: var(--fs-xl);
  color: var(--dark);
  margin-bottom: var(--sp-md);
}

.service-card p {
  font-size: var(--fs-sm);
  color: var(--text-light);
  line-height: 1.7;
}


/* --------------------------------------------------------------------------
   17. Samples Grid — samples.html
   -------------------------------------------------------------------------- */
.samples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--sp-xl);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--sp-2xl) var(--sp-xl);
}

/* samples reuse .research-card — already styled above */


/* --------------------------------------------------------------------------
   18. Contact — contact.html
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--sp-xl);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--sp-2xl) var(--sp-xl);
}

/* contact-grid reuses .purchase-card — already styled */

.contact-info {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--sp-xl) var(--sp-xl) var(--sp-2xl);
  text-align: center;
}

.contact-info h3 {
  font-size: var(--fs-xl);
  color: var(--dark);
  margin-bottom: var(--sp-lg);
}

.contact-info p {
  font-size: var(--fs-base);
  color: var(--text-light);
  margin-bottom: var(--sp-sm);
  line-height: 1.7;
}

.contact-info a {
  color: var(--primary);
  font-weight: 600;
}

.contact-info a:hover {
  color: var(--accent1);
}


/* --------------------------------------------------------------------------
   19. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.70);
  padding: var(--sp-3xl) 0 var(--sp-xl);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--sp-2xl);
  margin-bottom: var(--sp-2xl);
}

.footer-brand h3 {
  font-size: var(--fs-xl);
  color: var(--white);
  margin-bottom: var(--sp-md);
}

.footer-brand h3 span {
  color: var(--accent2);
}

.footer-brand p {
  font-size: var(--fs-sm);
  line-height: 1.8;
  max-width: 360px;
  color: rgba(255,255,255,0.60);
}

.footer-links h4 {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--white);
  margin-bottom: var(--sp-lg);
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: var(--sp-sm);
}

.footer-links a {
  color: rgba(255,255,255,0.60);
  font-size: var(--fs-sm);
  transition: color var(--ease-fast),
              padding-left var(--ease-fast);
}

.footer-links a:hover {
  color: var(--accent2);
  padding-left: 4px;
}

.footer-links p {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.60);
  line-height: 1.8;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.10);
  padding-top: var(--sp-lg);
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.45);
}


/* --------------------------------------------------------------------------
   20. Scroll-to-Top Button
   -------------------------------------------------------------------------- */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--primary), var(--accent1));
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: var(--fs-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity var(--ease-base),
              visibility var(--ease-base),
              transform var(--ease-bounce),
              background var(--ease-fast);
  z-index: 900;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: linear-gradient(135deg, var(--accent1), var(--primary));
  transform: translateY(-3px) scale(1.08);
  box-shadow: var(--shadow-lg);
}

.scroll-top-btn:active {
  transform: translateY(0) scale(0.95);
  transition-duration: 0.1s;
}


/* --------------------------------------------------------------------------
   21. Fade-in Animation (scroll reveal)
   -------------------------------------------------------------------------- */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered fade-in for grid children */
.books-grid .book-card,
.rec-grid .rec-card,
.evidence-grid .evidence-card,
.roadmap-grid .roadmap-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow var(--ease-base),
              border-color var(--ease-base);
}

.books-grid .book-card.show,
.books-grid .book-card:not(.hidden),
.rec-grid .rec-card,
.evidence-grid .evidence-card.visible,
.roadmap-grid .roadmap-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delay for grid items */
.books-grid .book-card:nth-child(1) { transition-delay: 0.02s; }
.books-grid .book-card:nth-child(2) { transition-delay: 0.06s; }
.books-grid .book-card:nth-child(3) { transition-delay: 0.10s; }
.books-grid .book-card:nth-child(4) { transition-delay: 0.14s; }
.books-grid .book-card:nth-child(5) { transition-delay: 0.18s; }
.books-grid .book-card:nth-child(6) { transition-delay: 0.22s; }
.books-grid .book-card:nth-child(7) { transition-delay: 0.26s; }
.books-grid .book-card:nth-child(8) { transition-delay: 0.30s; }
.books-grid .book-card:nth-child(9) { transition-delay: 0.34s; }
.books-grid .book-card:nth-child(10) { transition-delay: 0.38s; }


/* --------------------------------------------------------------------------
   22. Keyframe Animations
   -------------------------------------------------------------------------- */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1);   }
  50%      { transform: scale(1.04); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

@keyframes heroOrbFloatA {
  0%, 100% {
    opacity: 0.78;
  }
  50% {
    opacity: 1;
  }
}

@keyframes heroOrbFloatB {
  0%, 100% {
    opacity: 0.72;
  }
  50% {
    opacity: 0.94;
  }
}

@keyframes heroGridDrift {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 0 42px, 42px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-orb,
  .hero-grid {
    animation: none !important;
  }

  .hero [data-parallax] {
    transform: none !important;
  }
}


/* --------------------------------------------------------------------------
   23. Responsive — Tablet (max-width: 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root {
    --fs-4xl: 2.5rem;
    --fs-3xl: 2rem;
    --fs-2xl: 1.5rem;
  }

  .author-profile {
    grid-template-columns: 260px 1fr;
    gap: var(--sp-2xl);
  }

  .book-detail {
    grid-template-columns: 280px 1fr;
    gap: var(--sp-2xl);
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-2xl);
  }
}


/* --------------------------------------------------------------------------
   24. Responsive — Mobile (max-width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --nav-h: 64px;
    --nav-h-scrolled: 56px;
    --fs-4xl: 2rem;
    --fs-3xl: 1.65rem;
    --fs-2xl: 1.35rem;
    --fs-xl:  1.15rem;
    --sp-4xl: 3.5rem;
  }

  .container {
    width: 92%;
    padding-inline: var(--sp-sm);
  }

  /* -- Hamburger visible -- */
  .nav-toggle {
    display: flex;
  }

  /* -- Mobile nav menu overlay -- */
  .nav-menu {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--nav-h));
    height: calc(100dvh - var(--nav-h));
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: var(--sp-xl) var(--sp-lg);
    box-shadow: var(--shadow-xl);
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-menu li {
    width: 100%;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .nav-menu.open li {
    opacity: 1;
    transform: translateY(0);
  }

  .nav-menu.open li:nth-child(1) { transition-delay: 0.04s; }
  .nav-menu.open li:nth-child(2) { transition-delay: 0.08s; }
  .nav-menu.open li:nth-child(3) { transition-delay: 0.12s; }
  .nav-menu.open li:nth-child(4) { transition-delay: 0.16s; }
  .nav-menu.open li:nth-child(5) { transition-delay: 0.20s; }
  .nav-menu.open li:nth-child(6) { transition-delay: 0.24s; }
  .nav-menu.open li:nth-child(7) { transition-delay: 0.28s; }
  .nav-menu.open li:nth-child(8) { transition-delay: 0.32s; }

  .nav-menu .nav-link {
    display: block;
    padding: 14px 0;
    font-size: var(--fs-lg);
    border-bottom: 1px solid var(--border);
    text-align: center;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-menu .nav-link:active {
    background: rgba(var(--primary-rgb), 0.06);
    border-radius: var(--r-sm);
  }

  .nav-menu .nav-link::after {
    display: none;
  }

  .nav-menu .lang-toggle {
    margin: var(--sp-md) auto 0;
    display: block;
    width: fit-content;
    min-height: 44px;
    padding: 10px 24px;
  }

  /* -- Hero -- */
  .hero {
    min-height: auto;
    padding: calc(var(--nav-h) + var(--sp-2xl)) var(--sp-md) var(--sp-3xl);
  }

  .hero-title {
    font-size: var(--fs-2xl);
  }

  .hero-subtitle {
    font-size: var(--fs-base);
  }

  /* -- Page Hero -- */
  .page-hero h1 {
    font-size: var(--fs-2xl);
  }

  .page-hero .hero-subtitle {
    font-size: var(--fs-base);
  }

  /* -- About Brief (legacy selectors removed; layout via .about-brief-grid) -- */

  /* -- Book grid -- */
  .books-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--sp-md);
    padding: 0 var(--sp-md);
  }

  .book-card-body {
    padding: var(--sp-md);
  }

  /* -- Book detail -- */
  .book-detail {
    grid-template-columns: 1fr;
    gap: var(--sp-xl);
  }

  .book-cover {
    position: static;
    max-width: 280px;
    margin: 0 auto;
  }

  /* -- Recommend: handled in section 28 via .rec-grid -- */

  /* -- Purchase -- */
  .purchase-grid {
    grid-template-columns: 1fr;
    padding: 0 var(--sp-md);
  }

  /* -- Author profile -- */
  .author-profile {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--sp-xl);
    padding: var(--sp-2xl) var(--sp-md);
  }

  .author-photo {
    max-width: 220px;
    margin: 0 auto;
  }

  .author-title::after {
    left: 50%;
    transform: translateX(-50%);
  }

  /* -- Research -- */
  .research-list {
    padding: var(--sp-xl) var(--sp-md);
  }

  /* -- Services/Samples: handled in section 28 responsive -- */

  /* -- Contact -- */
  .contact-grid {
    grid-template-columns: 1fr;
    padding: var(--sp-xl) var(--sp-md);
  }

  /* -- Footer -- */
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--sp-xl);
  }

  .footer-brand p {
    max-width: 100%;
  }

  /* -- Scroll top -- */
  .scroll-top-btn {
    bottom: 1.2rem;
    right: 1.2rem;
    width: 42px;
    height: 42px;
  }

  /* -- Filter buttons -- */
  .filter-buttons,
  .book-filters {
    gap: var(--sp-sm);
  }

  .filter-btn {
    padding: 6px 16px;
    font-size: var(--fs-xs);
  }
}


/* --------------------------------------------------------------------------
   25. Responsive — Small Mobile (max-width: 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  :root {
    --fs-4xl: 1.65rem;
    --fs-3xl: 1.4rem;
    --fs-2xl: 1.2rem;
  }

  .books-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-sm);
  }

  .book-card-cover {
    aspect-ratio: 2 / 3;
  }

  .book-card-body {
    padding: var(--sp-sm);
  }

  .book-card-title {
    font-size: var(--fs-sm);
  }

  .category-tag {
    font-size: 0.65rem;
    padding: 2px 6px;
  }

  .nav-logo {
    font-size: var(--fs-base);
  }

  .school-cards {
    grid-template-columns: 1fr;
  }
}


/* --------------------------------------------------------------------------
   26. Print Styles
   -------------------------------------------------------------------------- */
@media print {
  .navbar,
  .nav-toggle,
  .scroll-top-btn,
  .hero-overlay,
  .filter-buttons,
  .filter-btn,
  .book-filters,
  .book-actions .btn {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  .hero,
  .page-hero {
    min-height: auto;
    background: none !important;
    color: #000;
    padding: 20pt 0;
  }

  .hero-title,
  .hero-subtitle,
  .hero-author {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
  }

  .page-hero h1,
  .page-hero .hero-subtitle {
    color: #000 !important;
  }

  section {
    page-break-inside: avoid;
    padding: 16pt 0;
  }

  .book-card,
  .service-card,
  .research-card,
  .purchase-card,
  .school-card,
  .recommend-item {
    box-shadow: none !important;
    border: 1px solid #ddd;
    break-inside: avoid;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555;
  }

  .site-footer {
    background: #333;
    color: #fff;
  }
}


/* --------------------------------------------------------------------------
   27. Accessibility
   -------------------------------------------------------------------------- */
/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }
}

/* Focus outlines */
:focus-visible {
  outline: 3px solid var(--accent1);
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--accent1);
  outline-offset: 2px;
}

/* Skip link (if present) */
.skip-link {
  position: fixed;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--white);
  padding: var(--sp-sm) var(--sp-xl);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  font-weight: 600;
  z-index: 9999;
  transition: top var(--ease-fast);
}

.skip-link:focus {
  top: 0;
  color: var(--white);
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}


/* --------------------------------------------------------------------------
   28. Content Harmonization (class names used by actual HTML files)
   -------------------------------------------------------------------------- */

/* Generic section rhythm */
.section {
  padding: var(--sp-4xl) 0;
  position: relative;
}

/* Subtle section divider using pseudo-element */
.section + .section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(80%, 800px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* Subpage hero variant */
.hero.hero-sub {
  min-height: 46vh;
  padding: calc(var(--nav-h) + var(--sp-2xl)) var(--sp-xl) var(--sp-2xl);
}

.hero.hero-sub .hero-title {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  margin-bottom: var(--sp-sm);
}

.hero.hero-sub .hero-title span {
  background: linear-gradient(90deg, var(--white), #D9ECFF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero.hero-sub .hero-subtitle {
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 0;
}

.books-hero {
  background: linear-gradient(135deg, #0E274C 0%, var(--primary) 58%, var(--accent1) 100%);
}

.hero-cta {
  margin-top: var(--sp-sm);
  position: relative;
  animation: heroCTAPulse 2.5s ease-in-out infinite;
}

.hero-cta:hover {
  animation: none;
}

@keyframes heroCTAPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 168, 23, 0.4); }
  50%      { box-shadow: 0 0 0 10px rgba(232, 168, 23, 0); }
}

/* Background moods by section */
.books-overview,
.services,
.purchase-channels,
.positions {
  background: var(--light);
}

.recommendation,
.publications,
.samples,
.direct-contact {
  background: var(--white);
}

.purchase,
.workshop,
.service-cta,
.purchase-note {
  background: linear-gradient(180deg, #F8FBFE 0%, #F0F5FC 100%);
}

.brand-story {
  background: linear-gradient(180deg, #FAFCFF 0%, #F3F8FD 100%);
}

.brand-story::before {
  display: none;
}

.brand-kicker {
  display: inline-block;
  margin-bottom: var(--sp-sm);
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.12);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-story-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--sp-xl);
  margin-top: var(--sp-lg);
}

.brand-story-main,
.brand-story-side {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-xl);
}

.brand-story-main p {
  color: var(--text-light);
  line-height: 1.9;
  margin-bottom: var(--sp-md);
}

.brand-story-list {
  margin-top: var(--sp-lg);
  padding-left: 1.1rem;
}

.brand-story-list li {
  list-style: disc;
  color: var(--text-light);
  margin-bottom: var(--sp-sm);
  line-height: 1.75;
  font-weight: 600;
}

.brand-quote {
  margin: 0 0 var(--sp-lg);
  padding: var(--sp-lg) var(--sp-xl);
  border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.06), rgba(61, 155, 233, 0.03));
  border: 1px solid rgba(var(--primary-rgb), 0.14);
  border-left: 3px solid var(--accent2);
  position: relative;
}

.brand-quote::before {
  content: '\201C';
  position: absolute;
  top: -4px;
  left: 14px;
  font-size: 3rem;
  color: rgba(var(--primary-rgb), 0.12);
  font-family: Georgia, serif;
  line-height: 1;
}

.brand-quote p {
  color: var(--dark);
  font-size: 1.02rem;
  line-height: 1.85;
  margin-bottom: var(--sp-sm);
  font-weight: 600;
  font-style: italic;
}

.brand-quote footer {
  color: var(--primary);
  font-size: var(--fs-sm);
  font-weight: 700;
}

.brand-method h3 {
  margin-bottom: var(--sp-sm);
}

.brand-method ol {
  padding-left: 1.1rem;
}

.brand-method li {
  list-style: decimal;
  color: var(--text-light);
  margin-bottom: var(--sp-sm);
  line-height: 1.75;
}

.brand-evidence {
  background: linear-gradient(160deg, #070E1A 0%, #0B1D3A 50%, #132F5C 100%);
}

/* Remove section divider when transitioning from/to dark section */
.brand-evidence::before,
.brand-evidence + .section::before {
  display: none;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-md);
}

.evidence-card {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--r-md);
  padding: var(--sp-lg);
  backdrop-filter: blur(6px);
  transition: transform var(--ease-bounce),
              background var(--ease-base),
              border-color var(--ease-fast);
}

.evidence-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}

.evidence-number {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--accent2);
  font-weight: 900;
  line-height: 1;
  margin-bottom: var(--sp-xs);
}

.evidence-label {
  color: var(--white);
  font-weight: 700;
  margin-bottom: var(--sp-xs);
}

.evidence-note {
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--fs-sm);
  line-height: 1.7;
}

.count-up {
  font-variant-numeric: tabular-nums;
}

.brand-story-grid .fade-in:nth-child(1) { transition-delay: 0.04s; }
.brand-story-grid .fade-in:nth-child(2) { transition-delay: 0.12s; }

.evidence-grid .fade-in:nth-child(1) { transition-delay: 0.02s; }
.evidence-grid .fade-in:nth-child(2) { transition-delay: 0.08s; }
.evidence-grid .fade-in:nth-child(3) { transition-delay: 0.14s; }
.evidence-grid .fade-in:nth-child(4) { transition-delay: 0.20s; }

.bridge-points .fade-in:nth-child(1) { transition-delay: 0.03s; }
.bridge-points .fade-in:nth-child(2) { transition-delay: 0.09s; }
.bridge-points .fade-in:nth-child(3) { transition-delay: 0.15s; }

.narrative-bridge {
  background: linear-gradient(180deg, #F8FCFF 0%, #F1F8FF 100%);
}

.bridge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-xl);
  align-items: stretch;
}

.bridge-copy {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-xl);
}

.bridge-kicker {
  display: inline-block;
  margin-bottom: var(--sp-sm);
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.10);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: var(--fs-xs);
  font-weight: 800;
}

.bridge-copy p {
  color: var(--text-light);
  line-height: 1.9;
}

.bridge-points {
  display: grid;
  gap: var(--sp-md);
}

.bridge-point {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-lg);
  transition: transform var(--ease-bounce),
              box-shadow var(--ease-base),
              border-left-color var(--ease-fast);
}

.bridge-point:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-left-color: var(--accent1);
}

.bridge-point h3 {
  margin-bottom: var(--sp-xs);
}

.bridge-point p {
  color: var(--text-light);
  line-height: 1.8;
}

.start-action {
  background: linear-gradient(180deg, #F5F9FE 0%, #EBF2FB 100%);
}

.start-action::before {
  display: none;
}

.start-action-card {
  background: linear-gradient(150deg, #0A1628 0%, #132F5C 50%, #1A4070 100%);
  color: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: var(--sp-2xl);
  text-align: center;
}

.start-action-card h2 {
  color: var(--white);
  margin-bottom: var(--sp-sm);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.start-action-card p {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.8;
  max-width: 820px;
  margin: 0 auto var(--sp-lg);
}

.start-action-buttons {
  display: flex;
  justify-content: center;
  gap: var(--sp-sm);
  flex-wrap: wrap;
}

.start-action .btn-secondary {
  border-color: rgba(255, 255, 255, 0.56);
  color: var(--white);
  background: transparent;
}

.start-action .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.82);
  color: var(--white);
}


/* -------------------- Homepage: About Brief -------------------- */
.about-brief {
  background: var(--white);
}

.about-brief .container {
  max-width: var(--container-max);
}

.about-brief-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--sp-3xl);
  align-items: start;
}

/* Photo frame with accent decoration */
.photo-frame {
  position: relative;
}

.photo-frame img {
  width: 100%;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}

.photo-accent {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 100%;
  height: 100%;
  border-radius: var(--r-lg);
  border: 2px solid rgba(var(--primary-rgb), 0.22);
  z-index: 0;
  transition: transform var(--ease-base);
}

.photo-frame:hover .photo-accent {
  transform: translate(4px, 4px);
}

.about-brief-photo img {
  width: 100%;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}

.about-brief-kicker {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.10);
  color: var(--primary);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: var(--sp-sm);
}

.about-brief-title {
  margin-bottom: var(--sp-xs) !important;
  padding-bottom: var(--sp-sm) !important;
}

.about-brief-title::after {
  display: none;
}

.about-brief-role {
  color: var(--primary);
  font-weight: 600;
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-lg);
  letter-spacing: 0.02em;
  position: relative;
  padding-bottom: var(--sp-md);
}

.about-brief-role::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent2), var(--primary));
  border-radius: 2px;
}

.about-brief-text .section-title {
  text-align: left;
}

.about-brief-desc {
  color: var(--text-light);
  line-height: 1.95;
  margin-bottom: var(--sp-lg);
  font-size: 0.95rem;
}

/* Academic tags */
.about-brief-tags {
  display: flex;
  gap: var(--sp-sm);
  flex-wrap: wrap;
  margin-bottom: var(--sp-xl);
}

.about-tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
  border: 1px solid rgba(var(--primary-rgb), 0.16);
  letter-spacing: 0.02em;
}


/* -------------------- Homepage: Book Grid -------------------- */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: var(--sp-md);
  flex-wrap: wrap;
  margin-bottom: var(--sp-2xl);
}

.books-overview .books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--sp-xl);
  padding: 0;
}

.books-overview .book-card {
  background: var(--white);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform var(--ease-bounce),
              box-shadow var(--ease-base),
              border-color var(--ease-base);
}

.books-overview .book-card:hover {
  transform: translateY(-10px) scale(1.015);
  box-shadow: var(--shadow-glow);
  border-color: rgba(var(--primary-rgb), 0.22);
}

.book-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

.book-card-cover {
  background: linear-gradient(180deg, #F2F8FF 0%, #E8F3FF 100%);
  padding: var(--sp-sm);
}

.book-card-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--r-sm);
  transition: transform var(--ease-slow);
}

.books-overview .book-card:hover .book-card-cover img {
  transform: scale(1.04);
}

.book-card-body {
  padding: var(--sp-lg);
  display: flex;
  flex-direction: column;
  min-height: 210px;
}

.book-card-tag {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: var(--sp-sm);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--white);
}

.tag-foundation { background: var(--tag-foundation); }
.tag-writing { background: var(--tag-writing); }
.tag-professional { background: var(--tag-professional); }

.book-card-meta {
  margin-top: auto;
  color: var(--accent3);
  font-size: var(--fs-sm);
  font-weight: 700;
}

.book-card-isbn {
  margin-top: var(--sp-xs);
  color: #7A8899;
  font-size: 0.75rem;
}


/* -------------------- Homepage: Recommendation -------------------- */
.recommendation .section-title {
  margin-bottom: var(--sp-xl);
}

.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-lg);
}

.rec-card {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-lg);
  color: inherit;
  transition: transform var(--ease-bounce), box-shadow var(--ease-base), border-color var(--ease-fast);
}

.rec-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(var(--primary-rgb), 0.35);
}

.rec-card:hover .rec-arrow {
  transform: translateX(4px);
  transition: transform var(--ease-bounce);
}

.rec-need {
  color: var(--primary);
  font-weight: 700;
  min-width: 120px;
}

.rec-arrow {
  color: var(--accent2);
  font-size: 1.25rem;
  font-weight: 800;
  transition: transform var(--ease-fast);
}

.rec-book {
  color: var(--text);
  font-weight: 600;
}


/* -------------------- Rich Info: Roadmap / FAQ / Guides -------------------- */
.learning-roadmap,
.books-guide,
.inquiry-guide {
  background: linear-gradient(180deg, #F7FBFF 0%, #EEF5FC 100%);
}

.roadmap-grid,
.guide-grid,
.inquiry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-lg);
}

.roadmap-card,
.guide-card,
.inquiry-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-xl);
  transition: transform var(--ease-bounce), box-shadow var(--ease-base), border-color var(--ease-fast);
}

.roadmap-card:hover,
.guide-card:hover,
.inquiry-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(var(--primary-rgb), 0.3);
}

.roadmap-step {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: var(--sp-sm);
}

.roadmap-books {
  color: var(--text-light);
  font-size: var(--fs-sm);
  margin: var(--sp-sm) 0;
}

.roadmap-card ul,
.inquiry-card ul {
  padding-left: 1.1rem;
}

.roadmap-card li,
.inquiry-card li {
  list-style: disc;
  color: var(--text-light);
  margin-bottom: var(--sp-sm);
  line-height: 1.75;
}

.guide-card p {
  color: var(--text-light);
  line-height: 1.85;
}

.faq {
  background: var(--white);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--sp-lg);
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-lg);
  transition: border-color var(--ease-fast),
              box-shadow var(--ease-fast);
}

.faq-item:hover {
  border-color: rgba(var(--primary-rgb), 0.28);
}

.faq-item[open] {
  border-color: rgba(var(--primary-rgb), 0.32);
  box-shadow: var(--shadow-md);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.55;
  padding: var(--sp-xs) 0;
  transition: color var(--ease-fast);
}

.faq-item summary:hover {
  color: var(--primary);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  float: right;
  color: var(--primary);
  font-weight: 800;
  font-size: 1.2rem;
  transition: transform var(--ease-base);
  display: inline-block;
}

.faq-item[open] summary::after {
  content: '\2212';
  transform: rotate(180deg);
}

.faq-item p {
  margin-top: var(--sp-md);
  color: var(--text-light);
  line-height: 1.85;
  animation: faqReveal 0.35s ease both;
}

@keyframes faqReveal {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* -------------------- Learning Tools & Resource Hub -------------------- */
.learning-tools {
  background: linear-gradient(180deg, #F8FCFF 0%, #ECF5FF 100%);
}

.learning-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-lg);
}

.tool-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-xl);
}

.tool-card h3 {
  margin-bottom: var(--sp-sm);
}

.tool-intro {
  color: var(--text-light);
  line-height: 1.85;
  margin-bottom: var(--sp-lg);
}

.placement-form {
  display: grid;
  gap: var(--sp-md);
}

.placement-question {
  border: 1px solid rgba(var(--primary-rgb), 0.16);
  border-radius: var(--r-sm);
  padding: var(--sp-md);
  background: #FCFEFF;
}

.placement-question legend {
  color: var(--dark);
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: var(--sp-sm);
  padding: 0 var(--sp-xs);
}

.placement-option {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-xs);
  color: var(--text-light);
  line-height: 1.7;
  cursor: pointer;
}

.placement-option:last-child {
  margin-bottom: 0;
}

.placement-option input {
  margin-top: 0.22rem;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.placement-submit {
  width: fit-content;
}

.placement-result {
  margin-top: var(--sp-lg);
  border-radius: var(--r-sm);
  border: 1px solid rgba(var(--primary-rgb), 0.18);
  background: linear-gradient(180deg, #F7FBFF 0%, #EEF5FF 100%);
  padding: var(--sp-md) var(--sp-lg);
}

.placement-result p {
  color: var(--text-light);
  line-height: 1.8;
  margin: 0;
}

.placement-result .result-title {
  color: var(--dark);
  font-weight: 800;
}

.placement-result .result-level {
  margin-top: 4px;
  color: var(--primary);
  font-weight: 700;
}

.placement-result .result-score {
  margin-top: 2px;
  color: #5E6E80;
  font-size: var(--fs-sm);
}

.placement-result .result-advice {
  margin-top: var(--sp-sm);
}

.result-books {
  margin-top: var(--sp-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
}

.result-book-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(var(--primary-rgb), 0.26);
  background: var(--white);
  color: var(--primary);
  font-size: var(--fs-xs);
  font-weight: 700;
  transition: transform var(--ease-fast),
              background var(--ease-fast),
              color var(--ease-fast),
              border-color var(--ease-fast);
}

.result-book-link:hover {
  transform: translateY(-1px);
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.planner-controls {
  display: grid;
  gap: var(--sp-sm);
}

.planner-label {
  color: var(--dark);
  font-weight: 700;
}

.planner-goal-row,
.planner-action-row {
  display: flex;
  gap: var(--sp-sm);
  flex-wrap: wrap;
}

.planner-goal-input {
  flex: 1 1 140px;
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid rgba(var(--primary-rgb), 0.25);
  background: var(--white);
  color: var(--text);
  font-size: var(--fs-base);
  padding: 10px 12px;
}

.planner-goal-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.16);
}

.planner-btn {
  min-height: 48px;
}

.planner-progress-track {
  margin-top: var(--sp-sm);
  height: 10px;
  border-radius: 999px;
  background: #E8F0FA;
  border: 1px solid rgba(var(--primary-rgb), 0.16);
  overflow: hidden;
}

.planner-progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent1));
  transition: width var(--ease-base);
}

.planner-meta {
  color: var(--text-light);
  font-size: var(--fs-sm);
  line-height: 1.7;
}

.planner-note {
  min-height: 1.2em;
  color: var(--primary);
  font-size: var(--fs-sm);
  font-weight: 700;
}

.resource-hub {
  background: var(--white);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--sp-lg);
}

.resource-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-xl);
  transition: transform var(--ease-bounce),
              box-shadow var(--ease-base),
              border-color var(--ease-fast);
}

.resource-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(var(--primary-rgb), 0.3);
}

.resource-kicker {
  display: inline-block;
  margin-bottom: var(--sp-sm);
  padding: 4px 11px;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  font-size: var(--fs-xs);
  font-weight: 800;
}

.resource-card h3 {
  margin-bottom: var(--sp-sm);
}

.resource-list {
  margin-bottom: var(--sp-lg);
  padding-left: 1.05rem;
}

.resource-list li {
  list-style: disc;
  color: var(--text-light);
  margin-bottom: var(--sp-sm);
  line-height: 1.75;
}

.resource-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(var(--primary-rgb), 0.24);
  background: #F2F8FF;
  color: var(--primary);
  font-size: var(--fs-sm);
  font-weight: 700;
  transition: transform var(--ease-fast),
              background var(--ease-fast),
              color var(--ease-fast),
              border-color var(--ease-fast);
}

.resource-link:hover {
  transform: translateY(-1px);
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}


/* -------------------- Homepage/Contact: Purchase text -------------------- */
.purchase-channel {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-md);
  color: var(--dark);
}

.purchase-detail {
  margin-bottom: var(--sp-sm);
  color: var(--text-light);
}


/* -------------------- books.html detail catalog -------------------- */
.book-filters-section {
  position: sticky;
  top: var(--nav-h-scrolled);
  z-index: 150;
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-lg) 0;
}

.book-filters-section .book-filters {
  margin-bottom: 0;
}

.book-jump-section {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.14);
  padding: var(--sp-md) 0;
}

.book-jump-label {
  text-align: center;
  color: var(--text-light);
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: var(--sp-sm);
}

.book-jump-nav {
  display: flex;
  gap: var(--sp-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.book-jump-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(var(--primary-rgb), 0.25);
  background: var(--white);
  color: var(--primary);
  font-size: var(--fs-xs);
  font-weight: 700;
  transition: transform var(--ease-fast),
              background var(--ease-fast),
              color var(--ease-fast),
              border-color var(--ease-fast);
}

.book-jump-link:hover {
  transform: translateY(-1px);
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.book-jump-link.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.28);
}

.books-catalog {
  padding: var(--sp-xl) 0 var(--sp-4xl);
  background:
    radial-gradient(900px 280px at 0% 0%, rgba(var(--primary-rgb), 0.08), transparent),
    radial-gradient(700px 260px at 100% 30%, rgba(39, 174, 96, 0.08), transparent),
    var(--light);
}

.books-catalog > .book-card {
  background: transparent;
  box-shadow: none;
  border: none;
  transform: none;
  border-radius: 0;
  margin-bottom: var(--sp-2xl);
  scroll-margin-top: calc(var(--nav-h-scrolled) + 130px);
}

.books-catalog > .book-card:hover {
  transform: none;
  box-shadow: none;
}

.books-catalog > .book-card.hidden,
.books-overview .book-card.hidden {
  display: none !important;
}

.books-catalog > .book-card.show,
.books-overview .book-card.show {
  display: block;
}

.books-catalog .book-detail {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-2xl);
}

.books-catalog .book-category-tag {
  background: var(--primary);
}

.books-catalog .book-card[data-category="寫作實力"] .book-category-tag {
  background: var(--accent4);
}

.books-catalog .book-card[data-category="專業英語"] .book-category-tag {
  background: var(--accent6);
}

.book-badge-upcoming {
  display: inline-block;
  margin-left: var(--sp-sm);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(135deg, var(--accent3), #FF7A66);
}


/* -------------------- about.html profile layout -------------------- */
.profile .container,
.positions .container,
.workshop .container,
.publications .container,
.services .container,
.samples .container,
.purchase-channels .container,
.direct-contact .container,
.purchase-note .container {
  max-width: var(--container-max);
}

.profile-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--sp-3xl);
  align-items: start;
}

.profile-photo img {
  width: 100%;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}

.profile-name {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  margin-bottom: var(--sp-xs);
}

.profile-info {
  min-width: 0;
}

.profile-title {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: var(--sp-lg);
}

.profile-bio {
  color: var(--text-light);
  line-height: 1.95;
}

.positions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-lg);
}

.position-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-xl);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease-bounce), box-shadow var(--ease-base);
}

.position-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.position-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--sp-md);
  color: var(--primary);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(var(--primary-rgb), 0.10);
}

.position-name {
  font-size: var(--fs-base);
}

.workshop-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-2xl);
  box-shadow: var(--shadow-sm);
}

.workshop-founded {
  text-align: center;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: var(--sp-lg);
}

.workshop-services {
  margin-top: var(--sp-lg);
  margin-bottom: var(--sp-lg);
}

.workshop-heading {
  text-align: center;
  margin-bottom: var(--sp-md);
}

.workshop-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-md);
}

.workshop-list li {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--sp-md);
  text-align: center;
  font-weight: 600;
}

.workshop-website {
  text-align: center;
  color: var(--text-light);
}


/* -------------------- research.html publication cards -------------------- */
.publications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-lg);
}

.pub-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--r-md);
  padding: var(--sp-xl);
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease-bounce), box-shadow var(--ease-base);
}

.pub-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.pub-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-sm);
}

.pub-date {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--primary);
  background: var(--light-blue);
  padding: 3px 10px;
  border-radius: 999px;
}

.pub-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--white);
  border-radius: 999px;
  padding: 3px 10px;
}

.tag-research { background: var(--primary); }
.tag-poetry { background: var(--accent5); }

.pub-title {
  font-size: 1.02rem;
  line-height: 1.55;
  margin-bottom: var(--sp-sm);
}

.pub-excerpt {
  color: var(--text-light);
  font-size: var(--fs-sm);
  line-height: 1.8;
}


/* -------------------- services.html -------------------- */
.service-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--sp-md);
  display: grid;
  place-items: center;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.10);
  border-radius: 50%;
}

.service-title {
  margin-bottom: var(--sp-sm);
}

.service-desc {
  color: var(--text-light);
  line-height: 1.8;
}

.service-cta .cta-card {
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
  color: var(--white);
  border-radius: var(--r-lg);
  padding: var(--sp-2xl);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.service-cta .cta-title {
  color: var(--white);
  margin-bottom: var(--sp-md);
}

.service-cta .cta-info {
  margin-bottom: var(--sp-lg);
}

.service-cta .cta-info p {
  color: rgba(255, 255, 255, 0.9);
}

.service-cta .cta-info a {
  color: #FFE9A3;
  font-weight: 700;
}


/* -------------------- samples.html -------------------- */
.sample-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent6);
  border-radius: var(--r-md);
  padding: var(--sp-xl);
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease-bounce), box-shadow var(--ease-base);
}

.sample-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.sample-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-sm);
}

.sample-date {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--accent6);
  background: rgba(0, 137, 155, 0.10);
  padding: 3px 10px;
  border-radius: 999px;
}

.sample-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--white);
  background: var(--accent6);
  padding: 3px 10px;
  border-radius: 999px;
}

.sample-title {
  font-size: 1.02rem;
  line-height: 1.55;
  margin-bottom: var(--sp-sm);
}

.sample-excerpt {
  color: var(--text-light);
  font-size: var(--fs-sm);
  line-height: 1.8;
}


/* -------------------- contact.html -------------------- */
.purchase-channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--sp-xl);
}

.channel-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-2xl);
  transition: transform var(--ease-bounce), box-shadow var(--ease-base);
}

.channel-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.channel-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.10);
  border-radius: 50%;
  margin-bottom: var(--sp-md);
}

.channel-name {
  margin-bottom: var(--sp-md);
}

.channel-details {
  margin-bottom: var(--sp-lg);
}

.channel-details li {
  margin-bottom: var(--sp-sm);
  color: var(--text-light);
  line-height: 1.75;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-2xl);
}

.contact-brand {
  text-align: center;
  margin-bottom: var(--sp-lg);
}

.contact-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-lg);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-sm);
  padding: var(--sp-md);
  border-radius: var(--r-sm);
  background: var(--light);
  border: 1px solid var(--border);
}

.contact-item svg {
  color: var(--primary);
  margin-top: 2px;
  flex-shrink: 0;
}

.contact-label {
  font-size: var(--fs-xs);
  color: #6F7C8D;
  margin-bottom: 2px;
}

.purchase-note .note-card {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.14), rgba(61, 155, 233, 0.08));
  border: 1px solid rgba(var(--primary-rgb), 0.24);
  border-radius: var(--r-md);
  padding: var(--sp-lg);
  text-align: center;
}

.purchase-note .note-text {
  color: var(--dark);
  font-weight: 700;
}


/* -------------------- responsive additions -------------------- */
@media (max-width: 1024px) {
  .about-brief-grid,
  .profile-grid {
    grid-template-columns: 260px 1fr;
    gap: var(--sp-2xl);
  }

  .books-catalog .book-detail {
    grid-template-columns: 280px 1fr;
  }
}

@media (max-width: 768px) {
  .section {
    padding: var(--sp-3xl) 0;
  }

  .hero.hero-sub {
    min-height: auto;
    padding: calc(var(--nav-h) + var(--sp-xl)) var(--sp-md) var(--sp-xl);
  }

  .home-map {
    top: var(--nav-h-scrolled);
  }

  .home-map-links {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .home-map-link {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .hero-badge {
    font-size: 0.68rem;
    padding: 5px 14px;
  }

  .hero-lede {
    font-size: 0.88rem;
  }

  .hero-divider {
    width: 40px;
    margin-bottom: var(--sp-md);
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta-group .btn,
  .hero-cta-group .btn-hero-ghost {
    width: 100%;
  }

  .hero-metrics {
    gap: var(--sp-sm);
  }

  .hero-metric {
    padding: 10px 16px;
    min-width: 90px;
  }

  .hero-metric strong {
    font-size: 1.15rem;
  }

  .hero-metric span {
    font-size: 0.68rem;
  }

  .hero-orb-b {
    display: none;
  }

  .hero-orb-c {
    opacity: 0.35;
  }

  .about-brief-grid,
  .profile-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--sp-xl);
  }

  .about-brief-text .section-title {
    text-align: center;
  }

  .about-brief-title::after {
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  .about-brief-role::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .about-brief-tags {
    justify-content: center;
  }

  .photo-frame {
    max-width: 240px;
    margin: 0 auto;
  }

  .photo-accent {
    top: 10px;
    left: 10px;
  }

  .section-title-left {
    text-align: center;
  }

  .brand-kicker {
    display: table;
    margin: 0 auto var(--sp-sm);
  }

  .brand-story-grid {
    grid-template-columns: 1fr;
  }

  .bridge-grid {
    grid-template-columns: 1fr;
  }

  .brand-story-main,
  .brand-story-side,
  .bridge-copy,
  .bridge-point {
    padding: var(--sp-lg);
  }

  .evidence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-brief-photo img,
  .profile-photo img {
    max-width: 240px;
    margin: 0 auto;
  }

  .books-overview .books-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-md);
  }

  .books-catalog .book-detail {
    grid-template-columns: 1fr;
    padding: var(--sp-lg);
  }

  .books-catalog .book-meta {
    grid-template-columns: 1fr;
  }

  .books-catalog .book-cover {
    position: static;
    max-width: 260px;
    margin: 0 auto;
  }

  .book-jump-nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .book-jump-link {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .rec-grid,
  .roadmap-grid,
  .learning-tools-grid,
  .resource-grid,
  .guide-grid,
  .inquiry-grid,
  .faq-grid,
  .bridge-points,
  .positions-grid,
  .publications-grid,
  .samples-grid,
  .services-grid,
  .purchase-channels-grid,
  .workshop-list {
    grid-template-columns: 1fr;
  }

  .contact-details {
    grid-template-columns: 1fr;
  }

  .rec-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .rec-need {
    min-width: auto;
  }

  .planner-goal-row,
  .planner-action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .placement-submit,
  .planner-btn {
    width: 100%;
  }

  .search-row {
    flex-direction: column;
    align-items: stretch;
    max-width: 100%;
    margin-bottom: var(--sp-md);
  }

  .search-input {
    width: 100%;
  }

  .search-clear {
    width: 100%;
  }

  .start-action-card {
    padding: var(--sp-lg);
  }

  .start-action-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .start-action-buttons .btn {
    width: 100%;
  }
}

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

  .evidence-grid {
    grid-template-columns: 1fr;
  }

  .book-card-body {
    min-height: auto;
  }

  .book-card-desc {
    display: block;
  }
}


/* --------------------------------------------------------------------------
   29. Touch Device Enhancements
   -------------------------------------------------------------------------- */
@media (hover: none) and (pointer: coarse) {
  /* Disable hover transforms on touch-only devices to prevent "sticky hover" */
  .book-card:hover,
  .books-overview .book-card:hover {
    transform: none;
  }

  .rec-card:hover {
    transform: none;
  }

  .bridge-point:hover,
  .evidence-card:hover {
    transform: none;
  }

  /* Keep active state feedback instead */
  .book-card:active {
    transform: scale(0.98);
    transition-duration: 0.1s;
  }

  .rec-card:active {
    transform: scale(0.98);
    transition-duration: 0.1s;
  }

  /* Ensure all interactive elements meet 44px minimum touch target */
  .filter-btn {
    min-height: 44px;
    padding: 10px 20px;
  }

  .home-map-link {
    min-height: 36px;
    padding: 8px 14px;
  }

  .book-jump-link {
    min-height: 36px;
    padding: 8px 14px;
  }

  /* Disable parallax on touch */
  .hero [data-parallax] {
    transform: none !important;
  }

  /* Disable CTA pulse animation on touch devices */
  .hero-cta {
    animation: none;
  }
}


/* --------------------------------------------------------------------------
   30. Smooth Scrollbar & Selection polish
   -------------------------------------------------------------------------- */
/* Custom scrollbar for Webkit browsers */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light);
}

::-webkit-scrollbar-thumb {
  background: rgba(var(--primary-rgb), 0.25);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--primary-rgb), 0.40);
}

/* Firefox scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(30, 107, 184, 0.25) var(--light);
}


/* --------------------------------------------------------------------------
   31. Learning Hub / Teacher Portal
   -------------------------------------------------------------------------- */
.learning-hero {
  background: linear-gradient(135deg, #0C2242 0%, #1E6BB8 58%, #63A8E6 100%);
}

.teacher-hero {
  background: linear-gradient(135deg, #131B2F 0%, #27466F 52%, #3D7CB8 100%);
}

.learning-shell,
.teacher-shell {
  background: linear-gradient(180deg, #F8FCFF 0%, #EEF5FD 100%);
}

.learning-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: var(--sp-lg);
  align-items: start;
}

.learning-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-xl);
}

.learning-card h2,
.learning-card h3,
.module-subtitle {
  margin-bottom: var(--sp-sm);
}

.learning-note {
  color: var(--text-light);
  font-size: var(--fs-sm);
  line-height: 1.7;
}

.demo-account-box {
  margin: var(--sp-md) 0;
  padding: var(--sp-md);
  border-radius: var(--r-sm);
  background: rgba(var(--primary-rgb), 0.07);
  border: 1px solid rgba(var(--primary-rgb), 0.16);
}

.demo-account-box p {
  margin-bottom: var(--sp-sm);
  line-height: 1.65;
}

.demo-account-box p:last-child {
  margin-bottom: 0;
}

.auth-forms {
  display: grid;
  gap: var(--sp-md);
}

.auth-form {
  display: grid;
  gap: var(--sp-xs);
  padding: var(--sp-md);
  border: 1px solid rgba(var(--primary-rgb), 0.14);
  border-radius: var(--r-sm);
  background: #FCFEFF;
}

.auth-form input,
.inline-form input,
.inline-form select,
.inline-form textarea,
.study-goal-row input,
.writing-textarea,
.quiz-form select {
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(var(--primary-rgb), 0.24);
  background: var(--white);
  color: var(--text);
  padding: 10px 12px;
  font-size: var(--fs-sm);
}

.inline-form textarea {
  min-height: 86px;
  resize: vertical;
}

.auth-form input:focus,
.inline-form input:focus,
.inline-form select:focus,
.inline-form textarea:focus,
.study-goal-row input:focus,
.writing-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.16);
}

.user-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  margin-bottom: var(--sp-md);
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
}

.stat-chip {
  background: linear-gradient(180deg, #F8FCFF 0%, #ECF4FD 100%);
  border: 1px solid rgba(var(--primary-rgb), 0.18);
  border-radius: var(--r-sm);
  padding: 10px 12px;
}

.stat-chip strong {
  display: block;
  color: var(--dark);
  font-size: 1.05rem;
  margin-bottom: 2px;
}

.stat-chip span {
  color: #5E7085;
  font-size: var(--fs-xs);
  font-weight: 700;
}

.study-goal-row {
  display: grid;
  grid-template-columns: 170px 1fr auto auto;
  gap: var(--sp-sm);
  align-items: center;
}

.study-goal-row label {
  color: var(--dark);
  font-weight: 700;
}

.module-section {
  background: var(--white);
}

.module-section:nth-of-type(even) {
  background: #F9FCFF;
}

.module-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-xl);
}

.quiz-form {
  display: grid;
  gap: var(--sp-md);
  margin-bottom: var(--sp-md);
}

.module-result {
  margin-top: var(--sp-md);
  border: 1px solid rgba(var(--primary-rgb), 0.18);
  border-radius: var(--r-sm);
  background: #F7FBFF;
  padding: var(--sp-md);
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
  align-items: center;
}

.inline-form.stack {
  grid-template-columns: 1fr;
}

.srs-toolbar {
  display: flex;
  gap: var(--sp-sm);
  flex-wrap: wrap;
  margin-bottom: var(--sp-md);
}

.card-list {
  display: grid;
  gap: var(--sp-sm);
}

.list-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--sp-md);
}

.list-card h4 {
  margin-bottom: var(--sp-xs);
}

.list-card p {
  margin-bottom: var(--sp-xs);
  color: var(--text-light);
  line-height: 1.7;
}

.review-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border: 1px solid rgba(var(--primary-rgb), 0.24);
  border-radius: 999px;
  background: #F4F9FF;
  color: var(--primary);
  font-size: var(--fs-xs);
  font-weight: 700;
  transition: transform var(--ease-fast),
              background var(--ease-fast),
              color var(--ease-fast),
              border-color var(--ease-fast);
}

.chip-btn:hover {
  transform: translateY(-1px);
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.choice-grid {
  display: grid;
  gap: 6px;
  margin-bottom: var(--sp-sm);
}

.writing-textarea {
  margin-bottom: var(--sp-md);
  min-height: 180px;
  resize: vertical;
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: var(--sp-lg);
}

.progress-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.progress-table th,
.progress-table td {
  border: 1px solid var(--border);
  padding: 10px;
  text-align: left;
  vertical-align: top;
  font-size: var(--fs-sm);
}

.progress-table th {
  background: #F4F9FF;
  color: var(--dark);
}

.enroll-form {
  grid-template-columns: 1fr auto;
  margin-top: var(--sp-sm);
  margin-bottom: 0;
}

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

  .study-goal-row {
    grid-template-columns: 1fr 1fr;
  }

  .study-goal-row label {
    grid-column: 1 / -1;
  }

  .inline-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .user-head {
    flex-direction: column;
    align-items: stretch;
  }

  .study-goal-row,
  .inline-form,
  .enroll-form {
    grid-template-columns: 1fr;
  }

  .module-card,
  .learning-card {
    padding: var(--sp-lg);
  }

  .srs-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .srs-toolbar .btn,
  .study-goal-row .btn,
  .inline-form .btn,
  .list-card .btn {
    width: 100%;
  }
}
