:root {
  --bg: #0F172A;
  --card-bg: #1E293B;
  --card-hover: #334155;
  --text: #F8FAFC;
  --subtext: #94A3B8;
  --accent: #3B82F6;
  --accent-hover: #2563EB;
  --accent-light: rgba(59, 130, 246, 0.15);
  --border: #334155;
  --highlight: #1E293B;
  --success: #10B981;
  --header-bg: rgba(15, 23, 42, 0.85);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #F8FAFC;
    --card-bg: #FFFFFF;
    --card-hover: #F1F5F9;
    --text: #0F172A;
    --subtext: #64748B;
    --accent: #2563EB;
    --accent-hover: #1D4ED8;
    --accent-light: rgba(37, 99, 235, 0.08);
    --border: #E2E8F0;
    --highlight: #F1F5F9;
    --success: #059669;
    --header-bg: rgba(248, 250, 252, 0.85);
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

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

/* Header & Nav */
.header-bar {
  position: sticky;
  top: 0;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-container {
  max-width: 840px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.brand-icon img, img.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: block;
  object-fit: cover;
}

.nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.nav a {
  color: var(--subtext);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  font-weight: 500;
}
.nav a:hover {
  color: var(--text);
  border-color: var(--accent);
  text-decoration: none;
}
.nav a.active {
  color: #FFF;
  background: var(--accent);
  border-color: var(--accent);
}

.lang-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  font-weight: 600;
}
.lang-btn:hover {
  border-color: var(--accent);
}

/* Layout */
.container {
  max-width: 840px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Typography */
h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding-left: 10px;
}

p {
  margin-bottom: 14px;
  color: var(--text);
}

.updated {
  font-size: 13px;
  color: var(--subtext);
  margin-bottom: 24px;
}

ul, ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

li {
  margin-bottom: 8px;
}

.highlight {
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  margin: 18px 0;
  font-size: 14px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--highlight);
  color: var(--text);
  font-weight: 600;
}

td {
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #FFF !important;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  text-decoration: none !important;
}
.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text) !important;
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: var(--card-hover);
  border-color: var(--accent);
}

/* Hero Section (LP) */
.hero {
  text-align: center;
  padding: 60px 0 40px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  color: var(--accent);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.hero-title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 50%, #93C5FD 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 18px;
  color: var(--subtext);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 50px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 16px;
  display: inline-block;
}

.feature-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 14px;
  color: var(--subtext);
  margin-bottom: 0;
  line-height: 1.6;
}

/* Pricing Section */
.pricing-section {
  margin-top: 60px;
  text-align: center;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.pricing-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  text-align: left;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.12);
}

.pricing-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--accent);
  color: #FFF;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
}

.pricing-price {
  font-size: 32px;
  font-weight: 800;
  margin: 16px 0;
}

.pricing-period {
  font-size: 14px;
  color: var(--subtext);
  font-weight: normal;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--subtext);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--subtext);
}
.footer-links a:hover {
  color: var(--text);
}

/* Language Toggle Logic */
body[class*="lang-en"] [data-lang="ja"],
body:not([class*="lang-en"]) [data-lang="en"] {
  display: none !important;
}

/* In-App Mode (WebView) */
body.in-app .header-bar,
body.in-app footer {
  display: none !important;
}
body.in-app .container {
  padding: 16px 12px;
}
body.in-app .card {
  padding: 20px 16px;
  border-radius: 12px;
  box-shadow: none;
}
