@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/NotoSerifSC-Regular.woff") format("woff");
}
@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/NotoSerifSC-Bold.woff") format("woff");
}

:root {
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "KaiTi", "STKaiti", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --bg: #1a120c;
  --ink: #2c2216;
  --ink-soft: #6a5844;
  --paper: rgba(255, 246, 228, 0.86);
  --paper-solid: #f6ead2;
  --gold: #d4a017;
  --gold-2: #f0c14a;
  --brass: #b8860b;
  --line: rgba(160, 110, 40, 0.3);
  --danger: #c44a32;
  --ok: #2db87a;
  --text: #f4f1e8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, #3a2414 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 520px;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(80, 50, 16, 0.35), 0 0 60px rgba(0, 0, 0, 0.45);
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  background: #c4843a;
}

#hud { position: absolute; inset: 0; pointer-events: none; }

.hud-top {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top));
  left: 12px;
  right: 86px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.hud-chip {
  pointer-events: none;
  display: flex;
  align-items: baseline;
  gap: 2px;
  background: linear-gradient(180deg, rgba(255, 248, 230, 0.9), rgba(236, 218, 180, 0.78));
  border: 1px solid rgba(184, 140, 50, 0.55);
  border-radius: 999px;
  padding: 5px 11px 6px;
  font-size: 12px;
  color: #5c4a32;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 2px 8px rgba(20, 10, 0, 0.18);
  backdrop-filter: blur(10px);
}

.hud-chip b {
  color: #7a4e08;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15px;
  margin: 0 1px;
  line-height: 1;
}

.hud-chip.gold b {
  color: #c48412;
  font-size: 16px;
}

.hud-chip.warn {
  border-color: rgba(180, 70, 40, 0.45);
}

.hud-chip.warn b { color: #c44a32; }

.hud-k, .hud-unit {
  font-size: 11px;
  color: #7a6a52;
  letter-spacing: 0.02em;
}

.hud-slash {
  color: #a09070;
  margin: 0 3px;
  font-size: 12px;
}

#hud-target { color: #7a6a52; font-size: 12px; }

.icon-btn {
  pointer-events: auto;
  position: absolute;
  top: calc(10px + env(safe-area-inset-top));
  right: 12px;
  height: 36px;
  min-width: 36px;
  padding: 0 12px 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(184, 140, 50, 0.55);
  background: linear-gradient(180deg, rgba(255, 248, 230, 0.92), rgba(236, 218, 180, 0.82));
  color: #4a3a22;
  border-radius: 18px;
  font-size: 13px;
  font-family: var(--sans);
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 2px 8px rgba(20, 10, 0, 0.18);
}

.icon-btn:active { transform: translateY(1px); }

.pause-glyph {
  display: block;
  width: 8px;
  height: 12px;
  border-left: 3px solid #4a3a22;
  border-right: 3px solid #4a3a22;
  box-sizing: content-box;
  width: 3px;
}

.main-btn {
  position: absolute;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(240px, 70vw);
  height: 56px;
  border: 1px solid rgba(120, 80, 16, 0.28);
  border-radius: 28px;
  background: linear-gradient(180deg, #ffe9a8 0%, #f0c14a 46%, #d4a017 100%);
  color: #3a2a08;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  text-shadow: 0 1px 0 rgba(255, 245, 200, 0.75);
  box-shadow:
    0 1px 0 rgba(255, 255, 230, 0.85) inset,
    0 8px 0 #a67c12,
    0 14px 24px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.main-btn:active {
  transform: translateX(-50%) translateY(3px);
  box-shadow:
    0 1px 0 rgba(255, 255, 230, 0.7) inset,
    0 5px 0 #a67c12,
    0 8px 16px rgba(0, 0, 0, 0.3);
}

.main-btn.fight {
  background: linear-gradient(180deg, #a8f0cc 0%, #3ecf8e 48%, #2db87a 100%);
  color: #062816;
  text-shadow: 0 1px 0 rgba(220, 255, 230, 0.7);
  box-shadow:
    0 1px 0 rgba(220, 255, 230, 0.75) inset,
    0 8px 0 #1d7a52,
    0 14px 24px rgba(0, 0, 0, 0.35);
}

.main-btn.fight:active {
  box-shadow:
    0 1px 0 rgba(220, 255, 230, 0.6) inset,
    0 5px 0 #1d7a52,
    0 8px 16px rgba(0, 0, 0, 0.3);
}

.main-btn.cut {
  background: linear-gradient(180deg, #ffc8b4 0%, #f07864 48%, #e25b4c 100%);
  color: #2b0a08;
  text-shadow: 0 1px 0 rgba(255, 230, 220, 0.7);
  box-shadow:
    0 1px 0 rgba(255, 230, 220, 0.75) inset,
    0 8px 0 #9c2f24,
    0 14px 24px rgba(0, 0, 0, 0.35);
}

.main-btn.cut:active {
  box-shadow:
    0 1px 0 rgba(255, 230, 220, 0.6) inset,
    0 5px 0 #9c2f24,
    0 8px 16px rgba(0, 0, 0, 0.3);
}

.main-btn:disabled {
  filter: grayscale(0.35) brightness(0.88);
  cursor: default;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
}

.leave-btn {
  position: absolute;
  right: 14px;
  bottom: calc(32px + env(safe-area-inset-bottom));
  height: 36px;
  padding: 0 12px;
  border-radius: 18px;
  border: 1px solid rgba(184, 140, 50, 0.5);
  background: linear-gradient(180deg, rgba(255, 248, 230, 0.9), rgba(236, 218, 180, 0.8));
  color: #8a5a10;
  font-size: 13px;
  font-family: var(--sans);
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset, 0 2px 8px rgba(20, 10, 0, 0.16);
}

#tension-wrap {
  position: absolute;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(280px, 80vw);
  text-align: center;
  pointer-events: none;
}

.tension-label, .tension-hint {
  font-size: 12px;
  color: #f4ead0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  margin-bottom: 4px;
  letter-spacing: 0.08em;
}

.tension-hint { margin-top: 6px; letter-spacing: 0.02em; opacity: 0.88; }

.tension-bar {
  position: relative;
  height: 18px;
  border-radius: 10px;
  background: rgba(16, 10, 6, 0.62);
  border: 1px solid rgba(232, 197, 107, 0.55);
  overflow: hidden;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.2);
}

.tension-track {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    #2db87a 0%, #2db87a 58%,
    #e6b422 58%, #e6b422 78%,
    #d4453a 78%, #ff6a55 100%);
  opacity: 0.55;
}

.tension-bar::before,
.tension-bar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
  z-index: 2;
  pointer-events: none;
}
.tension-bar::before { left: 58%; }
.tension-bar::after { left: 78%; }

#tension-fill {
  position: relative;
  z-index: 1;
  height: 100%;
  width: 0%;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(90deg, #7cffb8 0%, #ffe07a 58%, #ff8a70 86%, #ff5a48 100%);
  background-size: 280px 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 2px 0 8px rgba(226, 91, 76, 0);
  transition: box-shadow 0.15s linear, width 0.06s linear;
}

#tension-wrap.hot #tension-fill {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 2px 0 18px rgba(255, 60, 40, 1);
}

#tension-wrap.hot .tension-label { color: #ffd0c4; }
#tension-wrap.hot .tension-bar {
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 120, 90, 0.45),
    0 0 18px rgba(255, 60, 40, 0.55);
  animation: tension-pulse 0.45s ease-in-out infinite alternate;
}

@keyframes tension-pulse {
  from { box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 120, 90, 0.4), 0 0 10px rgba(255, 60, 40, 0.35); }
  to { box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 160, 120, 0.7), 0 0 22px rgba(255, 50, 30, 0.75); }
}

.tension-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #d8f0c8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}
.tension-legend .t-danger { color: #ffc0b4; }

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  padding-top: calc(20px + env(safe-area-inset-top));
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse 90% 70% at 50% 38%, rgba(40, 22, 10, 0.12), rgba(12, 10, 18, 0.42));
  overflow: auto;
}

.overlay.hidden, .hidden { display: none !important; }

.card {
  position: relative;
  width: min(400px, 100%);
  background:
    linear-gradient(180deg, rgba(255, 250, 236, 0.94), rgba(244, 228, 198, 0.9));
  color: var(--ink);
  border: 1px solid rgba(184, 140, 50, 0.55);
  border-radius: 18px;
  padding: 26px 22px 20px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 0 0 1px rgba(120, 80, 20, 0.08) inset,
    0 18px 46px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(14px) saturate(1.1);
}

.card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(184, 140, 50, 0.28);
  border-radius: 12px;
  pointer-events: none;
}

.card.title-card {
  width: min(360px, 100%);
  background:
    linear-gradient(180deg, rgba(255, 250, 236, 0.88), rgba(244, 228, 198, 0.82));
  padding: 28px 22px 22px;
}

.corner {
  position: absolute;
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 1;
}
.corner::before, .corner::after {
  content: "";
  position: absolute;
  background: linear-gradient(180deg, #f0d078, #b8860b);
  border-radius: 1px;
}
.corner::before { width: 18px; height: 1.5px; }
.corner::after { width: 1.5px; height: 18px; }
.c-tl { top: 5px; left: 5px; }
.c-tr { top: 5px; right: 5px; }
.c-tr::before { right: 0; }
.c-tr::after { right: 0; }
.c-bl { bottom: 5px; left: 5px; }
.c-bl::before { bottom: 0; }
.c-br { bottom: 5px; right: 5px; }
.c-br::before { right: 0; bottom: 0; }
.c-br::after { right: 0; bottom: 0; }

.title-lockup {
  text-align: center;
  margin-bottom: 4px;
}

.title-mark {
  width: 72px;
  height: 10px;
  margin: 0 auto 8px;
  background:
    linear-gradient(90deg, transparent, #c9962a 18%, #c9962a 82%, transparent),
    radial-gradient(circle at 50% 50%, #f0d078 0 2px, transparent 3px);
  background-size: 100% 1px, 10px 10px;
  background-repeat: no-repeat;
  background-position: center, center;
  opacity: 0.9;
}

.card h1 {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
  color: #8a5a10;
  text-align: center;
  text-shadow:
    0 1px 0 #fff6d0,
    0 2px 0 #d4b05a,
    0 8px 18px rgba(160, 100, 20, 0.18);
  line-height: 1.2;
}

.title-motto {
  font-family: var(--serif);
  text-align: center;
  color: #8a6a3a;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  margin: 8px 0 2px;
}

.card .sub {
  text-align: center;
  color: var(--ink-soft);
  margin: 10px 0 18px;
  font-size: 13.5px;
  line-height: 1.65;
}

.card h2 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #8a5a10;
  text-align: center;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 0 #fff6d0;
}

.btn-row { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

.btn {
  height: 48px;
  border: 0;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--serif);
  letter-spacing: 0.1em;
  text-indent: 0.1em;
  cursor: pointer;
}

.btn.primary {
  background: linear-gradient(180deg, #ffe9a8, #d4a017);
  color: #2c1e06;
  border: 1px solid rgba(120, 80, 16, 0.25);
  box-shadow: 0 1px 0 rgba(255, 255, 230, 0.8) inset, 0 3px 0 #a67c12, 0 6px 12px rgba(0, 0, 0, 0.16);
}

.btn.primary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(255, 255, 230, 0.7) inset, 0 1px 0 #a67c12, 0 3px 8px rgba(0, 0, 0, 0.14);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(160, 110, 40, 0.35);
  letter-spacing: 0.08em;
  text-indent: 0.08em;
  font-weight: 400;
}

.btn.ghost:active { background: rgba(160, 110, 40, 0.08); }

.stat-row {
  display: flex;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 14px;
  margin: 7px 0;
  padding: 0 2px;
}

.stat-row b {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 700;
}

.catch-list {
  list-style: none;
  margin: 12px 0;
  max-height: 180px;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.catch-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.catch-list li b {
  font-family: var(--serif);
  color: #8a5a10;
}

.rarity {
  display: inline-block;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 8px;
  margin-right: 6px;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
}

.rarity.垃圾 { background: #ece6da; color: #6a6258; border-color: #d4cdc0; }
.rarity.普通 { background: #e3f5e8; color: #2a6a3e; border-color: #b7e0c2; }
.rarity.稀有 { background: #d8f3ff; color: #1a5a8a; border-color: #9ad4f0; box-shadow: 0 0 8px rgba(80, 200, 230, 0.35); }
.rarity.史诗 { background: #efe0ff; color: #5a2a8a; border-color: #c9a8f0; box-shadow: 0 0 8px rgba(168, 120, 255, 0.35); }
.rarity.传说 { background: linear-gradient(180deg, #fff0c0, #f0d070); color: #7a4e08; border-color: #e0b83a; box-shadow: 0 0 10px rgba(232, 197, 107, 0.55); }
.rarity.梗物 { background: #ffdce6; color: #8a2a4a; border-color: #f0a8bc; box-shadow: 0 0 8px rgba(255, 130, 170, 0.35); }

.shop-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 16px; }

.shop-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 252, 244, 0.7), rgba(236, 220, 190, 0.4));
}

.shop-item .name {
  font-weight: 700;
  font-family: var(--serif);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.shop-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex: 0 0 28px;
  background: linear-gradient(180deg, #fff0b8, #e0b44a);
  box-shadow: 0 1px 0 rgba(255, 255, 230, 0.8) inset, 0 1px 3px rgba(80, 50, 0, 0.15);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.shop-ico::after { content: none; display: none; }

.shop-ico svg {
  width: 22px;
  height: 22px;
  display: block;
}

.shop-item .desc {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.shop-item button {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(120, 80, 16, 0.2);
  background: linear-gradient(180deg, #ffe9a8, #d4a017);
  color: #2c1e06;
  font-weight: 700;
  font-family: var(--serif);
  cursor: pointer;
  white-space: nowrap;
}

.shop-item button:disabled {
  background: #e6dfd0;
  color: #8a8070;
  border-color: #d4cdc0;
  cursor: default;
}

.dex-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-height: 50vh;
  overflow: auto;
  margin: 12px 0 16px;
}

.dex-item {
  padding: 10px 10px 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 252, 244, 0.7), rgba(236, 220, 190, 0.4));
  font-size: 13px;
  position: relative;
  overflow: hidden;
}

.dex-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #c4b8a0;
}

.dex-item.is-on.rarity-普通::before { background: #3ecf8e; }
.dex-item.is-on.rarity-稀有::before { background: #3db8e0; }
.dex-item.is-on.rarity-史诗::before { background: #a878f0; }
.dex-item.is-on.rarity-传说::before { background: linear-gradient(180deg, #ffe7a0, #d4a017); }
.dex-item.is-on.rarity-垃圾::before { background: #9a9080; }
.dex-item.is-on.rarity-梗物::before { background: #f080a0; }

.dex-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 0;
}

.dex-swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  flex: 0 0 8px;
}

.dex-item .locked { color: var(--ink-soft); margin-top: 4px; }
.dex-item b { font-family: var(--serif); }

.event-text {
  font-size: 15px;
  line-height: 1.8;
  margin: 12px 0 18px;
  text-align: center;
  color: var(--ink);
  font-family: var(--serif);
}

.toast {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--paper);
  border: 1px solid var(--gold);
  color: #8a5a10;
  padding: 10px 16px;
  border-radius: 12px;
  pointer-events: none;
  font-weight: 700;
}


/* —— HUD gap, catch juice, tips, cabin, dex minis —— */
.hud-chip.gap b { color: #c48412; }
.hud-chip.gap.ok {
  border-color: rgba(45, 184, 122, 0.5);
}
.hud-chip.gap.ok b,
.hud-chip.gap.ok #hud-gap-label { color: #1f8a58; }
.hud-chip.gap.close {
  border-color: rgba(196, 74, 50, 0.45);
}
.hud-chip.gap.close b { color: #c44a32; }

#tip-banner {
  position: absolute;
  left: 50%;
  top: calc(86px + env(safe-area-inset-top));
  transform: translateX(-50%);
  width: min(360px, calc(100% - 28px));
  z-index: 6;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: linear-gradient(180deg, rgba(255, 250, 236, 0.94), rgba(244, 228, 198, 0.9));
  border: 1px solid rgba(184, 140, 50, 0.55);
  color: #5c4a32;
  border-radius: 12px;
  padding: 9px 10px 9px 12px;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 6px 18px rgba(0,0,0,0.2);
  animation: tip-in 0.28s ease-out;
}
#tip-banner.out { animation: tip-out 0.28s ease-in forwards; }
#tip-banner span { flex: 1; font-family: var(--serif); }
#tip-banner .tip-x {
  pointer-events: auto;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  color: #8a6a3a;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  border-radius: 11px;
}
#tip-banner .tip-x:active { background: rgba(160, 110, 40, 0.12); }
@keyframes tip-in { from { opacity: 0; transform: translateX(-50%) translateY(-6px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes tip-out { to { opacity: 0; transform: translateX(-50%) translateY(-6px); } }

#catch-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.catch-pop {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%) scale(0.86);
  min-width: 168px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 250, 236, 0.96), rgba(244, 228, 198, 0.94));
  border: 1px solid rgba(184, 140, 50, 0.6);
  border-radius: 14px;
  padding: 12px 16px 11px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.75) inset, 0 10px 28px rgba(0,0,0,0.28);
  animation: pop-in 0.28s cubic-bezier(.2,.8,.2,1) forwards;
}
.catch-pop.out { animation: pop-out 0.32s ease-in forwards; }
.catch-pop.is-rare {
  box-shadow: 0 1px 0 rgba(255,255,255,0.75) inset, 0 0 0 1px rgba(232, 197, 107, 0.45), 0 10px 32px rgba(180, 120, 20, 0.4);
}
.catch-pop.is-gag {
  box-shadow: 0 1px 0 rgba(255,255,255,0.75) inset, 0 0 0 1px rgba(240, 128, 160, 0.4), 0 10px 32px rgba(160, 40, 80, 0.28);
}
.catch-first {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #8a5a10;
  font-family: var(--serif);
  margin-bottom: 4px;
}
.catch-dex {
  font-size: 11px;
  color: #7a6a52;
  margin-bottom: 6px;
}
.catch-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.catch-gold {
  margin-top: 4px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 22px;
  color: #c48412;
}
.catch-suspense {
  font-family: var(--serif);
  font-size: 16px;
  color: #8a5a10;
  letter-spacing: 0.08em;
}
@keyframes pop-in { to { transform: translate(-50%, -50%) scale(1); } }
@keyframes pop-out { to { opacity: 0; transform: translate(-50%, -58%) scale(0.92); } }

.fly-gold {
  position: absolute;
  transform: translate(-50%, -50%);
  color: #d4a017;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 16px;
  text-shadow: 0 1px 2px rgba(60, 30, 0, 0.35), 0 0 8px rgba(255, 210, 80, 0.6);
  will-change: transform, opacity;
  pointer-events: none;
}
.fly-gold.dot { font-size: 13px; color: #f0c14a; }

#break-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background: radial-gradient(ellipse 70% 50% at 50% 45%, rgba(180, 30, 20, 0.28), transparent 70%);
  animation: break-flash 0.45s ease-out forwards;
}
@keyframes break-flash { from { opacity: 1; } to { opacity: 0; } }

.near-miss {
  text-align: center;
  font-family: var(--serif);
  font-size: 18px;
  color: #8a5a10;
  margin: 8px 0 4px;
  letter-spacing: 0.06em;
}
.best-catch {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0 4px;
  padding: 9px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 236, 180, 0.7), rgba(240, 210, 140, 0.45));
  border: 1px solid rgba(184, 140, 50, 0.45);
  font-size: 14px;
}
.best-catch .bc-k {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #8a6a3a;
  display: block;
  margin-bottom: 2px;
}
.best-catch b { font-family: var(--serif); color: #8a5a10; }
.catch-list li.is-best b { color: #c48412; }
.catch-list li.is-best { background: linear-gradient(90deg, rgba(255, 236, 180, 0.35), transparent); }

.shop-gap {
  text-align: center;
  font-family: var(--serif);
  font-size: 14px;
  color: #8a5a10;
  background: rgba(255, 236, 180, 0.4);
  border: 1px solid rgba(184, 140, 50, 0.3);
  border-radius: 10px;
  padding: 8px 10px;
  margin: 0 0 10px;
}
.shop-gap.ok { color: #1f8a58; background: rgba(180, 230, 200, 0.35); }
.shop-after {
  font-size: 11px;
  color: #8a6a3a;
  font-weight: 400;
  letter-spacing: 0;
  text-indent: 0;
  display: block;
  margin-top: 2px;
}
.shop-item button { position: relative; }

.dex-progress {
  text-align: center;
  font-family: var(--serif);
  color: #8a5a10;
  margin: -4px 0 10px;
  font-size: 15px;
}
.dex-grid {
  grid-template-columns: 1fr 1fr;
}
.dex-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 12px;
  min-height: 56px;
}
.dex-mini {
  width: 52px;
  height: 36px;
  flex: 0 0 52px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(90, 150, 180, 0.18), rgba(20, 40, 60, 0.12));
  display: block;
}
.dex-item .dex-meta { min-width: 0; flex: 1; }
.dex-item.locked-item { opacity: 0.85; }
.dex-item.locked-item .dex-mini {
  background: linear-gradient(180deg, rgba(40, 36, 30, 0.18), rgba(20, 16, 12, 0.12));
}

.btn-row.compact {
  flex-direction: row;
  flex-wrap: wrap;
}
.btn-row.compact .btn { flex: 1 1 30%; min-width: 96px; height: 42px; font-size: 14px; }

.btn.daily {
  background: linear-gradient(180deg, #fff6dc, #f0d090);
  color: #5a3a08;
  border: 1px solid rgba(160, 110, 40, 0.35);
  box-shadow: 0 1px 0 rgba(255,255,230,0.8) inset;
}
.btn.daily:disabled,
.btn.daily.is-done {
  filter: none;
  background: linear-gradient(180deg, #f3ead6, #e6dcc8);
  color: #7a6a52;
  box-shadow: none;
}
.daily-note {
  text-align: center;
  font-size: 12px;
  color: #7a6a52;
  margin-top: 8px;
  line-height: 1.5;
}

.cabin-bank {
  text-align: center;
  font-family: var(--serif);
  font-size: 15px;
  color: #8a5a10;
  margin: 4px 0 12px;
}
.cabin-slot { margin-bottom: 12px; }
.cabin-slot h3 {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: #8a6a3a;
  font-weight: 700;
  margin: 0 0 6px;
}
.cabin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.cabin-opt {
  text-align: left;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 252, 244, 0.7), rgba(236, 220, 190, 0.4));
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  font-family: var(--sans);
  color: var(--ink);
}
.cabin-opt .n { font-family: var(--serif); font-weight: 700; font-size: 13px; display: block; }
.cabin-opt .d { font-size: 11px; color: var(--ink-soft); line-height: 1.35; margin-top: 2px; }
.cabin-opt.is-on {
  border-color: rgba(184, 140, 50, 0.7);
  box-shadow: 0 0 0 1px rgba(212, 160, 23, 0.35);
  background: linear-gradient(180deg, rgba(255, 236, 180, 0.75), rgba(240, 210, 140, 0.5));
}
.cabin-opt.is-locked {
  opacity: 0.72;
  cursor: default;
}
.cabin-opt.is-buyable { cursor: pointer; border-color: rgba(45, 184, 122, 0.35); }

.reward-pill {
  text-align: center;
  font-family: var(--serif);
  font-size: 16px;
  color: #8a5a10;
  margin: 8px 0;
}
