:root {
  --bg-base: #070b14;
  --bg-elevated: #0e1525;
  --bg-card: #111a2e;
  --bg-card-hover: #16213a;
  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent: #06b6d4;
  --accent-strong: #22d3ee;
  --accent-soft: rgba(6, 182, 212, 0.12);
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.12);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.1);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45);
  --max-width: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-base);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(6, 182, 212, 0.11), transparent 40%),
    radial-gradient(circle at 85% 12%, rgba(16, 185, 129, 0.08), transparent 36%);
  color: var(--text-primary);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

code,
.mono {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    monospace;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(7, 11, 20, 0.8);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--emerald));
  color: #04131c;
  font-weight: 800;
  font-size: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
}

.nav-links a {
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease,
    opacity 0.15s ease;
  text-decoration: none;
}

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

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, #06b6d4, #0ea5e9);
  color: #04131c;
  box-shadow: 0 10px 28px rgba(6, 182, 212, 0.28);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.btn-secondary {
  background: rgba(148, 163, 184, 0.08);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(148, 163, 184, 0.15);
}

.btn-emerald {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #031912;
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.25);
}

.btn-emerald:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn-full {
  width: 100%;
}

/* Badges & Section Titles */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid rgba(34, 211, 238, 0.25);
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
}

.section {
  padding: 76px 0;
}

.section-header {
  max-width: 720px;
  margin-bottom: 40px;
}

.section-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 8px;
}

.section-title {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.section-desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
}

/* Hero */
.hero {
  padding: 72px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 44px;
  align-items: center;
}

.hero-title {
  margin: 18px 0 18px;
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.hero-title .accent-text {
  background: linear-gradient(120deg, #38bdf8, #34d399);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin: 0 0 28px;
  color: var(--text-secondary);
  font-size: 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: var(--text-secondary);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Terminal / Monitor Preview Card */
.terminal-card {
  background: #0b1220;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.terminal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-secondary);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots i {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #334155;
}

.terminal-dots i:nth-child(1) {
  background: #ef4444;
}

.terminal-dots i:nth-child(2) {
  background: #f59e0b;
}

.terminal-dots i:nth-child(3) {
  background: #10b981;
}

.terminal-body {
  padding: 20px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-box {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.metric-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-value {
  margin-top: 4px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.metric-value.ok {
  color: #34d399;
}

.log-box {
  background: #060a12;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 12px;
  line-height: 1.75;
  color: #cbd5e1;
}

.log-box .ts {
  color: #64748b;
}

.log-box .tag-ok {
  color: #34d399;
}

.log-box .tag-info {
  color: #38bdf8;
}

/* Grids & Cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 26px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
  margin-bottom: 16px;
  font-size: 16px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Spec Table / Lists */
.spec-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 14px;
}

.spec-list li:last-child {
  border-bottom: none;
}

.spec-list .spec-key {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.spec-list .spec-val {
  color: var(--text-primary);
  text-align: right;
  font-weight: 500;
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.check-list li {
  position: relative;
  padding-left: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--emerald);
  font-weight: 700;
}

/* Purchase Box */
.purchase-card {
  background: linear-gradient(180deg, #121d33 0%, #0d1526 100%);
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
}

.price-block {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 14px 0 8px;
}

.price-amount {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.price-tax {
  font-size: 14px;
  color: var(--text-secondary);
}

.consent-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  margin: 18px 0;
  border-radius: var(--radius-sm);
  background: rgba(7, 11, 20, 0.55);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.consent-box input {
  margin-top: 3px;
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.security-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* Disclaimer Section */
.disclaimer-box {
  background: var(--amber-soft);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  padding: 28px 30px;
}

.disclaimer-box h2 {
  margin: 0 0 12px;
  font-size: 20px;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 10px;
}

.disclaimer-lead {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: #fef3c7;
}

.disclaimer-box ul {
  margin: 0;
  padding-left: 20px;
  color: #e2e8f0;
  font-size: 14px;
}

.disclaimer-box li + li {
  margin-top: 6px;
}

/* Alerts & Status */
.alert {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-top: 14px;
  display: none;
}

.alert.show {
  display: block;
}

.alert-error {
  background: var(--danger-soft);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.alert-info {
  background: var(--accent-soft);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: #cffafe;
}

.alert-success {
  background: var(--emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #d1fae5;
}

/* Thanks Page */
.centered-page {
  min-height: calc(100vh - 150px);
  display: flex;
  align-items: center;
  padding: 56px 0;
}

.status-panel {
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-lg);
}

.spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(148, 163, 184, 0.25);
  border-top-color: var(--accent-strong);
  animation: spin 0.85s linear infinite;
  margin-bottom: 18px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.download-summary {
  background: rgba(7, 11, 20, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 22px 0;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
  font-weight: 700;
  font-size: 13px;
}

.count-badge.zero {
  background: var(--danger-soft);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}

/* Legal Table (Tokushoho) */
.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
}

.legal-table th,
.legal-table td {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.legal-table tr:last-child th,
.legal-table tr:last-child td {
  border-bottom: none;
}

.legal-table th {
  width: 28%;
  background: rgba(15, 23, 42, 0.55);
  color: var(--text-primary);
  font-weight: 600;
}

.legal-table td {
  color: var(--text-secondary);
}

.legal-highlight {
  color: #fef3c7;
  font-weight: 600;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

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

/* Responsive */
@media (max-width: 900px) {
  .hero-grid,
  .purchase-card,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 640px) {
  .purchase-card,
  .status-panel {
    padding: 24px 20px;
  }

  .legal-table,
  .legal-table tbody,
  .legal-table tr,
  .legal-table th,
  .legal-table td {
    display: block;
    width: 100%;
  }

  .legal-table th {
    padding-bottom: 6px;
    border-bottom: none;
  }

  .legal-table td {
    padding-top: 6px;
  }
}
