:root {
  --mango-50: #fff7ef;
  --mango-100: #ffe9d6;
  --mango-200: #ffd2b0;
  --mango-300: #ffb37a;
  --mango-400: #ff9a3c;
  --mango-500: #ff7a1a;
  --mango-600: #f05f00;
  --mango-700: #c44b00;
  --mango-800: #8f3600;
  --mango-900: #5c2300;
  --ink-900: #1b1410;
  --ink-700: #3d2f26;
  --ink-500: #6b5a4d;
  --ink-300: #9c8b7d;
  --surface: #ffffff;
  --surface-2: #fffaf5;
  --surface-3: #fff2e6;
  --line: rgba(255, 122, 26, 0.18);
  --line-strong: rgba(255, 122, 26, 0.32);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.86);
  --shadow-sm: 0 2px 8px rgba(92, 35, 0, 0.06);
  --shadow-md: 0 10px 28px rgba(92, 35, 0, 0.1);
  --shadow-lg: 0 22px 48px rgba(92, 35, 0, 0.14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --header-h: 68px;
  --maxw: 1240px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

html[data-theme="dark"] {
  --ink-900: #f5ece4;
  --ink-700: #e0d2c6;
  --ink-500: #b8a596;
  --ink-300: #8d7a6b;
  --surface: #1a1310;
  --surface-2: #221a15;
  --surface-3: #2b211a;
  --line: rgba(255, 154, 60, 0.2);
  --line-strong: rgba(255, 154, 60, 0.38);
  --glass: rgba(34, 26, 21, 0.72);
  --glass-strong: rgba(34, 26, 21, 0.88);
  --mango-50: #2b211a;
  --mango-100: #3a2a1e;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 22px 48px rgba(0, 0, 0, 0.6);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-700);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 154, 60, 0.14), transparent 42%),
    radial-gradient(circle at 88% 8%, rgba(255, 95, 31, 0.1), transparent 40%),
    linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 45%, var(--surface-2) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

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

a {
  color: var(--mango-600);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

a:hover,
a:focus-visible {
  color: var(--mango-500);
  text-decoration: underline;
  text-underline-offset: 3px;
}

h1,
h2,
h3,
h4 {
  color: var(--ink-900);
  line-height: 1.3;
  margin: 0 0 0.6em;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
}

h2 {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
}

h3 {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
}

h4 {
  font-size: 1rem;
  color: var(--ink-500);
  font-weight: 600;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.3em;
}

li {
  margin-bottom: 0.4em;
}

.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;
}

:focus-visible {
  outline: 2px solid var(--mango-500);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--mango-300);
  color: var(--ink-900);
}

/* ===================== HEADER ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-md);
  background: var(--glass-strong);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(255, 122, 26, 0.32);
  transition: transform 0.4s var(--ease);
}

.brand:hover .brand-logo {
  transform: rotate(-6deg) scale(1.06);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 1.05rem;
  color: var(--ink-900);
  letter-spacing: 0.02em;
}

.brand-text em {
  font-style: normal;
  font-size: 0.7rem;
  color: var(--ink-300);
  letter-spacing: 0.14em;
}

.main-nav {
  flex: 1;
  min-width: 0;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: center;
}

.main-nav a {
  display: block;
  padding: 8px 12px;
  font-size: 0.88rem;
  color: var(--ink-500);
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--mango-600);
  background: var(--mango-100);
  text-decoration: none;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 4px 4px 14px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.search-box:focus-within {
  border-color: var(--mango-400);
  box-shadow: 0 0 0 3px rgba(255, 154, 60, 0.18);
}

.search-box input {
  border: 0;
  background: transparent;
  color: var(--ink-700);
  font-size: 0.85rem;
  width: 150px;
  padding: 6px 0;
  font-family: inherit;
}

.search-box input::placeholder {
  color: var(--ink-300);
}

.search-box input:focus {
  outline: none;
}

.search-box button {
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, var(--mango-400), var(--mango-600));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  font-family: inherit;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.search-box button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 122, 26, 0.4);
}

.theme-toggle,
.menu-toggle {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-3);
  color: var(--ink-700);
  font-size: 1.05rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.theme-toggle:hover,
.menu-toggle:hover {
  background: var(--mango-100);
  border-color: var(--line-strong);
  transform: translateY(-2px) rotate(6deg);
}

.menu-toggle {
  display: none;
}

.breadcrumb {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 10px;
  font-size: 0.78rem;
  color: var(--ink-300);
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.breadcrumb li + li::before {
  content: "›";
  margin-right: 6px;
  color: var(--mango-300);
}

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

/* ===================== HERO ===================== */
.hero {
  position: relative;
  max-width: var(--maxw);
  margin: 26px auto 0;
  padding: 0 20px;
}

.hero-slides {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 154, 60, 0.16), rgba(255, 95, 31, 0.08)),
    var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.hero-slides::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(255, 154, 60, 0.34), transparent 68%);
  pointer-events: none;
  animation: floatBlob 14s ease-in-out infinite;
}

@keyframes floatBlob {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-40px, 30px) scale(1.12);
  }
}

.hero-slide {
  display: none;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
  padding: 48px 44px;
  position: relative;
  z-index: 1;
}

.hero-slide.is-active {
  display: grid;
  animation: slideIn 0.6s var(--ease);
}

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

.hero-tag {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--mango-700);
  background: var(--mango-100);
  border: 1px solid var(--line-strong);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero-copy h1,
.hero-copy h2 {
  margin-bottom: 14px;
}

.hero-copy h1 {
  background: linear-gradient(120deg, var(--mango-600), var(--mango-400) 60%, var(--mango-700));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 0.96rem;
  color: var(--ink-500);
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    background 0.3s var(--ease), color 0.3s var(--ease);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--mango-400), var(--mango-600));
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 122, 26, 0.34);
}

.btn-primary:hover {
  color: #fff;
  box-shadow: 0 16px 34px rgba(255, 122, 26, 0.46);
}

.btn-ghost {
  background: var(--glass-strong);
  color: var(--mango-700);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  color: var(--mango-600);
  background: var(--mango-100);
}

.hero-stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.hero-stats strong {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--mango-600);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.hero-stats span {
  font-size: 0.78rem;
  color: var(--ink-300);
  letter-spacing: 0.04em;
}

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

.hero-figure svg {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform 0.6s var(--ease);
}

.hero-figure:hover svg {
  transform: translateY(-6px) scale(1.02);
}

.hero-figure figcaption {
  margin-top: 12px;
  font-size: 0.76rem;
  color: var(--ink-300);
  text-align: center;
}

.hero-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--glass-strong);
  color: var(--mango-600);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}

.hero-prev:hover,
.hero-next:hover {
  background: var(--mango-500);
  color: #fff;
  transform: scale(1.1);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: var(--line-strong);
  transition: width 0.35s var(--ease), background 0.35s var(--ease);
}

.hero-dots button.is-active {
  width: 30px;
  background: linear-gradient(90deg, var(--mango-400), var(--mango-600));
}

/* ===================== SECTIONS ===================== */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px 20px 0;
}

.section-head {
  margin-bottom: 30px;
  max-width: 76ch;
}

.section-head h2 {
  position: relative;
  padding-bottom: 14px;
}

.section-head h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 68px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mango-400), var(--mango-600));
}

.section-sub {
  color: var(--ink-500);
  font-size: 0.94rem;
  margin: 0;
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

/* ===================== CARDS ===================== */
.card {
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--mango-400), var(--mango-600));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line-strong);
}

.card:hover::before {
  transform: scaleX(1);
}

.card h3 {
  margin-top: 0;
}

.card h4 {
  margin: 18px 0 6px;
}

.card p:last-child,
.card ul:last-child,
.card ol:last-child {
  margin-bottom: 0;
}

.product-card {
  background:
    linear-gradient(160deg, rgba(255, 154, 60, 0.08), transparent 55%),
    var(--glass);
}

.product-card h3::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mango-500);
  margin-right: 10px;
  vertical-align: middle;
  box-shadow: 0 0 0 4px rgba(255, 122, 26, 0.16);
}

.case-card {
  border-left: 4px solid var(--mango-400);
}

.case-meta {
  font-size: 0.78rem;
  color: var(--mango-700);
  background: var(--mango-100);
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  margin: 0;
}

.quote-card {
  margin: 0;
  font-style: italic;
  color: var(--ink-700);
  background:
    linear-gradient(160deg, rgba(255, 154, 60, 0.1), transparent 60%),
    var(--glass);
}

.quote-card::after {
  content: "”";
  position: absolute;
  right: 18px;
  bottom: -6px;
  font-size: 5rem;
  line-height: 1;
  color: var(--mango-200);
  font-family: Georgia, serif;
  pointer-events: none;
}

.quote-card footer {
  margin-top: 12px;
  font-size: 0.82rem;
  font-style: normal;
  color: var(--ink-300);
}

.article-card h3 {
  font-size: 1.05rem;
  line-height: 1.5;
}

.article-card h3 a {
  color: var(--ink-900);
  text-decoration: none;
}

.article-card h3 a:hover {
  color: var(--mango-600);
  text-decoration: none;
}

.article-meta {
  font-size: 0.76rem;
  color: var(--ink-300);
  margin-bottom: 10px;
}

.read-more {
  font-size: 0.84rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.read-more::after {
  content: "→";
  transition: transform 0.3s var(--ease);
}

.read-more:hover::after {
  transform: translateX(4px);
}

/* ===================== HOWTO ===================== */
.howto-card {
  padding: 34px;
}

.howto-card ol,
.howto-card ul {
  padding-left: 1.4em;
}

.howto-card ol li::marker {
  color: var(--mango-500);
  font-weight: 700;
}

.howto-card ul li::marker {
  color: var(--mango-400);
}

/* ===================== FAQ ===================== */
.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.faq-item:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.faq-item[open] {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  color: var(--ink-900);
  font-size: 0.96rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

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

.faq-item summary::before {
  content: "＋";
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--mango-100);
  color: var(--mango-600);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

.faq-item[open] summary::before {
  content: "－";
  background: var(--mango-500);
  color: #fff;
  transform: rotate(180deg);
}

.faq-item summary:hover {
  background: var(--mango-50);
}

.faq-answer {
  padding: 0 22px 20px 60px;
  color: var(--ink-500);
  font-size: 0.92rem;
  animation: fadeDown 0.4s var(--ease);
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

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

/* ===================== CONTACT ===================== */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.92rem;
}

.contact-list li:last-child {
  border-bottom: 0;
}

.contact-list strong {
  color: var(--ink-900);
  margin-right: 6px;
}

/* ===================== SITEMAP / LINKS ===================== */
.sitemap-nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sitemap-nav a {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--ink-700);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease),
    color 0.3s var(--ease);
}

.sitemap-nav a:hover {
  background: var(--mango-500);
  color: #fff;
  text-decoration: none;
  transform: translateY(-3px);
}

.links-block h3 {
  font-size: 1rem;
}

.friend-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.friend-links a {
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  border: 1px solid var(--line);
  font-size: 0.84rem;
  color: var(--ink-500);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.friend-links a:hover {
  color: var(--mango-600);
  border-color: var(--line-strong);
  text-decoration: none;
}

/* ===================== FOOTER ===================== */
.site-footer {
  margin-top: 72px;
  background:
    linear-gradient(180deg, transparent, rgba(255, 154, 60, 0.08)),
    var(--surface-3);
  border-top: 1px solid var(--line);
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 20px 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 32px;
}

.footer-col h3 {
  font-size: 1rem;
  margin-bottom: 14px;
  color: var(--ink-900);
}

.footer-col p {
  font-size: 0.88rem;
  color: var(--ink-500);
  margin: 0;
}

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

.footer-col li {
  font-size: 0.86rem;
  color: var(--ink-500);
  margin-bottom: 8px;
}

.footer-col a {
  color: var(--ink-500);
}

.footer-col a:hover {
  color: var(--mango-600);
}

.footer-bottom {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 20px 30px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-300);
}

/* ===================== BACK TO TOP ===================== */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: linear-gradient(135deg, var(--mango-400), var(--mango-600));
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 26px rgba(255, 122, 26, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease),
    visibility 0.35s var(--ease);
  z-index: 90;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px) scale(1.06);
}

/* ===================== SCROLL REVEAL ===================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@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;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1080px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .main-nav {
    order: 3;
    flex-basis: 100%;
  }
  .main-nav ul {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .main-nav ul::-webkit-scrollbar {
    height: 4px;
  }
  .main-nav ul::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 999px;
  }
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-slide {
    grid-template-columns: 1fr;
    padding: 40px 32px;
    gap: 28px;
  }
  .hero-figure {
    order: -1;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 780px) {
  :root {
    --header-h: 60px;
  }
  .header-inner {
    padding: 8px 14px;
    gap: 10px;
  }
  .search-box {
    flex: 1;
    min-width: 0;
  }
  .search-box input {
    width: 100%;
    min-width: 0;
  }
  .menu-toggle {
    display: grid;
  }
  .main-nav {
    display: none;
  }
  .main-nav.is-open {
    display: block;
    animation: fadeDown 0.35s var(--ease);
  }
  .main-nav ul {
    flex-direction: column;
    gap: 4px;
  }
  .main-nav a {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--surface-3);
  }
  .breadcrumb {
    padding: 0 14px 8px;
    font-size: 0.72rem;
  }
  .hero {
    margin-top: 16px;
    padding: 0 14px;
  }
  .hero-slide {
    padding: 28px 20px;
  }
  .hero-actions {
    gap: 10px;
  }
  .btn {
    padding: 11px 20px;
    font-size: 0.86rem;
  }
  .hero-stats {
    gap: 18px;
  }
  .hero-stats strong {
    font-size: 1.35rem;
  }
  .section {
    padding: 46px 14px 0;
  }
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .card {
    padding: 20px;
    border-radius: var(--radius-md);
  }
  .howto-card {
    padding: 22px;
  }
  .faq-item summary {
    padding: 15px 16px;
    font-size: 0.9rem;
  }
  .faq-answer {
    padding: 0 16px 16px 50px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    padding: 34px 14px 20px;
    gap: 24px;
  }
  .footer-bottom {
    padding: 16px 14px 24px;
    flex-direction: column;
  }
  .back-to-top {
    right: 14px;
    bottom: 16px;
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 420px) {
  .brand-text em {
    display: none;
  }
  .search-box button {
    padding: 7px 12px;
  }
  .hero-stats {
    flex-direction: column;
    gap: 12px;
  }
  .hero-stats li {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
  }
}

/* ===================== DARK MODE TWEAKS ===================== */
html[data-theme="dark"] .hero-copy h1 {
  background: linear-gradient(120deg, var(--mango-400), var(--mango-300) 60%, var(--mango-500));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

html[data-theme="dark"] .hero-tag {
  color: var(--mango-300);
  background: rgba(255, 122, 26, 0.16);
}

html[data-theme="dark"] .btn-ghost {
  color: var(--mango-300);
}

html[data-theme="dark"] .product-card,
html[data-theme="dark"] .quote-card {
  background:
    linear-gradient(160deg, rgba(255, 154, 60, 0.12), transparent 55%),
    var(--glass);
}

html[data-theme="dark"] .case-meta {
  color: var(--mango-300);
  background: rgba(255, 122, 26, 0.16);
}

html[data-theme="dark"] .search-box button {
  color: #1a1310;
}

html[data-theme="dark"] .sitemap-nav a:hover,
html[data-theme="dark"] .hero-prev:hover,
html[data-theme="dark"] .hero-next:hover {
  color: #1a1310;
}

html[data-theme="dark"] .faq-item[open] summary::before {
  color: #1a1310;
}

html[data-theme="dark"] .back-to-top {
  color: #1a1310;
}

/* ===================== PRINT ===================== */
@media print {
  .site-header,
  .hero-controls,
  .back-to-top,
  .search-box,
  .theme-toggle,
  .menu-toggle {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}