/* ============================================
   SOKKON — Global Stylesheet
   ============================================ */

/* ── Design Tokens ── */
:root {
  --ink:       #18140f;
  --ink2:      #3d3530;
  --gold:      #b8943c;
  --gold-bg:   #faf4e6;
  --gold-bd:   rgba(184,148,60,.28);
  --paper:     #fdfaf4;
  --surface:   #ffffff;
  --muted:     #7a6e5e;
  --subtle:    #f0ebe0;
  --teal:      #0f6e56;
  --coral:     #bf4a30;

  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  18px;
  --r-xl:  24px;

  --max-w: 720px;
  --side:  1.25rem;

  --font-serif: 'Shippori Mincho', serif;
  --font-sans:  'Zen Kaku Gothic New', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}
img { max-width:100%; height:auto; display:block; }
a { color: inherit; text-decoration: none; }

/* ── Ambient BG ── */
body::before {
  content:'';
  position:fixed; inset:0; pointer-events:none; z-index:0;
  background:
    radial-gradient(ellipse 60% 40% at 10% 10%, rgba(184,148,60,.06) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 90% 90%, rgba(15,110,86,.04) 0%, transparent 55%);
}

/* ── Layout ── */
.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--side);
}

/* ── Site Header ── */
.site-header {
  border-bottom: .5px solid var(--gold-bd);
  background: rgba(253,250,244,.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: .9rem var(--side);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .25em;
  color: var(--ink);
}
.site-logo span { color: var(--gold); }
.site-nav { display:flex; gap:1.5rem; }
.site-nav a {
  font-size: .78rem;
  letter-spacing: .12em;
  color: var(--muted);
  transition: color .2s;
}
.site-nav a:hover { color: var(--gold); }

/* ── Site Footer ── */
.site-footer {
  border-top: .5px solid var(--gold-bd);
  padding: 2.5rem var(--side) 3rem;
  text-align: center;
  margin-top: 5rem;
}
.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  letter-spacing: .3em;
  color: var(--ink);
  margin-bottom: .75rem;
  display: block;
}
.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  margin-bottom: 1rem;
}
.footer-nav a { font-size: .75rem; color: var(--muted); }
.footer-nav a:hover { color: var(--gold); }
.footer-copy { font-size: .7rem; color: var(--muted); letter-spacing: .08em; }

/* ── Rule ── */
.rule {
  display:flex; align-items:center; gap:.75rem; margin: 1.5rem 0;
}
.rule::before, .rule::after {
  content:''; flex:1; height:.5px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}
.rule span { color:var(--gold); font-size:.65rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .85rem 2rem;
  border-radius: var(--r-sm);
  font-family: var(--font-serif);
  font-size: 1rem;
  letter-spacing: .2em;
  cursor: pointer;
  border: none;
  transition: all .25s;
  text-align: center;
}
.btn-primary {
  background: var(--ink);
  color: #f5f0e4;
  width: 100%;
}
.btn-primary:hover { background: #2d2520; }
.btn-gold {
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
}
.btn-gold:hover { opacity: .88; }
.btn-outline {
  background: transparent;
  border: .5px solid var(--gold-bd);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: .8rem;
  letter-spacing: .15em;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

/* ── Card ── */
.card {
  background: var(--surface);
  border: .5px solid var(--gold-bd);
  border-radius: var(--r-lg);
  padding: 2rem;
  margin-bottom: 1.25rem;
}

/* ── Dark Card (overview) ── */
.card-dark {
  background: var(--ink);
  color: #f0ead8;
  border-radius: var(--r-lg);
  padding: 2rem;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.card-dark::before {
  content: '\201C';
  position: absolute; top: -.5rem; left: 1.5rem;
  font-family: var(--font-serif);
  font-size: 7rem; color: rgba(184,148,60,.12);
  line-height: 1; pointer-events: none;
}
.card-tag {
  font-size: .65rem; letter-spacing: .22em;
  color: var(--gold); margin-bottom: .9rem; display: block;
}
.card-body {
  font-family: var(--font-serif);
  font-size: 1rem; line-height: 2.1;
  position: relative; z-index: 1;
}

/* ── Gold Banner ── */
.banner-gold {
  background: var(--gold-bg);
  border: .5px solid var(--gold-bd);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  text-align: center;
}
.banner-label {
  font-size: .68rem; letter-spacing: .2em;
  color: var(--muted); margin-bottom: .5rem; display: block;
}
.banner-text {
  font-family: var(--font-serif);
  font-size: 1.05rem; font-weight: 600;
  color: #6b4a10; line-height: 1.9;
}

/* ── CTA Card ── */
.cta-card {
  background: linear-gradient(135deg, #1a140f 0%, #2d2218 100%);
  border-radius: var(--r-lg);
  padding: 2rem;
  text-align: center;
  color: #f0ead8;
  margin-top: 2rem;
}
.cta-eyebrow {
  font-size: .68rem; letter-spacing: .22em;
  color: var(--gold); margin-bottom: .75rem; display: block;
}
.cta-card h2 {
  font-family: var(--font-serif);
  font-size: 1.2rem; font-weight: 700;
  margin-bottom: .6rem; line-height: 1.7;
}
.cta-card p {
  font-size: .85rem; color: rgba(240,234,216,.65);
  line-height: 1.9; margin-bottom: 1.5rem;
}

/* ── Ad / Affiliate placeholder ── */
.ad-slot {
  min-height: 90px;
  background: var(--subtle);
  border: .5px dashed var(--gold-bd);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .1em;
  margin: 1.5rem 0;
}
/* 本番では .ad-slot::before { content:''; } などで非表示にする */

/* ── Section heading ── */
.sec-head {
  font-family: var(--font-serif);
  font-size: .95rem; font-weight: 600;
  letter-spacing: .12em; color: var(--ink2);
  margin-bottom: 1rem;
}

/* ── Keyword chips ── */
.kw-row { display:flex; flex-wrap:wrap; gap:.5rem; margin-bottom:1.25rem; }
.kw-chip {
  padding: .35rem .9rem; border-radius: 20px;
  font-size: .75rem; letter-spacing: .06em;
  background: var(--gold-bg); color: #6b4a10;
  border: .5px solid var(--gold-bd);
}

/* ── Strength / Weakness list ── */
.str-item {
  margin-bottom: 1rem; padding-bottom: 1rem;
  border-bottom: .5px solid var(--gold-bd);
}
.str-item:last-child { margin-bottom:0; padding-bottom:0; border-bottom:none; }
.str-title {
  font-family: var(--font-serif);
  font-size: .92rem; font-weight: 600;
  color: var(--ink); margin-bottom: .35rem;
  display: flex; align-items: center; gap: .5rem;
}
.str-title::before {
  content: ''; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); flex-shrink: 0;
}
.wk-title::before { background: #9a7a6a !important; }
.str-body { font-size: .88rem; line-height: 1.85; color: var(--ink2); }

/* ── Section body text ── */
.sec-body { font-size: .9rem; line-height: 1.95; color: var(--ink2); }

/* ── Phase grid ── */
.phase-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:.75rem; }
.phase-card {
  background: var(--gold-bg); border: .5px solid var(--gold-bd);
  border-radius: var(--r-md); padding: 1rem; text-align: center;
}
.ph-label { font-size:.65rem; letter-spacing:.15em; color:var(--muted); display:block; margin-bottom:.4rem; }
.ph-title { font-family:var(--font-serif); font-size:.88rem; font-weight:600; color:#6b4a10; margin-bottom:.4rem; }
.ph-desc  { font-size:.78rem; color:var(--ink2); line-height:1.75; }

/* ── Trust badges ── */
.trust-row { display:flex; justify-content:center; flex-wrap:wrap; gap:.5rem; margin-bottom:2rem; }
.tbadge {
  padding:.3rem .85rem; border-radius:20px; font-size:.7rem;
  letter-spacing:.06em; background:var(--subtle); color:var(--muted);
  border:.5px solid var(--gold-bd);
}

/* ── Logo dots ── */
.logo-dots { display:inline-flex; align-items:center; gap:.4rem; margin-bottom:1rem; }
.ldot {
  width:7px; height:7px; border-radius:50%; background:var(--gold);
  animation: ldot-pulse 2.5s ease-in-out infinite;
}
.ldot:nth-child(2) { animation-delay:.4s; background:#0f6e56; }
.ldot:nth-child(3) { animation-delay:.8s; }
@keyframes ldot-pulse {
  0%,100%{opacity:.4;transform:scale(1)} 50%{opacity:1;transform:scale(1.3)}
}

/* ── Loading ── */
.loading { display:none; text-align:center; padding:4rem 0; }
.loading.on { display:block; }
.spin-ring {
  width:48px; height:48px; margin:0 auto 1.5rem;
  border:1.5px solid var(--gold-bd); border-top-color:var(--gold);
  border-radius:50%; animation:spin 1.2s linear infinite;
}
@keyframes spin { to{transform:rotate(360deg)} }
.load-msg  { font-size:.8rem; letter-spacing:.18em; color:var(--muted); animation:blink 1.8s ease-in-out infinite; }
.load-sub  { font-size:.7rem; color:var(--muted); opacity:.5; margin-top:.5rem; letter-spacing:.1em; }
@keyframes blink { 0%,100%{opacity:.4}50%{opacity:1} }

/* ── Result ── */
.result { display:none; }
.result.on { display:block; animation:rise .7s ease both; }
@keyframes rise { from{opacity:0;transform:translateY(18px)} to{opacity:1;transform:none} }

/* ── Result hero ── */
.result-hero { text-align:center; padding:2rem 0 1.25rem; }
.r-emoji   { font-size:3.5rem; display:block; margin-bottom:.6rem; }
.r-archetype {
  font-family:var(--font-serif); font-size:1.55rem; font-weight:700;
  letter-spacing:.08em; margin-bottom:.3rem;
}
.r-tagline { font-size:.87rem; color:var(--muted); line-height:1.85; }

/* ── Error ── */
.err {
  display:none; font-size:.82rem; color:var(--coral);
  text-align:center; margin-bottom:.75rem; padding:.6rem;
  background:rgba(191,74,48,.06); border-radius:var(--r-sm);
  border:.5px solid rgba(191,74,48,.2);
}
.err.on { display:block; }

/* ── Form ── */
.form-lead { font-size:.82rem; color:var(--muted); line-height:1.8; margin-bottom:1.5rem; text-align:center; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin-bottom:1.25rem; }
.field label { display:block; font-size:.7rem; letter-spacing:.18em; color:var(--muted); margin-bottom:.45rem; }
.field input, .field select {
  width:100%; padding:.7rem 1rem;
  background:var(--paper); border:.5px solid var(--gold-bd);
  border-radius:var(--r-sm); font-family:var(--font-sans);
  font-size:.95rem; color:var(--ink); outline:none;
  transition:border-color .2s; appearance:none;
}
.field input:focus, .field select:focus { border-color:var(--gold); }
.g-row { display:flex; gap:.6rem; }
.g-btn {
  flex:1; padding:.6rem; border:.5px solid var(--gold-bd);
  border-radius:var(--r-sm); background:transparent;
  font-family:var(--font-sans); font-size:.85rem;
  color:var(--muted); cursor:pointer; transition:all .2s;
}
.g-btn.on { background:var(--gold-bg); border-color:var(--gold); color:#6b4a10; font-weight:500; }
.privacy-note { font-size:.68rem; color:var(--muted); text-align:center; margin-top:.75rem; line-height:1.7; }

/* ── Page hero (non-fortune pages) ── */
.page-hero { text-align:center; padding:4rem 0 2rem; }
.page-hero h1 {
  font-family:var(--font-serif); font-size:1.8rem;
  font-weight:700; letter-spacing:.15em; margin-bottom:.5rem;
}
.page-hero p { font-size:.88rem; color:var(--muted); line-height:1.85; }

/* ── Prose (articles, about, etc.) ── */
.prose h2 {
  font-family:var(--font-serif); font-size:1.15rem;
  font-weight:700; margin:2rem 0 .75rem;
  padding-bottom:.4rem; border-bottom:.5px solid var(--gold-bd);
}
.prose p { font-size:.92rem; line-height:2; color:var(--ink2); margin-bottom:1rem; }
.prose ul { padding-left:1.5rem; margin-bottom:1rem; }
.prose li { font-size:.92rem; line-height:1.9; color:var(--ink2); margin-bottom:.3rem; }

/* ── Responsive ── */
@media (max-width: 540px) {
  .form-grid   { grid-template-columns: 1fr; }
  .phase-grid  { grid-template-columns: 1fr; }
  .site-nav    { display: none; }
  .r-archetype { font-size: 1.3rem; }
}
