@import url('https://fonts.googleapis.com/css2?family=BIZ+UDPGothic&family=BIZ+UDPMincho&family=Kiwi+Maru&family=Klee+One&family=Noto+Sans+JP:wght@400;700&family=Noto+Serif+JP:wght@400;700&family=Yomogi&display=swap');

:root {
  /* Color Matrix */
  --sg-navy: #1A237E;
  --sg-orange: #FF9800;
  --sg-linen: #FAF9F6;
  --sg-mint: #E8F5E9;
  --sg-btn-green: #4CAF50;

  /* Gradient */
  --color-gradient-akatsuki: linear-gradient(105deg, var(--sg-navy) 0%, var(--sg-orange) 100%);

  /* Typography */
  --sg-font-serif: "Ryumin R-KL", "BIZ UDPMincho", "Noto Serif JP", serif;
  --sg-font-sans: "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", "Noto Sans JP", sans-serif;
  --sg-font-hand: "Kiwi Maru", "Yomogi", "Klee One", cursive;

  /* Spacing & Surface */
  --line-height-base: 1.9;
  --sg-radius: 24px;
  --sg-glass-blur: 12px;
  --sg-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  --sg-line-height-narrative: 1.95;
  --sg-glass-bg: rgba(255, 255, 255, 0.35);
  --sg-glass-border: rgba(255, 255, 255, 0.4);

  /* Fluid Typography (Protocol 3/3: 4. 機能別ゴールライン) */
  --fs-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --fs-h1: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
  --fs-h2: clamp(1.5rem, 1.25rem + 1.25vw, 2.25rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.75vw, 1.75rem);
}

/* Reset */
* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: var(--sg-font-sans);
  background-color: var(--sg-linen);
  color: var(--sg-navy);
  line-height: var(--line-height-base);
  font-size: var(--fs-base);
}

/* Margin Cancellation (Protocol 3/3: 4. 余白の数学的統治) */
.sg-cassette {
  position: relative;
  width: 100%;
  margin: 60px 0;
}

.sg-cassette::after { content: ""; display: table; clear: both; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Common Components */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: var(--sg-radius);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn:active { transform: scale(0.96); }

.btn-line {
  background-color: var(--sg-btn-green);
  color: #fff;
  animation: pulse 4s infinite ease-in-out; /* Protocol 3/3: 4s cycle */
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(76, 175, 80, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

.handwritten { font-family: var(--sg-font-hand); }
.serif { font-family: var(--sg-font-serif); }

/* Dr. Owl Global Logic (Protocol 3/3: 4. ホスピタリティの義務化) */
.owl-mascot {
  position: absolute;
  width: 120px;
  height: 120px;
  object-fit: contain;
  animation: bouncingEntry 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 10;
}

/* Owl Sync: Global Mode Styles (フェーズ2: ステップ3) */
body.sn-mode-explanation { --sg-accent: var(--sg-navy); }
body.sn-mode-empathy { --sg-accent: var(--sg-orange); --sg-linen: #FAF9F6; }
body.sn-mode-one-point { --sg-accent: var(--sg-mint); }

/* Responsive Owl Logic */
@media (max-width: 767px) {
  .sg-cassette { margin: 40px 0; }
  .owl-mascot {
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    left: auto !important;
    display: block;
    margin: 20px auto;
    width: 100px;
  }
  .container { padding: 0 15px; }
  .hero-title { writing-mode: horizontal-tb; text-align: center; font-size: 2.5rem; }
}
