/* ========================================
   KIKIME Checker LP - Shared Styles
   ======================================== */

:root {
  --color-bg: #fafafa;
  --color-white: #ffffff;
  --color-text: #1a1a1a;
  --color-text-sub: #555555;
  --color-accent: #0d9488;
  --color-accent-light: #e6f5f3;
  --color-red: #c0392b;
  --color-green: #0d9488;
  --color-border: #e0e0e0;
  --color-section-alt: #f3f3f3;
  --max-width: 820px;
  --font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

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

.section {
  padding: 64px 24px;
}

.section--alt {
  background: var(--color-section-alt);
}

.section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ---- Typography ---- */

h1, h2, h3 {
  line-height: 1.4;
  font-weight: 700;
}

h1 {
  font-size: 2rem;
  margin-bottom: 16px;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--color-accent);
  display: inline-block;
}

h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  color: var(--color-accent);
}

p {
  margin-bottom: 16px;
  color: var(--color-text-sub);
}

ul, ol {
  margin-bottom: 16px;
  padding-left: 1.5em;
}

li {
  margin-bottom: 8px;
  color: var(--color-text-sub);
}

strong {
  color: var(--color-text);
}

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

.hero {
  text-align: center;
  padding: 120px 24px 100px;
  background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.55)), url('kikime-image.jpg') center/cover no-repeat;
  position: relative;
}

.hero__catch {
  font-size: 2.2rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 16px;
  line-height: 1.3;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero__sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 0;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.device-photo {
  max-width: 360px;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* ---- Problem ---- */

.problem__question {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Steps ---- */

.steps {
  display: flex;
  gap: 24px;
  margin-top: 24px;
}

.step {
  flex: 1;
  background: var(--color-white);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.step__title {
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text);
}

.step__desc {
  font-size: 0.9rem;
  color: var(--color-text-sub);
}

/* ---- Engine Cards ---- */

.engines {
  display: flex;
  gap: 24px;
  margin-top: 24px;
}

.engine-card {
  flex: 1;
  background: var(--color-white);
  border-radius: 12px;
  padding: 24px;
  border-left: 4px solid var(--color-accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.engine-card__title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--color-accent);
}

.engine-card__desc {
  font-size: 0.95rem;
  color: var(--color-text-sub);
  margin-bottom: 12px;
}

.engine-card__example {
  font-size: 0.85rem;
  color: #888;
  background: var(--color-section-alt);
  padding: 8px 12px;
  border-radius: 6px;
}

/* ---- Precision ---- */

.precision-grid {
  display: flex;
  gap: 24px;
  margin-top: 24px;
}

.precision-box {
  flex: 1;
  background: var(--color-white);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.precision-box__number {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--color-accent);
}

.precision-box__label {
  font-size: 0.9rem;
  color: var(--color-text-sub);
  margin-top: 4px;
}

.precision-link {
  text-align: center;
  margin-top: 24px;
}

.btn-whitepaper {
  display: inline-block;
  padding: 14px 32px;
  background: var(--color-accent);
  color: #ffffff !important;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1rem;
  transition: opacity 0.2s;
}

.btn-whitepaper:hover {
  opacity: 0.85;
}

/* ---- Feature Box ---- */

.feature-boxes {
  display: flex;
  gap: 24px;
  margin-top: 24px;
}

.feature-box {
  flex: 1;
  background: var(--color-white);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.feature-box__title {
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text);
}

.feature-box__desc {
  font-size: 0.95rem;
  color: var(--color-text-sub);
}

/* ---- Honesty ---- */

.honesty-list {
  list-style: none;
  padding-left: 0;
}

.honesty-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-sub);
}

.honesty-list li:last-child {
  border-bottom: none;
}

/* ---- Spec Table ---- */

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.spec-table th,
.spec-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  font-size: 0.95rem;
}

.spec-table th {
  width: 140px;
  color: var(--color-text);
  font-weight: 700;
  background: none;
}

.spec-table td {
  color: var(--color-text-sub);
}

.spec-price {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--color-text) !important;
}

.spec-tax {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-text-sub);
}

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

.footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 0.8rem;
  color: #999;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
}

/* ---- Whitepaper Page ---- */

.wp-header {
  text-align: center;
  padding: 48px 24px 32px;
  background: var(--color-section-alt);
}

.wp-header h1 {
  font-size: 1.8rem;
}

.wp-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
}

.wp-content h2 {
  margin-top: 48px;
}

.wp-content h3 {
  margin-top: 32px;
}

.wp-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.9rem;
}

.wp-content th,
.wp-content td {
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  text-align: left;
}

.wp-content th {
  background: var(--color-section-alt);
  font-weight: 700;
  color: var(--color-text);
}

.wp-content td {
  color: var(--color-text-sub);
}

.wp-back {
  display: inline-block;
  margin-top: 32px;
  color: var(--color-accent);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--color-accent);
}

.wp-back:hover {
  opacity: 0.7;
}

/* ---- Device Screen Mockup ---- */

.screen-row {
  display: flex;
  gap: 24px;
  margin-top: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.device-frame {
  width: 320px;
  background: #000;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.device-frame--wide {
  width: 100%;
  max-width: 420px;
}

.device-screen {
  background: #000;
  border-radius: 4px;
  padding: 12px 16px;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.85rem;
  line-height: 1.5;
  min-height: 160px;
}

.ds-header {
  color: #888;
  font-size: 0.7rem;
  text-align: center;
  margin-bottom: 4px;
}

.ds-item {
  color: #00cccc;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.ds-hr {
  border: none;
  border-top: 1px solid #444;
  margin: 8px 0;
}

.ds-question {
  color: #fff;
  text-align: center;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.ds-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.ds-btn {
  padding: 8px 20px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
}

.ds-btn--active {
  background: #e8c400;
  color: #000;
}

.ds-btn--inactive {
  background: #333;
  color: #888;
}

.ds-progress-bar {
  background: #444;
  border-radius: 4px;
  height: 10px;
  margin: 8px 0;
  overflow: hidden;
}

.ds-progress-fill {
  background: #00cccc;
  height: 100%;
  border-radius: 4px;
}

.ds-message {
  color: #fff;
  text-align: center;
  font-size: 0.85rem;
  margin-top: 12px;
}

.ds-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  margin-bottom: 4px;
}

.ds-label-red { color: #e74c3c; }
.ds-label-green { color: #0d9488; }

.t-green { color: #0d9488; }
.t-red { color: #e74c3c; }

.ds-engine-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.ds-engine-label {
  width: 50px;
  font-size: 0.7rem;
  color: #ccc;
}

.ds-engine-track {
  flex: 1;
  height: 14px;
  background: #333;
  border-radius: 3px;
  position: relative;
}

.ds-engine-center {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 14px;
  background: #555;
  transform: translateX(-1px);
}

.ds-engine-fill {
  position: absolute;
  top: 2px;
  height: 10px;
  border-radius: 2px;
}

.ds-engine-fill--right {
  left: 50%;
  background: #0d9488;
}

.ds-engine-fill--left {
  right: 50%;
  background: #e74c3c;
}

.ds-engine-fill--gray {
  left: 50%;
  background: #666;
}

.ds-engine-conf {
  width: 32px;
  text-align: right;
  font-size: 0.7rem;
  color: #aaa;
}

.ds-judgment {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 12px;
}

.ds-judgment--green { color: #0d9488; }
.ds-judgment--red { color: #e74c3c; }
.ds-judgment--gray { color: #666; }

.ds-footer {
  color: #555;
  font-size: 0.6rem;
  text-align: center;
  margin-top: 8px;
}

.screen-caption {
  text-align: center;
  font-size: 0.8rem;
  color: #999;
  margin-top: 8px;
}

.screen-caption strong {
  display: block;
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 2px;
}

/* ---- V8 Single ML Bar (中央起点・双方向) ---- */

.ds-mlbar-track {
  position: relative;
  height: 22px;
  background: #222;
  border-radius: 4px;
  margin: 10px 0 4px;
}

.ds-mlbar-center {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 22px;
  background: #fff;
  transform: translateX(-1px);
  z-index: 2;
}

.ds-mlbar-fill {
  position: absolute;
  top: 3px;
  height: 16px;
  border-radius: 3px;
}

.ds-mlbar-fill--right { left: 50%; background: #0d9488; }
.ds-mlbar-fill--left  { right: 50%; background: #e74c3c; }
.ds-mlbar-fill--gray  { left: 50%; background: #555; }

/* 確度% は実機と同じくバー先端の脇に表示 */
.ds-mlbar-pct {
  position: absolute;
  top: 0;
  left: 100%;
  margin-left: 4px;
  font-size: 0.7rem;
  line-height: 16px;
  color: #fff;
  white-space: nowrap;
}

.ds-mlbar-pct--left {
  left: auto;
  right: 100%;
  margin-left: 0;
  margin-right: 4px;
}

/* バー下部の左右ラベル（悪化／改善）— 実機はバーの下に配置 */
.ds-dir-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  margin-top: 4px;
}

/* ---- Confidence Growth Chart ---- */

.conf-chart {
  margin-top: 24px;
  text-align: center;
}

.conf-chart svg {
  max-width: 100%;
}

/* ---- 判定ステッパー（時間で確度が上がる） ---- */
.judge-axis {
  font-size: 0.85rem;
  color: var(--color-text-sub);
  margin-top: 4px;
}

.judge-stepper {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin-top: 16px;
}

.judge-step {
  flex: 1;
  background: var(--color-white);
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
  border-top: 4px solid #bbb;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.judge-step__label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text);
  margin-bottom: 4px;
}

.judge-step__desc {
  font-size: 0.78rem;
  color: var(--color-text-sub);
  line-height: 1.5;
}

.judge-step--gray    { border-top-color: #bbb; }
.judge-step--hint    { border-top-color: #7fcfc6; }
.judge-step--confirm { border-top-color: var(--color-accent); }
.judge-step--confirm .judge-step__label { color: var(--color-accent); }

.judge-arrow {
  align-self: center;
  flex: 0 0 auto;
  color: #bbb;
  font-size: 1.2rem;
}

.judge-branch {
  margin-top: 12px;
  padding-left: 8px;
  font-size: 0.85rem;
  color: var(--color-text-sub);
}

.judge-branch strong { color: var(--color-text); }

@media (max-width: 640px) {
  .judge-stepper { flex-direction: column; }
  .judge-arrow { transform: rotate(90deg); }
}

/* ---- Precision detail ---- */

.precision-box__detail {
  font-size: 0.75rem;
  color: #999;
  margin-top: 4px;
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .hero {
    padding: 80px 24px 60px;
  }

  .hero__catch {
    font-size: 1.6rem;
  }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }

  .steps,
  .engines,
  .precision-grid,
  .feature-boxes {
    flex-direction: column;
  }

  .section {
    padding: 40px 16px;
  }
}
