/* 坐騎（2026-10-01.3，js/mounts.js）：騎士與坐騎、我的坐騎、坐騎裝備欄、恐龍蛋與巢、孵化動畫
   由 index.html 在 style.css 後面載入；淺色（羊皮紙）＋夜戰（html[data-theme="night"]）；面板（.mt-sheet）掛在 body 下面，所以顏色變數放 :root */
:root {
  --mt-sky1: #9ed4fb; --mt-sky2: #e2f3ff; --mt-grass1: #8fcd6c; --mt-grass2: #62a74a; --mt-grass-edge: #4f933b;
  --mt-straw1: #d2a358; --mt-straw2: #a8753a; --mt-straw3: #ecc77a; --mt-straw-dark: #7a5226;
  --mt-race: #23804d; --mt-race-bg: rgba(46, 157, 98, 0.12); --mt-fly: #2a6fb3; --mt-cloud: rgba(255, 255, 255, 0.85);
  --mt-hatch1: #fff6dc; --mt-hatch2: #edd6a0;
}
:root[data-theme="night"] {
  --mt-sky1: #0c1730; --mt-sky2: #22375f; --mt-grass1: #2b5132; --mt-grass2: #1a3321; --mt-grass-edge: #37683f;
  --mt-straw1: #8e6a36; --mt-straw2: #634520; --mt-straw3: #a98449; --mt-straw-dark: #3e2a12;
  --mt-race: #5fd08a; --mt-race-bg: rgba(95, 208, 138, 0.12); --mt-fly: #7cc0ff; --mt-cloud: rgba(200, 220, 255, 0.14);
  --mt-hatch1: #26304a; --mt-hatch2: #0b0e16;
}
.mt-page .card { scroll-margin-top: 76px; }
.mt-sub { margin: 14px 0 8px; font-size: 15px; }
.mt-sub:first-of-type { margin-top: 4px; }
.mt-warn { color: #b0541a; font-weight: 700; }
[data-theme="night"] .mt-warn { color: #ffb070; }
.mt-empty { padding: 10px 12px; border: 1px dashed var(--line-3); border-radius: 12px; background: var(--field); }
.mt-empty .row-end { margin-top: 8px; }

/* ── 像素圖：飛行坐騎（兩格翅膀）、恐龍蛋、坐騎裝備 ── */
.mt-fly, .mt-egg { position: relative; display: inline-block; line-height: 0; vertical-align: bottom; --doll-ol: #2a1d12; }
.mt-fly > svg, .mt-egg > svg { display: block; }
.mt-flap > svg + svg, .mt-egg2 > svg + svg { position: absolute; left: 0; top: 0; }
.mt-flap > svg:nth-child(1) { animation: mt-f1 0.56s steps(1) infinite; }
.mt-flap > svg:nth-child(2) { opacity: 0; animation: mt-f2 0.56s steps(1) infinite; }
@keyframes mt-f1 { 0%, 49.9% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes mt-f2 { 0%, 49.9% { opacity: 0; } 50%, 100% { opacity: 1; } }
.mt-bob { animation: mt-bob 1.9s ease-in-out infinite; }
.mt-bob.b1 { animation-delay: -0.6s; animation-duration: 2.2s; }
.mt-bob.b2 { animation-delay: -1.2s; animation-duration: 1.7s; }
@keyframes mt-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.mt-gico svg { display: block; }
[data-theme="night"] .mt-fly, [data-theme="night"] .mt-egg { --doll-ol: #0b0806; }

/* ── 牧場（最上面） ── */
.mt-top, .mt-gate { display: grid; gap: 10px; }
.mt-scene { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; min-height: 176px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2);
  background: linear-gradient(to top, var(--mt-grass2) 0, var(--mt-grass1) 58px, var(--mt-grass-edge) 58px, var(--mt-grass-edge) 61px, var(--mt-sky2) 61px, var(--mt-sky1) 100%); }
[data-theme="night"] .mt-scene { background: radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 38% 10%, #dfe8ff 50%, transparent 51%),
  radial-gradient(1.4px 1.4px at 71% 22%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 88% 8%, #cfe0ff 50%, transparent 51%), radial-gradient(1px 1px at 55% 30%, #fff 50%, transparent 51%),
  linear-gradient(to top, var(--mt-grass2) 0, var(--mt-grass1) 58px, var(--mt-grass-edge) 58px, var(--mt-grass-edge) 61px, var(--mt-sky2) 61px, var(--mt-sky1) 100%); }
.mt-sky { position: relative; z-index: 1; display: flex; justify-content: space-evenly; align-items: center; gap: 4px; min-height: 92px; padding: 10px 6px 0; }
.mt-field { position: relative; z-index: 1; display: flex; justify-content: space-evenly; align-items: flex-end; gap: 4px; padding: 0 6px 8px; min-height: 84px; }
.mt-sc-i { position: relative; display: grid; justify-items: center; gap: 2px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; line-height: 0; border-radius: 10px; }
span.mt-sc-i { cursor: default; }
.mt-sc-i:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.mt-sc-name { font: 700 11px/1.3 var(--font); padding: 0 7px; border-radius: 999px; background: rgba(42, 29, 18, 0.66); color: #fffaf0; white-space: nowrap; max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
.mt-scene-empty { position: absolute; left: 12px; right: 12px; top: 50%; transform: translateY(-60%); z-index: 2; margin: 0; padding: 8px 12px; border-radius: 10px; text-align: center;
  background: rgba(255, 250, 240, 0.86); color: #3a2616; font-size: 13px; line-height: 1.5; }
[data-theme="night"] .mt-scene-empty { background: rgba(12, 14, 18, 0.8); color: var(--text); }
.mt-cloud { position: absolute; z-index: 0; width: 54px; height: 14px; border-radius: 999px; background: var(--mt-cloud); animation: mt-drift 26s linear infinite; }
.mt-cloud::before { content: ''; position: absolute; left: 12px; top: -9px; width: 24px; height: 18px; border-radius: 50%; background: inherit; }
.mt-cloud.c1 { top: 16px; left: 6%; }
.mt-cloud.c2 { top: 44px; left: 58%; transform: scale(0.8); animation-duration: 34s; animation-delay: -12s; }
.mt-cloud.c3 { top: 24px; left: 84%; transform: scale(0.65); animation-duration: 40s; animation-delay: -20s; }
@keyframes mt-drift { 0% { translate: 0 0; } 50% { translate: 26px 0; } 100% { translate: 0 0; } }
.mt-sum { display: flex; flex-wrap: wrap; gap: 6px; }
.mt-sum > span { padding: 2px 10px; border-radius: 999px; background: var(--field); border: 1px solid var(--line-2); font-size: 13px; white-space: nowrap; }
.mt-sum b { font-variant-numeric: tabular-nums; }
.mt-alert { justify-self: start; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--gold); background: color-mix(in srgb, var(--gold) 16%, var(--field)); color: var(--text);
  font: 800 14px/1.4 var(--font); cursor: pointer; animation: wish-glow 1.1s ease-in-out infinite alternate; }
.mt-gate-scene { min-height: 150px; }
@media (max-width: 560px) {
  .mt-sky > :nth-child(n + 4), .mt-field > :nth-child(n + 4) { display: none; } /* 手機：天上、草地各最多 3 隻 */
}

/* ── 騎士與坐騎 ── */
.mt-riders-list { display: grid; gap: 8px; }
@media (min-width: 900px) { .mt-riders-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mt-rider { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 6px 10px; padding: 8px 10px 10px 6px; min-width: 0;
  border: 1px solid var(--line-2); border-radius: 12px; background: var(--field); }
.mt-rider.in-party { border-color: color-mix(in srgb, var(--gold) 55%, var(--line-2)); }
.mt-rmain { display: grid; gap: 1px; min-width: 0; line-height: 1.35; }
.mt-rname { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.mt-rname b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-rsub { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-rbtn { align-self: start; }
.mt-ride { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 10px; min-width: 0;
  border: 1px solid color-mix(in srgb, #8a6a3a 40%, var(--line-2)); background: color-mix(in srgb, #8fcd6c 10%, var(--surface)); }
.mt-ride.mt-k-fly { border-color: color-mix(in srgb, var(--rc) 55%, var(--line-2)); background: linear-gradient(100deg, color-mix(in srgb, var(--mt-sky1) 35%, var(--surface)), color-mix(in srgb, var(--rc) 10%, var(--surface))); }
.mt-ride.mt-walk { display: block; margin: 0; padding: 4px 10px; border: 1px dashed var(--line-2); background: transparent; }
.mt-ride-main { display: grid; gap: 1px; min-width: 0; line-height: 1.4; }
.mt-ride-main p { margin: 0; }
.mt-bonus { font-weight: 700; font-variant-numeric: tabular-nums; }
.mt-flyline { color: var(--mt-fly); font-weight: 700; }
.mt-fx { margin: 0; line-height: 1.45; }
/* 清單裡的坐騎小圖（馬站在草地上、飛行坐騎在天上） */
.mt-mini { flex: none; display: grid; place-items: end center; width: 58px; height: 46px; padding-bottom: 2px; border-radius: 10px; overflow: hidden; line-height: 0;
  background: linear-gradient(to top, var(--mt-grass1) 0 9px, var(--mt-sky2) 9px, var(--mt-sky1)); }
.mt-k-fly > .mt-mini, .mt-mini.mt-k-fly { place-items: center; padding: 0; background: linear-gradient(var(--mt-sky1), var(--mt-sky2)); }
.mt-mini.mt-big { width: 72px; height: 56px; }

/* ── 面板：換坐騎、讓誰騎、穿到哪一隻 ── */
.mt-pick { display: grid; gap: 10px; }
.mt-pick-who { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: var(--field); border: 1px solid var(--line-2); }
.mt-pick-who p { margin: 0; line-height: 1.45; }
.mt-list { display: grid; gap: 8px; }
.mt-li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 6px 8px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--field); min-width: 0; }
.mt-li.mt-k-fly { border-color: color-mix(in srgb, var(--rc) 40%, var(--line-2)); }
.mt-li.mt-on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); background: color-mix(in srgb, var(--gold) 9%, var(--field)); }
.mt-li.mt-no { opacity: 0.72; }
.mt-li.mt-k-hero.in-party { border-color: color-mix(in srgb, var(--gold) 45%, var(--line-2)); }
.mt-li-main { display: grid; gap: 1px; min-width: 0; line-height: 1.4; }
.mt-li-main p { margin: 0; }
.mt-li-act { display: grid; justify-items: end; gap: 3px; text-align: right; }
.mt-li-act .bt-delta { font-size: 12px; white-space: nowrap; }
.mt-why { color: var(--muted); max-width: 8.5em; line-height: 1.35; }
.mt-tag { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; background: var(--line); color: var(--muted); }
.mt-tag.mt-on { background: color-mix(in srgb, var(--gold) 24%, transparent); color: var(--text); }
@media (max-width: 480px) {
  .mt-li { grid-template-columns: auto minmax(0, 1fr); }
  .mt-li-act { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 10px; }
  .mt-why { max-width: none; }
}

/* ── 我的坐騎：卡片 ── */
.mt-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .mt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1120px) { .mt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mt-card { --mc: color-mix(in srgb, #8a6a3a 55%, var(--line-2)); position: relative; display: flex; flex-direction: column; min-width: 0; border: 2px solid var(--mc); border-radius: 14px;
  background: var(--field); overflow: hidden; scroll-margin-top: 90px; }
.mt-card.mt-k-horse.mt-st3 { --mc: #d9a441; box-shadow: 0 0 14px rgba(217, 164, 65, 0.45); }
.mt-card.mt-no { --mc: var(--line-3); }
.mt-card.mt-k-fly { --mc: var(--rc); }
.mt-card.mt-k-fly.rar-3 { box-shadow: 0 0 12px color-mix(in srgb, var(--rc) 42%, transparent); }
.mt-card.mt-k-fly.rar-4 { box-shadow: 0 0 0 1px color-mix(in srgb, var(--rc) 50%, transparent), 0 0 18px color-mix(in srgb, var(--rc) 55%, transparent); }
/* 神話：七彩流轉的框 */
@property --mt-ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.mt-card.mt-k-fly.rar-5 { border-color: transparent; box-shadow: 0 0 20px rgba(176, 106, 255, 0.45);
  background: linear-gradient(var(--field), var(--field)) padding-box, conic-gradient(from var(--mt-ang), #ff6b6b, #ffd166, #6be38f, #5ab8ff, #b77dff, #ff6b6b) border-box;
  animation: mt-ang 4s linear infinite; }
@keyframes mt-ang { to { --mt-ang: 360deg; } }
.mt-card.mt-hl { animation: mt-flash-card 1.4s ease-out; }
.mt-card.mt-k-fly.rar-5.mt-hl { animation: mt-ang 4s linear infinite, mt-flash-card 1.4s ease-out; }
@keyframes mt-flash-card { 0%, 40% { box-shadow: 0 0 0 4px var(--ring), 0 0 24px var(--ring); } 100% { box-shadow: 0 0 0 0 transparent; } }
.mt-pic { position: relative; flex: none; display: grid; place-items: end center; height: 124px; padding-bottom: 10px; overflow: hidden; line-height: 0;
  background: linear-gradient(to top, var(--mt-grass2) 0, var(--mt-grass1) 30px, var(--mt-grass-edge) 30px, var(--mt-grass-edge) 32px, var(--mt-sky2) 32px, var(--mt-sky1) 100%); }
.mt-card.mt-k-fly .mt-pic { place-items: center; padding: 6px 0 0; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--rc) 22%, transparent) 0, transparent 62%), linear-gradient(var(--mt-sky1), var(--mt-sky2)); }
.mt-pic .mt-cloud.c1 { top: 18px; left: 8%; }
.mt-pic .mt-cloud.c2 { top: 70px; left: 70%; }
/* 獨特：一道光掃過；神話：光再亮一點 */
.mt-card.mt-k-fly.rar-4 .mt-pic::after, .mt-card.mt-k-fly.rar-5 .mt-pic::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 38%, rgba(255, 255, 255, 0.5) 50%, transparent 62%); background-size: 260% 100%; animation: mt-sheen 3.4s linear infinite; }
@keyframes mt-sheen { 0% { background-position: 130% 0; } 60%, 100% { background-position: -130% 0; } }
.mt-spark { position: absolute; z-index: 1; color: #fff7c2; font-size: 12px; line-height: 1; text-shadow: 0 0 6px var(--rc, #ffd54a); opacity: 0; animation: mt-twinkle 2.2s ease-in-out infinite; }
.mt-spark.s1 { left: 12%; top: 20%; }
.mt-spark.s2 { left: 82%; top: 16%; animation-delay: -0.5s; }
.mt-spark.s3 { left: 22%; top: 70%; animation-delay: -1s; font-size: 10px; }
.mt-spark.s4 { left: 74%; top: 64%; animation-delay: -1.5s; }
.mt-spark.s5 { left: 50%; top: 10%; animation-delay: -1.8s; font-size: 9px; }
.mt-spark.s6 { left: 36%; top: 40%; animation-delay: -0.8s; }
@keyframes mt-twinkle { 0%, 100% { opacity: 0; transform: scale(0.5); } 50% { opacity: 1; transform: scale(1.1); } }
.mt-badge { position: absolute; left: 8px; top: 8px; z-index: 2; padding: 1px 8px; border-radius: 999px; font: 800 11px/1.6 var(--font); background: rgba(255, 250, 240, 0.9); color: #3a2616; }
.mt-card.mt-k-fly .mt-badge { background: var(--rc); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); }
.mt-badge.mt-el { left: auto; right: 8px; background: rgba(255, 250, 240, 0.9) !important; }
[data-theme="night"] .mt-badge { background: rgba(12, 14, 18, 0.82); color: var(--text); }
[data-theme="night"] .mt-card.mt-k-fly .mt-badge { background: var(--rc); color: #10131a; text-shadow: none; }
[data-theme="night"] .mt-badge.mt-el { background: rgba(12, 14, 18, 0.82) !important; }
.mt-body { display: grid; gap: 8px; padding: 10px 12px 12px; min-width: 0; }
.mt-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.mt-name { font-family: var(--serif); font-size: 19px; line-height: 1.25; }
.mt-rideby { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 5px 8px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.mt-rideby .btn { margin-left: auto; }
.mt-who { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.mt-tiny { flex: none; display: grid; place-items: start center; width: 28px; height: 28px; overflow: hidden; border-radius: 50%; background: var(--field); box-shadow: inset 0 0 0 1px var(--line-2); line-height: 0; }
.mt-tiny .hero-doll { margin-top: 1px; }
.mt-k { display: block; font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: 0.02em; }
.mt-rideby .mt-k { display: inline; }
.mt-sec { display: grid; gap: 4px; min-width: 0; }
.mt-sec p { margin: 0; }
.mt-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.mt-chip { padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--gold) 10%, var(--surface)); font-size: 12px; font-weight: 700;
  white-space: nowrap; font-variant-numeric: tabular-nums; }
.mt-hs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.mt-hs-i { display: grid; justify-items: center; gap: 0; padding: 3px 2px 4px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); line-height: 1.25; min-width: 0; }
.mt-hs-i.mt-boost { border-color: color-mix(in srgb, var(--mt-race) 50%, var(--line)); background: var(--mt-race-bg); }
.mt-hs-k { font-size: 11px; color: var(--muted); }
.mt-hs-i b { font-size: 16px; font-variant-numeric: tabular-nums; }
.mt-up { font-size: 11px; font-weight: 800; color: var(--mt-race); }
.mt-race-on { color: var(--mt-race); font-weight: 700; }
.mt-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.mt-slot { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 2px 5px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface);
  color: inherit; font: inherit; line-height: 1.2; cursor: pointer; min-width: 0; }
.mt-slot:hover { border-color: var(--rc, var(--gold)); }
.mt-slot:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.mt-slot.mt-vacant { border-style: dashed; background: transparent; }
.mt-slot-k { font-size: 11px; color: var(--muted); }
.mt-slot-n { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.mt-slot-race, .mt-tile-race { position: absolute; top: 2px; left: 3px; font-size: 11px; line-height: 1; }
.mt-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding-top: 8px; border-top: 1px dashed var(--line-2); }

/* ── 坐騎裝備：詳細、面板裡的清單 ── */
.mt-gcard .xg-lines li { line-height: 1.45; }
.mt-race-l { color: var(--mt-race); font-weight: 700; }
.mt-race-l.mt-dead, .mt-aff.mt-dead { opacity: 0.5; text-decoration: line-through; }
.mt-affs { display: flex; flex-wrap: wrap; gap: 0 8px; margin-top: 1px; }
.mt-aff { color: var(--rar1); white-space: nowrap; }
.mt-aff.mt-aff-race { color: var(--mt-race); font-weight: 700; }
.mt-gpick li { align-items: center; }
.mt-gp-d { display: inline-flex; flex-wrap: wrap; gap: 2px 8px; align-items: center; }
.mt-race-d { color: var(--mt-race); font-weight: 800; white-space: nowrap; }
.mt-slot-pick .slot-cur { display: grid; gap: 6px; }

/* ── 坐騎裝備欄 ── */
.mt-bag { display: grid; gap: 10px; }
.mt-bag .card-head { margin-bottom: 4px; }
.mt-filter { justify-self: start; }
.mt-bag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.mt-tile { position: relative; display: grid; justify-items: center; align-content: start; gap: 2px; padding: 7px 3px 5px; border-radius: 10px; min-width: 0;
  border: 1px solid color-mix(in srgb, var(--rc) 35%, var(--line-2)); background: var(--field); color: inherit; font: inherit; line-height: 1.2; cursor: pointer; }
.mt-tile:hover { border-color: var(--rc, var(--gold)); }
.mt-tile:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.mt-tile.rar-4, .mt-tile.rar-5 { background: linear-gradient(170deg, var(--field), color-mix(in srgb, var(--rc) 14%, var(--field))); }
.mt-tile-n { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.mt-tile-affs { display: grid; justify-items: center; max-width: 100%; font-size: 11px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.mt-tile-aff { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--rar1); }
.mt-tile-aff.mt-aff-race { color: var(--mt-race); font-weight: 700; }
@media (min-width: 700px) { .mt-bag-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); } }
@media (max-width: 699px) { .mt-tile-aff:nth-child(n + 2) { display: none; } } /* 手機：格子小，只寫主要的那一條（全部的點開看） */
.mt-check { position: absolute; right: 4px; top: 4px; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line-3); background: var(--surface);
  display: grid; place-items: center; font: 900 13px/1 var(--font); color: #fff; }
.mt-tile.mt-picked { border-color: var(--loss); box-shadow: 0 0 0 1px var(--loss); background: color-mix(in srgb, var(--loss) 8%, var(--field)); }
.mt-tile.mt-picked .mt-check { background: var(--loss); border-color: var(--loss); }
.mt-tile.mt-picked .mt-check::after { content: '✓'; }
.mt-tile.mt-no { opacity: 0.45; }
.mt-pickbar { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 8px); z-index: 5; display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--loss); background: color-mix(in srgb, var(--loss) 6%, var(--surface)); box-shadow: 0 8px 20px -12px rgba(0, 0, 0, 0.5); }
.mt-pickbar p { margin: 0; line-height: 1.5; }
.mt-pickbar .row-end { margin-top: 0; }
@media (min-width: 960px) { .mt-pickbar { bottom: 12px; } }
.mt-salv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mt-salv { display: grid; gap: 10px; }
.mt-salv p { margin: 0; line-height: 1.6; }
.mt-salv-n { margin-right: 10px; white-space: nowrap; }
.mt-salv-icons { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mt-salv-gain b { color: var(--gold); }

/* ── 恐龍蛋與巢（寬的螢幕：左邊巢、右邊還沒孵的蛋） ── */
.mt-nest-wrap { display: grid; gap: 4px 20px; }
.mt-nest-l, .mt-nest-r { display: grid; gap: 8px; align-content: start; min-width: 0; }
.mt-nest-l > p { margin: 0; }
@media (min-width: 900px) {
  .mt-nest-wrap { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .mt-nest-r .mt-sub { margin-top: 0; }
}
.mt-nests { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mt-nest-slot { display: grid; justify-items: center; align-content: start; gap: 4px; padding: 10px 8px 12px; min-width: 0; text-align: center; line-height: 1.4;
  border: 1px solid color-mix(in srgb, var(--rc, #8a6a3a) 45%, var(--line-2)); border-radius: 14px; background: var(--field); }
.mt-nest-slot.mt-vacant { border-style: dashed; border-color: var(--line-3); }
.mt-nest-slot.mt-ready { border-color: var(--rc); box-shadow: 0 0 0 1px var(--rc), 0 0 16px color-mix(in srgb, var(--rc) 45%, transparent); background: linear-gradient(170deg, var(--field), color-mix(in srgb, var(--rc) 12%, var(--field))); }
.mt-nest-pic { position: relative; display: grid; place-items: end center; width: 120px; height: 92px; }
.mt-nest-pic > * { grid-area: 1 / 1; }
.mt-nest-back, .mt-nest-front { position: relative; display: block; width: 104px; border-radius: 50%; }
.mt-nest-back { height: 30px; margin-bottom: 8px; background: radial-gradient(ellipse at 50% 60%, var(--mt-straw-dark) 0 45%, var(--mt-straw2) 70%); }
.mt-nest-front { z-index: 2; height: 24px; border-radius: 0 0 52px 52px / 0 0 24px 24px;
  background: repeating-linear-gradient(28deg, var(--mt-straw1) 0 3px, var(--mt-straw2) 3px 5px, var(--mt-straw3) 5px 8px), var(--mt-straw1);
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.18), 0 2px 0 rgba(0, 0, 0, 0.12); }
.mt-nest-pic .mt-egg { z-index: 1; margin-bottom: 12px; transform-origin: 50% 100%; }
.mt-nest-slot.mt-vacant .mt-nest-pic { opacity: 0.55; }
.mt-wobble { animation: mt-wobble 3.2s ease-in-out infinite; }
.mt-jiggle { animation: mt-jiggle 1.3s ease-in-out infinite; }
@keyframes mt-wobble { 0%, 72%, 100% { transform: rotate(0); } 76% { transform: rotate(-5deg); } 81% { transform: rotate(4deg); } 86% { transform: rotate(-2deg); } 90% { transform: rotate(1deg); } }
@keyframes mt-jiggle { 0%, 50%, 100% { transform: rotate(0) translateY(0); } 58% { transform: rotate(-8deg) translateY(-2px); } 66% { transform: rotate(7deg); } 74% { transform: rotate(-5deg) translateY(-1px); } 82% { transform: rotate(3deg); } }
.mt-glow { position: absolute; left: 50%; top: 44%; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%; z-index: 0; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--rc) 55%, transparent) 0, transparent 68%); animation: mt-pulse 1.3s ease-in-out infinite; }
@keyframes mt-pulse { 0%, 100% { opacity: 0.45; transform: scale(0.9); } 50% { opacity: 1; transform: scale(1.08); } }
.mt-cd { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 14px; }
.mt-nest-slot.mt-ready .mt-cd { color: var(--rc); }
.mt-nbar { display: block; width: 88%; height: 7px; border-radius: 999px; background: var(--line); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line-2); }
.mt-nbar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #f2c14e, var(--rc, #e0a020)); transition: width 0.8s linear; }
.mt-hatch-btn { margin-top: 4px; min-width: 120px; animation: wish-glow 1s ease-in-out infinite alternate; }
.mt-hatch-btn:disabled { animation: none; }
.mt-eggs { display: grid; gap: 8px; }
.mt-egg-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px 10px; padding: 8px 10px; min-width: 0;
  border: 1px solid color-mix(in srgb, var(--rc) 45%, var(--line-2)); border-radius: 12px; background: var(--field); }
.mt-egg-main { display: grid; gap: 3px; min-width: 0; line-height: 1.4; }
.mt-egg-main p { margin: 0; }
.mt-egg-pic { flex: none; display: grid; place-items: center; line-height: 0; }
.mt-odds { display: flex; flex-wrap: wrap; gap: 4px; }
.mt-odd { padding: 0 7px; border-radius: 999px; font-size: 12px; line-height: 1.6; white-space: nowrap; background: var(--surface); border: 1px solid color-mix(in srgb, var(--rc) 45%, var(--line-2)); font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
  .mt-egg-row { grid-template-columns: auto minmax(0, 1fr); }
  .mt-egg-btn { grid-column: 1 / -1; justify-self: end; }
  .mt-nest-pic { width: 104px; }
}

/* ── 孵化動畫（面板裡） ── */
.mt-hatch-sheet .sheet-body { display: grid; gap: 12px; }
.mt-hatch { position: relative; display: grid; place-items: end center; height: 250px; padding-bottom: 20px; overflow: hidden; border-radius: 14px; border: 1px solid var(--line-2); isolation: isolate;
  background: radial-gradient(circle at 50% 58%, color-mix(in srgb, var(--rc) 26%, var(--mt-hatch1)) 0, var(--mt-hatch2) 78%); }
.mt-hatch > * { grid-area: 1 / 1; }
.mt-hatch .mt-rays { position: absolute; inset: -60%; z-index: 0; opacity: 0; transition: opacity 0.6s;
  background: repeating-conic-gradient(from 0deg at 50% 50%, color-mix(in srgb, var(--rc) 45%, transparent) 0deg 9deg, transparent 9deg 22deg);
  -webkit-mask-image: radial-gradient(circle, #000 12%, transparent 46%); mask-image: radial-gradient(circle, #000 12%, transparent 46%); animation: mt-spin 14s linear infinite; }
.mt-hatch.rar-5 .mt-rays { background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 107, 107, 0.5) 0deg 8deg, transparent 8deg 18deg, rgba(255, 209, 102, 0.5) 18deg 26deg, transparent 26deg 36deg,
  rgba(107, 227, 143, 0.5) 36deg 44deg, transparent 44deg 54deg, rgba(90, 184, 255, 0.5) 54deg 62deg, transparent 62deg 72deg, rgba(183, 125, 255, 0.5) 72deg 80deg, transparent 80deg 90deg); }
@keyframes mt-spin { to { transform: rotate(360deg); } }
.mt-hatch .mt-halo { position: absolute; left: 50%; top: 56%; z-index: 0; width: 150px; height: 150px; margin: -75px 0 0 -75px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--rc) 60%, #fff) 0, transparent 66%); opacity: 0.35; animation: mt-pulse 1.4s ease-in-out infinite; }
.mt-hatch .mt-nest-back { width: 150px; height: 40px; margin-bottom: 10px; z-index: 1; }
.mt-hatch .mt-nest-front { width: 150px; height: 34px; border-radius: 0 0 75px 75px / 0 0 34px 34px; z-index: 4; }
.mt-hegg, .mt-half { position: relative; z-index: 2; margin-bottom: 18px; transform-origin: 50% 100%; }
.mt-hegg > svg + svg { opacity: 0; }
.p-shake .mt-hegg { animation: mt-shake 0.7s ease-in-out infinite; }
.p-crack .mt-hegg { animation: mt-shake-hard 0.18s linear infinite; }
.p-crack .mt-hegg > svg:first-child { opacity: 0; }
.p-crack .mt-hegg > svg + svg { opacity: 1; }
.p-crack .mt-halo { opacity: 0.8; }
.p-crack .mt-rays { opacity: 0.35; }
.p-burst .mt-hegg, .p-reveal .mt-hegg { visibility: hidden; }
@keyframes mt-shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-7deg); } 75% { transform: rotate(7deg); } }
@keyframes mt-shake-hard { 0%, 100% { transform: rotate(0) translateX(0); } 25% { transform: rotate(-10deg) translateX(-2px); } 75% { transform: rotate(10deg) translateX(2px); } }
/* 蛋殼：沿著裂痕分成左右兩半飛開 */
.mt-half { z-index: 3; opacity: 0; }
.mt-half.h0 { clip-path: polygon(0 0, 52% 0, 44% 22%, 56% 40%, 45% 58%, 55% 76%, 48% 100%, 0 100%); }
.mt-half.h1 { clip-path: polygon(52% 0, 100% 0, 100% 100%, 48% 100%, 55% 76%, 45% 58%, 56% 40%, 44% 22%); }
.p-burst .mt-half.h0 { animation: mt-half-l 0.9s ease-out forwards; }
.p-burst .mt-half.h1 { animation: mt-half-r 0.9s ease-out forwards; }
@keyframes mt-half-l { 0% { opacity: 1; transform: none; } 35% { opacity: 1; transform: translate(-48px, -34px) rotate(-38deg); } 100% { opacity: 0; transform: translate(-96px, 30px) rotate(-90deg); } }
@keyframes mt-half-r { 0% { opacity: 1; transform: none; } 35% { opacity: 1; transform: translate(48px, -34px) rotate(38deg); } 100% { opacity: 0; transform: translate(96px, 30px) rotate(90deg); } }
.mt-hatch .mt-flash { position: absolute; left: 50%; top: 58%; z-index: 5; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; opacity: 0; pointer-events: none;
  background: radial-gradient(circle, #fff 0, rgba(255, 255, 255, 0.9) 35%, color-mix(in srgb, var(--rc) 60%, transparent) 60%, transparent 72%); }
.p-burst .mt-flash { animation: mt-boom 0.8s ease-out forwards; }
@keyframes mt-boom { 0% { opacity: 1; transform: scale(0.4); } 30% { opacity: 1; transform: scale(6); } 100% { opacity: 0; transform: scale(12); } }
.mt-hmount { position: relative; z-index: 6; align-self: center; margin-bottom: 26px; line-height: 0; opacity: 0; }
.p-burst .mt-hmount { animation: mt-rise 1s cubic-bezier(0.2, 1.4, 0.4, 1) forwards; }
.p-reveal .mt-hmount { opacity: 1; animation: mt-bob 1.9s ease-in-out infinite; }
@keyframes mt-rise { 0% { opacity: 0; transform: translateY(46px) scale(0.2); } 60% { opacity: 1; } 100% { opacity: 1; transform: translateY(0) scale(1); } }
.p-burst .mt-rays, .p-reveal .mt-rays { opacity: 1; }
.p-burst .mt-halo, .p-reveal .mt-halo { opacity: 0.9; width: 200px; height: 200px; margin: -100px 0 0 -100px; }
.mt-hatch .mt-spark { z-index: 7; font-size: 16px; animation: none; }
.p-reveal .mt-spark { animation: mt-twinkle 1.8s ease-in-out infinite; }
.mt-hatch .mt-spark.s1 { left: 16%; top: 22%; }
.mt-hatch .mt-spark.s2 { left: 80%; top: 18%; }
.mt-hatch .mt-spark.s3 { left: 24%; top: 62%; }
.mt-hatch .mt-spark.s4 { left: 76%; top: 58%; }
.mt-hatch .mt-spark.s5 { left: 50%; top: 8%; }
.mt-hatch .mt-spark.s6 { left: 62%; top: 34%; }
.mt-hatch-info { display: grid; gap: 6px; justify-items: center; text-align: center; min-height: 60px; }
.mt-hatch-info p { margin: 0; }
.mt-hatch-name { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; }
.mt-hatch-name b { font-family: var(--serif); font-size: 22px; }
.mt-rar-pill { padding: 1px 10px; border-radius: 999px; background: var(--rc); color: #fff; font: 800 12px/1.6 var(--font); }
[data-theme="night"] .mt-rar-pill { color: #10131a; }
.mt-hatch-info .mt-chips { justify-content: center; }

/* ── 說明、圖鑑 ── */
.mt-info { display: grid; gap: 8px; }
.mt-progress { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--field); border: 1px solid var(--line-2); line-height: 1.7; }
.mt-dex { border: 1px solid var(--line-2); border-radius: 12px; background: var(--field); padding: 8px 12px; }
.mt-dex summary { cursor: pointer; font-weight: 800; }
.mt-dex[open] summary { margin-bottom: 8px; }
.mt-dex-grid { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .mt-dex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mt-dex-i, .mt-dex-egg { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 8px; border-radius: 10px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--rc) 40%, var(--line-2)); }
.mt-dex-i p, .mt-dex-egg p { margin: 0; line-height: 1.45; }
.mt-dex-eggs { display: grid; gap: 8px; }
.mt-dex-egg > div { display: grid; gap: 3px; min-width: 0; }

@media (prefers-reduced-motion: reduce) {
  .mt-flap > svg { animation: none !important; }
  .mt-flap > svg + svg { opacity: 0 !important; }
  .mt-bob, .mt-cloud, .mt-wobble, .mt-jiggle, .mt-glow, .mt-alert, .mt-hatch-btn, .mt-spark, .mt-card.mt-k-fly.rar-5, .mt-rays, .mt-halo,
  .mt-card.mt-k-fly.rar-4 .mt-pic::after, .mt-card.mt-k-fly.rar-5 .mt-pic::after, .p-reveal .mt-hmount { animation: none !important; }
  .mt-spark { opacity: 0.8; }
}

/* ───────── 2026-10-01.7 馬廄的「🐎 坐騎」分頁（js/stable.js、js/mounts.js 的 mountTab） ───────── */
/* 分頁（🐴 我的馬／🐎 坐騎） */
.stable-tabs { margin: 0 0 12px; }
.stable-tab-mount .mt-page { margin: 0; }
.stable-tab-mount .mt-embed > .card:first-child, .stable-tab-mount .mt-embed > .card[hidden] + .card { margin-top: 0; }
/* 騎士那一行：騎著的話畫騎在坐騎上（js/ride-art.js 的 rideSvg） */
.mt-rpic.mt-rpic-ride { display: grid; place-items: end center; min-width: 64px; line-height: 0; --doll-ol: #2a1d12; }
.mt-rpic-ride svg, .mt-ride-pic svg { display: block; image-rendering: pixelated; }
/* 坐騎卡片：有騎士的時候畫騎在上面（換裝效果） */
.mt-pic .mt-ride-pic { position: relative; z-index: 1; line-height: 0; --doll-ol: #2a1d12; }
.mt-card .mt-pic:has(.mt-ride-pic) { height: 150px; }
/* 坐騎技能：圖示＋名字＋說明（compact＝一行小字） */
.mt-skill { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 5px 8px; border-radius: 9px;
  background: color-mix(in srgb, #f2c250 10%, var(--field)); border: 1px solid color-mix(in srgb, #c8963a 40%, var(--line-2)); }
.mt-skill .sk-ico { flex: none; }
.mt-skill-t { display: grid; min-width: 0; line-height: 1.4; }
.mt-skill-t b { font-size: 14px; }
.mt-skill-up { font-size: 12px; font-weight: 800; color: #b0761a; }
.mt-skill-d { color: var(--text-2); }
.mt-skill.compact { display: inline-flex; padding: 2px 8px 2px 3px; margin: 2px 0; }
.mt-skill.compact .mt-skill-t { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
.mt-skill.compact .mt-skill-t b { font-size: 12.5px; }
[data-theme="night"] .mt-skill { background: color-mix(in srgb, #f2c250 8%, var(--field)); border-color: color-mix(in srgb, #f2c250 30%, var(--line-2)); }
[data-theme="night"] .mt-skill-up { color: #ffd86a; }
[data-theme="night"] .mt-rpic.mt-rpic-ride, [data-theme="night"] .mt-pic .mt-ride-pic { --doll-ol: #05070a; }
