/* ============================================================
   KIRION — beast.css
   Guardian beast stages + shop
   ============================================================ */

.stage { display: none; min-height: 80vh; padding: 60px 40px 80px; }
.stage.show { display: block; animation: fadeUp .5s ease; }
.stage-inner, .care-inner, .shop-inner { max-width: 640px; margin: 0 auto; }

.stage-kicker {
  font-family: var(--sans); font-size: 11.5px; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--cinnabar); margin-bottom: 16px;
}
.stage h1 { font-size: 36px; font-weight: 400; margin-bottom: 18px; line-height: 1.3; }
.stage-sub { font-size: 17px; color: var(--ink-soft); margin-bottom: 36px; line-height: 1.8; }

/* ---------- BEAST CARD (adoption) ---------- */
.beast-card {
  position: relative;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 16px; padding: 40px 32px; text-align: center;
  box-shadow: 0 2px 24px rgba(42,40,36,.05);
}
.beast-visual {
  width: 140px; height: 140px; margin: 0 auto 22px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 56px; line-height: 1;
  background: var(--jade-pale);
}
.beast-name-en { font-size: 28px; font-weight: 400; margin-bottom: 4px; }
.beast-name-cn { font-size: 18px; color: var(--gold); margin-bottom: 10px; }
.beast-freq {
  display: inline-block; font-family: var(--sans); font-size: 12px;
  background: var(--gold-pale); color: var(--gold);
  padding: 4px 14px; border-radius: 100px; margin-bottom: 16px;
  border: 1px solid #e5d9ae;
}
.beast-desc { font-size: 15px; color: var(--ink-soft); line-height: 1.8; margin-bottom: 24px; }

/* ---------- EGG ---------- */
.egg-container { text-align: center; margin: 30px auto; }
.egg {
  width: 120px; height: 160px; margin: 0 auto 20px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .15s ease;
  animation: eggBreath 2.5s ease-in-out infinite;
}
@keyframes eggBreath {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.03); }
}
.egg:active { transform: scale(.97); }
.egg-shell {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #d4cfae 0%, #b5c9a8 50%, #9bb5a3 100%);
  border-radius: inherit;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  border: 2px solid rgba(0,0,0,.08);
}
.egg-pattern {
  width: 70%; height: 70%;
  border-radius: 50%;
  border: 2px solid rgba(90,85,77,.15);
}
.egg-crack {
  position: absolute; top: 42%; left: 50%; transform: translateX(-50%);
  width: 2px; height: 0; background: rgba(0,0,0,.2);
  transition: height .5s ease;
}
.egg-hint { font-size: 14px; color: var(--ink-faint); font-style: italic; }
.warm-count { font-family: var(--sans); font-size: 12.5px; color: var(--ink-faint); margin-top: 14px; }

/* ---------- HATCH ---------- */
.hatch-container { text-align: center; margin: 30px auto; position: relative; min-height: 180px; }
.hatch-crack {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  font-size: 40px; color: var(--ink-faint); opacity: .3;
}
.hatch-beast {
  width: 120px; height: 120px; margin: 0 auto;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 52px; line-height: 1;
  background: var(--jade-pale);
  animation: popIn .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* ---------- CARE ---------- */
.care-header { text-align: center; margin-bottom: 24px; }
.care-kicker {
  font-family: var(--sans); font-size: 11.5px; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--cinnabar); margin-bottom: 10px;
}
.care-name { font-size: 32px; font-weight: 400; line-height: 1.3; }
.care-sub { font-size: 14px; color: var(--ink-faint); }

.care-beast-area { text-align: center; margin: 20px auto 24px; }
.beast-stage {
  width: 160px; height: 160px; margin: 0 auto;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  position: relative;
  background: var(--jade-pale);
  cursor: pointer; user-select: none;
  transition: transform .15s ease;
}
.beast-stage:active { transform: scale(.96); }
.beast-body { font-size: 64px; line-height: 1; }
.beast-mood {
  font-size: 13px; color: var(--ink-faint); font-style: italic;
  margin-top: 10px; min-height: 20px;
}

/* stats */
.care-stats { margin: 20px 0 24px; }
.stat-row {
  display: grid; grid-template-columns: 74px 1fr 36px;
  align-items: center; gap: 12px; margin-bottom: 8px;
  font-family: var(--sans); font-size: 12.5px;
}
.stat-label { color: var(--ink-soft); }
.stat-bar { height: 7px; background: var(--line); border-radius: 4px; overflow: hidden; display: block; }
.stat-fill {
  display: block; height: 100%; border-radius: 4px;
  background: var(--jade); transition: width .5s ease;
}
.stat-val { text-align: right; color: var(--ink); }

/* actions */
.care-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 28px; }
.care-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--white); border: 1px solid var(--line);
  padding: 16px 10px; border-radius: var(--radius);
  font-family: var(--serif); font-size: 14px; color: var(--ink);
  cursor: pointer; transition: all .15s ease;
}
.care-btn:hover { border-color: var(--jade-soft); background: var(--jade-pale); }
.care-btn:active { transform: scale(.96); }
.care-btn-icon { font-size: 22px; line-height: 1; }

/* log */
.care-log { margin-bottom: 28px; }
.cl-title {
  font-family: var(--sans); font-size: 11px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--ink-faint);
  padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 10px;
}
.care-msg {
  font-size: 14px; color: var(--ink-soft); line-height: 1.7;
  padding: 6px 0; border-bottom: 1px solid var(--paper-warm);
}

/* visitor */
.visitor {
  background: var(--gold-pale); border: 1px solid #e5d9ae;
  border-radius: 12px; padding: 20px 22px; margin: 20px 0;
  text-align: center;
}
.v-kicker {
  font-family: var(--sans); font-size: 10.5px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--gold); margin-bottom: 8px;
}
.v-text { font-size: 15px; color: var(--ink); line-height: 1.7; margin-bottom: 14px; }

/* links */
.care-links { display: flex; gap: 10px; margin-bottom: 20px; }
.cl-link {
  flex: 1; text-align: center; font-family: var(--sans); font-size: 13px;
  background: var(--white); border: 1px solid var(--line);
  padding: 12px; border-radius: var(--radius); color: var(--ink);
  transition: all .15s ease;
}
.cl-link:hover { border-color: var(--jade-soft); text-decoration: none; }
.cl-link.disabled { opacity: .45; pointer-events: none; }
.cl-link .small { font-size: 11px; color: var(--ink-faint); display: block; }

.care-footer { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.btn-ghost.small { padding: 8px 16px; font-size: 12px; }

/* ---------- SHOP ---------- */
.shop-head { text-align: center; margin-bottom: 32px; }
.shop-head h1 { font-size: 32px; font-weight: 400; margin-bottom: 8px; }
.back-link {
  display: inline-block; font-family: var(--sans); font-size: 13px;
  color: var(--ink-faint); margin-bottom: 16px;
}
.back-link:hover { color: var(--ink); }

.shop-cat { margin-bottom: 36px; }
.shop-cat h2 {
  font-family: var(--sans); font-size: 13px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--ink-faint);
  padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 14px;
}
.shop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.shop-item {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px;
  transition: all .15s ease;
}
.shop-item:hover { border-color: var(--jade-soft); box-shadow: 0 2px 12px rgba(42,40,36,.06); }
.si-name { font-family: var(--serif); font-size: 15px; color: var(--ink); }
.si-desc { font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; }
.si-price {
  font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--jade);
  margin-top: 6px;
}
.si-btn {
  background: var(--ink); color: var(--paper); border: none;
  padding: 8px 16px; border-radius: 100px;
  font-family: var(--sans); font-size: 12.5px; cursor: pointer;
  margin-top: 6px;
  transition: background .15s ease;
}
.si-btn:hover { background: var(--jade); }
.shop-item.muted { opacity: .5; }
.shop-item.muted .si-price { color: var(--ink-faint); font-weight: 400; }

@media(max-width:760px){
  .stage { padding: 40px 18px 60px; }
  .stage h1 { font-size: 26px; }
  .shop-grid { grid-template-columns: 1fr; }
  .care-actions { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .care-btn { padding: 12px 6px; font-size: 12.5px; }
}

/* ============================================================
   CONCEPT IMAGERY (v2.1) — 概念图接入
   ============================================================ */

.beast-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* 领养卡：圆形 → 立起来的产品图 */
.beast-visual.has-img {
  width: 100%;
  max-width: 300px;
  height: auto;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  background: var(--jade-pale);
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(42,40,36,.10);
  animation: beastBreath 5s ease-in-out infinite;
}
.beast-visual.has-img .beast-img { object-fit: cover; }

@keyframes beastBreath {
  0%,100% { transform: translateY(0) scale(1); }
  50%     { transform: translateY(-3px) scale(1.012); }
}

/* 认养卡：蛋 → 孵化后 / 成熟态 的展示预览 */
.preview-row {
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
  margin: 16px 0 8px;
}
.pv-chip {
  font-family: var(--sans); font-size: 12px; line-height: 1;
  padding: 7px 13px; border-radius: 100px;
  border: 1px solid var(--line); background: var(--white);
  color: var(--ink-soft); cursor: pointer; transition: all .2s ease;
}
.pv-chip:hover { border-color: var(--jade-soft); color: var(--jade); }
.pv-chip.on { border-color: var(--jade); color: var(--jade); background: var(--jade-pale); }
.preview-badge {
  position: absolute; top: 16px; right: 16px;
  font-family: var(--sans); font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: #fff; background: rgba(42,40,36,.72);
  padding: 5px 11px; border-radius: 100px; pointer-events: none;
}
.preview-note {
  font-size: 12px; line-height: 1.7; color: var(--ink-soft);
  max-width: 320px; margin: 0 auto 18px;
}

/* 孵化：从圆形里冒出来 */
.hatch-beast.has-img {
  width: 200px; height: 260px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(42,40,36,.12);
}

/* 照管主视图 */
.beast-stage.has-img {
  width: 100%;
  max-width: 320px;
  height: auto;
  background: transparent;
  border-radius: 0;
  flex-direction: column;
  cursor: default;
}
.beast-stage.has-img .beast-body {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
  background: var(--jade-pale);
  box-shadow: 0 8px 32px rgba(42,40,36,.10);
  animation: beastBreath 5s ease-in-out infinite;
}
.beast-stage.has-img:active { transform: none; }

/* 变身按钮 */
.reveal-btn {
  margin-top: 18px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: .5px;
  padding: 9px 20px;
  border-radius: 100px;
  cursor: pointer;
  transition: all .18s ease;
}
.reveal-btn:hover {
  border-color: var(--jade);
  color: var(--jade);
  background: var(--jade-pale);
}

/* ---------- TRUE FORM OVERLAY ---------- */
.reveal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(18,16,14,.965);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
.reveal-overlay.show { display: flex; animation: rvFade .4s ease; }
@keyframes rvFade { from { opacity: 0; } to { opacity: 1; } }

.rv-inner {
  max-width: 560px; width: 100%; text-align: center;
  animation: rvRise .6s cubic-bezier(.22,1,.36,1);
}
@keyframes rvRise {
  from { transform: translateY(24px) scale(.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.rv-kicker {
  font-family: var(--sans); font-size: 11.5px; letter-spacing: 3px;
  text-transform: uppercase; color: #c8a96a; margin-bottom: 18px;
}
.rv-frame {
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  margin-bottom: 24px;
}
.rv-img { display: block; width: 100%; height: auto; }
.rv-cn {
  font-family: var(--serif); font-size: 17px; line-height: 1.9;
  color: #f2ece1; margin-bottom: 14px;
}
.rv-en {
  font-family: var(--serif); font-size: 14.5px; line-height: 1.8;
  color: rgba(242,236,225,.62); font-style: italic; margin-bottom: 26px;
}
.reveal-overlay .btn-ghost {
  border-color: rgba(242,236,225,.28);
  color: rgba(242,236,225,.85);
}
.reveal-overlay .btn-ghost:hover {
  border-color: rgba(242,236,225,.6);
  color: #f2ece1;
  background: rgba(255,255,255,.06);
}

@media(max-width:760px){
  .beast-stage.has-img { max-width: 280px; }
  .rv-cn { font-size: 15.5px; }
  .rv-en { font-size: 13.5px; }
}

/* ---------- 状态标签：Awake / Asleep ---------- */
.state-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 100px;
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--jade);
  background: var(--jade-pale);
  border: 1px solid rgba(90,120,105,.28);
  vertical-align: 2px;
}
.state-tag.asleep {
  color: var(--ink-faint);
  background: transparent;
  border-color: var(--line);
}

/* 领养页状态：Asleep / Waking */
.beast-state {
  display: inline-block;
  margin: -6px 0 14px;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px dotted var(--line);
  padding-bottom: 2px;
}

/* ---------- 未登录时的保存提示条 ---------- */
.auth-bar {
  position: sticky; bottom: 0; left: 0; right: 0; z-index: 40;
  background: #1f1e1b; color: #f6f2ea;
  padding: 14px 18px 16px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.ab-text { font-size: 12.5px; line-height: 1.6; margin: 0 0 10px; color: #ded7c9; }
.ab-row { display: flex; gap: 8px; }
#authEmail {
  flex: 1; min-width: 0; padding: 9px 12px; border-radius: 100px;
  border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06);
  color: #fff; font-size: 13px; font-family: var(--sans);
}
#authEmail::placeholder { color: rgba(255,255,255,.45); }
.ab-btn {
  padding: 9px 16px; border-radius: 100px; border: 0; cursor: pointer;
  background: #e8dcc0; color: #1f1e1b; font-size: 13px; font-family: var(--sans); white-space: nowrap;
}
.ab-btn[disabled] { opacity: .55; cursor: default; }
.ab-msg { font-size: 12px; color: #c9bfa8; margin: 8px 0 0; min-height: 16px; }

/* 商店商品图（400×400） */
.si-img { display: block; width: 100%; border-radius: 10px; margin-bottom: 8px; aspect-ratio: 1/1; object-fit: cover; }

/* ---------- Memory Book（记忆册） ---------- */
.mb { margin: 4px 0 28px; padding: 26px 24px; background: var(--white);
      border: 1px solid var(--line); border-radius: 16px; }
.mb-title { font-family: var(--sans); font-size: 11.5px; letter-spacing: 2.5px;
            text-transform: uppercase; color: var(--cinnabar); margin-bottom: 10px; }
.mb-sub { font-size: 13.5px; color: var(--ink-soft); line-height: 1.75; margin-bottom: 18px; }
.mb-list { display: grid; gap: 10px; margin-bottom: 16px; }
.mb-empty { font-size: 13px; color: var(--ink-soft); opacity: .75; font-style: italic; }
.mb-full { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; }
.mb-item { position: relative; padding: 14px 16px; background: var(--paper, #f7f4ec);
           border: 1px solid var(--line); border-radius: 10px; }
.mb-item-text { padding-right: 34px; }
.mb-text { font-size: 14px; line-height: 1.7; color: var(--ink, #2a2824); white-space: pre-wrap; word-break: break-word; }
.mb-img { display: block; width: 100%; max-height: 300px; object-fit: cover; border-radius: 8px; }
.mb-del { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border: none;
          border-radius: 50%; background: rgba(42,40,36,.08); color: var(--ink-soft);
          font-size: 12px; cursor: pointer; line-height: 1; }
.mb-del:hover { background: rgba(176,58,46,.15); color: var(--cinnabar, #b03a2e); }
.mb-date { display: block; margin-top: 6px; font-size: 11px; color: var(--ink-soft); opacity: .65; }
.mb-form textarea { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--line);
                    border-radius: 10px; font-family: var(--serif, Georgia, serif); font-size: 14px;
                    resize: vertical; background: var(--white); color: var(--ink, #2a2824); }
.mb-form textarea:focus { outline: none; border-color: var(--cinnabar, #b03a2e); }
.mb-form-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.mb-count { font-size: 12px; color: var(--ink-soft); opacity: .7; margin-left: auto; }
.mb-msg { font-size: 12px; color: var(--ink-soft); margin: 8px 0 0; min-height: 15px; }
