/* ============================================================
   Diagnosis.html — externalized styles (CSP-compliant)
   Declarations transcribed verbatim from the original inline
   style="" attributes and <style> block. Do not alter values.
   ============================================================ */

/* ---- Base (from original <style> block) ---- */
html, body { margin: 0; padding: 0; }
body { font-family: "Noto Serif JP", "Shippori Mincho B1", serif; color: #4A3324; background: #FBF6EE; -webkit-font-smoothing: antialiased; letter-spacing: 0.02em; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
* { box-sizing: border-box; }
@keyframes drift { 0%,100% { transform: translate(0,0); } 50% { transform: translate(8px,-6px); } }
@keyframes fadeUp { from { opacity:0; transform: translateY(20px); } to { opacity:1; transform: translateY(0); } }
@keyframes shimmer { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }
.sp-br { display: none; }

/* v2 chrome: sticky blur header */
#siteHeader { transition: background 0.45s ease, box-shadow 0.45s ease; }
#siteHeader.is-scrolled {
  background: rgba(252,247,239,0.82);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(201,169,97,0.28), 0 12px 40px -24px rgba(107,66,37,0.18);
}

/* ============================================================
   Static shell
   ============================================================ */
.page-shell { position: relative; min-height: 100vh; background: linear-gradient(180deg, #FCF7EF 0%, #FAF1E3 60%, #FBF4E8 100%); overflow-x: hidden; }

.bg-drift {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; background:
    radial-gradient(ellipse 500px 380px at 5% 12%, rgba(244, 200, 188, 0.40) 0%, transparent 60%),
    radial-gradient(ellipse 460px 360px at 95% 14%, rgba(232, 175, 162, 0.36) 0%, transparent 60%),
    radial-gradient(ellipse 520px 380px at 8% 88%, rgba(232, 175, 162, 0.36) 0%, transparent 60%),
    radial-gradient(ellipse 480px 380px at 92% 90%, rgba(244, 210, 200, 0.40) 0%, transparent 60%);
  animation: drift 20s ease-in-out infinite;
}

.site-header { position: sticky; top: 0; z-index: 100; padding: clamp(16px,3vw,28px) clamp(16px,5vw,72px); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.brand-link { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.brand-ja { font-family: 'Shippori Mincho B1', serif; font-size: clamp(15px,1.5vw,18px); font-weight: 500; letter-spacing: 0.32em; color: #6B4E32; }
.brand-en { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 10px; letter-spacing: 0.3em; color: #B89556; margin-top: 6px; }
.site-nav { display: flex; align-items: center; gap: clamp(12px,2.4vw,28px); flex-wrap: wrap; font-family: 'Shippori Mincho B1', serif; font-size: clamp(11px,1.2vw,13px); letter-spacing: 0.18em; color: #6B5040; }
.nav-link:hover { color: #A88345; }
.nav-btn { background: none; border: 0; color: inherit; font-size: inherit; letter-spacing: inherit; padding: 0; font-family: inherit; }
.nav-btn:hover { color: #A88345; }

/* ============================================================
   renderIntro
   ============================================================ */
.intro-section { position: relative; z-index: 1; padding: clamp(24px,4vw,40px) clamp(20px,4vw,24px) clamp(80px,10vw,120px); }
.intro-wrap { max-width: 760px; margin: 0 auto; text-align: center; animation: fadeUp 1s ease-out; }
.intro-kicker { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: clamp(11px,1.2vw,13px); letter-spacing: 0.4em; color: #B89556; margin-bottom: 16px; }
.intro-eng { font-family: 'Italiana', serif; font-size: clamp(48px,12vw,100px); color: #C9A961; letter-spacing: 0.06em; line-height: 1; opacity: 0.7; margin-bottom: 4px; }
.intro-title { font-family: 'Shippori Mincho B1', serif; font-weight: 500; font-size: clamp(26px,6vw,52px); letter-spacing: 0.22em; color: #5C3F25; margin: 0 0 28px; line-height: 1.4; }
.intro-rule { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 auto 32px; max-width: 420px; }
.rule-seg { flex: 1; height: 0.6px; background: linear-gradient(90deg, transparent, #B89556 30%, #B89556 70%, transparent); }
.intro-tagline { font-family: 'Shippori Mincho B1', serif; font-size: clamp(14px,1.7vw,18px); letter-spacing: 0.1em; color: #5C3F25; line-height: 2.2; margin: 0 0 14px; }
.intro-desc { font-family: 'Noto Serif JP', serif; font-size: clamp(12.5px,1.4vw,14px); letter-spacing: 0.05em; color: #8A7060; line-height: 2.1; margin: 0 0 44px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(8px,1.5vw,16px); margin-bottom: 44px; max-width: 560px; margin-left: auto; margin-right: auto; }
.stat-card { padding: clamp(14px,2vw,20px) 6px; background: rgba(255, 250, 240, 0.7); border: 0.6px solid rgba(201, 169, 97, 0.3); border-radius: 4px; }
.stat-label { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: clamp(10px,1vw,11px); letter-spacing: 0.26em; color: #B89556; margin-bottom: 4px; }
.stat-value { font-family: 'Shippori Mincho B1', serif; font-size: clamp(17px,3vw,24px); font-weight: 500; color: #5C3F25; }
.intro-note { padding: clamp(20px,3vw,28px) clamp(18px,3vw,32px); background: rgba(244, 210, 200, 0.20); border-left: 2px solid #C9A961; border-radius: 0 4px 4px 0; text-align: left; margin-bottom: 36px; }
.intro-note-kicker { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 11px; letter-spacing: 0.3em; color: #B89556; margin-bottom: 10px; }
.intro-note-text { font-family: 'Noto Serif JP', serif; font-size: clamp(12px,1.3vw,13.5px); letter-spacing: 0.04em; color: #6B5040; line-height: 2; margin: 0; }
.start-btn { display: inline-flex; align-items: center; gap: 12px; padding: clamp(15px,2vw,18px) clamp(32px,6vw,56px); background: linear-gradient(135deg, #C9A961 0%, #B89556 100%); color: #FFFFFF; font-family: 'Shippori Mincho B1', serif; font-size: clamp(13px,1.5vw,15px); letter-spacing: 0.26em; border: 0; border-radius: 999px; box-shadow: 0 12px 32px -10px rgba(184, 149, 86, 0.55); transition: all 0.4s; }
.start-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -10px rgba(184, 149, 86, 0.65); }
.start-btn-arrow { font-family: serif; font-size: 16px; }
.intro-links { margin-top: 28px; display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.intro-link { font-family: 'Shippori Mincho B1', serif; font-size: 12.5px; letter-spacing: 0.18em; color: #A88345; padding-bottom: 4px; border-bottom: 0.6px solid #C9A961; }
.intro-link:hover { color: #6B4225; }
.intro-link-btn { background: none; border: 0; font-family: 'Shippori Mincho B1', serif; font-size: 12.5px; letter-spacing: 0.18em; color: #A88345; padding-bottom: 4px; border-bottom: 0.6px solid #C9A961; }
.intro-link-btn:hover { color: #6B4225; }
.intro-disclaimer { margin-top: 48px; padding: 18px 22px; background: rgba(244, 210, 200, 0.18); border: 0.6px solid rgba(201, 169, 97, 0.3); border-radius: 4px; max-width: 620px; margin-left: auto; margin-right: auto; }
.intro-disclaimer-text { font-family: 'Noto Serif JP', serif; font-size: 11.5px; letter-spacing: 0.04em; color: #6B5040; line-height: 1.95; margin: 0; text-align: left; }

/* ============================================================
   renderQuestion
   ============================================================ */
.q-section { position: relative; z-index: 1; padding: 12px clamp(16px,4vw,24px) 64px; }
.q-wrap { max-width: 720px; margin: 0 auto; }
.q-progress-row { display: flex; align-items: center; gap: clamp(12px,2vw,20px); margin-bottom: clamp(28px,5vw,48px); }
.q-progress-label { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: clamp(11px,1.2vw,13px); letter-spacing: 0.22em; color: #B89556; white-space: nowrap; }
.q-progress-label-total { color: #C9B999; }
.q-progress-track { flex: 1; height: 2px; background: rgba(201, 169, 97, 0.18); border-radius: 999px; overflow: hidden; }
.q-progress-fill { height: 100%; background: linear-gradient(90deg, #E5C886 0%, #B89556 100%); border-radius: 999px; transition: width 0.5s ease; }
.q-card { position: relative; background: rgba(255, 251, 244, 0.85); border: 0.6px solid rgba(201, 169, 97, 0.35); border-radius: 6px; padding: clamp(48px,6vw,56px) clamp(18px,4vw,44px) clamp(72px,8vw,64px); box-shadow: 0 24px 60px -24px rgba(184, 149, 86, 0.30); }
.q-card-crest { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; }
.q-crest-line { width: 24px; height: 0.6px; background: #C9A961; }
.q-card-body { text-align: center; }
.q-card-kicker { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: clamp(11px,1.2vw,12px); letter-spacing: 0.34em; color: #B89556; margin-bottom: 22px; }
.q-text { font-family: 'Shippori Mincho B1', serif; font-size: clamp(15px,2.4vw,21px); letter-spacing: 0.06em; color: #4A3324; line-height: 2; margin: 0 0 clamp(36px,6vw,56px); min-height: 84px; display: flex; align-items: center; justify-content: center; }
.likert-grid { display: grid; grid-template-columns: repeat(5, 1fr); align-items: start; gap: clamp(4px,1vw,8px); max-width: 600px; margin: 0 auto; }
.likert-btn { display: flex; flex-direction: column; align-items: center; gap: clamp(7px,1.2vw,12px); background: none; border: 0; padding: 4px 2px; transition: transform 0.25s; cursor: pointer; }
.likert-btn:hover { transform: translateY(-3px); }
.likert-dot { display: flex; align-items: center; justify-content: center; border-radius: 50%; background: linear-gradient(135deg, #FFFAF0, #F5E6CD); border: 1.4px solid #B89556; color: #8A6932; font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: clamp(15px,2.2vw,19px); transition: all 0.3s; box-shadow: 0 6px 14px -6px rgba(184, 149, 86, 0.35); }
.likert-btn:hover .likert-dot { background: linear-gradient(135deg, #E5C886, #B89556); color: #FFFFFF; box-shadow: 0 10px 24px -8px rgba(184, 149, 86, 0.6); }
.dot-sm { width: 50px; height: 50px; }
.dot-md { width: 54px; height: 54px; }
.dot-lg { width: 60px; height: 60px; }
.likert-caption { font-family: 'Noto Serif JP', serif; font-size: clamp(9px,1.4vw,10.5px); letter-spacing: 0.02em; color: #8A7060; text-align: center; line-height: 1.4; min-height: 28px; }
.q-back-btn { position: absolute; bottom: 20px; left: 24px; background: none; border: 0; font-family: 'Shippori Mincho B1', serif; font-size: 12px; letter-spacing: 0.18em; color: #A08A72; display: flex; align-items: center; gap: 6px; padding: 6px 0; }
.q-back-btn:hover { color: #6B5040; }
.q-back-arrow { font-family: serif; font-size: 14px; }
.q-hint { text-align: center; margin-top: 22px; font-family: 'Noto Serif JP', serif; font-size: 11px; letter-spacing: 0.1em; color: #A08A72; }

/* ============================================================
   renderCalculating
   ============================================================ */
.calc-section { position: relative; z-index: 1; padding: 100px 24px; min-height: 60vh; display: flex; align-items: center; justify-content: center; }
.calc-wrap { text-align: center; animation: fadeUp 0.8s ease-out; }
.calc-kicker { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: clamp(11px,1.3vw,13px); letter-spacing: 0.4em; color: #B89556; margin-bottom: 22px; animation: shimmer 2s ease-in-out infinite; }
.calc-title { font-family: 'Shippori Mincho B1', serif; font-weight: 500; font-size: clamp(20px,3.4vw,30px); letter-spacing: 0.18em; color: #5C3F25; margin: 0 0 30px; line-height: 1.7; }
.calc-spinner { margin: 0 auto; }

/* ============================================================
   renderResult
   ============================================================ */
.result-section { position: relative; z-index: 1; padding: 16px clamp(14px,4vw,24px) 90px; }
.result-wrap { max-width: 880px; margin: 0 auto; }
.result-hero { position: relative; padding: clamp(44px,7vw,80px) clamp(18px,4vw,40px) clamp(36px,6vw,60px); background: linear-gradient(135deg, rgba(255, 250, 240, 0.95) 0%, rgba(252, 240, 224, 0.92) 100%); border: 0.6px solid rgba(184, 149, 86, 0.4); border-radius: 6px; box-shadow: 0 30px 80px -30px rgba(184, 149, 86, 0.4); overflow: hidden; margin-bottom: 26px; animation: fadeUp 1s ease-out; }
.result-hero-glow { position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(ellipse 320px 240px at 0% 0%, rgba(244, 200, 188, 0.45) 0%, transparent 65%),
  radial-gradient(ellipse 320px 240px at 100% 100%, rgba(232, 175, 162, 0.40) 0%, transparent 65%); }
.result-hero-body { position: relative; text-align: center; }
.result-hero-kicker { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: clamp(12px,1.4vw,14px); letter-spacing: 0.4em; color: #B89556; margin-bottom: 14px; }
.result-hero-eng { font-family: 'Italiana', serif; font-size: clamp(40px,9vw,80px); color: #C9A961; letter-spacing: 0.06em; line-height: 1; opacity: 0.7; }
.result-hero-sub { font-family: 'Shippori Mincho B1', serif; font-weight: 500; font-size: clamp(12.5px,1.5vw,16px); letter-spacing: 0.26em; color: #8A6932; margin: 10px 0 24px; }
.result-hero-name { font-family: 'Shippori Mincho B1', serif; font-weight: 600; font-size: clamp(32px,9vw,64px); letter-spacing: 0.24em; color: #5C3F25; margin: 0 0 28px; line-height: 1.2; text-indent: 0.24em; }
.result-hero-rule { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 auto 24px; max-width: 320px; }
.result-hero-rule-l { flex: 1; height: 0.6px; background: linear-gradient(90deg, transparent, #B89556); }
.result-hero-rule-r { flex: 1; height: 0.6px; background: linear-gradient(90deg, #B89556, transparent); }
.result-hero-domlabel { font-family: 'Shippori Mincho B1', serif; font-size: clamp(12.5px,1.3vw,15px); letter-spacing: 0.16em; color: #8A6932; margin: 0 0 12px; }
.result-dom-pill { display: inline-flex; align-items: baseline; gap: clamp(10px,2vw,16px); padding: 11px clamp(16px,3vw,26px); background: rgba(255, 253, 247, 0.7); border: 0.6px solid rgba(184, 149, 86, 0.3); border-radius: 999px; flex-wrap: wrap; justify-content: center; }
.result-dom-eng { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: clamp(13px,1.4vw,16px); color: #B89556; }
.result-dom-sep { width: 0.6px; height: 14px; background: #C9A961; }
.result-dom-name { font-family: 'Shippori Mincho B1', serif; font-weight: 500; font-size: clamp(16px,2.2vw,22px); letter-spacing: 0.14em; color: #5C3F25; }

.panel { padding: clamp(28px,5vw,46px) clamp(18px,4vw,40px); background: rgba(255, 251, 244, 0.85); border: 0.6px solid rgba(201, 169, 97, 0.3); border-radius: 6px; margin-bottom: 26px; }
.panel-head { text-align: center; margin-bottom: 28px; }
.panel-kicker { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 12px; letter-spacing: 0.3em; color: #B89556; margin-bottom: 6px; }
.panel-title { font-family: 'Shippori Mincho B1', serif; font-weight: 500; font-size: clamp(17px,2.4vw,22px); letter-spacing: 0.14em; color: #5C3F25; margin: 0; }
.bars-wrap { display: flex; flex-direction: column; gap: 14px; max-width: 580px; margin: 0 auto; }
.bar-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.bar-labels { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bar-eng { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 11.5px; letter-spacing: 0.24em; color: #B89556; }
.bar-name { font-family: 'Shippori Mincho B1', serif; font-size: clamp(12.5px,1.4vw,15px); font-weight: 500; letter-spacing: 0.1em; color: #5C3F25; }
.bar-pct { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 14.5px; color: #B89556; }
.bar-track { height: 6px; background: rgba(201, 169, 97, 0.15); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; transition: width 0.8s ease; }
.bar-top { background: linear-gradient(90deg, #E5C886 0%, #B89556 100%); }
.bar-rest { background: linear-gradient(90deg, rgba(201, 169, 97, 0.5) 0%, rgba(184, 149, 86, 0.5) 100%); }
.subtype-narrative { text-align: center; margin: 26px 0 0; font-family: 'Noto Serif JP', serif; font-size: clamp(11.5px,1.3vw,12.5px); letter-spacing: 0.05em; color: #927866; line-height: 1.9; }

.structure-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; max-width: 700px; margin: 0 auto; }
.structure-card { padding: clamp(16px,3vw,22px) 12px; background: rgba(255, 250, 240, 0.7); border: 0.6px solid rgba(201, 169, 97, 0.3); border-radius: 4px; text-align: center; }
.structure-card-main { padding: clamp(16px,3vw,22px) 12px; background: linear-gradient(180deg, rgba(244, 200, 188, 0.25) 0%, rgba(255, 250, 240, 0.7) 100%); border: 0.8px solid rgba(184, 149, 86, 0.5); border-radius: 4px; text-align: center; }
.structure-tier { font-family: 'Noto Serif JP', serif; font-size: 10px; letter-spacing: 0.22em; color: #B89556; margin-bottom: 8px; }
.structure-stars { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 13.5px; color: #C9A961; letter-spacing: 0.18em; margin-bottom: 6px; }
.structure-chain { font-family: 'Shippori Mincho B1', serif; font-size: 14.5px; font-weight: 500; letter-spacing: 0.1em; color: #5C3F25; }
.structure-narrative { text-align: center; margin: 22px auto 0; max-width: 600px; font-family: 'Noto Serif JP', serif; font-size: clamp(11.5px,1.3vw,12.5px); letter-spacing: 0.05em; color: #927866; line-height: 2; }
.structure-narrative-note { font-size: 10.5px; color: #A08A72; }
.structure-cta-wrap { text-align: center; margin-top: 22px; }
.structure-cta { display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; font-family: 'Shippori Mincho B1', serif; font-size: 11.5px; letter-spacing: 0.2em; color: #8A6932; border: 0.6px solid #B89556; border-radius: 999px; transition: all 0.3s; }
.structure-cta:hover { background: #B89556; color: #FFFFFF; }
.arrow-serif { font-family: serif; }

.story-block { margin-bottom: 26px; }
.story-head { text-align: center; margin-bottom: 32px; }
.story-kicker { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: clamp(11px,1.3vw,13px); letter-spacing: 0.32em; color: #B89556; margin-bottom: 10px; }
.story-title { font-family: 'Shippori Mincho B1', serif; font-weight: 500; font-size: clamp(19px,2.6vw,24px); letter-spacing: 0.16em; color: #5C3F25; margin: 0; }
.chapter { padding: clamp(26px,4vw,38px) clamp(20px,4vw,34px); background: rgba(255, 251, 244, 0.85); border: 0.6px solid rgba(201, 169, 97, 0.3); border-radius: 6px; margin-bottom: 14px; }
.chapter-05 { padding: clamp(26px,4vw,38px) clamp(20px,4vw,34px); background: linear-gradient(180deg, rgba(255, 251, 244, 0.95) 0%, rgba(255, 246, 235, 0.95) 100%); border: 0.6px solid rgba(184, 149, 86, 0.4); border-radius: 6px; margin-bottom: 14px; }
.chapter-06 { padding: clamp(26px,4vw,38px) clamp(20px,4vw,34px); background: linear-gradient(135deg, rgba(255, 250, 240, 0.95) 0%, rgba(244, 210, 200, 0.20) 100%); border: 0.8px solid rgba(184, 149, 86, 0.5); border-radius: 6px; }
.chapter-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.chapter-num { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: clamp(26px,4vw,34px); color: #C9A961; line-height: 1; }
.chapter-num-gold { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: clamp(26px,4vw,34px); color: #B89556; line-height: 1; }
.chapter-label { font-family: 'Noto Serif JP', serif; font-size: 10px; letter-spacing: 0.26em; color: #B89556; margin-bottom: 2px; }
.chapter-h4 { font-family: 'Shippori Mincho B1', serif; font-weight: 500; font-size: clamp(15px,1.8vw,18px); letter-spacing: 0.12em; color: #5C3F25; margin: 0; }
.chapter-hr { width: 30px; height: 0.6px; background: #C9A961; margin-bottom: 18px; }
.chapter-p { font-family: 'Shippori Mincho B1', serif; font-size: clamp(13px,1.5vw,15px); letter-spacing: 0.06em; color: #4A3324; line-height: 2.1; margin: 0; }
.chapter-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.chapter-li { display: flex; gap: 12px; font-family: 'Shippori Mincho B1', serif; font-size: clamp(13px,1.5vw,15px); letter-spacing: 0.05em; color: #4A3324; line-height: 1.9; }
.chapter-li-mark { color: #B89556; flex-shrink: 0; }
.chapter-origin-p { font-family: 'Shippori Mincho B1', serif; font-size: clamp(13px,1.5vw,15px); letter-spacing: 0.06em; color: #4A3324; line-height: 2.1; margin: 0 0 14px; }
.chapter-origin-note { font-family: 'Noto Serif JP', serif; font-size: clamp(11.5px,1.3vw,13px); letter-spacing: 0.04em; color: #8A7060; line-height: 1.95; margin: 0; padding: 14px 16px; background: rgba(244, 210, 200, 0.18); border-radius: 4px; }
.impact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.impact-item { padding: 14px 16px; background: rgba(244, 210, 200, 0.18); border-left: 2px solid #C9A961; border-radius: 0 4px 4px 0; font-family: 'Shippori Mincho B1', serif; font-size: clamp(12.5px,1.4vw,13.5px); letter-spacing: 0.04em; color: #5C3F25; line-height: 1.8; }
.trueself-p { font-family: 'Shippori Mincho B1', serif; font-weight: 500; font-size: clamp(14.5px,1.8vw,18px); letter-spacing: 0.08em; color: #5C3F25; line-height: 2.3; margin: 0; }
.firststeps-intro { font-family: 'Shippori Mincho B1', serif; font-size: clamp(13px,1.5vw,15px); letter-spacing: 0.05em; color: #5C3F25; line-height: 2.1; margin: 0 0 20px; }
.firststeps-list { display: flex; flex-direction: column; gap: 10px; }
.step-row { display: flex; gap: 12px; padding: 13px 16px; background: rgba(255, 253, 247, 0.7); border-radius: 4px; }
.step-num { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #E5C886, #B89556); display: flex; align-items: center; justify-content: center; font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 12px; color: #FFFFFF; }
.step-text { flex: 1; font-family: 'Shippori Mincho B1', serif; font-size: clamp(12.5px,1.4vw,14px); letter-spacing: 0.05em; color: #4A3324; line-height: 1.9; padding-top: 3px; }

.download-panel { padding: clamp(28px,4vw,40px) clamp(20px,4vw,36px); background: rgba(255, 251, 244, 0.92); border: 0.8px solid rgba(184, 149, 86, 0.4); border-radius: 6px; margin-bottom: 18px; }
.step-header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.step-badge { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #E5C886, #B89556); color: #FFFFFF; font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 17px; font-weight: 500; flex-shrink: 0; }
.step-badge-line { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: #06C755; color: #FFFFFF; font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 17px; font-weight: 500; flex-shrink: 0; }
.step-kicker { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 11.5px; letter-spacing: 0.3em; color: #B89556; margin-bottom: 2px; }
.step-title { font-family: 'Shippori Mincho B1', serif; font-weight: 500; font-size: clamp(15px,1.8vw,18px); letter-spacing: 0.14em; color: #5C3F25; margin: 0; }
.step-title-line { font-family: 'Shippori Mincho B1', serif; font-weight: 500; font-size: clamp(16px,2vw,20px); letter-spacing: 0.14em; color: #5C3F25; margin: 0; }
.download-desc { font-family: 'Noto Serif JP', serif; font-size: clamp(11.5px,1.3vw,13px); letter-spacing: 0.04em; color: #6B5040; line-height: 2; margin: 0 0 22px; }
.download-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.dl-btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 24px; background: linear-gradient(135deg, #FFFAF0, #F5E6CD); color: #6B4E32; font-family: 'Shippori Mincho B1', serif; font-size: 12.5px; letter-spacing: 0.18em; border: 1px solid #B89556; border-radius: 999px; transition: all 0.3s; }
.dl-btn:hover { background: linear-gradient(135deg, #E5C886, #B89556); color: #FFFFFF; }

.line-panel { position: relative; padding: clamp(36px,5vw,52px) clamp(20px,4vw,40px); background: linear-gradient(135deg, rgba(255, 250, 240, 0.95) 0%, rgba(244, 210, 200, 0.32) 100%); border: 0.8px solid rgba(184, 149, 86, 0.5); border-radius: 6px; margin-bottom: 20px; overflow: hidden; }
.line-glow { position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(ellipse 260px 200px at 5% 0%, rgba(244, 200, 188, 0.42) 0%, transparent 65%),
  radial-gradient(ellipse 260px 200px at 100% 100%, rgba(232, 175, 162, 0.38) 0%, transparent 65%); }
.line-body { position: relative; }
.line-lead { font-family: 'Shippori Mincho B1', serif; font-size: clamp(13px,1.5vw,15px); letter-spacing: 0.06em; color: #5C3F25; line-height: 2.1; margin: 0 0 14px; }
.line-desc { font-family: 'Noto Serif JP', serif; font-size: clamp(11.5px,1.3vw,12.5px); letter-spacing: 0.05em; color: #6B5040; line-height: 2; margin: 0 0 26px; }
.line-cta-wrap { text-align: center; }
.line-btn { display: inline-flex; align-items: center; gap: 12px; padding: clamp(14px,2vw,18px) clamp(28px,5vw,44px); background: #06C755; color: #FFFFFF; font-family: 'Shippori Mincho B1', serif; font-size: clamp(13px,1.5vw,15px); letter-spacing: 0.22em; border-radius: 999px; box-shadow: 0 12px 28px -10px rgba(6, 199, 85, 0.55); transition: all 0.3s; }
.line-btn:hover { background: #05B04B; transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(6, 199, 85, 0.7); }
.line-note { margin: 18px 0 0; font-family: 'Noto Serif JP', serif; font-size: 10.5px; letter-spacing: 0.16em; color: #A08A72; }

.session-panel { padding: clamp(22px,3vw,28px) clamp(20px,4vw,28px); background: rgba(244, 210, 200, 0.18); border: 0.6px solid rgba(201, 169, 97, 0.3); border-radius: 6px; text-align: center; }
.session-lead { font-family: 'Shippori Mincho B1', serif; font-size: clamp(12px,1.4vw,13.5px); letter-spacing: 0.05em; color: #6B5040; margin: 0 0 16px; line-height: 1.95; }
.session-lead-note { font-size: 10.5px; color: #A08A72; }
.session-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.session-restart { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; background: linear-gradient(135deg, #C9A961 0%, #B89556 100%); color: #FFFFFF; font-family: 'Shippori Mincho B1', serif; font-size: 12px; letter-spacing: 0.18em; border: 0; border-radius: 999px; }
.session-restart:hover { transform: translateY(-1px); }
.session-history { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; background: rgba(255,255,255,0.5); color: #8A6932; font-family: 'Shippori Mincho B1', serif; font-size: 12px; letter-spacing: 0.18em; border: 0.6px solid rgba(184, 149, 86, 0.5); border-radius: 999px; }
.session-history:hover { background: rgba(255,255,255,0.85); }
.session-nav { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; color: #8A6932; font-family: 'Shippori Mincho B1', serif; font-size: 12px; letter-spacing: 0.18em; border: 0.6px solid rgba(184, 149, 86, 0.5); border-radius: 999px; }
.session-nav:hover { background: rgba(255,255,255,0.85); }
.result-disclaimer { margin-top: 18px; padding: 18px 22px; background: rgba(244, 210, 200, 0.18); border: 0.6px solid rgba(201, 169, 97, 0.3); border-radius: 4px; }
.result-disclaimer-text { font-family: 'Noto Serif JP', serif; font-size: 11.5px; letter-spacing: 0.04em; color: #6B5040; line-height: 1.95; margin: 0; }

/* ============================================================
   renderHistory
   ============================================================ */
.hist-section { position: relative; z-index: 1; padding: 16px clamp(14px,4vw,24px) 80px; }
.hist-wrap { max-width: 820px; margin: 0 auto; }
.hist-head { text-align: center; margin-bottom: 40px; }
.hist-kicker { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: clamp(11px,1.3vw,13px); letter-spacing: 0.4em; color: #B89556; margin-bottom: 12px; }
.hist-title { font-family: 'Shippori Mincho B1', serif; font-weight: 500; font-size: clamp(24px,4.5vw,40px); letter-spacing: 0.18em; color: #5C3F25; margin: 0 0 14px; }
.hist-rule { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 auto; max-width: 240px; }
.hist-rule-l { flex: 1; height: 0.6px; background: linear-gradient(90deg, transparent, #C9A961); }
.hist-rule-r { flex: 1; height: 0.6px; background: linear-gradient(90deg, #C9A961, transparent); }
.hist-list { display: flex; flex-direction: column; gap: 14px; }
.hist-card { display: grid; grid-template-columns: 64px 1fr; gap: clamp(14px,3vw,22px); align-items: start; padding: clamp(20px,3vw,26px) clamp(18px,3vw,28px); background: rgba(255, 251, 244, 0.85); border: 0.6px solid rgba(201, 169, 97, 0.3); border-radius: 6px; transition: all 0.3s; }
.hist-card:hover { border-color: rgba(184, 149, 86, 0.6); transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(184, 149, 86, 0.25); }
.hist-date { text-align: center; }
.hist-month { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 10.5px; letter-spacing: 0.2em; color: #B89556; margin-bottom: 4px; }
.hist-day { font-family: 'Italiana', serif; font-size: clamp(26px,4vw,34px); color: #C9A961; line-height: 1; }
.hist-time { font-family: 'Noto Serif JP', serif; font-size: 10px; letter-spacing: 0.16em; color: #A08A72; margin-top: 4px; }
.hist-info { display: flex; flex-direction: column; gap: 10px; }
.hist-chain-eng { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 10.5px; letter-spacing: 0.28em; color: #B89556; margin-bottom: 4px; }
.hist-chain-name { font-family: 'Shippori Mincho B1', serif; font-weight: 500; font-size: clamp(15px,1.8vw,17px); letter-spacing: 0.14em; color: #5C3F25; margin: 0 0 6px; }
.hist-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hist-meta-label { font-family: 'Noto Serif JP', serif; font-size: 10px; letter-spacing: 0.16em; color: #A08A72; }
.hist-meta-sub { padding: 2px 10px; background: rgba(244, 210, 200, 0.35); border-radius: 999px; font-family: 'Shippori Mincho B1', serif; font-size: 11.5px; letter-spacing: 0.1em; color: #5C3F25; }
.hist-meta-score { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 11px; color: #B89556; }
.hist-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hist-view-btn { padding: 9px 18px; background: linear-gradient(135deg, #C9A961, #B89556); color: #FFFFFF; font-family: 'Shippori Mincho B1', serif; font-size: 11px; letter-spacing: 0.18em; border: 0; border-radius: 999px; }
.hist-view-btn:hover { transform: translateY(-1px); }
.hist-del-btn { background: none; border: 0; font-family: 'Noto Serif JP', serif; font-size: 10.5px; letter-spacing: 0.12em; color: #B0998A; padding: 3px 4px; }
.hist-del-btn:hover { color: #8B5C4A; }
.hist-empty { text-align: center; padding: 56px 22px; background: rgba(255, 251, 244, 0.6); border: 0.6px dashed rgba(201, 169, 97, 0.4); border-radius: 6px; }
.hist-empty-svg { margin: 0 auto 16px; opacity: 0.5; }
.hist-empty-text { font-family: 'Shippori Mincho B1', serif; font-size: clamp(13px,1.5vw,15px); letter-spacing: 0.08em; color: #6B5040; margin: 0 0 20px; line-height: 1.95; }
.hist-empty-cta { display: inline-flex; align-items: center; gap: 10px; padding: 12px 26px; background: linear-gradient(135deg, #C9A961 0%, #B89556 100%); color: #FFFFFF; font-family: 'Shippori Mincho B1', serif; font-size: 12px; letter-spacing: 0.2em; border: 0; border-radius: 999px; }
.hist-empty-cta:hover { transform: translateY(-1px); }
.hist-back-wrap { text-align: center; margin-top: 40px; }
.hist-back { display: inline-flex; align-items: center; gap: 10px; font-family: 'Shippori Mincho B1', serif; font-size: 12.5px; letter-spacing: 0.16em; color: #A88345; padding-bottom: 4px; border-bottom: 0.6px solid #C9A961; }
.hist-back:hover { color: #6B4225; }
.hist-back-arrow { font-family: serif; font-size: 14px; }

/* ============================================================
   Unified diagnosis additions (result hero "です" / star map / services)
   ============================================================ */
.result-hero-desu { font-family: 'Shippori Mincho B1', serif; font-weight: 500; font-size: clamp(15px,2vw,20px); letter-spacing: 0.2em; color: #8A6932; margin: -6px 0 22px; }

/* 5-chain star map */
.starmap-list { display: flex; flex-direction: column; gap: 12px; max-width: 480px; margin: 0 auto 30px; }
.starmap-row { display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; }
.starmap-name { font-family: 'Shippori Mincho B1', serif; font-size: clamp(13px,1.6vw,16px); letter-spacing: 0.1em; color: #5C3F25; min-width: 6em; text-align: right; }
.starmap-colon { color: #B89556; }
.starmap-stars { font-size: clamp(16px,2.4vw,21px); letter-spacing: 0.16em; line-height: 1; }
.starmap-row-top .starmap-name { color: #8A6932; font-weight: 600; }
.star-on { color: #C9A961; }
.star-off { color: rgba(201, 169, 97, 0.28); }

/* history: compact 5-chain star map */
.hist-starmap { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.hist-starmap-row { display: flex; align-items: center; gap: 3px; }
.hist-starmap-name { font-family: 'Shippori Mincho B1', serif; font-size: 11px; letter-spacing: 0.06em; color: #6B5040; min-width: 5em; }
.hist-starmap-stars { font-size: 12.5px; letter-spacing: 0.1em; line-height: 1; }

/* Services section */
.service-section { padding: clamp(28px,5vw,46px) clamp(18px,4vw,40px); background: rgba(255, 251, 244, 0.85); border: 0.6px solid rgba(201, 169, 97, 0.3); border-radius: 6px; margin-bottom: 26px; }
.service-head { text-align: center; margin-bottom: 28px; }
.service-kicker { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 12px; letter-spacing: 0.3em; color: #B89556; margin-bottom: 6px; }
.service-title { font-family: 'Shippori Mincho B1', serif; font-weight: 500; font-size: clamp(18px,2.6vw,24px); letter-spacing: 0.16em; color: #5C3F25; margin: 0; }
.service-list { display: flex; flex-direction: column; gap: 16px; max-width: 640px; margin: 0 auto; }
.service-card { padding: clamp(20px,3vw,28px) clamp(18px,3vw,26px); background: rgba(255, 250, 240, 0.7); border: 0.6px solid rgba(201, 169, 97, 0.3); border-radius: 6px; }
.service-card-main { border: 0.8px solid rgba(184, 149, 86, 0.5); background: linear-gradient(180deg, rgba(244, 210, 200, 0.20) 0%, rgba(255, 250, 240, 0.7) 100%); }
.service-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 6px; }
.service-name { font-family: 'Shippori Mincho B1', serif; font-weight: 600; font-size: clamp(15px,1.9vw,18px); letter-spacing: 0.08em; color: #5C3F25; }
.service-price { font-family: 'Shippori Mincho B1', serif; font-size: clamp(12.5px,1.5vw,14px); letter-spacing: 0.06em; color: #8A6932; white-space: nowrap; }
.service-price-free { color: #A8823C; }
.service-desc { font-family: 'Noto Serif JP', serif; font-size: clamp(12px,1.3vw,13px); letter-spacing: 0.04em; color: #6B5040; line-height: 1.95; margin: 6px 0 0; }
.service-line-wrap { text-align: center; margin-top: 18px; }
.service-line-note { margin: 12px 0 0; font-family: 'Noto Serif JP', serif; font-size: 11px; letter-spacing: 0.08em; color: #8A7060; }
.service-flow { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.flow-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: rgba(255, 253, 247, 0.75); border-radius: 4px; border-left: 2px solid #C9A961; font-family: 'Shippori Mincho B1', serif; font-size: clamp(12px,1.4vw,13.5px); letter-spacing: 0.04em; color: #5C3F25; line-height: 1.7; }
.flow-num { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, #E5C886, #B89556); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 12px; }
.service-note { text-align: center; margin: 20px 0 0; font-family: 'Noto Serif JP', serif; font-size: 10.5px; letter-spacing: 0.08em; color: #A08A72; }

/* ============================================================
   @media print  (verbatim behavior from original)
   ============================================================ */
@media print {
  @page { margin: 14mm; }
  html, body { background: #FFFFFF !important; }
  body * { animation: none !important; }
  header, [data-noprint] { display: none !important; }
  [aria-hidden="true"] { display: none !important; }
}

/* ============================================================
   @media (max-width: 760px)  (class-based equivalents)
   ============================================================ */
@media (max-width: 760px) {
  .sp-br { display: initial; }
  header { padding: 14px 16px !important; flex-wrap: wrap !important; gap: 12px 18px !important; }
  header nav { gap: 14px !important; font-size: 11px !important; flex-wrap: wrap !important; letter-spacing: 0.14em !important; }
  h1, h2, h3, h4 { text-wrap: balance !important; line-break: strict !important; }
  p { line-break: strict !important; }

  /* letter-spacing 0.32em → 0.18em (was [style*="letter-spacing: 0.32em"]): .brand-ja, .story-kicker */
  .brand-ja, .story-kicker { letter-spacing: 0.18em !important; text-indent: 0.18em !important; }
  /* letter-spacing 0.3em → 0.18em (was [style*="letter-spacing: 0.3em"]): .brand-en, .intro-note-kicker, .panel-kicker, .step-kicker */
  .brand-en, .intro-note-kicker, .panel-kicker, .step-kicker { letter-spacing: 0.18em !important; }
  /* letter-spacing 0.28em → 0.18em (was [style*="letter-spacing: 0.28em"]): .hist-chain-eng */
  .hist-chain-eng { letter-spacing: 0.18em !important; }
  /* letter-spacing 0.26em → 0.16em (was [style*="letter-spacing: 0.26em"]): .stat-label, .start-btn, .result-hero-sub, .chapter-label */
  .stat-label, .start-btn, .result-hero-sub, .chapter-label { letter-spacing: 0.16em !important; text-indent: 0 !important; }
  /* letter-spacing 0.25em → 0.16em (was [style*="letter-spacing: 0.25em"]): none present in Diagnosis */
  /* letter-spacing 0.24em → 0.14em (was [style*="letter-spacing: 0.24em"]): .result-hero-name, .bar-eng */
  .result-hero-name, .bar-eng { letter-spacing: 0.14em !important; text-indent: 0 !important; }
  /* letter-spacing 0.22em → 0.14em (was [style*="letter-spacing: 0.22em"]): .intro-title, .q-progress-label, .structure-tier, .line-btn */
  .intro-title, .q-progress-label, .structure-tier, .line-btn { letter-spacing: 0.14em !important; }

  /* a/button [style*="border-radius: 999px"] → nowrap + horizontal padding.
     Applies to every pill-shaped link/button. */
  a.start-btn, button.start-btn,
  a.line-btn, button.line-btn,
  a.dl-btn, button.dl-btn,
  a.structure-cta, button.structure-cta,
  a.session-restart, button.session-restart,
  a.session-history, button.session-history,
  a.session-nav, button.session-nav,
  a.result-dom-pill, button.result-dom-pill,
  a.hist-view-btn, button.hist-view-btn,
  a.hist-empty-cta, button.hist-empty-cta,
  a.hist-meta-sub, button.hist-meta-sub {
    white-space: nowrap !important; padding-left: 24px !important; padding-right: 24px !important;
  }
}
