:root {
  --color-primary: #1f6feb;
  --color-primary-dark: #1557b0;
  --color-primary-light: #4a8ef5;
  --color-accent: #7c5cff;
  --color-accent-light: #a78bfa;
  --color-bg: #f5f8ff;
  --color-bg-alt: #eef4ff;
  --color-surface: #ffffff;
  --color-surface-glass: rgba(255, 255, 255, 0.72);
  --color-border: rgba(31, 111, 235, 0.14);
  --color-text: #1a2233;
  --color-text-secondary: #4a5568;
  --color-text-muted: #7a8699;
  --color-shadow: rgba(31, 111, 235, 0.12);
  --color-shadow-strong: rgba(31, 111, 235, 0.24);
  --gradient-hero: linear-gradient(135deg, #1f6feb 0%, #7c5cff 50%, #a78bfa 100%);
  --gradient-accent: linear-gradient(135deg, #4a8ef5 0%, #7c5cff 100%);
  --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(238, 244, 255, 0.7));
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3.5rem;
  --space-2xl: 5rem;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --max-width: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-primary: #4a8ef5;
    --color-primary-dark: #1f6feb;
    --color-primary-light: #7aaef8;
    --color-accent: #a78bfa;
    --color-accent-light: #c4b5fd;
    --color-bg: #0d1220;
    --color-bg-alt: #131a2e;
    --color-surface: #1a2238;
    --color-surface-glass: rgba(26, 34, 56, 0.72);
    --color-border: rgba(74, 142, 245, 0.2);
    --color-text: #e8edf7;
    --color-text-secondary: #b0bdd4;
    --color-text-muted: #7a8699;
    --color-shadow: rgba(0, 0, 0, 0.4);
    --color-shadow-strong: rgba(0, 0, 0, 0.6);
    --gradient-hero: linear-gradient(135deg, #1557b0 0%, #5b3fd4 50%, #7c5cff 100%);
    --gradient-card: linear-gradient(145deg, rgba(26, 34, 56, 0.9), rgba(19, 26, 46, 0.7));
  }
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(circle at 12% 8%, rgba(31, 111, 235, 0.08), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(124, 92, 255, 0.08), transparent 42%),
    radial-gradient(circle at 50% 100%, rgba(167, 139, 250, 0.06), transparent 50%);
  background-attachment: fixed;
}

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

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

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

ul,
ol {
  list-style: none;
}

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

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }

p {
  margin-bottom: 1rem;
  color: var(--color-text-secondary);
}

p:last-child {
  margin-bottom: 0;
}

/* ===== HEADER ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface-glass);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 4px 24px var(--color-shadow);
  animation: slideDown 0.6s var(--transition-slow) both;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.5rem clamp(1rem, 4vw, 2.5rem);
  background: var(--gradient-hero);
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.topbar span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  opacity: 0.95;
}

.topbar span:first-child::before {
  content: "📚";
  font-size: 0.9em;
}

.topbar span:last-child::before {
  content: "☎";
  font-size: 0.9em;
}

header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
  padding: 0.6rem clamp(1rem, 4vw, 2.5rem);
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

header nav a {
  position: relative;
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

header nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width var(--transition-base);
}

header nav a:hover {
  color: var(--color-primary);
  background: rgba(31, 111, 235, 0.08);
  transform: translateY(-2px);
}

header nav a:hover::after {
  width: 60%;
}

header form[role="search"] {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem clamp(1rem, 4vw, 2.5rem) 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

header form[role="search"] label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

header form[role="search"] input[type="search"] {
  flex: 1 1 220px;
  min-width: 0;
  padding: 0.7rem 1.1rem;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

header form[role="search"] input[type="search"]::placeholder {
  color: var(--color-text-muted);
}

header form[role="search"] input[type="search"]:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.15);
  background: var(--color-surface);
}

header form[role="search"] button[type="submit"] {
  padding: 0.7rem 1.6rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  background: var(--gradient-accent);
  border-radius: 999px;
  box-shadow: 0 4px 16px var(--color-shadow-strong);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

header form[role="search"] button[type="submit"]:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 24px var(--color-shadow-strong);
  filter: brightness(1.08);
}

header form[role="search"] button[type="submit"]:active {
  transform: translateY(0) scale(0.98);
}

/* ===== MAIN ===== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 4vw, 2.5rem) var(--space-2xl);
}

/* ===== BREADCRUMB ===== */
main > nav[aria-label="面包屑"] {
  margin-bottom: var(--space-lg);
  animation: fadeUp 0.6s var(--transition-slow) 0.1s both;
}

main > nav[aria-label="面包屑"] ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

main > nav[aria-label="面包屑"] li {
  display: inline-flex;
  align-items: center;
}

main > nav[aria-label="面包屑"] li + li::before {
  content: "›";
  margin-right: 0.4rem;
  color: var(--color-text-muted);
  font-weight: 700;
}

main > nav[aria-label="面包屑"] a {
  color: var(--color-text-muted);
  font-weight: 500;
}

main > nav[aria-label="面包屑"] a:hover {
  color: var(--color-primary);
}

/* ===== SECTIONS ===== */
section {
  margin-bottom: var(--space-xl);
  animation: fadeUp 0.7s var(--transition-slow) both;
}

section > h2 {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-md);
  padding-bottom: 0.5rem;
}

section > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: var(--gradient-accent);
  transition: width var(--transition-slow);
}

section:hover > h2::after {
  width: 100%;
}

section > h3 {
  margin: var(--space-lg) 0 var(--space-sm);
  color: var(--color-primary);
}

section > h3:first-of-type {
  margin-top: var(--space-sm);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== HERO ===== */
#hero {
  position: relative;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 3rem);
  border-radius: var(--radius-xl);
  background: var(--gradient-hero);
  background-size: 200% 200%;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 24px 60px var(--color-shadow-strong);
  animation: gradientShift 12s ease infinite, fadeUp 0.8s var(--transition-slow) both;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.22), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(255, 255, 255, 0.14), transparent 40%);
  pointer-events: none;
}

#hero > * {
  position: relative;
  z-index: 1;
}

#hero h1 {
  color: #fff;
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.18);
  animation: fadeUp 0.8s var(--transition-slow) 0.15s both;
}

#hero p {
  color: rgba(255, 255, 255, 0.94);
  max-width: 68ch;
  font-size: 1.02rem;
  animation: fadeUp 0.8s var(--transition-slow) 0.25s both;
}

#hero figure {
  margin: var(--space-lg) 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  animation: fadeUp 0.8s var(--transition-slow) 0.35s both;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

#hero figure:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.28);
}

#hero figure svg {
  width: 100%;
  height: auto;
  display: block;
}

#hero figcaption {
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(0, 0, 0, 0.18);
  text-align: center;
}

#hero > p:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: var(--space-md);
}

#hero > p:last-child a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 1.4rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

#hero > p:last-child a:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  color: #fff;
}

/* ===== CARDS (generic sections) ===== */
#brand,
#korean-comics,
#products,
#solutions,
#cases,
#news,
#articles,
#howto,
#faq,
#contact,
#sitemap,
#links {
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px var(--color-shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

#brand:hover,
#korean-comics:hover,
#products:hover,
#solutions:hover,
#cases:hover,
#news:hover,
#articles:hover,
#howto:hover,
#faq:hover,
#contact:hover,
#sitemap:hover,
#links:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px var(--color-shadow-strong);
  border-color: rgba(31, 111, 235, 0.28);
}

/* ===== NEWS / ARTICLES ===== */
#news article,
#articles article {
  position: relative;
  padding: var(--space-md) var(--space-md) var(--space-md) calc(var(--space-md) + 6px);
  margin-bottom: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px var(--color-shadow);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

#news article:last-child,
#articles article:last-child {
  margin-bottom: 0;
}

#news article:hover,
#articles article:hover {
  transform: translateX(6px) translateY(-2px);
  box-shadow: 0 14px 36px var(--color-shadow-strong);
  border-left-color: var(--color-accent);
}

#news article h3,
#articles article h3 {
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
  transition: color var(--transition-fast);
}

#news article:hover h3,
#articles article:hover h3 {
  color: var(--color-primary);
}

#news article p,
#articles article p {
  font-size: 0.92rem;
}

#news article p:first-of-type,
#articles article p:first-of-type {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

#news article a,
#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.88rem;
  font-weight: 600;
}

#news article a::after,
#articles article a::after {
  content: "→";
  transition: transform var(--transition-fast);
}

#news article a:hover::after,
#articles article a:hover::after {
  transform: translateX(4px);
}

/* ===== CASES ===== */
#cases blockquote {
  position: relative;
  margin: var(--space-md) 0;
  padding: var(--space-md) var(--space-md) var(--space-md) calc(var(--space-md) + 1.5rem);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 16px var(--color-shadow);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

#cases blockquote::before {
  content: "❝";
  position: absolute;
  top: 0.5rem;
  left: 0.6rem;
  font-size: 2rem;
  line-height: 1;
  color: var(--color-primary);
  opacity: 0.35;
}

#cases blockquote:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px var(--color-shadow-strong);
}

#cases blockquote p {
  font-style: italic;
  color: var(--color-text-secondary);
  margin: 0;
}

/* ===== HOWTO ===== */
#howto ol {
  counter-reset: step;
  display: grid;
  gap: var(--space-sm);
  margin: var(--space-md) 0;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: var(--space-md) var(--space-md) var(--space-md) calc(var(--space-md) + 2.5rem);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 14px var(--color-shadow);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-accent);
  border-radius: 50%;
  box-shadow: 0 4px 12px var(--color-shadow-strong);
}

#howto ol li:hover {
  transform: translateX(6px);
  border-color: var(--color-primary);
  box-shadow: 0 12px 32px var(--color-shadow-strong);
}

/* ===== FAQ ===== */
#faq details {
  margin-bottom: var(--space-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px var(--color-shadow);
  overflow: hidden;
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

#faq details:last-child {
  margin-bottom: 0;
}

#faq details[open] {
  border-color: var(--color-primary);
  box-shadow: 0 12px 32px var(--color-shadow-strong);
}

#faq summary {
  position: relative;
  padding: var(--space-md) calc(var(--space-md) + 2rem) var(--space-md) var(--space-md);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  transition: color var(--transition-fast), background var(--transition-fast);
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--color-primary);
  background: rgba(31, 111, 235, 0.1);
  border-radius: 50%;
  transition: transform var(--transition-base), background var(--transition-base), color var(--transition-base);
}

#faq details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
  background: var(--gradient-accent);
  color: #fff;
}

#faq summary:hover {
  color: var(--color-primary);
  background: rgba(31, 111, 235, 0.05);
}

#faq details p {
  padding: 0 var(--space-md) var(--space-md);
  font-size: 0.92rem;
  animation: fadeUp 0.35s var(--transition-base) both;
}

/* ===== CONTACT ===== */
#contact address {
  font-style: normal;
  display: grid;
  gap: 0.4rem;
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 14px var(--color-shadow);
}

#contact address p {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.94rem;
}

#contact address a {
  font-weight: 600;
  word-break: break-all;
}

/* ===== SITEMAP / LINKS ===== */
#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-sm);
}

#sitemap ul li a,
#links ul li a {
  display: block;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px var(--color-shadow);
  transition: transform var(--transition-fast), background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  transform: translateY(-3px);
  color: #fff;
  background: var(--gradient-accent);
  box-shadow: 0 10px 24px var(--color-shadow-strong);
}

/* ===== FOOTER ===== */
footer {
  position: relative;
  margin-top: var(--space-xl);
  padding: var(--space-xl) clamp(1rem, 4vw, 2.5rem) var(--space-lg);
  background: linear-gradient(160deg, #0f1a30 0%, #16233f 50%, #1a2a4a 100%);
  color: rgba(232, 237, 247, 0.82);
  border-top: 1px solid rgba(74, 142, 245, 0.2);
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-accent);
}

footer section {
  max-width: var(--max-width);
  margin: 0 auto var(--space-lg);
  animation: none;
}

footer section h2 {
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: var(--space-sm);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid rgba(74, 142, 245, 0.3);
  display: inline-block;
}

footer section h3 {
  color: var(--color-primary-light);
  font-size: 1rem;
  margin: var(--space-md) 0 0.35rem;
}

footer p {
  color: rgba(232, 237, 247, 0.78);
  font-size: 0.88rem;
  max-width: 70ch;
}

footer > p:last-of-type {
  max-width: var(--max-width);
  margin: var(--space-lg) auto 0;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: 0.82rem;
  color: rgba(232, 237, 247, 0.6);
}

/* ===== BACK TO TOP ===== */
#back-to-top {
  position: fixed;
  right: clamp(0.75rem, 3vw, 1.75rem);
  bottom: clamp(0.75rem, 3vw, 1.75rem);
  z-index: 200;
  padding: 0.7rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  background: var(--gradient-accent);
  border-radius: 999px;
  box-shadow: 0 8px 28px var(--color-shadow-strong);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0.92;
  transition: transform var(--transition-base), box-shadow var(--transition-base), opacity var(--transition-base);
}

#back-to-top:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 14px 40px var(--color-shadow-strong);
  opacity: 1;
}

#back-to-top:active {
  transform: translateY(-1px) scale(0.98);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  header nav {
    justify-content: center;
  }

  header nav a {
    font-size: 0.85rem;
    padding: 0.45rem 0.7rem;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 15px;
  }

  .topbar {
    justify-content: center;
    text-align: center;
    font-size: 0.75rem;
  }

  header nav {
    gap: 0.1rem;
    padding: 0.5rem 0.75rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  header nav::-webkit-scrollbar {
    display: none;
  }

  header nav a {
    white-space: nowrap;
    flex-shrink: 0;
  }

  header form[role="search"] {
    padding: 0.5rem 0.75rem 0.85rem;
  }

  header form[role="search"] input[type="search"] {
    flex: 1 1 100%;
  }

  header form[role="search"] button[type="submit"] {
    flex: 1 1 100%;
  }

  #hero {
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.25rem;
  }

  #hero > p:last-child {
    flex-direction: column;
    align-items: stretch;
  }

  #hero > p:last-child a {
    justify-content: center;
  }

  #brand,
  #korean-comics,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #howto,
  #faq,
  #contact,
  #sitemap,
  #links {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-md);
  }

  #news article:hover,
  #articles article:hover {
    transform: translateY(-2px);
  }

  #howto ol li:hover {
    transform: translateY(-2px);
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  #back-to-top {
    font-size: 0.75rem;
    padding: 0.6rem 0.9rem;
  }
}

@media (max-width: 380px) {
  header nav a {
    font-size: 0.8rem;
    padding: 0.4rem 0.55rem;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== 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;
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-alt);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
  border-radius: 999px;
  border: 2px solid var(--color-bg-alt);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}

/* ===== SELECTION ===== */
::selection {
  background: rgba(31, 111, 235, 0.25);
  color: var(--color-text);
}

/* ===== PRINT ===== */
@media print {
  header,
  footer,
  #back-to-top,
  header form[role="search"] {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  section {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}