/* pixiv guide mirror — tokens measured from the source site (design-source/pages/home.md):
   brand #0096fa, text #1f1f1f/#474747/#858585, flat surfaces rgba(0,0,0,.04), radii 4/8/24/pill, 64px white header,
   16px bold tabs with 4px inset brand underline, 40px pill buttons, dark 12px bottom bar, 0.2s colour transitions */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css');

:root {
  --primary: #0096fa;
  --primary-dark: #007ed2;
  --primary-hover: #0090f0;
  --header-bg: #ffffff;
  --dark: #1f1f1f;
  --bg: #ffffff;
  --surface: #f5f5f5;
  --surface-2: #eeeeee;
  --tint: rgba(0,0,0,.04);
  --text: #1f1f1f;
  --text-2: #474747;
  --text-muted: #858585;
  --green: #b1cc29;
  --red: #ff2b00;
  --border: rgba(0,0,0,.08);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 24px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --ease: cubic-bezier(.2,.7,.2,1);
  --dur-fast: .12s;
  --dur-md: .2s;
  --transition: .2s ease;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: clip; max-width: 100%; } /* clip, NOT hidden: hidden breaks the sticky header (M9) */
html { scroll-padding-top: 80px; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 15px; line-height: 1.7; color: var(--text); background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: #3d7699; text-decoration: none; transition: color var(--transition); }
a:hover { color: #336381; text-decoration: underline; }
ul { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4 { margin-top: 0; line-height: 1.3; color: var(--text); }
p { margin: 0 0 12px; }

/* ─── HEADER (white, 64px, hairline border) ─── */
.site-header { position: sticky; top: 0; z-index: 1000; background: var(--header-bg); border-bottom: 1px solid var(--border); }
.nav { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; padding: 0 var(--space-sm); height: 64px; gap: var(--space-md); }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.logo { height: 32px; width: auto; max-width: 140px; object-fit: contain; }
.nav-links { display: flex; align-items: stretch; gap: 0; flex: 1; justify-content: center; height: 64px; }
.nav-links > li { display: flex; }
.nav-links > li > a {
  display: flex; align-items: center; padding: 0 20px; height: 64px;
  color: var(--text-muted); font-size: 15px; font-weight: 700; white-space: nowrap;
  transition: color var(--transition), box-shadow var(--transition);
}
.nav-links > li > a:hover { color: var(--text); text-decoration: none; box-shadow: inset 0 -4px 0 var(--border); }
.nav-links > li > a[aria-current="page"], .nav-links > li > a.active { color: var(--text); box-shadow: inset 0 -4px 0 var(--primary); }
.nav-right { display: flex; align-items: center; gap: var(--space-sm); flex-shrink: 0; margin-left: auto; }
.mobile-lang { display: none; }

/* ─── DROPDOWN (bridge-correct, M26) ─── */
.dropdown { position: relative; }
.dropdown-panel { position: absolute; top: 100%; right: 0; margin-top: 0; padding-top: 8px; display: none; min-width: 160px; z-index: 1000; }
.dropdown-panel-inner { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-lg); }
.dropdown:hover .dropdown-panel, .dropdown:focus-within .dropdown-panel { display: block; }
.dropdown-panel a { display: block; padding: 10px 16px; color: var(--text); font-size: 14px; transition: background var(--transition); white-space: nowrap; }
.dropdown-panel a:hover { background: var(--surface); text-decoration: none; }
.dropdown.open > .dropdown-panel { display: block; }
.nav-links .dropdown-panel { left: 0; right: auto; }
.dropdown-toggle { background: none; border: 0; cursor: pointer; font: inherit; color: var(--text-muted); font-size: 15px; font-weight: 700; padding: 0 20px; }
.dropdown-toggle::after { content: " ▾"; font-size: .8em; }

/* ─── BUTTONS: 40px pills, brand blue / tinted secondary ─── */
.btn-cta {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; min-height: 40px; padding: 0 24px;
  border-radius: var(--radius-pill); font-size: 14px; font-weight: 700; white-space: nowrap;
  transition: background var(--transition), transform var(--dur-fast) var(--ease);
}
.btn-cta:hover { background: var(--primary-hover); color: #fff; text-decoration: none; }
.btn-cta:active { background: var(--primary-dark); transform: scale(.97); }
.btn-lg { min-height: 48px; padding: 0 40px; font-size: 16px; }
.btn-cta:focus-visible, .faq-q:focus-visible, .nav-toggle:focus-visible, .nav-links a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 24px;
  background: var(--tint); color: #5c5c5c; border-radius: var(--radius-pill); font-size: 14px; font-weight: 700;
  transition: background var(--transition);
}
.btn-outline:hover { background: rgba(0,0,0,.078); text-decoration: none; color: #5c5c5c; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--text-2); font-size: 22px; padding: 6px; order: 99; }

/* ─── HERO: grey stage + white rounded card (login-card geometry from the source) ─── */
.hero { background: var(--surface-2); padding: var(--space-xl) var(--space-sm); text-align: center; }
.hero-inner {
  max-width: 640px; margin: 0 auto; background: #fff; border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-lg) 44px;
}
.hero-badge {
  display: inline-block; background: rgba(0,150,250,.1); color: var(--primary-dark);
  padding: 4px 14px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; margin-bottom: var(--space-sm);
}
.hero h1 { font-size: clamp(24px, 4.2vw, 34px); font-weight: 800; margin-bottom: 8px; color: var(--text-2); }
.hero p { font-size: 15px; color: var(--text-2); max-width: 520px; margin: 0 auto var(--space-md); }
.hero-cta-group { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.hero-price { margin-top: var(--space-md); font-size: 13px; color: var(--text-muted); }

/* ─── SECTIONS ─── */
.section { padding: var(--space-xl) var(--space-sm); }
.section-alt { background: var(--surface); }
.container { max-width: 1040px; margin: 0 auto; }
.section-title { font-size: clamp(20px, 3vw, 26px); font-weight: 800; margin-bottom: 8px; text-align: center; color: var(--text-2); }
.section-sub { max-width: 720px; margin: 0 auto var(--space-md); text-align: center; color: var(--text-muted); font-size: 15px; }
.container > p { max-width: 760px; margin-left: auto; margin-right: auto; }

/* ─── FEATURE CARDS (flat, 24px radius, tinted surface) ─── */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-sm); }
.feature-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-md);
  transition: box-shadow var(--dur-md) var(--ease), transform var(--dur-md) var(--ease);
}
.section-alt .feature-card { border-color: transparent; }
.feature-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.feature-icon { width: 48px; height: 48px; border-radius: 50%; background: rgba(0,150,250,.1); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: var(--space-sm); color: var(--primary); }
.feature-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--text-2); }
.feature-card p { font-size: 14px; color: var(--text-muted); margin: 0; line-height: 1.7; }

/* ─── PRICING ─── */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-sm); max-width: 760px; margin: 0 auto; }
.pricing-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-md); transition: box-shadow var(--dur-md) var(--ease), transform var(--dur-md) var(--ease); display: flex; flex-direction: column; }
.pricing-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.pricing-name { font-size: 14px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; }
.pricing-price { font-size: 30px; font-weight: 800; color: var(--text); line-height: 1.2; }
.pricing-period { font-size: 13px; color: var(--text-muted); margin: 6px 0 var(--space-sm); }
.pricing-card .bullets { flex: 1; }
.pricing-cta { margin-top: var(--space-sm); display: flex; justify-content: center; }

/* ─── FAQ (animated open/close via opacity + translate) ─── */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; background: none; border: none; text-align: left; padding: var(--space-sm) 28px var(--space-sm) 0;
  font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; color: var(--text-2); position: relative;
  transition: color var(--transition);
}
.faq-q:hover { color: var(--primary); }
.faq-q::after { content: "+"; position: absolute; right: 4px; top: 50%; margin-top: -13px; font-size: 22px; color: var(--primary); transition: transform var(--dur-md) var(--ease); }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { display: none; padding: 0 0 var(--space-sm); font-size: 14px; color: var(--text-muted); line-height: 1.8; }
.faq-item.open .faq-a { display: block; animation: reveal var(--dur-md) var(--ease); }
@keyframes reveal { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ─── FOOTER: dark bar (rgba(0,0,0,.88) over white = #1f1f1f) ─── */
.site-footer { background: var(--dark); color: rgba(255,255,255,.72); padding: var(--space-lg) var(--space-sm) var(--space-sm); font-size: 12px; }
.footer-grid { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-lg); margin-bottom: var(--space-lg); }
.footer-brand .logo-footer { height: 30px; width: auto; margin-bottom: var(--space-sm); }
.footer-brand p { font-size: 12px; line-height: 1.8; max-width: 320px; }
.footer-heading { color: #fff; font-size: 13px; font-weight: 700; margin-bottom: var(--space-sm); }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,.72); font-size: 12px; }
.footer-col ul li a:hover { color: #fff; text-decoration: none; }
.footer-bottom { max-width: 1040px; margin: 0 auto; border-top: 1px solid rgba(255,255,255,.12); padding-top: var(--space-sm); }
.footer-bottom p { font-size: 12px; margin: 0; }

/* ─── PAGE HERO (inner pages) ─── */
.page-hero { background: var(--surface-2); text-align: center; padding: 56px var(--space-sm) 48px; }
.page-hero h1 { font-size: clamp(24px, 4vw, 32px); font-weight: 800; margin-bottom: 8px; color: var(--text-2); }
.page-hero p { font-size: 15px; color: var(--text-2); max-width: 640px; margin: 0 auto var(--space-sm); }
.page-hero .hero-cta-group { margin-top: var(--space-sm); }

time.updated { display: inline-block; margin: 0 0 var(--space-sm); font-size: 12px; color: var(--text-muted); }

/* ─── common-mistake components ─── */
.device-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--space-sm); }
.device-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-md); display: flex; flex-direction: column; gap: 10px; text-align: left; transition: box-shadow var(--dur-md) var(--ease), transform var(--dur-md) var(--ease); }
.device-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.device-card .device-icon { font-size: 32px; width: 40px; height: 40px; line-height: 40px; color: var(--primary); }
.device-card h3 { margin: 0; font-size: 18px; color: var(--text-2); }
.device-card h3 a { color: inherit; }
.device-card ul { margin: 0; padding-left: 18px; list-style: disc; }
.device-card li { font-size: 14px; color: var(--text-muted); margin: 2px 0; }
.device-card .btn-cta { margin-top: auto; align-self: flex-start; }
.payment-methods { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: var(--space-md); }
.payment-methods li { list-style: none; background: var(--tint); border-radius: var(--radius-pill); padding: 8px 18px; font-weight: 700; font-size: 14px; color: var(--text-2); }
.compare-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius-md); overflow: hidden; }
.compare-table th, .compare-table td { border-bottom: 1px solid var(--border); padding: 12px 14px; text-align: left; font-size: 14px; }
.compare-table th { color: var(--text-muted); font-weight: 700; }
.compare-table .highlight { background: rgba(0,150,250,.08); font-weight: 700; }
.bullets { padding-left: 20px; list-style: disc; max-width: 760px; margin: 12px auto; }
.bullets li { margin: 6px 0; }
.pricing-card .bullets { margin-left: 0; margin-right: 0; }
.device-card .bullets { margin: 0; }
.container > .bullets { color: var(--text-2); }

/* ─── MOBILE ─── */
@media (max-width: 768px) {
  .nav { padding: 0 16px; }                                  /* M7 */
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    height: auto; background: #fff; border-bottom: 1px solid var(--border); box-shadow: 0 8px 16px rgba(0,0,0,.08); padding: 8px 0; z-index: 999;
  }
  .nav-links.open { display: flex; animation: reveal var(--dur-md) var(--ease); }
  .nav-links > li { width: 100%; }
  .nav-links > li > a { width: 100%; height: auto; padding: 14px 24px; font-size: 16px; justify-content: flex-start; }
  .nav-links > li > a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--primary); }
  .nav-right .btn-cta { display: none; }
  .nav-toggle { display: block; }
  .nav-links .dropdown { width: 100%; }
  .nav-links .dropdown-toggle { width: 100%; padding: 14px 24px; font-size: 16px; text-align: left; }
  .nav-links .dropdown-panel { position: static; padding-top: 0; min-width: 0; }
  .nav-links .dropdown:hover > .dropdown-panel, .nav-links .dropdown:focus-within > .dropdown-panel { display: none; }
  .nav-links .dropdown.open > .dropdown-panel { display: block; }
  .nav-links .dropdown-panel-inner { background: var(--surface); border: 0; box-shadow: none; border-radius: 0; }

  .hero { padding: 32px 12px; }
  .hero-inner { padding: 28px 20px 32px; border-radius: 20px; }
  .section { padding: 48px var(--space-sm); }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }           /* M21 */
  .footer-brand { grid-column: 1 / -1; }
  .btn-cta, .hero-cta-group a { display: flex; margin-left: auto; margin-right: auto; width: max-content; max-width: 90%; }
  .hero-cta-group { flex-direction: column; align-items: center; }
  .device-card .btn-cta { align-self: center; }
  .compare-table th, .compare-table td { padding: 10px 8px; font-size: 13px; }
}
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ─── MOTION: reduced-motion kills all transitions/animations ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .feature-card:hover, .pricing-card:hover, .device-card:hover { transform: none; }
}
