:root {
  --bg: #f6f6f4;
  --panel: #ffffff;
  --text: #2a2a2a;
  --muted: #6f6f6f;
  --primary: #3d5a73;
  --primary-dark: #2f465a;
  --border: #e4e4e0;
  --border-soft: #efefec;
  --accent-soft: #f3f5f7;
  --nav-h: 60px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Hiragino Sans", "Yu Gothic UI", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.container {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

/* ── Nav ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--nav-h);
}

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

.brand:hover {
  color: var(--primary);
}

.brand-logo {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-weight: 800;
  font-size: 1rem;
}

.brand-text {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.nav-link:hover {
  color: var(--primary);
  background: var(--accent-soft);
}

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

.btn-nav {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.btn-nav-ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid transparent;
}

.btn-nav-ghost:hover {
  background: var(--accent-soft);
}

.btn-nav-outline {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
}

/* ── Hero ── */
.hero {
  padding: 28px 0 20px;
}

.hero-inner {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 32px;
}

.hero-brand-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hero-logo {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 16px;
  flex-shrink: 0;
}

.hero-tag {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hero-title {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.hero-purpose {
  margin: 20px 0 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--accent-soft);
}

.hero-purpose-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.hero-purpose p {
  margin: 0 0 10px;
  line-height: 1.7;
  color: var(--text);
}

.hero-purpose-subtitle {
  margin: 16px 0 8px;
  font-size: 0.98rem;
}

.hero-data-use {
  margin: 16px 0 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
}

.hero-data-use p {
  margin: 0 0 10px;
  line-height: 1.7;
  color: var(--text);
}

.hero-data-use p:last-child {
  margin-bottom: 0;
}

.hero-legal-links--prominent {
  margin-top: 12px;
  font-weight: 600;
}

.hero-legal-links--prominent a {
  color: var(--primary);
}

.hero-subtitle {
  margin: 8px 0 0;
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.5;
  color: var(--text);
  font-weight: 600;
}

.hero-lead {
  margin: 16px 0 0;
  max-width: 46em;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.75;
}

.hero-lead-en {
  margin: 10px 0 0;
  max-width: 46em;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.hero-legal-links {
  margin: 14px 0 0;
  font-size: 0.88rem;
}

.hero-legal-links a {
  color: var(--primary);
  font-weight: 600;
}

.hero-legal-links span {
  margin: 0 8px;
  color: var(--border);
}

.hero-cta {
  display: inline-flex;
  margin-top: 18px;
  text-decoration: none;
}

/* ── Workspace (horizontal) ── */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 20px 0 32px;
}

.panel-presets {
  grid-column: 1 / -1;
}

.presets-head {
  margin-bottom: 14px;
}

.presets-lead {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.presets-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.presets-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.preset-detail {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  min-height: 1.2em;
}

.presets-save-wrap .field-label {
  margin-top: 10px;
}

@media (max-width: 800px) {
  .presets-layout {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.panel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.builder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}

.builder-grade {
  display: flex;
  align-items: center;
  gap: 10px;
}

.field-label-inline {
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.field-input-compact {
  width: auto;
  min-width: 88px;
  padding: 8px 12px;
}

.builder-columns {
  display: grid;
  grid-template-columns: 1.1fr 0.95fr 0.85fr;
  gap: 14px;
  align-items: start;
}

.builder-col-settings {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.field-label {
  font-weight: 700;
  font-size: 0.88rem;
}

.field-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: var(--panel);
  color: var(--text);
}

.field-input:focus {
  outline: 2px solid rgba(61, 90, 115, 0.18);
  border-color: var(--primary);
}

.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.bulk-actions {
  display: flex;
  gap: 2px;
}

.btn-text {
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-text:hover {
  background: var(--accent-soft);
}

.check-list {
  display: grid;
  gap: 2px;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: #fcfcfb;
}

.check-list-compact {
  max-height: 260px;
}

.check-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.check-item:hover {
  background: var(--accent-soft);
}

.check-item input {
  margin-top: 3px;
  flex-shrink: 0;
}

.check-item span {
  font-size: 0.86rem;
  line-height: 1.45;
}

.format-item {
  border-bottom: 1px solid var(--border-soft);
}

.format-item:last-child {
  border-bottom: none;
}

.format-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.format-item-head .check-item {
  flex: 1;
  padding: 6px 4px;
}

.format-toggle {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.format-toggle:hover,
.format-toggle[aria-expanded="true"] {
  color: var(--primary);
  background: var(--accent-soft);
  border-color: transparent;
}

.format-instruction {
  margin: 0 0 8px 24px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
  background: var(--accent-soft);
  border-radius: 6px;
}

.format-instruction[hidden] {
  display: none;
}

.available-summary {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fcfcfb;
}

.available-summary-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.available-summary-label {
  font-size: 0.82rem;
  font-weight: 700;
}

.available-count-value {
  font-size: 1.45rem;
  line-height: 1;
  color: var(--primary-dark);
}

.available-summary-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.available-by-format {
  display: grid;
  gap: 4px;
  margin: 10px 0 0;
  padding: 10px 0 0;
  list-style: none;
  border-top: 1px solid var(--border-soft);
}

.available-by-format li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
}

.available-by-format span:last-child {
  font-weight: 700;
  color: var(--primary-dark);
}

.available-summary.is-loading .available-count-value {
  color: var(--muted);
  font-size: 0.9rem;
}

.available-summary.is-empty .available-count-value {
  color: var(--muted);
  font-size: 1rem;
}

.form-actions-bar {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

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

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-tab {
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 9px 12px;
  font-size: 0.85rem;
}

.btn-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.status {
  min-height: 1.1em;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.status.error {
  color: #a33;
}

/* ── Preview panel ── */
.panel-preview {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  max-height: calc(100vh - var(--nav-h) - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.result-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.result-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.preview-empty[hidden] {
  display: none !important;
}

#preview-content[hidden] {
  display: none !important;
}

.preview-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 32px 20px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: #fcfcfb;
  text-align: center;
}

.preview-empty-title {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
}

.preview-empty-text {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  max-width: 18em;
}

#preview-content {
  flex: 1;
  overflow: auto;
  min-height: 0;
}

.sheet-title {
  margin: 0 0 14px;
  font-size: 1rem;
  line-height: 1.5;
}

.preview-sheet {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 28px;
  background: white;
  line-height: 1.8;
}

.section-heading {
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.format-heading {
  margin: 16px 0 8px;
  color: var(--primary-dark);
  font-size: 0.9rem;
  line-height: 1.65;
  font-weight: 700;
}

.question-list {
  margin: 0;
  padding-left: 1.3rem;
}

.question-list li {
  margin-bottom: 12px;
}

.q-text {
  white-space: pre-wrap;
}

.q-jp {
  margin-bottom: 4px;
  color: var(--ink, #1a2b32);
  font-weight: 600;
}

.extra-line {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.answer-block {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border-soft);
}

.ans-num {
  font-weight: 700;
  margin: 0 0 4px;
}

/* ── How to ── */
.plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.plan-badge-free {
  background: var(--accent-soft);
  color: var(--primary);
  border: 1px solid var(--border);
}

.plan-badge-personal {
  background: var(--primary);
  color: white;
}

.plan-badge-classroom {
  background: #1e6b4f;
  color: white;
}

.plan-usage {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.generate-count-notice {
  margin: 8px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

.generate-count-notice strong {
  color: var(--text);
  font-weight: 600;
}

.nav-link-btn {
  font: inherit;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.announcements-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: min(80vh, 640px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.announcements-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.announcements-dialog-inner {
  display: flex;
  flex-direction: column;
  max-height: min(80vh, 640px);
}

.announcements-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.announcements-dialog-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.announcements-close-btn {
  flex-shrink: 0;
}

.announcements-list {
  overflow: auto;
  padding: 8px 20px 20px;
}

.announcements-item + .announcements-item {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.announcements-item-date {
  margin: 0 0 4px;
  font-size: 0.75rem;
  color: var(--muted);
}

.announcements-item-title {
  margin: 0 0 6px;
  font-size: 0.95rem;
}

.announcements-item-body {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
}

.announcements-empty,
.announcements-loading,
.announcements-error {
  margin: 12px 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.hero-note {
  margin: 12px 0 0;
  max-width: 42rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted);
}

.about {
  padding: 0 0 24px;
}

.about-inner {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 32px;
}

.about-inner h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.about-inner .how-to-steps {
  margin: 0 0 16px;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.75;
}

.about-inner .how-to-steps li + li {
  margin-top: 10px;
}

.about-inner .how-to-steps strong {
  color: var(--text);
}

.about-contact {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.about-contact a {
  color: var(--primary);
}

.about-inner p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.75;
}

.about-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.75;
}

.about-list a {
  color: var(--primary);
}

.footer-note {
  margin: 6px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

.content-disclaimer {
  margin: 20px 0 0;
  padding: 12px 14px;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--muted);
  background: #f4f7fa;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.pricing-inner {
  text-align: center;
}

.pricing-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.pricing-lead {
  margin: 0 0 28px;
  color: var(--muted);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto;
  text-align: left;
}

.pricing-card-classroom {
  border-color: #1e6b4f;
  box-shadow: 0 8px 24px rgba(30, 107, 79, 0.1);
}

.pricing-badge-classroom {
  background: #1e6b4f;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 22px;
}

.pricing-card-featured {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(61, 90, 115, 0.12);
}

.pricing-card-muted {
  opacity: 0.88;
  background: #f8f9fb;
}

.pricing-card-muted .pricing-card h3,
.pricing-card-muted h3 {
  color: var(--muted);
}

.pricing-price-muted {
  color: var(--muted);
}

.pricing-badge-soon {
  background: #8a96a3;
}

.pricing-badge-classroom.pricing-badge-soon {
  background: #8a96a3;
}

.pricing-badge {
  position: absolute;
  top: -10px;
  right: 16px;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
}

.pricing-card h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.pricing-price {
  margin: 0 0 16px;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
}

.pricing-price span {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}

.pricing-card ul {
  flex: 1;
  margin: 0 0 20px;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.pricing-stripe-note {
  max-width: 720px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.pricing-status {
  max-width: 720px;
  margin: 12px auto 0;
  min-height: 1.4em;
  font-size: 0.9rem;
  color: var(--primary);
}

.pricing-status.error {
  color: #b42318;
}

.pricing-terms-highlight {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef3f2;
  outline: 2px solid #fecdca;
}

.pricing-card li + li {
  margin-top: 6px;
}

.btn-block {
  width: 100%;
}

@media (max-width: 960px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

.feedback {
  padding: 0 0 48px;
}

.feedback-inner {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
}

.feedback-title {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.feedback-lead {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.feedback-usage {
  margin: 0 0 16px;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
}

.feedback-form {
  display: grid;
  gap: 8px;
  max-width: 640px;
}

.feedback-message {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

.feedback-char-count {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: right;
}

.feedback-status {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  background: #eef6ee;
  color: #2f6b2f;
  border: 1px solid #cfe6cf;
}

.feedback-status:empty {
  display: none;
  padding: 0;
  border: none;
}

.feedback-status.error {
  background: #fff0f0;
  color: #9b2c2c;
  border-color: #f0caca;
}

.feedback-status.is-loading {
  background: var(--accent-soft);
  color: var(--muted);
  border-color: var(--border);
}

.how-to {
  padding: 0 0 40px;
}

.how-to-inner {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
}

.how-to-title {
  margin: 0 0 14px;
  font-size: 1rem;
}

.how-to-steps {
  margin: 0;
  padding-left: 1.3rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.9;
}

.how-to-steps strong {
  color: var(--text);
}

/* ── Footer ── */
.site-footer {
  padding: 24px 0 36px;
  border-top: 1px solid var(--border);
  background: var(--panel);
}

.footer-brand {
  margin: 0;
  font-weight: 800;
  font-size: 0.95rem;
}

.footer-copy {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 0.82rem;
}

.footer-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  text-decoration: underline;
}

.pricing-terms {
  margin: 18px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.pricing-terms-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.pricing-terms-label input {
  margin-top: 4px;
}

.pricing-terms a {
  color: var(--primary);
}

/* ── Legal pages ── */
.legal-page {
  background: var(--bg);
}

.legal-wrap {
  padding: 28px 0 48px;
}

.legal-doc {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
}

.legal-doc h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.legal-doc h2 {
  margin: 28px 0 10px;
  font-size: 1.05rem;
}

.legal-doc p,
.legal-doc li {
  font-size: 0.92rem;
  line-height: 1.75;
}

.legal-doc ol,
.legal-doc ul {
  padding-left: 1.25rem;
}

.legal-meta {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.85rem;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.legal-table th,
.legal-table td {
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  vertical-align: top;
  text-align: left;
}

.legal-table th {
  width: 28%;
  min-width: 120px;
  background: var(--accent-soft);
  color: var(--muted);
  font-weight: 700;
}

.legal-note {
  font-size: 0.82rem;
  color: var(--muted);
}

.legal-disclaimer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  font-size: 0.8rem !important;
  color: var(--muted);
}

.legal-notice {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff8e6;
  border: 1px solid #f0dfa0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.legal-notice code {
  font-size: 0.82rem;
}

.legal-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 20px;
  font-size: 0.88rem;
}

.legal-footer-nav a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.legal-footer-nav a:hover {
  text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .panel-preview {
    position: static;
    max-height: none;
  }

  .builder-columns {
    grid-template-columns: 1fr 1fr;
  }

  .builder-col-settings {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
  }

  .form-actions-bar {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .nav-inner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
  }

  .nav-menu {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .builder-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .builder-columns,
  .builder-col-settings {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    padding: 22px 20px;
  }
}

@media print {
  body {
    background: white;
  }

  .no-print,
  .preview-empty {
    display: none !important;
  }

  .workspace {
    display: block;
    padding: 0;
  }

  .container {
    width: 100%;
    margin: 0;
  }

  .panel-preview {
    position: static;
    max-height: none;
    overflow: visible;
    border: none;
    padding: 0;
    box-shadow: none;
  }

  #preview-content {
    display: block !important;
    overflow: visible;
  }

  #preview-content[hidden] {
    display: none !important;
  }

  .preview-sheet {
    border: none;
    padding: 0;
  }

  .sheet-title {
    margin-bottom: 16px;
    font-size: 1.1rem;
  }

  .content-disclaimer {
    margin-top: 24px;
    padding: 0;
    font-size: 0.72rem;
    line-height: 1.45;
    color: #444;
    background: none;
    border: none;
    border-radius: 0;
  }

  .page-break {
    page-break-before: always;
  }

  #preview-questions,
  #preview-answers {
    display: block !important;
  }

  #preview-questions[hidden],
  #preview-answers[hidden] {
    display: block !important;
  }

  #preview-questions {
    page-break-after: always;
  }
}
