/* Pet Mode · Thai Kawaii Pet Festival (pastel pink, soft purple, cream, soft gold, mint) */
.pet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pet-head h2 { margin: 0; }
.pet-sub { margin: 4px 0 0; color: #8d7a90; font-size: .88rem; }
.pet-eco { margin: 10px 0 12px; max-width: none; text-align: left; }

/* intro */
.pet-intro { text-align: center; padding: 6px 0 4px; }
.pet-intro-art { display: flex; justify-content: center; gap: 4px; }
.pet-intro-art svg { width: 86px; height: 86px; }
.pet-intro-text { margin: 6px auto 12px; max-width: 460px; color: #6b5a76; font-size: .9rem; line-height: 1.6; }
.pet-intro-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; }

/* creator */
.pet-grid { display: grid; gap: 14px; }
.pet-stagebox {
  background: radial-gradient(circle at 50% 30%, #fff 0, #fff4f9 55%, #f3ecff 100%); border: 1.5px solid #f3dcea;
  border-radius: 24px; padding: 12px; text-align: center;
}
.pet-preview { width: min(220px, 60vw); aspect-ratio: 1; margin: 0 auto; }
.pet-preview svg { width: 100%; height: 100%; display: block; }
.pet-nametag { margin: 0 0 10px; font: 700 1.05rem "Mali", sans-serif; color: #8a4f9e; }
.pet-add.on { background: linear-gradient(135deg, #7ccfa3, #5fb38a); }
.pet-kt { display: none; }   /* the river above already shows the krathong with the pet */
.pet-kt svg { width: 100%; height: auto; display: block; }
.pet-more { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.pet-more .sm { display: none; }
.pet-controls .mini-label { margin-top: 12px; font-weight: 700; color: #51417e; }
.pet-controls .mini-label:first-child { margin-top: 0; }
.mini-sub { margin: 8px 0 4px; font-size: .78rem; color: #9a86a8; }
.pet-species { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.pet-sp {
  border: 1.5px solid #f0dcea; background: #fff; border-radius: 18px; padding: 6px 4px 8px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px; font: 600 .78rem "Mali", sans-serif; color: #5d4c68;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.pet-sp svg { width: 56px; height: 56px; }
.pet-sp small { display: block; font: 500 .62rem "IBM Plex Sans Thai", sans-serif; color: #a593b0; }
.pet-sp span { line-height: 1.2; text-align: center; }
.pet-sp:hover { transform: translateY(-2px); }
.pet-sp[aria-pressed="true"] { border-color: #ff83a9; box-shadow: 0 0 0 4px rgba(255, 131, 169, .18); background: #fff6fa; }
.pet-controls .chip small { color: #a593b0; font-weight: 500; }
.dot.odd { background-size: 100% 100%; }
.pet-tools { display: flex; justify-content: space-between; margin-top: 12px; }
.link.danger { color: #c0566b; }
.pet-welfare { margin-top: 12px; font-size: .78rem; background: #fff8ef; border-radius: 14px; padding: 8px 12px; }

/* phones: a compact preview strip that stays in view while the options scroll (its own wrapper, no nav inside) */
@container sheet (max-width: 719px) {
  .pet-stagebox {
    position: sticky; top: 8px; z-index: 3; display: grid; grid-template-columns: 92px 1fr; gap: 4px 10px;
    align-items: center; text-align: left; padding: 8px 10px; box-shadow: 0 8px 20px rgba(60, 30, 90, .12);
  }
  .pet-preview { width: 92px; grid-row: span 4; }
  .pet-nametag { margin: 0; font-size: .95rem; }
  .pet-add { padding: 7px 12px; font-size: .8rem; min-height: 0; width: auto; justify-self: start; white-space: nowrap; }
  .pet-nametag { justify-self: start; }
  .pet-kt { display: none; }
  #petRemoveK { justify-self: start; font-size: .78rem; padding: 0; }
  .pet-more { justify-content: flex-start; margin-top: 2px; gap: 6px; }
  .pet-more .pill { font-size: .72rem; padding: 4px 9px; }
  .pet-more .lg { display: none; }
  .pet-more .sm { display: inline; }
}
@container sheet (min-width: 720px) {
  .pet-grid { grid-template-columns: minmax(260px, 340px) 1fr; align-items: start; }
  .pet-stagebox { position: static; }   /* sticky only under the slim river, see layout.css */
}

/* gentle life in the preview only (never in the river: perf) */
.pet-anim .pet-eyes { transform-box: fill-box; transform-origin: center; animation: petBlink 4.2s infinite; }
.pet-anim .pet-ear { transform-box: fill-box; transform-origin: 50% 90%; animation: petEar 3.6s ease-in-out infinite; }
.pet-anim .pet-float { animation: petFloat 2.4s ease-in-out infinite; }
.pet-anim .pet-twinkle { animation: petTwinkle 1.8s ease-in-out infinite; }
@keyframes petBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes petEar { 0%, 80%, 100% { transform: rotate(0); } 86% { transform: rotate(-6deg); } 92% { transform: rotate(5deg); } }
@keyframes petFloat { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-4px); opacity: .75; } }
@keyframes petTwinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .pet-anim .pet-eyes, .pet-anim .pet-ear, .pet-anim .pet-float, .pet-anim .pet-twinkle { animation: none; }
}

/* result screen link */
.btn.pet-link { background: linear-gradient(135deg, #fff1f6, #f3ecff); color: #8a4f9e; border: 1.5px solid #f0d6ea; }

/* modal */
.pet-modal-wrap { align-items: center; }
.modal-card.pet-modal { max-width: 560px; max-height: 92vh; background: #fffaf6; }
.pm-tabs { margin: 10px 0 8px; }
.pm-tabs .chip[aria-pressed="true"] { background: #ff83a9; color: #fff; border-color: #ff83a9; }
.pm-intro { margin: 4px 0 10px; color: #6b5a76; font-size: .88rem; line-height: 1.55; }
.pm-note { margin: 10px 0 0; color: #9a86a8; font-size: .74rem; line-height: 1.5; text-align: center; }
.pm-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.pm-row.between { justify-content: space-between; align-items: center; margin-top: 4px; }
.pm-label { display: block; margin: 12px 0 6px; font-weight: 700; font-size: .86rem; color: #51417e; }
.pm-label small { font-weight: 500; color: #a593b0; }
.pet-modal textarea { width: 100%; box-sizing: border-box; border-radius: 16px; border: 1.5px solid #ecdcea; padding: 10px 12px; font: 500 .9rem "IBM Plex Sans Thai", sans-serif; resize: vertical; background: #fff; color: #3d2b4f; }
.pm-private { margin: 12px 0; padding: 8px 12px; border-radius: 14px; background: #eef8f2; color: #3f7a5e; font-size: .8rem; line-height: 1.5; }

/* pet fortune */
.pf-stage { display: flex; align-items: flex-end; justify-content: center; gap: 4px; min-height: 230px; }
.pf-me { display: flex; flex-direction: column; align-items: center; font: 700 .9rem "Mali", sans-serif; color: #8a4f9e; }
.pf-me svg { width: 130px; height: 130px; }
.pf-siam .siam-cyl svg { width: 120px; height: 190px; }
.pf-siam .siam-stick { margin-left: 34px; }
.pf-card {
  --c: #ff83a9; position: relative; margin-top: 14px; background: #fff8ef; border-radius: 24px; padding: 16px 16px 14px; text-align: center;
  border: 2px solid var(--c); box-shadow: 0 10px 24px rgba(60, 30, 90, .1); animation: cardIn .5s cubic-bezier(.3, 1.4, .5, 1);
}
.pf-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .76rem; }
.pf-no { font-weight: 700; color: #8d7a90; }
.pf-cat { background: var(--c); color: #fff; border-radius: 999px; padding: 2px 10px; font-weight: 700; }
.pf-pet svg { width: 120px; height: 120px; }
.pf-name { margin: 0; font: 700 1rem "Mali", sans-serif; color: #8a4f9e; }
.pf-title { margin: 6px 0 2px; font: 700 1.25rem "Mali", sans-serif; color: var(--c); }
.pf-msg { margin: 4px 0 8px; font: 700 1.02rem/1.5 "Mali", sans-serif; color: #3d2b4f; }
.pf-bless { margin: 0; font-size: .86rem; color: #b0709a; }
.pf-bless small { display: block; color: #a593b0; margin-top: 2px; }
.pf-rare { position: absolute; top: -12px; right: 14px; background: #f2c14e; color: #fff; font: 700 .72rem "Mali", sans-serif; padding: 3px 10px; border-radius: 999px; }

/* memory */
.pm-mems { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.pm-mem {
  text-align: left; border: 1.5px solid #eedcea; background: #fff; border-radius: 18px; padding: 10px 12px; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px; color: #5d4c68; font: 500 .78rem/1.45 "IBM Plex Sans Thai", sans-serif;
}
.pm-mem b { font: 700 .92rem "Mali", sans-serif; color: #51417e; }
.pm-mem small { color: #a593b0; }
.pm-mem[aria-pressed="true"] { border-color: #ff83a9; background: #fff4f9; box-shadow: 0 0 0 4px rgba(255, 131, 169, .15); }
.pm-mem[data-mem="forever"][aria-pressed="true"] { border-color: #d8b98a; background: #fff8ee; box-shadow: 0 0 0 4px rgba(216, 185, 138, .2); }

/* share */
.pm-types, .pm-ratio { justify-content: center; margin-bottom: 8px; }
.pm-types .chip[disabled] { opacity: .45; cursor: not-allowed; }
.pm-canvas { position: relative; display: flex; justify-content: center; }
.pm-canvas canvas { width: min(100%, 360px); height: auto; border-radius: 18px; box-shadow: 0 10px 26px rgba(60, 30, 90, .18); background: #fff; }
.pm-canvas .card-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .85rem; color: #8d7a90; }

@media (max-width: 480px) {
  .pm-mems { grid-template-columns: 1fr; }
  .pf-me svg { width: 108px; height: 108px; }
}
