/* ハムハムアイランド 共通スタイル v2（デンシランド式リデザイン） */
:root {
  --cream: #fff6e6;
  --cream-deep: #ffe8c2;
  --paper: #fffdf7;
  --orange: #f0913d;
  --orange-deep: #d96f1e;
  --brown: #4a2e1d;
  --brown-mid: #7a5a44;
  --pink: #f2679c;
  --pink-soft: #ffd9e6;
  --yellow: #ffcf3f;
  --green: #58b368;
  --blue: #5aa7d6;
  --white: #ffffff;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", sans-serif;
  background-color: var(--cream);
  /* 紙吹雪ドット（4色の小さな丸と四角を散らす） */
  background-image:
    radial-gradient(circle 3px at 40px 60px,  rgba(240,145,61,.35) 3px, transparent 4px),
    radial-gradient(circle 3px at 180px 140px, rgba(242,103,156,.28) 3px, transparent 4px),
    radial-gradient(circle 2px at 300px 40px,  rgba(88,179,104,.3) 2px, transparent 3px),
    radial-gradient(circle 2px at 120px 220px, rgba(90,167,214,.3) 2px, transparent 3px),
    radial-gradient(circle 3px at 260px 260px, rgba(255,207,63,.4) 3px, transparent 4px);
  background-size: 340px 300px;
  color: var(--brown);
  line-height: 2;
  font-weight: 500;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }
a { color: var(--orange-deep); }

/* ===== ヘッダー ===== */
.site-header {
  background: var(--paper);
  border-bottom: 3px solid var(--brown);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brown); }
.site-logo img { width: 42px; height: 42px; }
.site-logo .logo-text { font-size: 1.22rem; font-weight: 800; letter-spacing: 0.06em; }
.site-logo .logo-sub { font-size: 0.66rem; color: var(--brown-mid); display: block; line-height: 1.3; font-weight: 700; }
.header-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.header-nav a {
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--brown);
  background: var(--white);
  border: 2px solid var(--brown);
  border-radius: 999px;
  padding: 5px 14px;
  box-shadow: 0 3px 0 var(--brown);
  transition: transform 0.12s, box-shadow 0.12s;
}
.header-nav a:hover { transform: translateY(2px); box-shadow: 0 1px 0 var(--brown); background: var(--yellow); }

/* ===== ヒーロー ===== */
.hero {
  background: linear-gradient(180deg, #cfeafc 0%, #e3f4fb 55%, #f2f8f2 100%);
  padding: 48px 20px 0;
  text-align: center;
  position: relative;
}
.hero-frame { max-width: 780px; margin: 0 auto; position: relative; z-index: 2; }
.hero-kicker {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--orange-deep);
  margin-bottom: 10px;
}
.hero-kicker::before, .hero-kicker::after { content: "・"; color: var(--pink); }
.hero-logo {
  font-size: clamp(2.1rem, 7vw, 3.6rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.2;
  margin-bottom: 4px;
  text-shadow:
    3px 3px 0 #fff, -3px 3px 0 #fff, 3px -3px 0 #fff, -3px -3px 0 #fff,
    3px 0 0 #fff, -3px 0 0 #fff, 0 3px 0 #fff, 0 -3px 0 #fff;
}
.hero-logo .t { display: inline-block; transform: rotate(-3deg); }
.hero-logo .t:nth-child(2n) { transform: rotate(3deg) translateY(3px); }
.hero-logo .t.c1 { color: var(--orange); }
.hero-logo .t.c2 { color: var(--pink); }
.hero-logo .t.c3 { color: var(--green); }
.hero-logo .t.c4 { color: var(--blue); }
.hero-sub {
  display: inline-block;
  background: var(--brown);
  color: var(--cream);
  font-weight: 800;
  font-size: clamp(0.85rem, 2.5vw, 1.05rem);
  letter-spacing: 0.15em;
  border-radius: 999px;
  padding: 6px 22px;
  margin: 10px 0 0;
}
.hero-scene { position: relative; max-width: 900px; margin: -6px auto 0; }
.hero-scene svg { display: block; width: 100%; height: auto; }
.hero-scene .hero-hamu {
  position: absolute;
  left: 50%;
  bottom: 21%;
  transform: translateX(-50%);
  width: 24%;
  animation: hop 3s ease-in-out infinite;
}
@keyframes hop {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}
.anim-cloud1 { animation: drift 14s ease-in-out infinite alternate; }
.anim-cloud2 { animation: drift 18s ease-in-out infinite alternate-reverse; }
@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(34px); }
}
.anim-boat { animation: bob 4s ease-in-out infinite; transform-origin: 788px 344px; }
@keyframes bob {
  0%, 100% { transform: translate(788px,344px) rotate(-2deg); }
  50% { transform: translate(788px,340px) rotate(2deg); }
}
.anim-sun { animation: sunpulse 5s ease-in-out infinite; transform-origin: 795px 64px; }
@keyframes sunpulse {
  0%, 100% { transform: translate(795px,64px) scale(1); }
  50% { transform: translate(795px,64px) scale(1.05); }
}

/* ===== 波の区切り ===== */
.wave { display: block; width: 100%; height: 36px; }

/* ===== セクション共通 ===== */
.section { max-width: 940px; margin: 0 auto; padding: 44px 20px; }
.section-title { text-align: center; margin-bottom: 6px; }
.section-title .en {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.4em;
  color: var(--pink);
  font-weight: 800;
}
.section-title .ja {
  display: inline-block;
  font-size: clamp(1.35rem, 4vw, 1.8rem);
  font-weight: 800;
  position: relative;
  padding: 0 14px;
}
.section-title .ja::after {
  content: "";
  display: block;
  height: 8px;
  margin-top: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='8' viewBox='0 0 60 8'%3E%3Cpath d='M0 6 Q7.5 0 15 6 T30 6 T45 6 T60 6' fill='none' stroke='%23f0913d' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x bottom / 60px 8px;
}
.section-lead { text-align: center; color: var(--brown-mid); font-weight: 700; margin-bottom: 30px; }

/* ===== ABOUT ===== */
.about-box {
  background: var(--paper);
  border: 3px solid var(--brown);
  border-radius: 26px;
  box-shadow: 6px 6px 0 rgba(74,46,29,.15);
  padding: 30px 28px;
  display: flex;
  gap: 26px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.about-box img { width: 128px; flex-shrink: 0; }
.about-box p { flex: 1; min-width: 260px; }
.marker { background: linear-gradient(transparent 62%, var(--yellow) 62%, var(--yellow) 92%, transparent 92%); font-weight: 800; }

/* ===== エリアカード ===== */
.area-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.area-card {
  background: var(--paper);
  border: 3px solid var(--brown);
  border-radius: 22px;
  padding: 22px 20px 20px;
  text-decoration: none;
  color: var(--brown);
  position: relative;
  display: block;
  box-shadow: 5px 5px 0 var(--area-shadow, rgba(74,46,29,.15));
  transition: transform 0.12s;
}
a.area-card:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--area-shadow, rgba(74,46,29,.3)); }
.c-plan     { --area-color: #dfa62e;       --area-shadow: rgba(223,166,46,.45); }
.c-ai       { --area-color: var(--orange); --area-shadow: rgba(240,145,61,.45); }
.c-writing  { --area-color: var(--green);  --area-shadow: rgba(88,179,104,.45); }
.c-design   { --area-color: var(--pink);   --area-shadow: rgba(242,103,156,.45); }
.c-launch   { --area-color: #9b7ed9;       --area-shadow: rgba(155,126,217,.45); }
.c-marketing{ --area-color: var(--blue);   --area-shadow: rgba(90,167,214,.45); }
.area-card .area-no {
  position: absolute;
  top: -14px;
  left: 16px;
  background: var(--area-color);
  color: var(--white);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  border: 2px solid var(--brown);
  border-radius: 999px;
  padding: 2px 12px;
}
.area-card .area-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.area-card .area-head img { width: 58px; height: 58px; border-radius: 50%; border: 2px solid var(--area-color); object-fit: cover; background: var(--white); }
.area-card h3 { font-size: 1.08rem; font-weight: 800; line-height: 1.45; }
.area-card h3 .small { display: block; font-size: 0.72rem; color: var(--area-color); letter-spacing: 0.1em; }
.area-card p { font-size: 0.86rem; color: var(--brown-mid); line-height: 1.8; }
.area-card .status { display: inline-block; margin-top: 10px; font-size: 0.76rem; font-weight: 800; border-radius: 999px; padding: 2px 14px; border: 2px dashed var(--area-color); color: var(--area-color); }
.area-card .status.open { background: var(--area-color); color: var(--white); border-style: solid; }

/* ===== キャラクター ===== */
.chara-box {
  background: var(--paper);
  border: 3px solid var(--brown);
  border-radius: 26px;
  box-shadow: 6px 6px 0 rgba(74,46,29,.15);
  padding: 30px 26px;
  text-align: center;
}
.chara-main { display: flex; align-items: center; justify-content: center; gap: 26px; flex-wrap: wrap; margin-bottom: 8px; }
.chara-main img { width: 150px; }
.chara-main .chara-desc { max-width: 400px; text-align: left; }
.name-plate {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-weight: 800;
  border: 2px solid var(--brown);
  border-radius: 999px;
  padding: 2px 18px;
  margin-bottom: 8px;
}
.name-plate.p-komugi { background: var(--pink); }
.chara-sub { display: flex; align-items: center; justify-content: center; gap: 26px; flex-wrap: wrap; margin-top: 22px; padding-top: 22px; border-top: 2px dashed var(--cream-deep); }
.chara-sub img { width: 110px; }
.chara-faces { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.chara-faces figure { width: 70px; }
.chara-faces img { width: 60px; }
.chara-faces figcaption { font-size: 0.7rem; font-weight: 700; color: var(--brown-mid); }

/* ===== 記事ページ ===== */
.article { max-width: 720px; margin: 0 auto; padding: 40px 20px 60px; }
.ep-head { text-align: center; margin-bottom: 30px; }
.ep-label {
  display: inline-block;
  background: var(--area-color, var(--orange));
  color: var(--white);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  border: 2px solid var(--brown);
  border-radius: 999px;
  padding: 3px 20px;
}
.article h1 { font-size: clamp(1.4rem, 4.2vw, 2rem); font-weight: 800; line-height: 1.6; margin: 16px 0 10px; }
.article h1 .accent { color: var(--orange-deep); }
.article .article-lead { color: var(--brown-mid); font-weight: 700; font-size: 0.92rem; text-align: left; }
.article h2 {
  font-size: clamp(1.15rem, 3.4vw, 1.4rem);
  font-weight: 800;
  color: var(--area-color, var(--orange-deep));
  text-align: center;
  margin: 52px 0 24px;
}
.article h2::before, .article h2::after { content: "〜"; color: var(--pink); margin: 0 8px; }
.article > p { margin-bottom: 18px; }

/* ===== 会話（デンシランド式） ===== */
.talk {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: flex-start;
  margin: 26px 0;
}
.talk .face { width: 92px; }
.talk .face img { width: 92px; display: block; }
.talk .bubble {
  background: var(--white);
  border: 2.5px solid var(--brown);
  border-radius: 18px;
  padding: 18px 18px 12px;
  position: relative;
  margin-top: 10px;
  line-height: 1.9;
}
.talk .bubble::before {
  content: "";
  position: absolute;
  top: 26px;
  width: 0;
  height: 0;
  border: 9px solid transparent;
}
.talk .bubble::after {
  content: "";
  position: absolute;
  top: 27.5px;
  width: 0;
  height: 0;
  border: 7.5px solid transparent;
}
.talk .name {
  position: absolute;
  top: -12px;
  left: 14px;
  background: var(--pink);
  color: var(--white);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  border-radius: 999px;
  padding: 1px 12px;
  line-height: 1.7;
}
/* 左（こむぎ） */
.talk.is-left .bubble::before { left: -18px; border-right-color: var(--brown); }
.talk.is-left .bubble::after { left: -13.5px; border-right-color: var(--white); }
/* 右（ハム先生） */
.talk.is-right { grid-template-columns: 1fr 92px; }
.talk.is-right .face { order: 2; }
.talk.is-right .bubble { order: 1; }
.talk.is-right .bubble::before { right: -18px; border-left-color: var(--brown); }
.talk.is-right .bubble::after { right: -13.5px; border-left-color: var(--white); }
.talk.is-right .name { background: var(--orange); left: auto; right: 14px; }

/* ===== ポイント・まとめ ===== */
.point-box {
  background: var(--paper);
  border: 3px dashed var(--area-color, var(--orange));
  border-radius: 20px;
  padding: 20px 24px;
  margin: 30px 0;
}
.point-box .point-title { font-weight: 800; color: var(--area-color, var(--orange-deep)); margin-bottom: 6px; }
.point-box .point-title::before {
  content: "";
  display: inline-block;
  width: 20px; height: 20px;
  margin-right: 8px;
  vertical-align: -4px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cellipse cx='10' cy='10' rx='6' ry='9' transform='rotate(20 10 10)' fill='%23d96f1e'/%3E%3Cellipse cx='10' cy='10' rx='3.4' ry='6.5' transform='rotate(20 10 10)' fill='%23f8dcb4'/%3E%3C/svg%3E") no-repeat center / contain;
}
.point-box ul { padding-left: 1.4em; }
.point-box li { margin-bottom: 6px; }

/* まとめ = 黒板 */
.matome, .kokuban {
  background:
    radial-gradient(ellipse at 20% 30%, rgba(255,255,255,.05), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(255,255,255,.04), transparent 50%),
    linear-gradient(160deg, #3a6b57 0%, #2c5545 60%, #294f40 100%);
  border: 9px solid #a9713d;
  border-radius: 14px;
  box-shadow:
    0 5px 0 rgba(74,46,29,.35),
    inset 0 0 34px rgba(0,0,0,.28);
  padding: 10px 26px 20px;
  margin: 56px 0 34px;
  position: relative;
  color: #fdf6e3;
  font-family: "Yomogi", "M PLUS Rounded 1c", sans-serif;
}
.matome .matome-tag {
  display: inline-block;
  background: var(--yellow);
  color: var(--brown);
  border: 2px solid var(--brown);
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  border-radius: 6px;
  padding: 3px 22px;
  position: relative;
  top: -24px;
  transform: rotate(-2deg);
  box-shadow: 2px 3px 0 rgba(0,0,0,.25);
}
.matome ul { padding-left: 1.3em; margin-top: -6px; }
.matome li { margin-bottom: 12px; font-weight: 400; font-size: 1.02rem; line-height: 1.8; }
.matome li::marker { content: "\1F33B "; }
.matome li strong { font-weight: 400; color: var(--yellow); }
.matome-hamu, .kokuban .board-hamu { position: absolute; left: -24px; bottom: -30px; top: auto; right: auto; width: 78px; }
.matome::after, .kokuban::after {
  content: "";
  position: absolute;
  right: 28px;
  left: auto;
  bottom: -22px;
  width: 74px;
  height: 8px;
  background: linear-gradient(#fdf6e3, #e8ddc4);
  border: 2px solid #8b5a33;
  border-radius: 4px;
  transform: rotate(-1deg);
}

/* 進捗ドット（EPISODE n/10） */
.ep-dots { display: flex; justify-content: center; gap: 7px; margin-top: 14px; }
.ep-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--cream-deep);
  border: 2px solid var(--brown-mid);
  opacity: .45;
}
.ep-dots i.on {
  background: var(--area-color, var(--orange));
  border-color: var(--brown);
  opacity: 1;
}
.ep-dots i.now { transform: scale(1.35); }

/* エピソードナビ */
.ep-nav { display: flex; flex-direction: column; gap: 12px; margin-top: 40px; }
.ep-nav a, .ep-nav .disabled {
  display: block;
  background: var(--paper);
  border: 2.5px solid var(--brown);
  border-radius: 16px;
  box-shadow: 0 4px 0 var(--brown);
  padding: 14px 20px;
  text-decoration: none;
  color: var(--brown);
  font-weight: 800;
  transition: transform 0.12s, box-shadow 0.12s;
}
.ep-nav a:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--brown); }
.ep-nav .disabled { color: var(--brown-mid); background: var(--cream-deep); border-style: dashed; box-shadow: none; }
.ep-nav .dir { font-size: 0.72rem; color: var(--orange-deep); display: block; letter-spacing: 0.15em; }
.ep-nav .disabled .dir { color: var(--brown-mid); }

/* ===== エリアもくじページ ===== */
.area-index { max-width: 760px; margin: 0 auto; padding: 40px 20px 60px; }
.area-index-head { text-align: center; margin-bottom: 26px; }
.area-index-head .area-en {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.4em;
  color: var(--area-color, var(--orange));
  font-weight: 800;
}
.area-index-head h1 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); font-weight: 800; line-height: 1.5; }
.area-index-head h1 .accent { color: var(--area-color, var(--orange)); }
.course-list { display: flex; flex-direction: column; gap: 14px; margin-top: 26px; }
.course-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  align-items: center;
  background: var(--paper);
  border: 2.5px solid var(--brown);
  border-radius: 18px;
  padding: 16px 20px;
  text-decoration: none;
  color: var(--brown);
  box-shadow: 0 4px 0 var(--brown);
  transition: transform 0.12s, box-shadow 0.12s;
}
a.course-item:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--brown); }
.course-item .course-no {
  grid-row: span 2;
  background: var(--area-color, var(--orange));
  color: var(--white);
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-align: center;
  border: 2px solid var(--brown);
  border-radius: 14px;
  padding: 10px 8px;
  line-height: 1.4;
  min-width: 58px;
}
.course-item .course-no b { display: block; font-size: 1.15rem; line-height: 1.1; }
.course-item h3 { font-size: 1rem; font-weight: 800; line-height: 1.5; }
.course-item p { font-size: 0.8rem; color: var(--brown-mid); line-height: 1.6; }
.course-item.soon {
  border-style: dashed;
  box-shadow: none;
  background: var(--cream-deep);
}
.course-item.soon .course-no { background: var(--brown-mid); }
.course-item.soon h3 { color: var(--brown-mid); }
.course-item .soon-tag {
  grid-column: 2;
  justify-self: start;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--area-color, var(--orange));
  border: 2px dashed var(--area-color, var(--orange));
  border-radius: 999px;
  padding: 0 12px;
}

/* ===== フッター ===== */
.site-footer {
  background: var(--brown);
  color: #f5e8dc;
  text-align: center;
  padding: 34px 20px 30px;
  font-size: 0.8rem;
  position: relative;
}
.site-footer .foot-hamu { width: 64px; margin-bottom: 8px; }
.site-footer .foot-logo { font-weight: 800; font-size: 1rem; margin-bottom: 4px; letter-spacing: 0.1em; }
.site-footer a { color: var(--yellow); }

@media (max-width: 560px) {
  .talk { grid-template-columns: 64px 1fr; gap: 10px; }
  .talk .face, .talk .face img { width: 64px; }
  .talk.is-right { grid-template-columns: 1fr 64px; }
  .chara-main .chara-desc { text-align: left; }
  .matome-hamu, .kokuban .board-hamu { width: 72px; left: -14px; bottom: -20px; }
}

/* トップの黒板 */
.kokuban.top-board { max-width: 640px; margin: 40px auto 10px; text-align: center; padding: 26px 26px 24px; }
.kokuban .chalk-big { font-size: clamp(1.1rem, 3.2vw, 1.4rem); line-height: 2; }
.kokuban .chalk-big .c-line { background: linear-gradient(transparent 78%, rgba(255,207,63,.7) 78%, rgba(255,207,63,.7) 96%, transparent 96%); }
.kokuban .chalk-sign { font-size: 0.82rem; opacity: .8; margin-top: 6px; }

/* ランドマークSVGアイコン */
.area-svg { width: 58px; height: 58px; flex-shrink: 0; display: inline-block; }
.area-svg svg { width: 100%; height: 100%; display: block; }
.area-index-head .area-svg { width: 76px; height: 76px; margin: 14px auto 0; display: block; }
.ep-head .area-svg.ep-head-icon { width: 60px; height: 60px; display: block; margin: 0 auto 8px; }
