/* ========================================
   全国1位争奪戦 - デザイン実装
   ======================================== */

/* CSS変数定義 */
#beginner {
  --primary-color: #154520;
  --accent-color: #ffcd00;
  --text-color: #ffffff;
  --overlay-light: rgba(255, 255, 255, 0.11);
  --overlay-bubble: rgba(255, 255, 255, 0.2);
  --overlay-dark: rgba(0, 0, 0, 0.21);
  --border-radius: 6px;
  --border-radius-large: 30px;
  --font-family-primary: "Kiwi Maru", serif;
}

/* 全体コンテナ */
#beginner.beginner-content {
  background-color: var(--primary-color);
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 0;
  color: var(--text-color);
  font-family: var(--font-family-primary);
  line-height: 1.5;
}

/* ヘッダーセクション */
#beginner .beginner-header {
  padding: 0 0px;
  text-align: center;
}

#beginner .title-images {
  width: 100%;
}

#beginner .title-main,
#beginner .subtitle {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 10px;
}

/* キャラクター紹介セクション */
#beginner .character-intro {
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
}

#beginner .character-intro::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.24);
  pointer-events: none;
}

#beginner .character-title {
  font-size: 26px;
  font-weight: 500;
  color: var(--accent-color);
  margin: 0 0 20px 0;
  position: relative;
  z-index: 1; text-align:left;
}

/* トモキヨセクション */
#beginner .tomokiyo-section {
  text-align: center;
}

#beginner .character-main-image {
  margin: 20px 0;
  display: flex;
  justify-content: center;
}

#beginner .character-avatar-large {
  width: 314px;
  height: 473px;
  border-radius: var(--border-radius);
  object-fit: cover;
}

#beginner .character-description {
  background: var(--overlay-light);
  border-radius: var(--border-radius);
  padding: 20px;
  margin: 20px auto;
  max-width: 740px;
  position: relative;
  z-index: 1;
}

#beginner .character-name {
  font-size: 20px;
  font-weight: 500;
  color: var(--accent-color);
  margin: 0 0 10px 0; text-align:left;
}

#beginner .character-bio {
  font-size: 16px;
  line-height: 1.5;
  margin: 0; color:#FFF;
}

/* ムネカタセクション */
#beginner .munekata-section .character-layout {
  display: flex;
  gap: 20px;
  position: relative;
  z-index: 1;
}

#beginner .character-info {
  flex: 1; height: 473px;
}

#beginner .character-avatar-small {
  width: 100%;
  height: 473px;
  border-radius: var(--border-radius);
  object-fit: cover;
  margin-bottom: 20px;
}

#beginner .character-images {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#beginner .game-screenshot {
  width: 100%;
  height: 231px;
  border-radius: var(--border-radius);
  object-fit: cover;
}

/* 対話セクション */
#beginner .conversation-section {
  padding: 20px;
}

#beginner .conversation-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 15px;
}

/* 右側の吹き出しの場合、キャラクター画像を右に配置 */
#beginner .conversation-item.right-conversation {
  flex-direction: row-reverse;
}

/* キャラクター円形アバター */
#beginner .character-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

#beginner .character-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 吹き出し */
#beginner .conversation-bubble {
  background: var(--overlay-bubble);
  border-radius: var(--border-radius);
  padding: 20px;
  min-height: 64px;
  display: flex;
  align-items: center;
  position: relative;
  max-width: 618px;
}

#beginner .conversation-bubble.right {
  margin-left: auto;
}

#beginner .conversation-bubble.left {
  margin-right: auto;
}

#beginner .conversation-bubble p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5; color: #FFF;
}

#beginner .conversation-bubble .large-text {
  font-size: 24px;
  font-weight: 500;
  text-align: center;
}

/* 説明画像とインターフェース画像 */
#beginner .explanation-images,
#beginner .interface-images {
  text-align: center;
  margin: 40px 0;
}

#beginner .interface-image {
  width: 100%;
  max-width: 519px;
  height: auto;
  border-radius: var(--border-radius);
  margin: 40px auto;
  display: block;
}

#beginner .time-notice {
  font-size: 26px;
  font-weight: 500;
  color: var(--accent-color);
  text-align: center;
  margin: 20px 0;
}

/* フッターセクション */
#beginner .footer-section {
  background: var(--overlay-dark);
  padding: 40px 20px;
  text-align: center;
  margin-top: 40px;
}

#beginner .more-info-title {
  font-size: 26px;
  font-weight: 500;
  color: var(--accent-color);
  margin: 0 0 30px 0; text-align: center;
}

#beginner .cta-button {
  display: flex;
  justify-content: center;
}

#beginner .btn-primary {
  background: var(--accent-color);
  color: #000000;
  text-decoration: none;
  padding: 20px 40px;
  border-radius: var(--border-radius-large);
  font-size: 20px;
  font-weight: 500;
  display: inline-block;
  transition: opacity 0.3s ease;
  min-width: 331px;
  text-align: center;
}

#beginner .btn-primary:hover {
  opacity: 0.9;
}

/* レスポンシブ対応 - ブレイクポイント 700px */
@media screen and (max-width: 700px) {
  
  /* 基本レイアウト調整 */
  #beginner.beginner-content {
    padding: 0 0px;
  }

  #beginner .character-intro {
    padding: 15px;
  }

  /* フォントサイズ調整 */
  #beginner .character-title {
    font-size: 22px;
  }

  #beginner .character-name {
    font-size: 18px;
  }

  #beginner .character-bio {
    font-size: 14px;
  }

  #beginner .conversation-bubble p {
    font-size: 14px;
  }

  #beginner .conversation-bubble .large-text {
    font-size: 20px;
  }

  #beginner .time-notice {
    font-size: 22px;
  }

  #beginner .more-info-title {
    font-size: 22px;
  }

  /* キャラクター画像調整 */
  #beginner .character-avatar-large {
    width: 100%;
    max-width: 280px;
    height: auto;
    aspect-ratio: 314/473;
  }

  /* ムネカタセクションをモバイル向けに調整 */
  #beginner .munekata-section .character-layout {
    flex-direction: column;
    gap: 15px;
  }

  #beginner .character-avatar-small {
    width: 100%;
    max-width: 250px;
    height: auto;
    /*aspect-ratio: 314/473;*/
    margin: 0 auto 15px;
    display: block;
    object-fit: cover; object-position: center;
  }

  #beginner .game-screenshot {
    height: auto;
    aspect-ratio: 415/231;
  }

  /* 対話セクション調整 */
  #beginner .conversation-item {
    /*flex-direction: column;
    align-items: center;*/
    text-align: center;
    gap: 10px;
  }

  #beginner .character-circle {
    width: 80px;
    height: 80px;
  }

  #beginner .conversation-bubble {
    max-width: 100%;
    margin: 0;
  }

  /* CTAボタン調整 */
  #beginner .btn-primary {
    min-width: auto;
    width: 100%;
    max-width: 300px;
    font-size: 18px;
    padding: 15px 30px;
  }

  #beginner .footer-section {
    padding: 30px 15px;
  }
}

/* 極小画面対応 (480px以下) */
@media screen and (max-width: 480px) {
  
  #beginner .character-title {
    font-size: 20px;
  }

  #beginner .conversation-bubble p {
    font-size: 13px;
  }

  #beginner .conversation-bubble .large-text {
    font-size: 18px;
  }

  #beginner .character-bio {
    font-size: 13px;
  }

  #beginner .btn-primary {
    font-size: 16px;
    padding: 12px 25px;
  }

  #beginner .more-info-title {
    font-size: 20px;
  }

  #beginner .time-notice {
    font-size: 20px;
  }
}

/* アニメーション効果 */
#beginner .conversation-item {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

#beginner .conversation-item:nth-child(1) { animation-delay: 0.1s; }
#beginner .conversation-item:nth-child(2) { animation-delay: 0.2s; }
#beginner .conversation-item:nth-child(3) { animation-delay: 0.3s; }
#beginner .conversation-item:nth-child(4) { animation-delay: 0.4s; }
#beginner .conversation-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* アクセシビリティ改善 */
#beginner .btn-primary:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

#beginner .character-circle:focus-within {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* 印刷対応 */
@media print {
  #beginner.beginner-content {
    background: white;
    color: black;
  }
  
  #beginner .character-title,
  #beginner .character-name,
  #beginner .time-notice,
  #beginner .more-info-title {
    color: #333;
  }
  
  #beginner .character-description,
  #beginner .conversation-bubble {
    background: #f5f5f5;
    border: 1px solid #ddd;
  }
}

/* 画像フォールバック対応 */
#beginner img {
  background-color: #333;
  background-image: 
    linear-gradient(45deg, transparent 25%, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.1) 50%, transparent 50%, transparent 75%, rgba(255,255,255,0.1) 75%),
    linear-gradient(45deg, transparent 25%, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.1) 50%, transparent 50%, transparent 75%, rgba(255,255,255,0.1) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  display: block;
  position: relative;
}

/* タイトル画像のプレースホルダー */
#beginner .title-main::before {
  content: '湾岸マキシ全国1位争奪戦 2025 - メインタイトル';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--accent-color);
  color: #000;
  padding: 20px;
  border-radius: var(--border-radius);
  font-weight: bold;
  text-align: center;
  z-index: 1;
  width: 90%;
  box-sizing: border-box;
}

#beginner .subtitle::before {
  content: '副題プレースホルダー';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--accent-color);
  color: #000;
  padding: 15px;
  border-radius: var(--border-radius);
  font-weight: bold;
  text-align: center;
  z-index: 1;
  width: 80%;
  box-sizing: border-box;
  font-size: 14px;
}

/* キャラクター画像のプレースホルダー */
#beginner .character-avatar-large::before,
#beginner .character-avatar-small::before {
  content: 'キャラクター画像';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 205, 0, 0.9);
  color: #000;
  padding: 10px;
  border-radius: var(--border-radius);
  font-weight: bold;
  text-align: center;
  z-index: 1;
  white-space: nowrap;
}

/* ゲーム画面のプレースホルダー */
#beginner .game-screenshot::before,
#beginner .interface-image::before {
  content: 'ゲーム画面プレースホルダー';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-color);
  padding: 20px;
  border-radius: var(--border-radius);
  font-weight: bold;
  text-align: center;
  z-index: 1;
  border: 2px dashed rgba(255, 255, 255, 0.5);
}

/* 円形アバターのプレースホルダー */
#beginner .character-circle img::before {
  content: '👤';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 40px;
  z-index: 1;
}

