/* 案A「2003年ごろの PC の個人ホームページ」
   ・背景はタイル柄（自作の小さな SVG を並べる）
   ・中身は幅 780px の表組み風（800×600 の画面に収まる幅）
   ・スマホ（640px 以下）では1カラムにして、メニューはボタンの並びにする */

:root {
  --pink: #ff66b3;
  --pink-d: #e0007a;
  --pink-l: #ffe6f2;
  --navy: #000080;
  --ink: #222;
  --link: #0000ee;
  --visited: #800080;
  --gold: #c9a200;
  --face: #fff9fc;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "ＭＳ Ｐゴシック", "MS PGothic", Osaka, "DotGothic16", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  /* 自作タイル: 16×16 のドットのハートと小さな点 */
  background-color: #ffeef7;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' shape-rendering='crispEdges'%3E%3Cg fill='%23ffc2e0'%3E%3Crect x='3' y='4' width='2' height='1'/%3E%3Crect x='6' y='4' width='2' height='1'/%3E%3Crect x='2' y='5' width='7' height='2'/%3E%3Crect x='3' y='7' width='5' height='1'/%3E%3Crect x='4' y='8' width='3' height='1'/%3E%3Crect x='5' y='9' width='1' height='1'/%3E%3C/g%3E%3Cg fill='%23d9c8ff'%3E%3Crect x='21' y='20' width='1' height='3'/%3E%3Crect x='20' y='21' width='3' height='1'/%3E%3C/g%3E%3C/svg%3E");
  touch-action: manipulation;
}
a { color: var(--link); text-decoration: underline; }
a:visited { color: var(--visited); }
a:hover { color: #ff0000; }
b { font-weight: bold; }
.sp { display: none; }
.center { text-align: center; }
.note { font-size: 12px; color: #555; margin: 6px 0; }
svg.px { display: inline-block; vertical-align: middle; image-rendering: pixelated; }

.test-now { position: sticky; top: 0; z-index: 50; margin: 0; padding: 6px 10px; background: #ffff66; border-bottom: 2px solid #000; font-size: 12px; text-align: center; }

/* ===== 全体の箱（800×600 時代の幅） ===== */
.page {
  width: 780px;
  max-width: 100%;
  margin: 12px auto;
  background: var(--face);
  border: 3px double var(--pink-d);
  box-shadow: 4px 4px 0 #c79fbd;
}

/* ===== 看板 ===== */
.head { background: #fff; border-bottom: 3px double var(--pink-d); }
.head-meta { margin: 0; padding: 2px 8px; font-size: 11px; color: #666; text-align: right; background: var(--pink-l); border-bottom: 1px dotted var(--pink); }
.logo { margin: 0; padding: 14px 10px 8px; display: flex; align-items: center; justify-content: center; gap: 14px; font-weight: normal; }
.logo-text { display: flex; flex-direction: column; align-items: center; text-align: center; }
.logo-sub { font-size: 14px; color: var(--navy); letter-spacing: .1em; }
.logo-main {
  font-family: "DotGothic16", "ＭＳ Ｐゴシック", "MS PGothic", Osaka, sans-serif;
  font-size: 38px; /* 「メイド＆執事カフェ」で長くなったので 44→38（2026-11-02） */
  line-height: 1.15;
  color: #ff3399;
  letter-spacing: .04em;
  /* 平成の「影付き文字」: ぼかさず、白→紫の2段ずらし */
  text-shadow: 2px 2px 0 #fff, 4px 4px 0 #9933cc;
}
.logo-en { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 13px; color: #9933cc; }
.logo-dots { flex: none; padding: 4px; background: #fff; border: 2px solid var(--pink); }

/* 流れる文字（<marquee> の代わり。CSS で流す） */
.marquee { overflow: hidden; white-space: nowrap; background: var(--navy); color: #ffff00; font-size: 13px; padding: 3px 0; }
.marquee-track { display: inline-flex; animation: marquee 22s linear infinite; }
.marquee-track span { padding-right: 2em; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== 2カラム（table レイアウト風） ===== */
.layout { display: grid; grid-template-columns: 150px 1fr; }
.side { border-right: 2px dotted var(--pink); background: #fff3fa; padding: 10px 8px; }
.side-title { margin: 0 0 6px; text-align: center; color: #fff; background: var(--pink); border: 2px outset #ffb3d9; font-size: 13px; }
.menu { list-style: none; margin: 0 0 12px; padding: 0; }
.menu li { border-bottom: 1px dashed var(--pink); }
.menu a { display: block; padding: 6px 4px; min-height: 32px; font-size: 13px; }
.menu a:visited { color: var(--link); } /* メニューは紫にしない（読みやすさ優先） */
.side-box { border: 1px solid var(--pink); background: #fff; padding: 6px; text-align: center; font-size: 12px; }
.side-box p { margin: 4px 0; }
.side-sub { color: var(--pink-d); }

.content { padding: 12px 14px 4px; min-width: 0; }

/* ===== 箱と見出し ===== */
.box { background: #fff; border: 1px solid #ff99cc; padding: 0 12px 12px; margin: 0 0 6px; }
.h {
  margin: 0 -12px 10px;
  padding: 4px 8px;
  text-align: center;
  font-size: 15px;
  font-weight: bold;
  color: #fff;
  background: var(--pink);
  border-bottom: 2px solid var(--pink-d);
  /* 文字の縁どり（平成のタイトル画像っぽく） */
  text-shadow: 1px 1px 0 var(--pink-d), -1px -1px 0 var(--pink-d), 1px -1px 0 var(--pink-d), -1px 1px 0 var(--pink-d);
}
.h svg.px { margin: 0 4px; }
.h3 { margin: 16px 0 6px; text-align: center; font-size: 14px; color: var(--navy); border-bottom: 1px dashed var(--navy); }

/* 虹色の hr（くっきりした帯） */
hr.rainbow {
  height: 4px; border: 0; margin: 12px 0;
  background: linear-gradient(90deg, #ff0000 0 14%, #ff9900 14% 28%, #ffee00 28% 42%, #33cc33 42% 57%, #00ccff 57% 71%, #3366ff 71% 85%, #cc33ff 85% 100%);
}
/* ビー玉の区切り線（自作。丸に光の点） */
.beads {
  height: 16px; margin: 10px 0;
  background:
    radial-gradient(circle at 5px 5px, #fff 0 1.5px, transparent 2px) 0 0 / 20px 16px,
    radial-gradient(circle at 8px 8px, #ff66b3 0 5px, #c2006b 5.5px 7px, transparent 7.5px) 0 0 / 20px 16px;
  background-repeat: repeat-x;
}
.beads:nth-of-type(even) {
  background:
    radial-gradient(circle at 5px 5px, #fff 0 1.5px, transparent 2px) 0 0 / 20px 16px,
    radial-gradient(circle at 8px 8px, #66ccff 0 5px, #1f6fb0 5.5px 7px, transparent 7.5px) 0 0 / 20px 16px;
  background-repeat: repeat-x;
}
.stars { margin: 10px 0; text-align: center; color: #ff66b3; font-size: 13px; white-space: nowrap; overflow: hidden; letter-spacing: .05em; }

/* ===== TOP ===== */
.info { width: 100%; border-collapse: collapse; margin: 8px 0; }
.info th, .info td { border: 1px solid #ff99cc; padding: 6px 8px; text-align: left; vertical-align: middle; }
.info th { width: 6.5em; background: var(--pink-l); color: var(--pink-d); font-weight: normal; white-space: nowrap; }
.big { font-size: 18px; color: var(--navy); }
.tag { display: inline-block; padding: 0 6px; font-size: 12px; color: #fff; background: #ff3333; border: 1px solid #990000; }
.new { color: #ff0000; font-weight: bold; font-size: 12px; }
.blink { animation: blink 1.6s steps(1, end) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.counter-wrap { margin: 10px 0; padding: 8px; text-align: center; border: 1px dashed #999; background: #fafafa; }
.counter { margin: 0; font-size: 13px; }
.counter-num {
  display: inline-block; margin: 0 4px; padding: 1px 6px;
  font-family: "DotGothic16", "Courier New", monospace; font-size: 18px; letter-spacing: .15em;
  color: #33ff33; background: #000; border: 2px inset #666;
}
.counter-note { margin: 2px 0 0; font-size: 11px; color: #777; }
.kiriban { margin: 6px 0 0; color: #ff0000; font-weight: bold; font-size: 13px; }
.kiriban-rule { margin: 6px 0 0; font-size: 12px; color: #a0005a; }

/* 昔のボタン（Windows のでっぱったボタン風） */
.old-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 6px 16px;
  font: inherit; font-size: 14px; color: #000; text-decoration: none;
  background: #e6e6e6; border: 3px outset #f4f4f4; cursor: pointer;
}
.old-btn:visited { color: #000; }
.old-btn:active { border-style: inset; }
.old-btn-pink { background: #ffd1e8; border-color: #ffe6f2; color: #b0005a; font-weight: bold; }
.old-btn-pink:visited { color: #b0005a; }
.old-btn.is-off { color: #808080; background: #e6e6e6; border: 3px outset #f4f4f4; cursor: default; text-shadow: 1px 1px 0 #fff; }

/* ===== ABOUT ===== */
.steps { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.steps th { width: 2.2em; font-size: 22px; color: var(--pink); vertical-align: top; font-weight: bold; }
.steps td { border: 1px solid #ffb3d9; background: #fffafd; padding: 6px 10px; }
.steps p { margin: 2px 0; }
.step-head { color: var(--navy); font-weight: bold; }
.step-marks { display: flex; gap: 8px; margin-top: 6px !important; }
.mini { position: relative; width: 64px; height: 64px; border: 1px solid #ccc; background: #fff; }
.mini img { position: absolute; inset: 0; width: 100%; height: 100%; }
.mini-face { position: absolute; left: 13%; top: 9.5%; width: 74%; height: 74%; border-radius: 50%; background: #f4c6d8; } /* リングの丸の中（2026-11-02） */
.mini.is-butler .mini-face { background: #b9c3d8; }

/* ===== CAST ===== */
.role-tabs { display: flex; gap: 6px; justify-content: center; margin-bottom: 6px; }
.role-tab {
  min-width: 120px; min-height: 44px; padding: 4px 14px;
  font: inherit; font-size: 14px; background: #e6e6e6; border: 3px outset #f4f4f4; cursor: pointer; color: #000;
}
.role-tab[aria-pressed="true"] { border-style: inset; background: #ffd1e8; color: #b0005a; font-weight: bold; }
.role-tab[data-role="butler"][aria-pressed="true"] { background: #d6d6ff; color: var(--navy); }
.koji { margin: 6px 0; font-size: 12px; color: #6b5200; }
.nw { white-space: nowrap; }
.koji-mark {
  display: inline-block; padding: 1px 6px; margin-right: 4px; font-weight: bold; font-size: 12px; color: #000;
  background: #ffd700; border: 3px solid transparent;
  border-image: repeating-linear-gradient(-45deg, #ffd700 0 4px, #222 4px 8px) 3;
}

.cast-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.cast-table th { background: var(--navy); color: #fff; font-weight: normal; font-size: 12px; padding: 3px; border: 1px solid #fff; }
.cast-table td { border: 1px solid #ff99cc; padding: 6px; vertical-align: middle; }
.cast-table tr.is-butler td { border-color: #9999dd; }
.c-icon { width: 92px; }
.c-name { font-weight: bold; color: var(--pink-d); white-space: nowrap; }
.is-butler .c-name { color: var(--navy); }
.c-line { font-size: 13px; }
.c-btn { width: 150px; text-align: center; }
.cast-btn { font-size: 12px; padding: 4px 8px; width: 100%; }
.cast-icon { position: relative; display: block; width: 80px; height: 80px; background: #fff; }
.cast-face { position: absolute; left: 13%; top: 9.5%; width: 74%; height: 74%; object-fit: cover; object-position: 50% 0; } /* リングの丸の中・立ち絵は顔が上に来るように（2026-11-02） */
.cast-dot { display: flex; align-items: center; justify-content: center; background: #ffeef7; }
.is-butler .cast-dot { background: #eaeaff; }
.cast-dot svg { width: 48px; height: 48px; }
.cast-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.cast-full { position: absolute; inset: 0; width: 100%; height: 100%; } /* 着せ替えメーカーの枠つきアイコンをそのまま（2026-11-02） */
.empty { text-align: center; color: #777; }

/* ===== VOTE ===== */
.vote-btn { min-width: 260px; font-size: 16px; }
.awards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.award { text-align: center; padding: 8px; background: #fffbe6; border: 4px double var(--gold); }
.award.is-butler { background: #f0f0ff; border-color: #5a5ab0; }
.award p { margin: 2px 0; }
.award-label { font-size: 12px; color: #666; }
.award-title { font-size: 20px; font-weight: bold; color: #b8860b; text-shadow: 1px 1px 0 #fff3b0; }
.award.is-butler .award-title { color: var(--navy); text-shadow: none; }
.award-name { font-size: 12px; color: #555; }
.award-name.is-set { font-size: 16px; color: #ff0000; font-weight: bold; }

/* ===== BBS（2ちゃんねる風） ===== */
.bbs-note { font-size: 12px; color: #555; margin: 0 0 8px; }
.bbs { background: #efefef; border: 1px solid #ccc; padding: 4px 10px; }
.post { padding: 6px 0; border-bottom: 1px solid #ddd; }
.post:last-child { border-bottom: 0; }
.post p { margin: 0; }
.post-meta { font-size: 13px; }
.post-meta.res { margin-top: 6px !important; }
.nanashi { color: #008000; font-weight: bold; }
.kanri { color: #008000; font-weight: bold; }
.post-q, .post-a { margin: 2px 0 0 2em !important; }
.post-q { font-weight: bold; }
.anchor { color: var(--link); text-decoration: underline; }

/* ===== LINK ===== */
.links { margin: 8px 0; padding-left: 1.4em; }
.links a { display: inline-block; padding: 12px 0; }
.clap { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #ff99cc; text-align: center; }
.clap-msg { min-height: 1.6em; margin: 6px 0 0; color: var(--pink-d); font-weight: bold; }


/* ===== LINK: 過去のイベント ===== */
.ev-list { list-style: none; margin: 6px 0; padding: 0; }
.ev { border-bottom: 1px dotted #ff99cc; }
.ev-link { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 4px; text-decoration: none; }
.ev-link:hover { background: #fff3fa; }
.banner-img { display: block; flex: none; max-width: 100%; height: auto; image-rendering: pixelated; border: 0; }
.ev-text { display: flex; flex-direction: column; min-width: 0; }
.ev-name { text-decoration: underline; font-weight: bold; overflow-wrap: anywhere; }
.ev-period { font-size: 12px; color: #444; }
.ev-line { font-size: 12px; color: var(--pink-d); }
.ev.is-history .ev-name { color: var(--navy); }

/* ===== LINK: バナー置き場 ===== */
.bp-lead { color: var(--pink-d); font-weight: bold; margin: 4px 0; }
.bp-list { list-style: none; margin: 6px 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bp { border: 1px dashed #ff99cc; background: #fffafd; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.bp-size { margin: 0; font-size: 12px; color: #666; }
.banner-code {
  width: 100%; font-family: "Courier New", monospace; font-size: 11px; line-height: 1.4; resize: none;
  border: 2px inset #ddd; background: #fff; color: #000; padding: 4px; overflow-wrap: anywhere;
}
.copy-btn {
  min-width: 120px; min-height: 44px; padding: 4px 14px;
  font: inherit; font-size: 14px; color: #000; background: #e6e6e6; border: 3px outset #f4f4f4; cursor: pointer;
}
.copy-btn:active { border-style: inset; }
.copy-msg { margin: 0; min-height: 1.4em; font-size: 12px; color: var(--pink-d); text-align: center; }
.bp-rules { margin: 8px 0 0; font-size: 11px; color: #777; line-height: 1.7; }

/* ===== フッター ===== */
.foot { text-align: center; padding: 10px; border-top: 3px double var(--pink-d); background: #fff; }
.foot p { margin: 2px 0; }
.foot a { display: inline-block; padding: 12px 6px; }
.foot-small { font-size: 11px; color: #666; }
.foot-logo-wrap { display: inline-block; margin-top: 6px; padding: 6px 10px; background: var(--navy); border: 2px outset #6666cc; }
.foot-logo { display: block; height: auto; }

/* ===== キラキラ ===== */
.sparkle-layer { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.sparkle { position: absolute; font-size: 14px; line-height: 1; animation: sparkle .8s ease-out forwards; }
@keyframes sparkle {
  from { opacity: 1; transform: translate(0, 0) scale(1); }
  to { opacity: 0; transform: translate(6px, 18px) scale(.5); }
}

/* ===== スマホ（640px 以下）: 1カラム、メニューはボタンの並び ===== */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .sp { display: inline; }
  .pc { display: none !important; }
  .page { margin: 0; border-width: 0 0 3px; box-shadow: none; }
  .head-meta { text-align: center; }
  .logo { gap: 8px; padding: 12px 6px 8px; }
  .logo-main { font-size: clamp(20px, 7vw, 28px); text-shadow: 1px 1px 0 #fff, 2px 2px 0 #9933cc; }
  .logo-sub { font-size: 12px; }
  .logo-en { font-size: 11px; }
  .logo-dots { padding: 2px; }
  .logo-dots .hd-sprite { width: 48px; height: 48px; } /* 24マスの2倍（ドットがにじまない大きさ） */
  .logo-text { min-width: 0; }
  .layout { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 2px dotted var(--pink); padding: 8px; }
  .menu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0; }
  .menu li { border: 0; }
  .menu a {
    display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 4px;
    background: #fff; border: 2px outset #ffd1e8; font-size: 13px;
  }
  .content { padding: 10px 8px 4px; }
  .box { padding: 0 10px 10px; }
  .h { margin: 0 -10px 10px; font-size: 14px; }
  .info th { width: 5em; }
  .big { font-size: 16px; }

  /* キャストの表は、1人1枚のカードに組みかえる */
  .cast-table thead { display: none; }
  .cast-table, .cast-table tbody { display: block; }
  .cast-table tr {
    display: grid; grid-template-columns: 84px 1fr; grid-template-areas: "icon name" "icon line" "btn btn";
    gap: 2px 10px; padding: 8px; margin-bottom: 8px; border: 1px solid #ff99cc; background: #fffafd;
  }
  .cast-table tr.is-butler { border-color: #9999dd; background: #f7f7ff; }
  .cast-table td { border: 0; padding: 0; }
  .c-icon { grid-area: icon; width: auto; }
  .c-name { grid-area: name; align-self: end; white-space: normal; }
  .c-line { grid-area: line; align-self: start; }
  .c-btn { grid-area: btn; width: auto; margin-top: 6px; }
  .cast-btn { font-size: 14px; }
  .role-tab { flex: 1; min-width: 0; }

  .vote-btn { min-width: 0; width: 100%; }
  .awards { grid-template-columns: 1fr; }
  .post-q, .post-a { margin-left: 1em !important; }
  .ev-link { flex-direction: column; align-items: flex-start; gap: 4px; }
  .bp-list { grid-template-columns: 1fr; }
  .banner-code { font-size: 16px; } /* iPhone で拡大されないよう16px */
}

/* 動きを減らす設定: 流れる文字・点滅・キラキラを止める */
@media (prefers-reduced-motion: reduce) {
  .marquee { white-space: normal; text-align: center; }
  .marquee-track { animation: none; display: block; }
  .marquee-track span + span { display: none; }
  .blink { animation: none; }
  .sparkle-layer { display: none; }
}

/* BackStageとは？・アプリの入手先 */
.whatis { border: 1px dashed #ff99cc; background: #fffafd; padding: 6px 10px; margin: 8px 0 4px; }
.whatis-h { color: #000080; font-weight: bold; text-align: center; margin: 2px 0 6px; }
.whatis ul { margin: 4px 0; padding-left: 1.4em; }
.whatis li { margin: 2px 0; }
.store-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.store-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; background: #eee; color: #0000ee;
  border: 2px outset #ddd; text-decoration: underline; }
.store-links a:visited { color: #551a8b; }
.store-links.is-small a { min-height: 44px; font-size: 12px; }

.step-greet { color: #ff3399; font-weight: bold; margin-top: 4px; }

/* 目印の見本（通話OK がかぶさった見え方・2026-11-02） */
.step-marks .mark { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.step-marks .mark img { display: block; width: 96px; height: auto; border: 1px solid #ccc; background: #fff; }
.mark-cap { font-size: 12px; font-weight: bold; color: #ff3399; }
.mark.is-butler .mark-cap { color: #000080; }
.logo-and { display: block; font-size: .5em; margin-top: 2px; letter-spacing: .05em; } /* 執事カフェの名前（2026-11-02） */
.serif { color: #ff3399; font-weight: bold; } /* キャストのせりふ（2026-11-02） */
/* ドット絵のコマ送り（本体と同じ assets/px/*-anim.svg。ふつう・口あけ・まばたき・お辞儀2コマの5コマ）2026-11-02 */
.px-anim { display: inline-block; width: 32px; height: 32px; margin-right: 3px; vertical-align: middle; border: 1px solid #ff66aa; background: #fff no-repeat 0 0 / 500% 100%; image-rendering: pixelated; animation: px-talk 5s step-end infinite; }
.px-anim.px-b { animation-delay: -2.5s; }
@keyframes px-talk {
  0% { background-position-x: 0; } 4% { background-position-x: 75%; } 8% { background-position-x: 100%; }
  20% { background-position-x: 75%; } 24% { background-position-x: 0; }
  32% { background-position-x: 25%; } 36% { background-position-x: 0; } 40% { background-position-x: 25%; }
  44% { background-position-x: 0; } 48% { background-position-x: 25%; } 52% { background-position-x: 0; }
  80% { background-position-x: 50%; } 84% { background-position-x: 0; } 100% { background-position-x: 0; }
}
@media (prefers-reduced-motion: reduce) { .px-anim { animation: none; } }

/* ヘッダーのメイド・執事（2026-11-02）
   コマ送りで小芝居をする。メイド＝ぴょんぴょん跳ねてハート → まばたき → お辞儀 → おしゃべり
   執事＝まばたき → ゆっくり深いお辞儀 → キラッ → おしゃべり → そわそわ左右に。タップ・クリックすると3回跳ねる
   絵は本体と同じ assets/px/*-anim.svg（0%=ふつう 25%=口あけ 50%=まばたき 75%=浅いお辞儀 100%=深いお辞儀） */
.hd-chara { position: relative; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.hd-sprite { display: block; width: 72px; height: 72px; background: no-repeat 0 0 / 500% 100%; image-rendering: pixelated; animation: hd-maid 8s step-end infinite; }
.hd-butler .hd-sprite { animation-name: hd-butler; }
.hd-emote { position: absolute; left: 50%; top: -4px; opacity: 0; pointer-events: none; transform: translateX(-50%); animation: hd-heart 8s step-end infinite; }
.hd-emote svg { display: block; width: 14px; height: 14px; }
.hd-butler .hd-emote { left: auto; right: -6px; top: -6px; transform: none; animation-name: hd-kira; }
@keyframes hd-maid {
  0% { background-position-x: 0; transform: translateY(0); }
  8% { background-position-x: 25%; transform: translateY(-6px); } 11% { background-position-x: 0; transform: translateY(0); }
  14% { background-position-x: 25%; transform: translateY(-6px); } 17% { background-position-x: 0; transform: translateY(0); }
  32% { background-position-x: 50%; } 35% { background-position-x: 0; }
  50% { background-position-x: 75%; } 53% { background-position-x: 100%; } 64% { background-position-x: 75%; } 67% { background-position-x: 0; }
  80% { background-position-x: 25%; } 83% { background-position-x: 0; } 86% { background-position-x: 25%; } 89% { background-position-x: 0; }
  100% { background-position-x: 0; transform: translateY(0); }
}
@keyframes hd-heart {
  0% { opacity: 0; } 8% { opacity: 1; top: -4px; } 12% { top: -9px; } 16% { top: -14px; } 20% { top: -19px; } 24% { opacity: 0; top: -4px; } 100% { opacity: 0; }
}
@keyframes hd-butler {
  0% { background-position-x: 0; transform: translateX(0); }
  20% { background-position-x: 50%; } 23% { background-position-x: 0; }
  38% { background-position-x: 75%; } 42% { background-position-x: 100%; } 60% { background-position-x: 75%; } 64% { background-position-x: 0; }
  74% { background-position-x: 25%; } 77% { background-position-x: 0; } 80% { background-position-x: 25%; } 83% { background-position-x: 0; }
  90% { transform: translateX(-3px); } 92% { transform: translateX(3px); } 94% { transform: translateX(-3px); } 96% { transform: translateX(0); }
  100% { background-position-x: 0; transform: translateX(0); }
}
@keyframes hd-kira {
  0% { opacity: 0; } 64% { opacity: 1; } 67% { opacity: 0; } 70% { opacity: 1; } 73% { opacity: 0; } 100% { opacity: 0; }
}
/* さわったとき：口をあけて3回ぴょんぴょん＋ハート・キラキラ */
.hd-chara.is-poke .hd-sprite { animation: hd-poke .9s step-end; }
.hd-chara.is-poke .hd-emote { animation: hd-poke-emote .9s step-end; }
@keyframes hd-poke {
  0% { background-position-x: 25%; transform: translateY(-8px); } 15% { background-position-x: 0; transform: translateY(0); }
  30% { background-position-x: 25%; transform: translateY(-8px); } 45% { background-position-x: 0; transform: translateY(0); }
  60% { background-position-x: 25%; transform: translateY(-8px); } 75% { background-position-x: 0; transform: translateY(0); } 100% { background-position-x: 0; transform: translateY(0); }
}
@keyframes hd-poke-emote { 0% { opacity: 1; top: -6px; } 30% { top: -12px; } 60% { top: -18px; } 90% { opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hd-sprite, .hd-emote, .hd-chara.is-poke .hd-sprite, .hd-chara.is-poke .hd-emote { animation: none; } }
