:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --border: #e7e7ea;
  --border-strong: #d7d8dd;
  --text: #16171b;
  --text-muted: #6b6d76;
  --text-faint: #97989f;
  --accent: #4f46e5;
  --accent-strong: #4338ca;
  --accent-soft: #eef0fd;
  --accent-contrast: #ffffff;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(22, 23, 27, 0.04);
  --shadow-md: 0 6px 20px rgba(22, 23, 27, 0.06);
  --shadow-lg: 0 16px 40px rgba(79, 70, 229, 0.14);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

a { color: inherit; }

/* ---------- Header ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.28);
}

.brand-word {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tagline {
  color: var(--text-faint);
  font-size: 0.8rem;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

/* ---------- Layout ---------- */

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 96px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 24px 48px;
  margin: 0 -24px 40px;
  text-align: center;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  z-index: 0;
}

.hero::before {
  width: 360px;
  height: 360px;
  background: var(--accent);
  opacity: 0.12;
  top: -180px;
  left: 50%;
  transform: translateX(-70%);
}

.hero::after {
  width: 280px;
  height: 280px;
  background: var(--accent-strong);
  opacity: 0.1;
  top: -80px;
  left: 50%;
  transform: translateX(30%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero-title {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0 0 28px;
}

.plan-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.plan-pill {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: 0.82rem;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, transform .15s ease;
}

.plan-pill:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.plan-pill strong {
  font-size: 0.95rem;
  color: var(--accent);
}

/* ---------- Section titles ---------- */

.page-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 4px;
}

.page-lead {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0 0 28px;
}

/* ---------- Category color system ---------- */

.cat-indigo { --cat: #4f46e5; --cat-soft: #eef0fd; }
.cat-teal   { --cat: #0d9488; --cat-soft: #e6f6f4; }
.cat-amber  { --cat: #d97706; --cat-soft: #fdf1e3; }
.cat-rose   { --cat: #e11d48; --cat-soft: #fde8ec; }
.cat-violet { --cat: #7c3aed; --cat-soft: #f3ecfd; }

/* ---------- Category nav / sections ---------- */

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 44px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, color .15s ease, transform .15s ease;
}

.category-chip:hover {
  border-color: var(--cat, var(--accent));
  color: var(--cat, var(--accent-strong));
  transform: translateY(-1px);
}

.category-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cat, var(--accent));
  flex-shrink: 0;
}

.category-chip-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-faint);
  background: var(--bg);
  border-radius: 999px;
  padding: 1px 7px;
}

.category-section {
  scroll-margin-top: 84px;
  margin-bottom: 24px;
  padding: 28px 28px 32px;
  background: var(--cat-soft, var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.category-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.category-glyph {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--cat, var(--accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--cat, var(--accent)) 40%, transparent);
}

.category-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 4px;
}

.category-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.category-section .plugin-card {
  background: var(--surface);
}

.category-section .plugin-card:hover {
  box-shadow: 0 16px 40px color-mix(in srgb, var(--cat, var(--accent)) 22%, transparent);
}

.category-section .plugin-icon {
  background: var(--cat-soft, var(--accent-soft));
  color: var(--cat, var(--accent-strong));
}

.category-section .plugin-card:hover .plugin-arrow {
  color: var(--cat, var(--accent));
}

.category-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cat, var(--accent-strong));
  background: var(--cat-soft, var(--accent-soft));
  padding: 4px 10px;
  border-radius: 999px;
  text-decoration: none;
  margin-bottom: 8px;
}

.category-tag:hover { text-decoration: underline; }

/* ---------- Plugin grid / cards ---------- */

.plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.plugin-card {
  position: relative;
  overflow: hidden; /* 斜めリボンをカードの角で切り取る */
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.plugin-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.plugin-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.plugin-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  flex-shrink: 0;
}

.plugin-arrow {
  color: var(--text-faint);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .2s ease, transform .2s ease;
  font-size: 1.1rem;
}

.plugin-card:hover .plugin-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent);
}

.plugin-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.plugin-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* ---------- Detail page ---------- */

.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin: 28px 0 24px;
}

.breadcrumb a { text-decoration: none; color: var(--accent-strong); font-weight: 500; }

.detail-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.detail-header .plugin-icon {
  width: 68px;
  height: 68px;
  font-size: 1.3rem;
  border-radius: var(--radius-sm);
}

.detail-title {
  font-size: 1.55rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.01em;
}

.detail-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 0 8px;
  max-width: 640px;
}

.section-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 40px 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--accent);
  display: inline-block;
}

.example-box {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: 0.92rem;
  color: var(--text);
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.screenshot-placeholder {
  aspect-ratio: 16 / 10;
  background: var(--surface);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 0.8rem;
}

.cta-box {
  margin-top: 48px;
  padding: 24px 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.cta-heading {
  font-weight: 700;
  font-size: 1rem;
}

.cta-note {
  font-size: 0.82rem;
  opacity: 0.85;
}

.cta-button {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  background: #fff;
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.cta-button[aria-disabled="true"] {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  pointer-events: none;
}

/* ---------- Purchase page ---------- */

.purchase-step {
  margin-bottom: 32px;
}

.step-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-bottom: 14px;
}

.plan-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.plan-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 22px 24px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.plan-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.plan-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.plan-card-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.plan-card-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-strong);
  margin-bottom: 8px;
}

.plan-card-price span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-faint);
}

.plan-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.picker-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.85rem;
}

.picker-row:has(input:checked) {
  background: var(--accent-soft);
}

.picker-row:has(input:disabled) {
  opacity: 0.4;
  cursor: not-allowed;
}

.picker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cat, var(--accent));
  flex-shrink: 0;
}

.subdomain-field {
  display: flex;
  align-items: center;
  max-width: 420px;
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}

.subdomain-field input {
  flex: 1;
  border: none;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.95rem;
  min-width: 0;
}

.subdomain-field input:focus {
  outline: none;
}

.subdomain-suffix {
  padding: 12px 14px;
  background: var(--bg);
  color: var(--text-faint);
  font-size: 0.85rem;
  white-space: nowrap;
}

.subdomain-help {
  margin-top: 6px;
}

.subdomain-help summary {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-strong);
  cursor: pointer;
  list-style: none;
}

.subdomain-help summary::-webkit-details-marker {
  display: none;
}

.subdomain-help summary::before {
  content: "？ ";
}

.subdomain-help[open] summary {
  color: var(--text-muted);
}

.subdomain-help p {
  margin: 8px 0 0;
  padding: 12px 14px;
  background: var(--accent-soft);
  border-radius: 10px;
  font-size: 0.82rem;
  color: var(--text);
  max-width: 420px;
}

.subdomain-help code {
  font-size: 0.85em;
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 4px;
  border-radius: 4px;
}

.purchase-summary {
  margin-top: 40px;
  padding: 28px 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-radius: var(--radius-lg);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.summary-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  opacity: 0.85;
  margin-bottom: 16px;
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 24px;
}

.summary-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
}

.summary-list dt {
  opacity: 0.8;
  flex-shrink: 0;
}

.summary-list dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
}

.summary-total {
  border-bottom: none !important;
  font-size: 1.05rem !important;
}

.summary-total dd {
  font-weight: 800;
  font-size: 1.2rem;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.75rem;
}

/* ---------- Header link ---------- */

.header-link {
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-strong);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  white-space: nowrap;
}

.header-link:hover { border-color: var(--accent); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover { border-color: var(--accent); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

.btn-primary:hover { background: var(--accent-strong); }

.btn-ghost { background: transparent; }

.btn-block { display: block; width: 100%; }

.btn-small {
  padding: 5px 12px;
  font-size: 0.75rem;
}

.btn.is-disabled,
.btn:disabled {
  color: var(--text-faint);
  border-color: var(--border);
  cursor: default;
}

/* ---------- Account page ---------- */

.mock-banner {
  margin: 24px 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: #fff7e6;
  border: 1px solid #f5d9a8;
  color: #8a5a00;
  font-size: 0.8rem;
}

.account-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.account-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.account-billing-note { text-align: right; }

.subscription-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow-md);
  border-top: 4px solid var(--tone);
}

.tone-ok   { --tone: #10b981; --tone-soft: #e7f8f1; --tone-text: #047857; }
.tone-warn { --tone: #f59e0b; --tone-soft: #fff7e6; --tone-text: #8a5a00; }
.tone-off  { --tone: #c4c5cb; --tone-soft: #f1f1f3; --tone-text: #6b6d76; }

.sub-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.sub-domain {
  font-size: 1.3rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.sub-domain span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-faint);
}

.sub-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.status-badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--tone-text);
  background: var(--tone-soft);
}

.sub-alert {
  margin: 16px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--tone-soft);
  color: var(--tone-text);
  font-size: 0.8rem;
}

.sub-pending {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 600;
}

.sub-pending a {
  margin-left: 6px;
  color: inherit;
}

.sub-section-label {
  margin: 20px 0 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.license-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.license-key {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 8px 14px;
  background: var(--bg);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  user-select: all;
}

.tone-off .license-key { color: var(--text-faint); text-decoration: line-through; }

.sub-plugins {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.sub-plugin {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
}

.sub-plugin + .sub-plugin { border-top: 1px solid var(--border); }

.sub-plugin-name {
  flex: 1;
  min-width: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.sub-plugin-name:hover { color: var(--accent-strong); text-decoration: underline; }

.sub-plugin {
  flex-wrap: wrap;
}

.sub-plugin-error {
  flex-basis: 100%;
  padding-left: 18px;
  font-size: 0.75rem;
  color: #b4233a;
}

.sub-plugins-toggle summary {
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-strong);
  margin-bottom: 8px;
}

.sub-empty {
  padding: 28px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.install-steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.install-steps li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.install-steps li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 0.75rem;
  margin-bottom: 8px;
}

.install-steps strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.account-more {
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.account-more-title { font-weight: 700; font-size: 0.9rem; }

.account-more p {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Purchase complete ---------- */

button.cta-button {
  border: none;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

button.cta-button:disabled {
  background: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.85);
  cursor: not-allowed;
}

.complete-card { text-align: center; }

.complete-card .btn { margin-top: 8px; }

.complete-mark {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #e7f8f1;
  color: #047857;
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Pricing (per plugin / unlimited / yearly) ---------- */

.interval-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.interval-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: none;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
}

.interval-option.is-selected {
  background: var(--accent);
  color: var(--accent-contrast);
}

.interval-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff3d6;
  color: #8a5a00;
}

/* .plan-card-price span（単位を小さくする指定）が金額そのものに効かないように戻す */
.plan-card-price .js-price {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.hero-tax {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--text-faint);
}

.plan-card-per {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.picker-hint {
  margin: 10px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: #fff7e6;
  color: #8a5a00;
  font-size: 0.8rem;
}

.picker-hint .link-button {
  margin: 0 0 0 4px;
}

/* 無料プラグインのカード右上の斜めリボン */
.ribbon-free {
  position: absolute;
  top: 16px;
  right: -36px;
  width: 128px;
  padding: 4px 0;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-align: center;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.35);
  pointer-events: none;
}

.free-section {
  margin-top: 48px;
}

/* ---------- Subscription change ---------- */

.change-current {
  margin: 8px 0 28px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.change-current:empty { display: none; }

.change-current-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.change-current-value {
  font-weight: 800;
  font-size: 1.05rem;
}

.change-sublabel { margin-top: 20px; }

.change-rules {
  margin: 20px 0;
  padding: 14px 16px 14px 32px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.change-summary {
  margin-top: 28px;
  padding: 24px 28px;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.change-summary-title {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 8px;
}

.change-due {
  font-size: 0.95rem;
  margin: 8px 0 4px;
}

.change-due strong {
  font-size: 1.6rem;
  color: var(--accent-strong);
  margin-left: 8px;
}

.change-lines {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.change-lines td {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.change-lines .num,
.quote-table .num {
  text-align: right;
  white-space: nowrap;
  font-weight: 700;
}

.change-lines .subtotal td {
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 6px 0;
}

.change-lines .total td {
  border-bottom: none;
  font-weight: 800;
}

.change-line-sub {
  font-size: 0.72rem;
  color: var(--text-faint);
}

.quote-form {
  margin: 20px 0;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.quote-form .login-input { margin-bottom: 10px; }

.sub-card-actions {
  margin-top: 16px;
}

/* 見積書は画面では隠し、印刷時だけ見積書以外を隠す */
.quote { display: none; }

@media print {
  body { background: #fff; }
  .header, .footer, .no-print { display: none !important; }
  .container { padding: 0; max-width: none; }

  .quote {
    display: block;
    color: #000;
    font-size: 11pt;
  }

  .quote-title {
    text-align: center;
    font-size: 20pt;
    letter-spacing: 0.3em;
    margin: 0 0 16px;
  }

  .quote-meta { text-align: right; font-size: 9pt; }

  .quote-to {
    margin: 16px 0 4px;
    font-size: 14pt;
    border-bottom: 1px solid #000;
    width: 60%;
  }

  .quote-from {
    text-align: right;
    font-size: 10pt;
    margin-bottom: 16px;
  }

  .quote-total {
    font-size: 15pt;
    font-weight: 800;
    border-bottom: 2px solid #000;
    width: 60%;
    margin: 8px 0 20px;
  }

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

  .quote-table th,
  .quote-table td {
    border: 1px solid #000;
    padding: 6px 8px;
    vertical-align: top;
  }

  .quote-table .total td { font-weight: 800; }

  .quote-sub { font-size: 8.5pt; color: #333; }

  .quote-notes { margin-top: 20px; font-size: 9.5pt; }
}

/* ---------- Legal / terms ---------- */

.legal-table {
  margin: 24px 0 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.legal-table > div {
  display: grid;
  grid-template-columns: 200px 1fr;
}

.legal-table > div + div { border-top: 1px solid var(--border); }

.legal-table dt {
  padding: 14px 18px;
  background: var(--bg);
  font-size: 0.82rem;
  font-weight: 700;
}

.legal-table dd {
  margin: 0;
  padding: 14px 18px;
  font-size: 0.85rem;
}

.legal-list {
  margin: 0 0 6px;
  padding-left: 1.2em;
}

.summary-terms {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
  line-height: 1.7;
}

.summary-terms-title {
  font-weight: 800;
  margin-bottom: 4px;
}

.summary-terms ul {
  margin: 0 0 6px;
  padding-left: 1.2em;
}

.summary-terms a { color: #fff; }

.complete-summary {
  margin: 16px 0 8px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  text-align: left;
}

.complete-summary dt {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
}

.complete-summary dd {
  margin: 0 0 6px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.sub-domain-note {
  margin: 16px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer a {
  color: inherit;
  display: inline-block;
  margin-bottom: 4px;
}

.footer-links,
.summary-terms-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
}

.summary-terms-links { justify-content: flex-start; }

.doc {
  margin-top: 20px;
  padding: 28px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
}

.doc-section + .doc-section { margin-top: 24px; }

.doc h2 {
  font-size: 1rem;
  margin: 0 0 8px;
}

.doc p { margin: 0 0 8px; }

.doc ul {
  margin: 0 0 8px;
  padding-left: 1.3em;
}

.doc li { margin-bottom: 4px; }

/* ---------- Free plugins / mail settings ---------- */

.free-plugins { margin-bottom: 8px; }

.marketing-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
}

.marketing-toggle input { margin-top: 4px; }

.login-optin {
  margin: -4px 0 16px;
  padding: 10px 12px;
  font-size: 0.78rem;
  background: var(--bg);
}

.login-context {
  margin: 8px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: #e7f8f1;
  color: #047857;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ---------- Invoices ---------- */

.invoice-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.invoice-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
}

.invoice-row + .invoice-row { border-top: 1px solid var(--border); }

.invoice-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.invoice-number {
  margin-left: 10px;
  color: var(--text-faint);
}

.invoice-title {
  font-size: 0.85rem;
  font-weight: 600;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.invoice-amount {
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.invoice-status {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: #047857;
}

.invoice-status.status-open { color: #8a5a00; }
.invoice-status.status-uncollectible { color: #b4233a; }

.invoice-links {
  display: flex;
  gap: 6px;
}

/* ---------- Login page ---------- */

.login-card {
  max-width: 420px;
  margin: 56px auto 0;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.login-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin: 20px 0 6px;
}

.login-input {
  display: block;
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.95rem;
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  margin-bottom: 16px;
}

.login-input:focus { outline: none; border-color: var(--accent); }

.login-sent {
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  font-size: 0.85rem;
}

.login-sent p { margin: 4px 0 8px; color: var(--text-muted); }

.login-sent a { color: var(--accent-strong); font-weight: 700; text-decoration: none; }

.otp {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.otp-digit {
  width: 100%;
  min-width: 0;
  aspect-ratio: 5 / 6;
  padding: 0;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}

.otp-digit:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.bot-check {
  margin: -4px 0 16px;
  padding: 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  font-size: 0.72rem;
  color: var(--text-faint);
  text-align: center;
}

.link-button {
  margin-top: 12px;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-strong);
  cursor: pointer;
}

.login-error {
  margin: 16px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: #fdecee;
  color: #b4233a;
  font-size: 0.8rem;
}

.bot-check:not(:empty) {
  border: none;
  padding: 0;
}

.bot-check:empty::before {
  content: "確認を読み込み中…";
}

.login-points {
  margin: 24px 0 0;
  padding: 16px 0 0 1.2em;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---------- Shared bits ---------- */

h1, h2, h3,
.cta-heading,
.summary-list dd {
  /* 日本語見出しが単語の途中で折り返さないよう、空白・<wbr>位置で改行する */
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.field-note {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.purchase-summary .field-note {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.8);
}

/* ---------- Mobile ---------- */

@media (max-width: 600px) {
  .legal-table > div {
    grid-template-columns: 1fr;
  }

  .legal-table dt {
    padding-bottom: 6px;
  }

  .header-inner {
    padding: 12px 16px;
  }

  .brand-word {
    white-space: nowrap;
  }

  .tagline {
    display: none;
  }

  .container {
    padding: 0 16px 72px;
  }

  .hero {
    padding: 48px 16px 40px;
    margin: 0 -16px 32px;
  }

  .hero-title {
    font-size: 1.7rem;
  }

  .plan-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .plan-pill {
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 6px;
    border-radius: 14px;
    font-size: 0.75rem;
  }

  .detail-title {
    font-size: 1.3rem;
  }

  .plan-pill-price {
    white-space: nowrap;
  }

  .plan-card {
    padding: 16px 18px;
  }

  .purchase-summary {
    padding: 24px 20px;
  }

  .sub-card {
    padding: 20px 18px;
  }

  .invoice-row {
    grid-template-columns: 1fr auto;
    padding: 14px 16px;
  }

  .invoice-links {
    grid-column: 1 / -1;
  }

  .sub-card-head {
    flex-direction: column-reverse;
    gap: 8px;
  }

  .sub-plugin {
    padding: 10px 12px;
  }

  .hide-sm {
    display: none;
  }

  .account-head,
  .account-actions {
    width: 100%;
  }

  .account-actions .btn {
    flex: 1;
  }

  .account-billing-note { text-align: left; }

  .account-more {
    flex-direction: column;
    align-items: stretch;
  }

  .login-card {
    margin-top: 32px;
    padding: 24px 20px;
  }

  .purchase-summary .cta-button {
    display: block;
    text-align: center;
    white-space: normal;
  }
}
