:root {
  --sofa-color: #c9b4a5; 
  --sofa-shadow: rgba(0, 0, 0, 0.18);
  --sofa-highlight: rgba(255, 255, 255, 0.4);
  --baran-green: #74c078;
}

.sofa-wrap {
  position: relative;
  width: 320px;
  height: 210px;
  margin: 50px auto;
}

.sofa-back-bear, .ear, .ear::before, .sofa-arm, .sofa-seat {
  background-color: var(--sofa-color);
}

.sofa-back-bear {
  position: absolute;
  top: 40px; left: 10px; right: 10px; bottom: 20px;
  border-radius: 60px 60px 20px 20px;
  z-index: 1;
  filter: brightness(0.97); 
}

.ear {
  position: absolute;
  top: -30px; width: 55px; height: 55px;
  border-radius: 50%; z-index: -1;
  box-shadow: inset 0 2px 4px var(--sofa-highlight);
}
.ear::before { content: ""; position: absolute; bottom: 0; width: 20px; height: 20px; }
.ear-l { left: 55px; }
.ear-l::before { right: -10px; bottom: 5px; border-radius: 0 0 0 100%; box-shadow: -5px 5px 0 5px var(--sofa-color); }
.ear-r { right: 55px; }
.ear-r::before { left: -10px; bottom: 5px; border-radius: 0 0 100% 0; box-shadow: 5px 5px 0 5px var(--sofa-color); }

.emoji-couple {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 104px;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,0.1));
  user-select: none;
}

.baran-cushion {
  width: 43px;
  height: 34px;
  background-color: var(--baran-green);
  box-shadow: 
    inset 0 10px 10px rgba(255,255,255,0.3), 
    inset 0 -5px 10px rgba(0,0,0,0.15);
  position: absolute;
  left: -70px;
  bottom: 1px;
  z-index: 4;
  border-radius: 6px;
  clip-path: polygon(0% 100%, 100% 100%, 100% 0%, 75% 45%, 50% 0%, 25% 45%, 0% 0%);
  filter: drop-shadow(2px 3px 4px rgba(0,0,0,0.2));
}

.hearts-container {
  position: absolute;
  width: 100px;
  height: 100%;
  top: -20px; 
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.css-heart {
  position: absolute;
  width: 12px;
  height: 12px;
  opacity: 0.5;
  background-color: #ff99aa;
  box-shadow: inset -1px 1px 2px rgba(255,255,255,0.7);
}
.css-heart::before, .css-heart::after {
  content: ""; position: absolute; width: 12px; height: 12px; background-color: inherit; border-radius: 50%;
}
.css-heart::before { top: -6px; left: 0; }
.css-heart::after { left: 6px; top: 0; }

.h1 { left: 0; top: 10px; scale: 0.8; animation: float1 3.5s ease-in-out infinite; }
.h2 { left: 50%; top: -10px; scale: 1.1; animation: float2 3s ease-in-out infinite; }
.h3 { right: 0; top: 5px; scale: 0.9; animation: float1 3s ease-in-out infinite; animation-delay: 0.5s; }

@keyframes float1 {
  0%, 100% { transform: rotate(-45deg) translateY(0); }
  50% { transform: rotate(-45deg) translateY(-10px); }
}
@keyframes float2 {
  0%, 100% { transform: translateX(-50%) rotate(-45deg) translateY(0); }
  50% { transform: translateX(-50%) rotate(-45deg) translateY(-10px); }
}

/* --- ミエルネット用・絵文字崩れ対策共通設定 --- */
.miel-emj {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
  line-height: 1 !important;
  text-indent: 0 !important;
  letter-spacing: normal !important;
}

/* --- 親要素のFlex干渉を遮断する修正 --- */
.cactus-area {
  position: relative;
  display: inline-block !important; 
  margin-right: -15px; 
  vertical-align: bottom;
}

.present-area {
  position: relative;
  display: inline-block !important; 
  vertical-align: bottom;
}

/* --- 各パーツのサイズ・配置の強制固定 --- */
.cactus {
  font-size: 45px !important;
  line-height: 1 !important;
  display: inline-block !important;
  position: relative;
  z-index: 1; 
}

.sweat-panic {
  position: absolute !important;
  top: 5px !important;
  left: -3px !important;
  font-size: 13px !important;
  width: 13px !important;
  height: 13px !important;
  line-height: 1 !important;
  z-index: 2;
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
  animation: sweat-shaking 0.8s infinite linear;
}

@keyframes sweat-shaking {
  0% { transform: scaleX(-1) rotate(-45deg) translate(0, 0); }
  25% { transform: scaleX(-1) rotate(-45deg) translate(1px, -1px); }
  75% { transform: scaleX(-1) rotate(-45deg) translate(-1px, 1px); }
  100% { transform: scaleX(-1) rotate(-45deg) translate(0, 0); }
}

/* 🍫 チョコ：ひよこや本の「後ろ（背面）」に隠すため、z-indexを1に下げました */
.chocolate {
  font-size: 20px !important;
  width: 20px !important;
  height: 20px !important;
  line-height: 1 !important;
  position: absolute !important;
  left: -11px !important;
  bottom: 13px !important;
  z-index: 1 !important;    
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
  animation: choco-push 1.2s ease-in-out infinite;
}

/* 🍫チョコ単体のアニメーション */
@keyframes choco-push {
  0%, 100% { transform: translate(0, 0) rotate(-15deg); }
  20% { transform: translate(0.5px, 0) rotate(-13deg); }       
  45% { transform: translate(-2px, -0.2px) rotate(-18deg); }   
  60% { transform: translate(-2.5px, -0.2px) rotate(-19deg); } 
  80% { transform: translate(0, 0) rotate(-15deg); }           
}

/* ひよこコンテナ：チョコより前に出すため z-index を 10 に固定 */
.chick-container {
  position: relative;
  display: inline-block !important; 
  right: 4px;
  z-index: 10 !important;
}

/* ひよこ本体：チョコの手前に重ねるため z-index を 15 に引き上げ */
.chick {
  font-size: 35px !important;
  line-height: 1 !important;
  display: inline-block !important;
  position: relative;
  z-index: 15 !important;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 1px rgba(0,0,0,0.2));
}

.comic-stack {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 35px;
  height: 11px;
}

.comic-step {
  position: absolute;
  width: 35px;
  height: 6px;
  border-radius: 1.5px;
  overflow: hidden;
  border: 0.5px solid rgba(0,0,0,0.1);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.book-top {
  bottom: 5.5px;
  left: 0;
  background-color: #ffd700;
  z-index: 3;
}

.book-bottom {
  bottom: 0;
  left: 2px;
  background-color: #4da6ff;
  z-index: 2;
}

.comic-pages {
  position: absolute;
  top: 1.5px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #fff;
  background-image: linear-gradient(
    to bottom,
    transparent 0.5px,
    #ccc 0.5px,
    #ccc 1px,
    transparent 1px,
    transparent 2px,
    #ccc 2px,
    #ccc 2.5px,
    transparent 2.5px
  );
}

.simple-ribbon {
  position: absolute;
  top: 1px;
  left: 33%;
  width: 10px;
  height: 8px;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
}
.simple-ribbon::before,
.simple-ribbon::after {
  content: "";
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}
.simple-ribbon::before {
  border-left: 6px solid #ff6688;
  margin-right: -1px;
  filter: drop-shadow(0 0 0.5px #e04a6d);
}
.simple-ribbon::after {
  border-right: 6px solid #ff6688;
  margin-left: -1px;
  filter: drop-shadow(0 0 0.5px #e04a6d);
}

.rabbit-cushion {
  width: 30px;
  height: 24px;
  border-radius: 15px 15px 12px 12px; 
  position: absolute;
  bottom: 0px; 
  box-shadow: inset -1px -1px 3px rgba(0,0,0,0.05), 1px 2px 4px rgba(0,0,0,0.1);
}
.rabbit-cushion::before, .rabbit-cushion::after {
  content: ""; position: absolute; top: -9px; width: 7px; height: 15px; background-color: inherit; border-radius: 10px 10px 0 0;
}
.rabbit-cushion::before { left: 5px; transform: rotate(-10deg); }
.rabbit-cushion::after { right: 5px; transform: rotate(10deg); }

.rabbit-cushion.white { background-color: #fffaf0; left: 100%; margin-left: 26px; z-index: 4; }
.rabbit-cushion.pink { background-color: #ffdce3; left: 100%; margin-left: 46px; z-index: 2; }

.sofa-arm {
  position: absolute;
  bottom: 10px; width: 45px; height: 100px;
  border-radius: 25px 25px 15px 15px;
  z-index: 4;
  box-shadow: 2px 5px 15px var(--sofa-shadow), inset 0 2px 5px var(--sofa-highlight);
}
.arm-l { left: 0; }
.arm-r { right: 0; }

.sofa-seat {
  position: absolute;
  bottom: 11px; left: 40px; right: 40px; height: 95px;
  border-radius: 25px; z-index: 4;
  box-shadow: 0 8px 15px var(--sofa-shadow), 0 -2px 10px rgba(0,0,0,0.05), inset 0 3px 6px var(--sofa-highlight), inset 0 -5px 10px rgba(0,0,0,0.05);
  display: flex; 
  align-items: flex-start;
  justify-content: center; 
  padding: 11px 30px;      
  box-sizing: border-box;
}

.sofa-text-container {
  width: 100%;
  color: #4e342e; 
  font-weight: bold; 
}

.sofa-title {
  font-size: 11px;
  text-align: center;
  width: 100%;
  margin-bottom: 1px; 
}

.sofa-list {
  font-size: 11px;
  text-align: left;
  line-height: 1.1;
  width: 100%;
}

.sofa-wrap::before, .sofa-wrap::after {
  content: ""; position: absolute; bottom: 2px;
  width: 16px; height: 15px; background: #3e2723;
  border-radius: 3px; z-index: 0;
}
.sofa-wrap::before { left: 60px; }
.sofa-wrap::after { right: 60px; }

/* ===================================================
   ソファの形を維持したまま、自慢のギンガムチェック柄を
   左右に50px、さらに下側にも50px分だけ長く広げるコード
   =================================================== */

.sofa-wrap {
  /* ① ソファ本体の表示サイズ（横320px・縦210px）は内側で100%完全に固定して歪ませません */
  width: 320px !important;
  height: 210px !important;
  box-sizing: content-box !important;

  /* ② チェック柄（ピンク×白）の設定（マス目30px） */
  background-color: #ffffff !important;
  background-image: 
    linear-gradient(90deg, rgba(255, 220, 227, 0.6) 50%, transparent 50%),
    linear-gradient(rgba(255, 220, 227, 0.6) 50%, transparent 50%) !important;
  background-size: 30px 30px !important;
  background-repeat: repeat !important;
  
  /* 💡【重要】左右に50pxずつ、さらに下側（bottom）にも50px分のチェック柄のエリアを拡張します */
  border-left: 50px solid transparent !important; 
  border-right: 50px solid transparent !important; 
  border-bottom: 10px solid transparent !important; 
  border-top: 0px solid transparent !important; /* 上側は伸ばさない */
  background-clip: border-box !important; 

  /* ④ 広げた左右50pxの分、全体の中心がズレるのを完全に相殺して中央に戻す設定 */
  margin-left: calc(50% - 210px) !important; 
  margin-right: calc(50% - 210px) !important; 

  /* ⑤ 拡張したチェック柄全体の角丸を設定 */
  border-radius: 20px !important;

  /* ⑥ 余計なぼかし影はなし */
  box-shadow: none !important;
}
