/* 2026 仔アルパカの名前決定ページ本文のスタイル
   ヘッダー・フッターは公式サイトの official/css/{reset,layout}.css をそのまま使う。
   公式の reset.css はスマホ幅で html の文字サイズを 1px にするため、ここでは rem を使わず px で指定する。
   コルクボードに、メモ用紙・付箋・ポラロイド写真をピンやマスキングテープで貼った「スクラップ」の見た目。
   色は仔アルパカの毛色のキャラメル・ミルク色と、お祝いの淡いピンク。 */
.ap {
  --navy: #023894;
  --brown: #5a3a1e;
  --caramel: #c27a3a;
  --caramel-deep: #9a5a24;
  --milk: #fff8ee;
  --paper: #fffdf6;
  --sand: #f6e6cf;
  --pink: #f2a7b5;
  --pink-pale: #fdeff1;
  --gold: #e9b44c;
  --frame: #8a5a2e;
  --text: #333;
  --line: #eadfce;
  /* マスキングテープ */
  --tape-pink: repeating-linear-gradient(45deg, rgba(242, 167, 181, .85) 0 6px, rgba(255, 240, 243, .85) 6px 12px);
  --tape-yellow: repeating-linear-gradient(90deg, rgba(233, 180, 76, .85) 0 8px, rgba(255, 246, 220, .85) 8px 16px);
  --tape-mint: repeating-linear-gradient(-45deg, rgba(143, 208, 192, .85) 0 6px, rgba(236, 249, 245, .85) 6px 12px);
  /* 押しピン */
  --pin-pink: radial-gradient(circle at 35% 30%, #fff 0 12%, #f48ca0 22%, #d9546e 70%, #a83a50 100%);
  --pin-yellow: radial-gradient(circle at 35% 30%, #fff 0 12%, #ffd66b 22%, #e9b44c 70%, #b98520 100%);
  --pin-mint: radial-gradient(circle at 35% 30%, #fff 0 12%, #8fd0c0 22%, #4fa892 70%, #2f7a68 100%);
  color: var(--text);
  font-size: 15px;
  line-height: 1.85;
  word-break: auto-phrase;
}
.ap *, .ap *::before, .ap *::after { box-sizing: border-box; }
.ap p, .ap li, .ap dt, .ap dd, .ap div, .ap span { line-height: inherit; }
.ap img { max-width: 100%; height: auto; display: block; }
.ap a { color: var(--navy); }
.ap h2, .ap h3, .ap h4, .ap strong, .ap b { font-weight: bold; }
.ap .heavy { font-family: "Noto Sans JP", sans-serif; font-weight: 900; }
.ap figure { margin: 0; }

/* 本文エリア(公式の #contents 内) */
#contents.ap { box-sizing: border-box; padding: 20px 20px 56px; }
.ap .blueTit01 { margin-bottom: 10px; line-height: 1.5; }

.ap-meta { display: flex; align-items: center; justify-content: space-between; margin: 0 0 18px; font-size: 13px; }
.ap-badge { background: #e57a95; color: #fff; padding: 1px 12px; }
.ap-meta time { color: #888; font-weight: bold; }

/* ===== コルクボード(本文全体の台紙) ===== */
.ap-cork {
  padding: 40px 36px 44px;
  border: 14px solid var(--frame);
  border-radius: 6px;
  background:
    radial-gradient(circle at 20% 30%, rgba(90, 50, 15, .22) 0 1px, transparent 2px) 0 0 / 9px 11px,
    radial-gradient(circle at 70% 60%, rgba(255, 235, 200, .35) 0 1px, transparent 2px) 0 0 / 13px 7px,
    radial-gradient(circle at 40% 80%, rgba(110, 60, 20, .18) 0 1.5px, transparent 2.5px) 0 0 / 17px 15px,
    linear-gradient(135deg, #c99a62 0%, #b98550 50%, #c49058 100%);
  box-shadow: inset 0 0 30px rgba(60, 30, 5, .35), 0 4px 0 #6b4420;
}

/* 貼りもの共通: 押しピン(.is-pin)・マスキングテープ(.is-tape) */
.ap .is-pin, .ap .is-tape { position: relative; }
.ap .is-pin::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -9px;
  left: 50%;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  border-radius: 50%;
  background: var(--pin-pink);
  box-shadow: 2px 4px 4px rgba(40, 20, 0, .45);
}
.ap .is-tape::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -13px;
  left: 50%;
  width: 110px;
  height: 26px;
  margin-left: -55px;
  transform: rotate(-3deg);
  background: var(--tape-pink);
  box-shadow: 0 1px 2px rgba(40, 20, 0, .2);
}

/* ポラロイド写真 */
.ap-polaroid {
  padding: 10px 10px 0;
  background: #fff;
  box-shadow: 0 6px 12px rgba(50, 25, 5, .35), 0 1px 2px rgba(50, 25, 5, .2);
}
.ap-polaroid figcaption {
  padding: 6px 4px 10px;
  text-align: center;
  color: var(--brown);
  font-family: "Yomogi", cursive;
  font-size: 18px;
  line-height: 1.5;
}

/* ===== メインビジュアル(大きなメモ用紙+ポラロイド) ===== */
.ap-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  align-items: center;
  gap: 36px;
  padding: 40px 36px 40px 44px;
  background:
    linear-gradient(90deg, transparent 30px, rgba(242, 167, 181, .5) 30px 32px, transparent 32px),
    repeating-linear-gradient(transparent 0 31px, rgba(194, 122, 58, .14) 31px 32px),
    var(--paper);
  box-shadow: 0 6px 14px rgba(50, 25, 5, .35);
  transform: rotate(-.6deg);
}
/* 左上・右上をテープで留める */
.ap-hero::before, .ap-hero::after {
  content: "";
  position: absolute;
  top: -12px;
  width: 120px;
  height: 28px;
  background: var(--tape-pink);
  box-shadow: 0 1px 2px rgba(40, 20, 0, .2);
}
.ap-hero::before { left: -24px; transform: rotate(-30deg); }
.ap-hero::after { right: -24px; transform: rotate(30deg); background: var(--tape-yellow); }
.ap-hero-kicker {
  display: inline-block;
  margin: 0 0 12px;
  padding: 2px 18px;
  background: var(--tape-mint);
  color: var(--brown);
  font-size: 14px;
  font-weight: bold;
  transform: rotate(-2deg);
}
.ap-hero-name {
  margin: 0 0 4px;
  color: var(--caramel-deep);
  font-size: 84px;
  line-height: 1.2;
  letter-spacing: 6px;
}
.ap-hero-name span { display: inline-block; line-height: 1.05; background: linear-gradient(transparent 68%, rgba(242, 167, 181, .55) 68% 92%, transparent 92%); padding: 0 8px; transform: rotate(-2deg); }
.ap-hero-sub { margin: 0 0 18px; color: var(--brown); font-weight: bold; font-size: 22px; }
.ap-hero-thanks { margin: 0; font-weight: bold; color: var(--brown); }
.ap-hero .ap-polaroid { transform: rotate(2.5deg); }

/* ===== もくじ(付箋) ===== */
.ap-index { margin: 34px 0 0; }
.ap-index ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 0; padding: 0; list-style: none; }
.ap-index a {
  display: block;
  padding: 8px 18px;
  background: #fff6c9;
  box-shadow: 0 3px 6px rgba(50, 25, 5, .3);
  color: var(--brown);
  font-weight: bold;
  font-size: 14px;
  text-decoration: none;
  transform: rotate(-2deg);
  transition: transform .2s;
}
.ap-index li:nth-child(2) a { background: var(--pink-pale); transform: rotate(1.5deg); }
.ap-index li:nth-child(3) a { background: #e6f6f0; transform: rotate(-1deg); }
/* 3個・2個の2段に並べる改行(4番目の li) */
.ap-index li.ap-index-br { flex-basis: 100%; height: 0; }
.ap-index li:nth-child(5) a { background: #e3f0fb; transform: rotate(2deg); }
.ap-index li:nth-child(6) a { background: #fff; transform: rotate(-1.5deg); }
.ap-index a::after { content: "\f107"; font-family: FontAwesome; padding-left: 8px; }
.ap-index a:hover { transform: rotate(0) translateY(-2px); }

/* ===== セクション共通(テープで留めたメモ用紙) ===== */
.ap-sec {
  position: relative;
  margin: 48px 0 0;
  padding: 34px 32px 32px;
  background: var(--paper);
  box-shadow: 0 6px 14px rgba(50, 25, 5, .3);
  scroll-margin-top: 110px;
}
.ap-sec::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -13px;
  left: 50%;
  width: 130px;
  height: 28px;
  margin-left: -65px;
  transform: rotate(-2deg);
  background: var(--tape-pink);
  box-shadow: 0 1px 2px rgba(40, 20, 0, .2);
}
#entrants::before { background: var(--tape-yellow); transform: rotate(2deg); }
#meet::before { background: var(--tape-mint); }
.ap-sec-title {
  margin: 0 0 22px;
  text-align: center;
  color: var(--caramel-deep);
  font-size: 26px;
  line-height: 1.45;
}
.ap-sec-title span { display: inline-block; padding: 0 0 4px; border-bottom: 4px dotted var(--pink); }
.ap-sec-title::before { content: "🦙"; display: block; font-size: 26px; line-height: 1.2; margin-bottom: 4px; }
.ap-lead { margin: 0 0 22px; text-align: center; font-weight: bold; color: var(--brown); }

.ap-split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }

/* 募集の結果(付箋) */
.ap-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin: 0; padding: 8px 6px 0; list-style: none; }
.ap-stats li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 130px;
  padding: 20px 10px 16px;
  background: #fff6c9;
  box-shadow: 0 4px 8px rgba(50, 25, 5, .22);
  text-align: center;
  transform: rotate(-2deg);
}
.ap-stats li:nth-child(2) { background: #e6f6f0; transform: rotate(1.5deg); }
.ap-stats li.is-name { background: var(--pink-pale); transform: rotate(-1deg); }
.ap-stat-name { color: var(--caramel-deep); font-family: "Yomogi", cursive; font-weight: bold; font-size: 17px; }
.ap-stat-num { margin-top: 4px; color: var(--caramel-deep); font-size: 34px; line-height: 1.25; }
.ap-stat-num small { font-size: 16px; margin-left: 2px; }
.ap-stats li.is-name .ap-stat-num { color: #d9546e; }
.ap-stat-date { margin-top: 6px; color: var(--brown); font-weight: bold; font-size: 16px; line-height: 1.6; }

/* プロフィール帳(リングとじの1ページ)・名前の由来(付箋) */
#profile::before { background: var(--tape-mint); transform: rotate(1.5deg); }
.ap-pb {
  position: relative;
  max-width: 880px;
  margin: 10px auto 0;
  padding: 26px 34px 34px 70px;
  border-radius: 14px;
  background:
    linear-gradient(rgba(242, 167, 181, .18) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(90deg, rgba(242, 167, 181, .18) 1px, transparent 1px) 0 0 / 20px 20px,
    #fff;
  border: 2px solid #f6cfd7;
  box-shadow: 0 4px 10px rgba(50, 25, 5, .15);
}
/* 左のとじ穴 */
.ap-pb::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 20px;
  width: 20px;
  background: radial-gradient(circle at 10px 10px, #e9dcc8 0 6px, #d8c4a6 7px, transparent 8px) 0 0 / 20px 40px repeat-y;
}
.ap-pb-head { margin: 0 0 22px; text-align: center; }
.ap-pb-head span {
  display: inline-block;
  padding: 4px 40px;
  background: var(--pink);
  color: #fff;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 6px;
  line-height: 1.5;
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 50%, 100% 100%, 0 100%, 14px 50%);
}
.ap-pb-top { display: grid; grid-template-columns: 250px 1fr; gap: 34px; align-items: center; }
.ap-pb-photo { text-align: center; transform: rotate(-3deg); }
.ap-pb-photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 8px solid #fff;
  box-shadow: 0 0 0 4px var(--pink), 0 6px 12px rgba(50, 25, 5, .25);
}
.ap-pb-photo figcaption { margin-top: 10px; color: #d9546e; font-family: "Yomogi", cursive; font-weight: bold; font-size: 24px; line-height: 1.3; }
.ap-pb-list { margin: 0; }
.ap-pb-list > div { display: grid; grid-template-columns: 196px 1fr; align-items: baseline; padding: 9px 4px; border-bottom: 2px dotted #f2c3cc; }
.ap-pb-list dt { color: var(--caramel-deep); font-family: "Yomogi", cursive; font-weight: bold; font-size: 16px; }
.ap-pb-list dd { margin: 0; color: var(--brown); font-weight: bold; font-size: 17px; }
.ap-pb-list dd small { font-size: 14px; }
.ap-pb-grow {
  display: inline-block;
  margin-left: 10px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--pink-pale);
  border: 1px solid var(--pink);
  color: #d9546e;
  font-family: "Yomogi", cursive;
  font-size: 14px;
  line-height: 1.7;
  transform: rotate(-3deg);
  white-space: nowrap;
}
.ap-pb .ap-origin { max-width: 640px; margin: 34px auto 0; }
.ap-origin {
  position: relative;
  padding: 26px 22px 22px;
  background: var(--pink-pale);
  box-shadow: 0 4px 10px rgba(50, 25, 5, .18);
  text-align: center;
  transform: rotate(1.2deg);
}
.ap-origin::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 100px;
  height: 24px;
  margin-left: -50px;
  transform: rotate(-3deg);
  background: var(--tape-yellow);
  box-shadow: 0 1px 2px rgba(40, 20, 0, .2);
}
.ap-origin-title { margin: 0 0 6px; color: #d9546e; font-family: "Yomogi", cursive; font-weight: bold; font-size: 20px; }
.ap-origin-lead { margin: 0 0 16px; color: var(--brown); font-weight: bold; }
.ap-origin-formula { display: flex; justify-content: center; align-items: flex-end; flex-wrap: wrap; gap: 8px; margin: 0; }
.ap-origin-parent { display: flex; flex-direction: column; align-items: center; padding: 4px 12px 6px; background: #fff; border-radius: 10px; box-shadow: 0 2px 4px rgba(50, 25, 5, .12); }
.ap-origin-parent small { color: #888; font-size: 12px; line-height: 1.4; }
.ap-origin-parent > span { color: #b9a58e; font-weight: bold; font-size: 22px; line-height: 1.4; }
.ap-origin-parent b { color: #d9546e; font-size: 1.25em; text-decoration: underline dotted var(--pink) 3px; text-underline-offset: 5px; }
.ap-origin-op { padding-bottom: 8px; color: var(--caramel); font-weight: bold; font-size: 22px; line-height: 1; }
.ap-origin-result { display: flex; align-items: flex-end; gap: 8px; }
.ap-origin-child { padding-bottom: 2px; color: #d9546e; font-size: 34px; line-height: 1.2; }

/* 応募者のニックネーム(ピンで留めた名札) */
.ap-names {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px 18px;
  max-width: 820px;
  margin: 0 auto;
  padding: 8px 0 0;
  list-style: none;
}
.ap-names li {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 60px;
  padding: 14px 14px 10px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 3px 6px rgba(50, 25, 5, .15);
  color: var(--brown);
  font-weight: bold;
  font-size: 17px;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
  transform: rotate(-1.5deg);
}
.ap-names li:nth-child(even) { transform: rotate(1.5deg); }
.ap-names li:nth-child(3n) { transform: rotate(-.5deg); }
.ap-names li.is-long { word-break: keep-all; }
/* 名札の上のピン(3色を順番に) */
.ap-names li::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: var(--pin-pink);
  box-shadow: 1px 3px 3px rgba(40, 20, 0, .35);
}
.ap-names li:nth-child(3n+2)::before { background: var(--pin-yellow); }
.ap-names li:nth-child(3n)::before { background: var(--pin-mint); }
.ap-names small { font-size: 13px; font-weight: normal; flex: none; }
.ap-notes { margin: 20px 0 0; padding: 0; list-style: none; font-size: 13px; color: #666; text-align: center; }

/* 会える場所(マザーファームツアーDX) */
.ap-meet .ap-split { grid-template-columns: 2fr 3fr; }
.ap-meet .ap-polaroid { transform: rotate(-2.5deg); }
.ap-meet .ap-polaroid img { aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 30%; }
.ap-meet .ap-polaroid.is-tape::before { background: var(--tape-yellow); }
.ap-meet p { margin: 0 0 12px; }
.ap-meet-lead { color: var(--brown); font-weight: bold; font-size: 20px; line-height: 1.6; }
.ap-meet-lead strong { color: var(--caramel-deep); font-size: 24px; background: linear-gradient(transparent 70%, rgba(242, 167, 181, .5) 70%); }
.ap-notes-left { margin: 0 0 18px; text-align: left; }
.ap-btn.ap-btn-main { margin: 0; background: var(--caramel); color: #fff !important; box-shadow: 0 3px 0 var(--caramel-deep); }
.ap-btn.ap-btn-main:hover { background: #d08848; }

/* マザーファームツアー20周年(ピンで留めたチラシ) */
.ap-ft20 {
  position: relative;
  display: flex;
  align-items: center;
  gap: 26px;
  max-width: 820px;
  margin: 40px auto 0;
  padding: 24px 28px;
  background:
    radial-gradient(circle 3px, rgba(255, 255, 255, .7) 0 100%, transparent 110%) 0 0 / 28px 28px,
    #e6f3fb;
  border: 3px dashed #7fb6dc;
  box-shadow: 0 4px 10px rgba(50, 25, 5, .18);
  transform: rotate(-.8deg);
}
.ap-ft20::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  border-radius: 50%;
  background: var(--pin-yellow);
  box-shadow: 2px 4px 4px rgba(40, 20, 0, .4);
}
.ap-ft20-badge {
  flex: none;
  display: grid;
  place-items: center;
  align-content: center;
  width: 108px;
  height: 108px;
  margin: 0;
  border-radius: 50%;
  background: #3a8bd8;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 0 0 5px #fff, 0 0 0 8px #ffd23f;
  transform: rotate(-8deg);
}
.ap-ft20-badge span { font-size: 50px; line-height: 1; color: #ffd23f; }
.ap-ft20-body { flex: 1; }
.ap-ft20-title { margin: 0 0 2px; color: #1f5f9e; font-size: 22px; line-height: 1.45; }
.ap-ft20-period { margin: 0 0 8px; color: var(--brown); font-weight: bold; font-size: 14px; }
.ap-ft20-period span { margin-left: 1em; }
.ap-ft20-list { margin: 0 0 14px; padding: 0; list-style: none; font-size: 14px; }
.ap-ft20-list li { position: relative; padding-left: 20px; }
.ap-ft20-list li::before { content: "🚜"; position: absolute; left: 0; font-size: 12px; }
.ap-btn.ap-btn-ft20 { margin: 0; background: #3a8bd8; color: #fff !important; box-shadow: 0 3px 0 #1f5f9e; }
.ap-btn.ap-btn-ft20:hover { background: #4f9ae0; }
.ap .sp-only { display: none; }
.ap .ap-nowrap { white-space: nowrap; }

/* ギャラリー(コルクボードに直接貼る) */
.ap-board { padding: 0; background: none; box-shadow: none; }
.ap-board::before { content: none; }
.ap-board .ap-sec-title,
.ap-board .ap-lead {
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  padding: 8px 22px;
  background: var(--paper);
  box-shadow: 0 2px 6px rgba(60, 30, 5, .25);
}
.ap-board .ap-sec-title { transform: rotate(-1.5deg); margin-bottom: 14px; }
.ap-board .ap-lead { transform: rotate(1deg); margin-bottom: 34px; font-size: 14px; }
.ap-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 30px; margin: 0; padding: 0 6px; list-style: none; }
.ap-gallery li { position: relative; }
.ap-gallery figure {
  padding: 10px 10px 0;
  background: #fff;
  box-shadow: 0 6px 12px rgba(50, 25, 5, .35), 0 1px 2px rgba(50, 25, 5, .2);
  transition: transform .2s;
}
.ap-gallery li:nth-child(6n+1) figure { transform: rotate(-3deg); }
.ap-gallery li:nth-child(6n+2) figure { transform: rotate(2deg); }
.ap-gallery li:nth-child(6n+3) figure { transform: rotate(-1.5deg); }
.ap-gallery li:nth-child(6n+4) figure { transform: rotate(2.5deg); }
.ap-gallery li:nth-child(6n+5) figure { transform: rotate(-2deg); }
.ap-gallery li:nth-child(6n+6) figure { transform: rotate(3deg); }
.ap-gallery li:hover figure { transform: rotate(0) scale(1.03); }
.ap-gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.ap-gallery figcaption {
  padding: 6px 4px 10px;
  text-align: center;
  color: var(--brown);
  font-family: "Yomogi", cursive;
  font-size: 18px;
  line-height: 1.5;
}
.ap-gallery li.is-tape::before { width: 96px; margin-left: -48px; top: -12px; transform: rotate(-4deg); }
.ap-gallery li.is-pin:nth-child(3)::before { background: var(--pin-yellow); }
.ap-gallery li.is-pin:nth-child(5)::before { background: var(--pin-mint); }
.ap-gallery li.is-tape:nth-child(4)::before { transform: rotate(5deg); background: var(--tape-yellow); }

/* ===== 締め(クラフト紙のカード) ===== */
.ap-closing {
  position: relative;
  margin: 52px 0 0;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  align-items: center;
  gap: 28px;
  padding: 30px 32px;
  background:
    radial-gradient(circle at 30% 40%, rgba(90, 50, 15, .12) 0 1px, transparent 2px) 0 0 / 7px 9px,
    #e9cfa5;
  box-shadow: 0 6px 14px rgba(50, 25, 5, .35);
  transform: rotate(.5deg);
}
.ap-closing::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 130px;
  height: 28px;
  margin-left: -65px;
  transform: rotate(2deg);
  background: var(--tape-mint);
  box-shadow: 0 1px 2px rgba(40, 20, 0, .2);
}
.ap-closing .ap-polaroid { transform: rotate(-3deg); }
.ap-closing .ap-polaroid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 30%; }
.ap-closing > div { text-align: center; }
.ap-closing h4 { margin: 0 0 8px; color: var(--caramel-deep); font-size: 26px; line-height: 1.5; }
.ap-closing p { margin: 0 0 18px; color: var(--brown); font-weight: bold; }
.ap-btn {
  display: inline-block;
  margin: 4px;
  padding: 12px 32px;
  border-radius: 10px;
  background: #fff;
  color: var(--brown) !important;
  font-weight: bold;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .15);
}
.ap-btn::before { content: "\f101"; font-family: FontAwesome; padding-right: 8px; }
.ap-btn:hover { background: var(--milk); }
.ap-closing .ap-btn:first-of-type { background: var(--caramel); color: #fff !important; box-shadow: 0 3px 0 var(--caramel-deep); }
.ap-closing .ap-btn:first-of-type:hover { background: #d08848; }

/* ===== スマホ・タブレット(公式サイトと同じ 768px で切替) ===== */
@media screen and (max-width: 768px) {
  #contents.ap { padding: 16px 12px 40px; }
  .ap { font-size: 14px; }
  .ap-cork { padding: 26px 12px 30px; border-width: 8px; }
  .ap .is-tape::before { width: 80px; height: 22px; margin-left: -40px; top: -11px; }
  .ap .is-pin::before { width: 18px; height: 18px; margin-left: -9px; top: -8px; }
  .ap-polaroid { padding: 6px 6px 0; }
  .ap-polaroid figcaption { padding: 4px 2px 6px; font-size: 15px; }

  .ap-hero { grid-template-columns: 1fr; gap: 18px; padding: 26px 16px 24px; text-align: center; transform: rotate(-.4deg); }
  .ap-hero::before, .ap-hero::after { width: 80px; height: 22px; top: -10px; }
  .ap-hero::before { left: -14px; }
  .ap-hero::after { right: -14px; }
  .ap-hero figure { order: -1; }
  .ap-hero .ap-polaroid { transform: rotate(1.5deg); }
  .ap-hero-name { font-size: 60px; letter-spacing: 4px; }
  .ap-hero-sub { font-size: 18px; margin-bottom: 12px; }
  .ap-hero-thanks { text-align: left; }

  .ap-index ul { gap: 10px; }
  .ap-index a { padding: 6px 12px; font-size: 13px; }

  .ap-sec { margin-top: 36px; padding: 28px 14px 24px; scroll-margin-top: 70px; }
  .ap-sec::before { width: 90px; height: 22px; margin-left: -45px; top: -11px; }
  .ap-sec-title { font-size: 21px; margin-bottom: 16px; }
  .ap-sec-title::before { font-size: 22px; }
  .ap-lead { text-align: left; }
  .ap-split { grid-template-columns: 1fr; gap: 20px; }

  .ap-stats { grid-template-columns: 1fr; gap: 20px; padding: 6px 8px 0; }
  .ap-stats li { flex-direction: row; gap: 12px; min-height: 0; padding: 16px 14px 12px; }
  .ap-stat-num, .ap-stat-date { margin-top: 0; }
  .ap-stat-num { font-size: 28px; }
  .ap-stat-date { font-size: 14px; }

  .ap-pb { padding: 20px 12px 24px 38px; }
  .ap-pb::before { left: 9px; top: 18px; bottom: 18px; width: 18px; background-size: 18px 36px; background-image: radial-gradient(circle at 9px 9px, #e9dcc8 0 5px, #d8c4a6 6px, transparent 7px); }
  .ap-pb-head span { font-size: 16px; padding: 3px 30px; }
  .ap-pb-top { grid-template-columns: 1fr; gap: 18px; }
  .ap-pb-photo { width: 190px; margin: 0 auto; }
  .ap-pb-photo figcaption { font-size: 20px; }
  .ap-pb-list > div { grid-template-columns: 1fr; padding: 7px 2px; }
  .ap-pb-list dt { font-size: 13px; }
  .ap-pb-list dd { font-size: 15px; }
  .ap-pb-grow { display: table; margin: 4px 0 2px; font-size: 13px; }
  .ap-pb .ap-origin { margin-top: 28px; }
  .ap-origin { padding: 24px 12px 18px; }
  .ap-origin-lead { text-align: left; }
  .ap-origin-formula { gap: 6px; }
  .ap-origin-parent { padding: 4px 8px 6px; }
  .ap-origin-parent > span { font-size: 18px; }
  .ap-origin-op { font-size: 18px; }
  .ap-origin-child { font-size: 28px; }
  .ap-origin-result { flex-basis: 100%; justify-content: center; }

  .ap-names { grid-template-columns: 1fr 1fr; gap: 18px 12px; padding: 6px 4px 0; }
  .ap-names li { min-height: 52px; padding: 12px 8px 8px; font-size: 15px; }
  .ap-names li.is-long { grid-column: span 2; }
  .ap-notes { text-align: left; }

  .ap-meet .ap-split { grid-template-columns: 1fr; }
  .ap-meet .ap-polaroid { width: 86%; margin: 0 auto; }
  .ap-meet .ap-polaroid img { aspect-ratio: 4 / 3; }
  .ap-meet-lead { font-size: 17px; text-align: center; }
  .ap-meet-lead strong { font-size: 20px; }
  .ap-ft20 { flex-direction: column; gap: 14px; margin-top: 32px; padding: 22px 14px 18px; text-align: center; }
  .ap-ft20-badge { width: 84px; height: 84px; font-size: 14px; }
  .ap-ft20-badge span { font-size: 38px; }
  .ap-ft20-title { font-size: 19px; }
  .ap-ft20-period { font-size: 13px; }
  .ap-ft20-period span { display: block; margin-left: 0; }
  .ap-ft20-list { display: inline-block; text-align: left; font-size: 13px; }
  .ap .sp-only { display: inline; }

  .ap-board { padding: 0; }
  .ap-board .ap-sec-title, .ap-board .ap-lead { padding: 6px 14px; }
  .ap-board .ap-lead { text-align: center; font-size: 13px; }
  .ap-gallery { grid-template-columns: 1fr 1fr; gap: 26px 16px; padding: 0 4px; }
  /* 2列でも似た写真が隣り合わないよう、全身→アップ / 牧草→全身 / 全身→アップ の順に */
  .ap-gallery li:nth-child(1) { order: 2; }
  .ap-gallery li:nth-child(2) { order: 1; }
  .ap-gallery li:nth-child(3) { order: 3; }
  .ap-gallery li:nth-child(4) { order: 4; }
  .ap-gallery li:nth-child(5) { order: 6; }
  .ap-gallery li:nth-child(6) { order: 5; }
  .ap-gallery figure { padding: 6px 6px 0; }
  .ap-gallery figcaption { padding: 4px 2px 6px; font-size: 14px; }
  .ap-gallery li.is-tape::before { width: 70px; height: 20px; margin-left: -35px; top: -10px; }

  .ap-closing { grid-template-columns: 1fr; gap: 18px; padding: 26px 16px 24px; }
  .ap-closing::before { width: 90px; height: 22px; margin-left: -45px; top: -11px; }
  .ap-closing .ap-polaroid { width: 86%; margin: 0 auto; }
  .ap-closing h4 { font-size: 20px; }
  .ap-btn { display: block; margin: 8px 0 0; padding: 12px 16px; font-size: 14px; }
}
