:root {
  --bg: #0e1117;
  --bg-elev: #161a22;
  --bg-elev-2: #1f2530;
  --border: #2a313d;
  --text: #e6e6e6;
  --text-mute: #9aa3b1;
  --accent: #c9a96a;
  --accent-soft: rgba(201, 169, 106, 0.15);
  --error: #ff7878;
  --error-bg: rgba(255, 120, 120, 0.08);
  --radius: 12px;
  --max-width: 760px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --transition: 200ms ease;
}

* {
  box-sizing: border-box;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.hero {
  text-align: center;
  margin: 24px 0 40px;
}

.hero h1 {
  font-size: 32px;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
  font-weight: 600;
}

.hero h1 .title-tag {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-right: 2px;
  text-shadow: 0 0 18px rgba(201, 169, 106, 0.35);
}

.hero .badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  font-size: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  vertical-align: middle;
  font-weight: normal;
}

.hero .lede {
  color: var(--text);
  margin: 0 auto;
  max-width: 620px;
  font-size: 15px;
  line-height: 1.85;
  letter-spacing: 0.01em;
}

.hero .lede-warning {
  margin: 18px auto 0;
  max-width: 560px;
  padding: 12px 18px;
  font-size: 13px;
  line-height: 1.8;
  color: #ffd2a8;
  background: rgba(255, 120, 120, 0.06);
  border: 1px solid rgba(201, 169, 106, 0.35);
  border-radius: 8px;
  letter-spacing: 0.02em;
}

.lede-sub {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-mute);
  line-height: 1.5;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

.form-actions .primary {
  flex: 1 1 200px;
}

.form-actions .ghost {
  flex: 1 1 220px;
}

.sixteen-main-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 20px;
  letter-spacing: 0.03em;
  text-transform: none;
}

.type-card {
  margin-bottom: 28px;
  padding: 20px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.type-card:last-of-type {
  margin-bottom: 16px;
}

.type-card-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 12px;
  line-height: 1.45;
}

.type-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.type-card-headline {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 12px;
  line-height: 1.5;
}

.type-card-body {
  margin-bottom: 16px;
}

.gap-essence {
  font-size: 13px;
  color: var(--text-mute);
  margin: 0;
  line-height: 1.65;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.meta-line {
  font-size: 12px;
  color: var(--text-mute);
  margin: 8px 0 0;
  line-height: 1.6;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.card.hidden {
  display: none;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.span-2 {
  grid-column: 1 / -1;
}

.label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mute);
  letter-spacing: 0.02em;
}

.label em {
  color: var(--accent);
  font-style: normal;
  margin-left: 6px;
  font-weight: normal;
  font-size: 11px;
}

.hint {
  color: var(--text-mute);
  font-size: 12px;
  line-height: 1.5;
}

.inline-check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  padding: 10px 12px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.inline-check input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

#asc-fallback-field {
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 18px 18px;
  background: var(--accent-soft);
  margin: 0;
}

#asc-fallback-field legend {
  padding: 0 8px;
  font-size: 13px;
}

.asc-fallback-question {
  margin: 6px 0 14px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.7;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.55;
  transition: border-color var(--transition), background var(--transition);
}

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

.radio-option input[type="radio"] {
  accent-color: var(--accent);
  margin-top: 3px;
  flex-shrink: 0;
}

.radio-option input[type="radio"]:checked + span {
  color: var(--accent);
  font-weight: 600;
}

.field.hidden {
  display: none;
}

input[type="text"],
input[type="date"],
input[type="time"],
select {
  background: var(--bg-elev-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color var(--transition);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-mute) 50%),
    linear-gradient(-45deg, transparent 50%, var(--text-mute) 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  border-radius: 8px;
  padding: 12px 20px;
  border: none;
  transition: background var(--transition), opacity var(--transition);
}

button.primary {
  background: var(--accent);
  color: #2a1f0a;
  font-weight: 600;
  width: 100%;
  margin-top: 28px;
  letter-spacing: 0.04em;
}

button.primary:hover:not(:disabled) {
  background: #d8b87a;
}

button.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.ghost {
  background: transparent;
  color: var(--text-mute);
  border: 1px solid var(--border);
}

button.ghost:hover {
  color: var(--text);
  border-color: var(--accent);
}

#loading {
  text-align: center;
  padding: 40px 20px;
}

.spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 16px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-text {
  color: var(--text-mute);
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
}

.error {
  border-color: var(--error);
  color: var(--error);
  background: var(--error-bg);
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.7;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.chip.subtle {
  background: transparent;
  color: var(--text-mute);
  border-color: var(--border);
}

.prose {
  color: var(--text);
  line-height: 1.85;
}

.prose h1 {
  font-size: 22px;
  margin: 0 0 24px;
  letter-spacing: 0.02em;
}

.prose h2,
.prose h3 {
  font-size: 17px;
  margin: 36px 0 12px;
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

.prose p {
  margin: 0 0 14px;
}

.prose ul,
.prose ol {
  margin: 0 0 14px;
  padding-left: 24px;
}

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

.prose code {
  background: var(--bg-elev-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

.section-block {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px dashed var(--border);
}

.section-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.verdict-warn {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 4px;
  background: rgba(255, 120, 120, 0.15);
  color: var(--error);
  border: 1px solid var(--error);
  text-transform: lowercase;
}

.share-block {
  margin: 8px 0 28px;
  padding: 22px 20px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.18));
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.share-lead {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-mute);
  letter-spacing: 0.04em;
}

.x-share {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000;
  color: #fff;
  border: 1px solid #2a2a2a;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.x-share:hover {
  transform: translateY(-1px);
  background: #111;
  box-shadow: 0 6px 18px rgba(201, 169, 106, 0.25), 0 0 0 1px var(--accent);
}

.x-share .x-icon {
  font-family: "Segoe UI Symbol", "Apple Symbols", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1;
}

.cta-section {
  position: relative;
  margin: 32px 0 8px;
  padding: 28px 24px 26px;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(201, 169, 106, 0.12), transparent 60%),
    linear-gradient(180deg, #1a1f2a 0%, #11151c 100%);
  border: 1px solid rgba(201, 169, 106, 0.55);
  border-radius: var(--radius);
  box-shadow:
    0 0 0 1px rgba(201, 169, 106, 0.08),
    0 14px 40px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(201, 169, 106, 0.04) 0 2px, transparent 2px 8px);
  pointer-events: none;
  opacity: 0.6;
}

.cta-badge {
  position: relative;
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--accent);
  background: rgba(201, 169, 106, 0.1);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 3px 10px;
  margin-bottom: 14px;
}

.cta-title {
  position: relative;
  margin: 0 0 14px;
  font-size: 19px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.cta-body {
  position: relative;
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.95;
  color: var(--text);
}

.cta-body strong {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cta-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 22px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #2a1f0a;
  background: linear-gradient(135deg, #e6c98a 0%, #c9a96a 45%, #a4853f 100%);
  border: 1px solid #d8b87a;
  border-radius: 10px;
  text-decoration: none;
  box-shadow:
    0 6px 18px rgba(201, 169, 106, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.cta-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow:
    0 10px 26px rgba(201, 169, 106, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.cta-button:active {
  transform: translateY(0);
}

.cta-arrow {
  font-size: 18px;
  line-height: 1;
  transition: transform var(--transition);
}

.cta-button:hover .cta-arrow {
  transform: translateX(4px);
}

.result-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.legal {
  margin-top: 56px;
  font-size: 11px;
  line-height: 1.8;
  color: var(--text-mute);
  text-align: center;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
  .container {
    padding: 16px 14px 60px;
  }

  .card {
    padding: 20px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .field.span-2 {
    grid-column: auto;
  }

  .hero h1 {
    font-size: 26px;
  }
}
