/* Component styles: inventory, shop, struggle FX, toasts, etc. */

.stat {
  background: rgba(12, 18, 18, 0.78);
  border: 2px solid #0c0c0c;
  border-radius: 10px;
  padding: 0.35rem 0.65rem;
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
  font-size: clamp(0.85rem, 2.5vw, 1rem);
}

.stat .label {
  opacity: 0.7;
  font-size: 0.68em;
  text-transform: uppercase;
}

.shop-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.shop-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
}

.shop-item .btn {
  width: auto;
  min-width: 4.5rem;
}

.trophy-modal {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  pointer-events: none;
  padding: max(0.5rem, env(safe-area-inset-top, 0px)) max(0.5rem, env(safe-area-inset-right, 0px))
    max(0.75rem, env(safe-area-inset-bottom, 0px)) max(0.5rem, env(safe-area-inset-left, 0px));
  background: rgba(4, 8, 12, 0.45);
  box-sizing: border-box;
}
.trophy-modal.hidden { display: none; }
.trophy-card {
  pointer-events: auto;
  width: min(36rem, 94vw);
  max-width: 100%;
  flex: 0 0 auto;
  text-align: center;
  background: transparent;
  border: none;
  box-shadow: none;
  box-sizing: border-box;
}
.trophy-surge-stage {
  --trophy-stage-w: min(92vw, calc(64vh * 183 / 360), 34rem);
  position: relative;
  width: var(--trophy-stage-w);
  max-width: 100%;
  aspect-ratio: 183 / 360;
  max-height: min(64vh, 72dvh);
  margin: 0 auto 0.35rem;
  flex-shrink: 0;
}
.trophy-surge-sheet {
  position: absolute;
  inset: 0;
  background-image: url('../assets/surge.webp');
  background-repeat: no-repeat;
  background-position: 0 0;
  /* size/position set in px by trophy-catch.js per frame */
  pointer-events: none;
}
/* Fish centered on surge sheet — nearly full hero width (128px art upscales) */
.trophy-surge-hero {
  position: absolute;
  left: 49.5%;
  top: 40%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 80%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.trophy-art,
.trophy-art-fallback {
  display: block;
  width: 95%;
  height: auto;
  margin: 0 auto;
  justify-self: center;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transform: scale(0.12);
  transform-origin: center center;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.45));
}
.trophy-art-fallback {
  display: grid;
  place-items: center;
  color: #f4efe6;
  font-size: clamp(3.2rem, 14vw, 5.5rem);
  line-height: 0;
}
.trophy-art-fallback .ico,
.trophy-art-fallback .ico-art,
.trophy-art-fallback img,
.trophy-art-fallback svg {
  width: 1em;
  height: 1em;
  max-width: 100%;
  max-height: 100%;
}
/* Name in lower third of the plaque (over calm water / name slot) */
.trophy-surge-stage .trophy-name {
  position: absolute;
  left: 50%;
  bottom: 21%;
  z-index: 2;
  width: 82%;
  margin: 0;
  padding: 0;
  transform: translateX(-50%);
  text-align: center;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: clamp(1.9rem, 5.8vw, 3rem);
  line-height: 1.05;
  pointer-events: none;
}
.trophy-desc {
  position: relative;
  top: -3rem;
  display: block;
  width: 100%;
  margin: 0 auto 0.25rem;
  max-width: 28rem;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.35;
  color: rgba(244, 239, 230, 0.88);
}
.trophy-tags {
  position: relative;
  top: -3rem;
  justify-content: center;
  margin: 0.15rem 0 0.3rem;
}
.trophy-tags .detail-tag {
  min-height: 1.85rem;
  padding: 0.35rem 0.75rem;
}
.trophy-pills {
  position: relative;
  top: -3rem;
  margin: 0.1rem auto 0.25rem;
  max-width: 22rem;
}
.trophy-stats {
  position: relative;
  top: -3rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  margin: 0.2rem auto 0.35rem;
  padding: 0;
  max-width: min(22rem, 100%);
  font-size: 0.9rem;
  font-weight: 700;
  color: #e8f0ea;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.trophy-stats .trophy-stat-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  width: max-content;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.35rem 0.9rem 0.35rem 0.55rem;
  border-radius: 0;
  background: url('../assets/bg-tab.webp') center / 100% 100% no-repeat;
  color: #f4efe6;
  text-align: left;
}

.trophy-stats .trophy-stat-ico {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  display: grid;
  place-items: center;
  line-height: 0;
}

.trophy-stats .trophy-stat-ico .ico,
.trophy-stats .trophy-stat-ico svg,
.trophy-stats .trophy-stat-ico img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.trophy-stats .trophy-stat-text {
  min-width: 0;
  line-height: 1.2;
}
.trophy-timer {
  min-height: 1.1em;
  color: #ffd76a;
  font-weight: 700;
}
.trophy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.35rem;
}
.trophy-actions.hidden { display: none; }
.trophy-actions .btn { width: auto; min-width: 7rem; }
.trophy-modal:not(.hidden) { pointer-events: auto; }
.trophy-card { pointer-events: auto; }

.toast {
  position: fixed;
  left: 50%;
  top: max(0.75rem, calc(env(safe-area-inset-top, 0px) + 0.75rem));
  bottom: auto;
  transform: translateX(-50%);
  --plat-edge: 8px;
  --plat-corner: 18px;
  z-index: 60;
  display: flex;
  align-items: center;
  width: max-content;
  max-width: min(34rem, 94vw);
  min-width: 0;
  padding: calc(var(--plat-edge) + 0.28rem) calc(var(--plat-edge) + 0.95rem) !important;
  color: #f0e6d4 !important;
  background-color: #2a1a0e !important;
  background-image: url('../assets/grid-platform.webp') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  border: none !important;
  border-radius: 6px !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5) !important;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  animation: pop 0.35s ease;
  overflow: visible;
}

/* Catch toast: mid screen, icon + left copy. Plain (cancel etc.) stay top. */
.toast:has(.toast-ico) {
  top: auto;
  bottom: 34%;
  text-align: left;
  min-width: min(16rem, 88vw);
}

.toast-body {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: 0;
  width: 100%;
}

.toast:has(.toast-ico) .toast-body {
  justify-content: flex-start;
}

.toast-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.08rem;
  min-width: 0;
  flex: 1 1 auto;
}

.toast:has(.toast-ico) .toast-text {
  align-items: flex-start;
}

.toast-l1,
.toast-l2 {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.toast-l2 {
  font-size: 0.88em;
  opacity: 0.92;
}

.toast-text-one {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.toast.bomb {
  color: #ffb4b4;
}

.toast.good {
  color: #b8f0a8;
}

@keyframes pop {
  from {
  transform: translateX(-50%) scale(0.85);
  opacity: 0;
  }
  to {
  transform: translateX(-50%) scale(1);
  opacity: 1;
  }
}

.xp-label {
  margin-left: auto;
  font-size: 0.78rem;
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}

.xp-bar-lg {
  height: 10px;
}

.stat-xp {
  min-width: 110px;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
}

.stat-xp-top {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.xp-label-hud {
  font-size: inherit;
  opacity: 0.95;
  margin-left: 0.25rem;
  font-variant-numeric: tabular-nums;
}

/* Composite XP: bg-exp → bar-exp (clipped fill) → border-exp → label */
.xp-bar-exp {
  --xp: 0;
  /* Tight inset so bar-exp.webp fills the wood frame (do not inflate). */
  --xp-inset: 2px;
  --xp-overhang: 0.45rem;
  position: relative;
  box-sizing: border-box;
  padding: 0;
  border: none !important;
  border-radius: 999px;
  overflow: hidden;
  isolation: isolate;
  background: transparent !important;
  box-shadow: none !important;
  container-type: inline-size;
}

.xp-bar-exp .xp-exp-bg,
.xp-bar-exp .xp-exp-border {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
}

.xp-bar-exp .xp-exp-bg {
  background-image: url('../assets/bg-exp.webp');
}

.xp-bar-exp .xp-exp-border {
  z-index: 3;
  background-image: url('../assets/border-exp.webp');
}

.xp-bar-exp .xp-fill {
  position: absolute;
  z-index: 1;
  left: calc(var(--xp-inset) - var(--xp-overhang));
  top: var(--xp-inset);
  bottom: var(--xp-inset);
  height: auto !important;
  width: max(
    1.35rem,
    calc((100% - 2 * var(--xp-inset)) * var(--xp) / 100 + var(--xp-overhang))
  );
  max-width: calc(100% - var(--xp-inset) + var(--xp-overhang));
  overflow: hidden;
  border-radius: 999px;
  background: none !important;
  box-shadow: none !important;
  transition: width 0.25s ease;
}

.xp-bar-exp .xp-fill::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: calc(100cqw - 2 * var(--xp-inset));
  background: url('../assets/bar-exp.webp') center / 100% 100% no-repeat;
  border-radius: 999px;
  pointer-events: none;
}

.xp-bar-hud {
  /* Outer wood plate size — not fill inset */
  width: 10.5rem;
  flex: none;
  height: 1.85rem !important;
}

.hud-xp-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 2px 8px;
  font-size: 0.92rem;
  font-weight: 800;
  font-family: Fredoka, 'Arial Black', sans-serif;
  letter-spacing: 0.01em;
  color: #fff;
  -webkit-text-stroke: 1.6px #111;
  paint-order: stroke fill;
  white-space: nowrap;
  pointer-events: none;
  line-height: 1;
}

.hud-xp-level {
  position: absolute;
  left: calc(0.55rem + 8px);
}

/* Level beside name — same type size as bar overlay, never ellipsized. */
.identity-level {
  position: static;
  left: auto;
  flex-shrink: 0;
  font-size: 0.92rem;
  font-weight: 800;
  font-family: Fredoka, 'Arial Black', sans-serif;
  letter-spacing: 0.01em;
  color: #fff;
  -webkit-text-stroke: 1.6px #111;
  paint-order: stroke fill;
  white-space: nowrap;
  line-height: 1;
}

.chat-system {
  color: #9ec9b8;
  font-style: italic;
  opacity: 0.95;
}

.chat-catch {
  color: #d8e8a0;
  font-style: normal;
}

#map-zones {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.lake-zone {
  --plat-edge: 8px;
  --plat-corner: 12px;
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  padding: calc(var(--plat-edge) + 0.5rem) calc(var(--plat-edge) + 0.9rem) !important;
  border: none !important;
  border-radius: 6px !important;
  color: #f0e6d4 !important;
  font: 600 11px/1.2 "Trebuchet MS", sans-serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  transition: transform 0.12s ease, filter 0.12s ease;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-sizing: border-box;
  background-color: #2a1a0e !important;
  background-image: url('../assets/grid-platform.webp') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: 21rem;
  min-width: 10rem;
  pointer-events: none;
  white-space: normal;
  overflow: visible;
}

.lake-zone > *:not(.inv-plat-frame):not(.lz-online) {
  position: relative;
  z-index: 1;
}

.lz-online {
  position: absolute;
  top: calc(var(--plat-edge) + 0.18rem);
  right: calc(var(--plat-edge) + 0.32rem);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  pointer-events: none;
  line-height: 1;
}

.lz-online-dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #3dce6a;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 0 5px rgba(61, 206, 106, 0.55);
  flex: 0 0 auto;
}

.lz-online-n {
  font-family: "Trebuchet MS", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  color: #e8ffe8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
  min-width: 0.6em;
}

@media (max-width: 900px) {
  .lz-online {
    top: calc(var(--plat-edge) + 0.1rem);
    right: calc(var(--plat-edge) + 0.22rem);
    gap: 0.22rem;
  }

  .lz-online-dot {
    width: 0.4rem;
    height: 0.4rem;
  }

  .lz-online-n {
    font-size: 0.64rem;
  }
}

.lake-zone:focus-visible {
  outline: 2px solid #e8c43a;
  outline-offset: 2px;
}

.lake-zone.open:hover {
  transform: translate(-50%, -50%) scale(1.04);
  filter: brightness(1.06);
}

.lake-zone.locked {
  color: rgba(240, 230, 212, 0.72) !important;
  cursor: not-allowed;
  filter: saturate(0.45) brightness(0.82);
}

.lake-zone.locked:hover {
  transform: translate(-50%, -50%);
  filter: saturate(0.5) brightness(0.88);
}

.lake-zone.locked-premium {
  cursor: pointer;
  filter: saturate(0.85) brightness(0.95);
}

.lake-zone.locked-premium:hover {
  transform: translate(-50%, -50%) scale(1.02);
  filter: saturate(1) brightness(1.05);
}

.lz-title-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  max-width: 100%;
  min-width: 0;
}

.lz-icon {
  flex: 0 0 auto;
  font-size: clamp(12px, 1.8vw, 16px);
  line-height: 1;
  opacity: 0.95;
  display: grid;
  place-items: center;
}

.lz-icon-open {
  width: 1.2em;
  height: 1.2em;
  border-radius: 50%;
  background: rgba(40, 120, 70, 0.85);
  color: #e8ffe8;
  font-size: clamp(10px, 1.4vw, 13px);
}

.lz-icon-vip {
  width: 1.4em;
  height: 0.95em;
  font-size: clamp(10px, 1.5vw, 13px);
}

.lz-icon-vip .ico,
.lz-icon-vip .ico-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.lz-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.22rem;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.lz-name {
  font-size: clamp(1.25rem, 3.4vw, 1.65rem);
  text-align: left;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  white-space: normal;
  line-height: 1.1;
  padding: 0;
}

.lz-badge {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  margin-top: 0.05rem;
  background: rgba(0, 0, 0, 0.4);
  overflow: visible;
}

.lz-open,
.lz-lock {
  border-radius: 0;
  min-height: 1.5rem;
  padding: 0.26rem 0.7rem 0.3rem;
  background: url('../assets/bg-tab.webp') center / 100% 100% no-repeat;
  color: #f0e6d4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.lz-lock {
  width: 100%;
  box-sizing: border-box;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
  font-size: 0.72rem;
  padding: 0.28rem 0.5rem 0.32rem;
}

.lz-open {
  position: relative;
  isolation: isolate;
  background: none;
  color: #d8ffd0;
  white-space: nowrap;
  max-width: 100%;
  padding: 0.32rem 0.85rem 0.36rem;
  font-size: 0.8rem;
  min-height: 1.65rem;
}
.lz-open::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/bg-tab.webp') center / 100% 100% no-repeat;
  filter: sepia(0.5) hue-rotate(78deg) saturate(1.7) brightness(0.9);
  z-index: -1;
  pointer-events: none;
}

.lake-zone.premium.open .lz-open {
  color: #ffe9a8;
}
.lake-zone.premium.open .lz-open::before {
  filter: sepia(0.55) hue-rotate(8deg) saturate(1.6) brightness(0.95);
}

.lz-prem {
  border-radius: 0;
  padding: 0.28rem 0.75rem 0.32rem;
  min-height: 1.55rem;
  background: url('../assets/bg-price.webp') center / 100% 100% no-repeat;
  color: #fff6d6;
  font-family: 'Lobster', Georgia, serif;
  font-weight: 400;
  font-size: clamp(0.82rem, 1.6vw, 0.98rem);
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.lz-prem .ico {
  font-size: 1em;
  line-height: 1;
}

.lz-prem .ico-img {
  width: 1em;
  height: 1em;
  display: block;
  object-fit: contain;
}

.shop-gold {
  font-size: 0.95rem;
}

.shop-sims {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sims-card {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 0.6rem;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
}

.sims-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg,#3a5,#174);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 700;
}

.sims-title {
  font-weight: 700;
}

.sims-bars {
  letter-spacing: 0.08em;
  color: #9be08a;
  font-size: 0.85rem;
}

.sims-meta {
  font-size: 0.8rem;
  opacity: 0.85;
}

.premium-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}

.premium-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.2rem;
  padding: 0.85rem 0.75rem 0.75rem;
  border-radius: 14px;
  /* Wood platform + dark filter (keep dimming) */
  background-color: #2a1a0e;
  background-image:
    linear-gradient(rgba(12, 7, 4, 0.58), rgba(12, 7, 4, 0.62)),
    url('../assets/grid-platform.webp');
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  box-shadow: inset 0 0 0 1px rgba(232, 196, 58, 0.12);
}

.premium-status-dot-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #8dff9a;
}

.premium-status-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #5adf6a;
  box-shadow: 0 0 0 3px rgba(90, 223, 106, 0.18);
}

.premium-status-time {
  margin-top: 0.15rem;
  font-size: clamp(1.55rem, 5vw, 1.9rem);
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}

.premium-status-sub {
  font-size: 0.82rem;
  color: rgba(245, 235, 224, 0.72);
}

.premium-bar {
  width: 100%;
  height: 0.45rem;
  margin-top: 0.55rem;
  border-radius: 999px;
  background: rgba(40, 24, 14, 0.9);
  overflow: hidden;
}

.premium-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c9a227, #f0d45a);
}

.premium-status-locked {
  gap: 0.35rem;
  padding: 1rem 0.85rem;
}

.premium-lock-wrap {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  background: rgba(20, 12, 8, 0.55);
  color: rgba(245, 235, 224, 0.85);
  box-shadow: inset 0 0 0 1px rgba(232, 196, 58, 0.18);
}

.premium-status-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
}

.premium-status-hint {
  max-width: 18rem;
  font-size: 0.8rem;
  line-height: 1.35;
  color: rgba(245, 235, 224, 0.7);
}

.premium-status-preview {
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  padding: 0.85rem 0.9rem;
}

.premium-preview-now,
.premium-preview-after {
  width: 100%;
  text-align: center;
}

.premium-preview-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: rgba(232, 196, 58, 0.9);
}

.premium-preview-after-label {
  color: #8dff9a;
}

.premium-preview-time {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.premium-preview-time-lg {
  font-size: clamp(1.45rem, 4.5vw, 1.75rem);
  margin-top: 0.1rem;
}

.premium-preview-arrow {
  text-align: center;
  color: #e8c43a;
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.9;
}

/* Wood CTAs in premium modal */
#premium-modal .wood-cta {
  width: 100%;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

#premium-modal .wood-cta .ico {
  display: inline-flex;
  width: 1.15rem;
  height: 1.15rem;
  line-height: 0;
}

#premium-modal .wood-cta .ico img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#premium-modal .wood-cta strong {
  font-variant-numeric: tabular-nums;
}

/* Green wood like map «Открыто · войти» — Зайти / Продлить */
#premium-modal .premium-enter.wood-cta {
  position: relative;
  isolation: isolate;
  color: #d8ffd0 !important;
  background: transparent !important;
  background-image: none !important;
  filter: none !important;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

#premium-modal .premium-enter.wood-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: url('../assets/bg-tab.webp') center / 100% 100% no-repeat;
  filter: sepia(0.5) hue-rotate(78deg) saturate(1.7) brightness(0.9);
  pointer-events: none;
}

#premium-modal .premium-enter.wood-cta:hover {
  filter: none !important;
}

#premium-modal .premium-enter.wood-cta:hover::before {
  filter: sepia(0.5) hue-rotate(78deg) saturate(1.85) brightness(1.02);
}

/* Gold wood — Пополнить */
#premium-modal .premium-topup.wood-cta {
  position: relative;
  isolation: isolate;
  color: #fff6d0 !important;
  background: transparent !important;
  background-image: none !important;
  filter: none !important;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

#premium-modal .premium-topup.wood-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: url('../assets/bg-tab.webp') center / 100% 100% no-repeat;
  filter: sepia(0.65) hue-rotate(5deg) saturate(1.55) brightness(1.05);
  pointer-events: none;
}

#premium-modal .premium-topup.wood-cta:hover {
  filter: none !important;
}

#premium-modal .premium-topup.wood-cta:hover::before {
  filter: sepia(0.65) hue-rotate(5deg) saturate(1.7) brightness(1.12);
}

.premium-extend {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.premium-extend-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(232, 196, 58, 0.9);
}

.premium-period-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.premium-period {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 3.6rem;
  padding: 0.55rem 0.3rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  color: #f5ebe0;
  background-color: #2a1a0e;
  background-image:
    linear-gradient(rgba(18, 11, 7, 0.55), rgba(18, 11, 7, 0.62)),
    url('../assets/grid-platform.webp');
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  box-shadow: inset 0 0 0 1px rgba(232, 196, 58, 0.2);
  touch-action: manipulation;
}

.premium-period:hover {
  filter: brightness(1.08);
}

.premium-period:active {
  transform: scale(0.98);
}

.premium-period-label {
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0.92;
}

.premium-period-price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: #e8c43a;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 #4a2a0a;
}

.premium-period-price .ico {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
  line-height: 0;
}

.premium-period-price .ico img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.premium-footer {
  margin: 0.1rem 0 0;
  text-align: center;
  font-size: 0.72rem;
  color: rgba(245, 235, 224, 0.55);
}

.premium-rows {
  display: flex;
  flex-direction: column;
}

.premium-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.1rem;
  border-bottom: 1px solid rgba(232, 196, 58, 0.14);
  font-size: 0.88rem;
}

.premium-row:last-child {
  border-bottom: none;
}

.premium-row-label,
.premium-row-val {
  color: #f5ebe0;
  font-weight: 600;
}

.premium-row-val {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-variant-numeric: tabular-nums;
}

.premium-row-cost .premium-row-val {
  color: #e8c43a;
  font-size: 1.08rem;
  font-weight: 900;
}

.premium-row-cost .premium-row-val strong {
  font-weight: 900;
}

.premium-row-val .ico {
  display: inline-flex;
  width: 1.05rem;
  height: 1.05rem;
  line-height: 0;
}

.premium-row-val .ico img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.premium-short {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  color: #fff6f0;
  font-size: 0.88rem;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.premium-short::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: url('../assets/bg-tab.webp') center / 100% 100% no-repeat;
  filter: sepia(0.75) hue-rotate(-45deg) saturate(2.6) brightness(0.72);
  pointer-events: none;
}

.premium-short-label {
  flex: 0 1 auto;
  min-width: 0;
}

.premium-short-amt {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  font-size: 1.15rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.premium-short-amt strong {
  font-weight: 900;
}

.premium-short .ico {
  display: inline-flex;
  width: 1.05rem;
  height: 1.05rem;
  vertical-align: -0.15em;
}

.premium-short-amt .ico {
  width: 1.25rem;
  height: 1.25rem;
}

.premium-short .ico img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.premium-short-ico {
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 0 0 1.5px rgba(255, 220, 200, 0.75);
  color: #fff6f0;
  font-size: 0.8rem;
  font-weight: 900;
}

.premium-confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.premium-cta {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.85rem;
  border: none !important;
  border-radius: 12px;
  box-shadow: none !important;
  font-size: 1rem;
  font-weight: 800;
  touch-action: manipulation;
}

.premium-cta .ico {
  display: inline-flex;
  width: 1.15rem;
  height: 1.15rem;
  line-height: 0;
}

.premium-cta .ico img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.premium-cta strong {
  font-variant-numeric: tabular-nums;
}

.premium-cta-green {
  color: #fff !important;
  background: linear-gradient(180deg, #6a9e45 0%, #4f7d32 100%) !important;
}

.premium-cta-green:hover {
  filter: brightness(1.06);
}

.premium-cta-gold {
  color: #2a1a08 !important;
  background: linear-gradient(180deg, #f0d45a 0%, #c9a227 100%) !important;
}

.premium-cta-gold:hover {
  filter: brightness(1.05);
}

.premium-cta-ghost {
  color: #f5ebe0 !important;
  background: rgba(18, 11, 7, 0.45) !important;
  box-shadow: inset 0 0 0 1.5px rgba(232, 196, 58, 0.35) !important;
}

.premium-cta-ghost:hover {
  filter: brightness(1.06);
}

.neo-volume-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.25rem 1.25rem;
  min-height: 34px;
  height: 34px;
  padding: 0 0.65rem;
  border-radius: 0.5rem;
  box-shadow: var(--morphism-down);
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
  touch-action: none;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.neo-volume-track:active {
  transform: scale(0.98);
}

.neo-volume-track:focus-visible {
  outline: 2px solid var(--mill-orange-to);
  outline-offset: 2px;
}

.neo-volume-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: 0.5rem;
  background-image: linear-gradient(to top right, var(--mill-orange-from), var(--mill-orange-to));
  box-shadow: var(--morphism-up);
  transition: width 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  z-index: 0;
  pointer-events: none;
}

.neo-volume-track.is-muted .neo-volume-fill {
  opacity: 0.35;
  box-shadow: var(--morphism-down);
}

.neo-volume-label {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1;
  min-width: 0;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.neo-volume-label span {
  white-space: nowrap;
}

.neo-volume-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: #fff;
  opacity: 0.95;
}

.neo-volume-value {
  position: relative;
  z-index: 1;
  color: #fff;
  font-weight: 800;
  font-size: 0.875rem;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .neo-volume-track,
  .neo-volume-fill {
    transition: none;
  }
  .neo-volume-track:active {
    transform: none;
  }
}

#settings-modal .settings-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(400px, 94vw) !important;
  max-width: 440px;
  height: fit-content;
  max-height: min(86vh, 640px);
  padding: calc(var(--plat-edge, 14px) + 0.75rem) calc(var(--plat-edge, 14px) + 0.65rem) !important;
  gap: 0.35rem !important;
  overflow: visible !important;
}

#settings-modal .settings-title {
  text-align: left;
  font-size: clamp(1.45rem, 4.5vw, 1.85rem);
  margin: 0.15rem 3.5rem 0.45rem 0.1rem;
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-transform: none;
}

#settings-modal .settings-version {
  position: absolute;
  top: calc(var(--plat-edge, 14px) + 0.55rem);
  right: calc(var(--plat-edge, 14px) + 2.85rem);
  margin: 0;
  text-align: center;
  font-size: 0.7rem;
  color: rgba(240, 230, 212, 0.55);
  z-index: 2;
  pointer-events: none;
}

#settings-modal .settings-x {
  position: absolute;
  top: calc(var(--plat-edge, 14px) + 0.2rem);
  right: calc(var(--plat-edge, 14px) + 0.2rem);
  z-index: 9;
  margin: 0;
}

#settings-modal .settings-field-label {
  margin: 0.4rem 0.15rem 0.15rem;
  color: #f0e6d4;
  font-weight: 700;
  font-size: 0.875rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

#settings-modal .settings-select-wrap {
  margin: 0 0 0.2rem;
  background: url('../assets/bg-tab.webp') center / 100% 100% no-repeat;
  border-radius: 12px;
  padding: 0 0.1rem;
}

#settings-modal .settings-voice-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  margin: 0 0 0.15rem;
}

#settings-modal .settings-voice-row .settings-select-wrap {
  margin: 0;
  flex: 1;
  min-width: 0;
}

#settings-modal .settings-voice-row .btn {
  width: auto;
  flex-shrink: 0;
  min-height: 2.5rem;
  padding: 0 0.75rem;
  white-space: nowrap;
  font-size: 0.8rem;
  position: relative;
  border: none !important;
  border-radius: 12px !important;
  background: url('../assets/bg-tab.webp') center / 100% 100% no-repeat !important;
  box-shadow: none !important;
  color: #fff !important;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

#settings-modal .settings-preview-ico {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  display: block;
}

#settings-modal .neo-volume-track {
  margin: 0.2rem 0;
  background: rgba(0, 0, 0, 0.42);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
}

#btn-tts-preview.is-loading {
  color: transparent !important;
}

#btn-tts-preview.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1rem;
  height: 1rem;
  margin: -0.5rem 0 0 -0.5rem;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: #fff;
  border-radius: 50%;
  animation: tts-spin 0.6s linear infinite;
}

@keyframes tts-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  #btn-tts-preview.is-loading::after {
    animation: none;
    opacity: 0.9;
  }
}

#settings-modal .settings-select-wrap select,
#settings-modal .settings-select-wrap .wood-select-btn {
  width: 100%;
  height: 2.5rem;
  min-height: 2.5rem;
  border-radius: 12px !important;
  border: none !important;
  color: #fff !important;
  font-weight: 800;
  padding: 0 1.7rem 0 0.75rem !important;
  background-color: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath fill='%23fff' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.55rem center !important;
  background-size: 10px 7px !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

#settings-modal .settings-select-wrap select:focus-visible,
#settings-modal .settings-select-wrap .wood-select-btn:focus-visible {
  outline: 2px solid rgba(232, 196, 58, 0.65);
  outline-offset: 2px;
}

.catch-feed {
  position: absolute;
  left: 50%;
  top: 14%;
  transform: translateX(-50%);
  z-index: 12;
  display: flex;
  align-items: center;
  width: max-content;
  max-width: min(34rem, 90%);
  min-width: 0;
  --plat-edge: 8px;
  --plat-corner: 18px;
  padding: calc(var(--plat-edge) + 0.28rem) calc(var(--plat-edge) + 0.95rem) !important;
  color: #f0e6d4 !important;
  background-color: #2a1a0e !important;
  background-image: url('../assets/grid-platform.webp') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  border: none !important;
  border-radius: 6px !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5) !important;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  white-space: nowrap;
  overflow: visible;
  font-family: var(--font-ui) !important;
  animation: pop 0.35s ease;
}
.catch-feed-body {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tour-banner {
  position: absolute;
  left: 50%;
  top: 32%;
  transform: translateX(-50%);
  z-index: 11;
  background: var(--glass-strong) !important;
  color: var(--gold) !important;
  padding: 0.4rem 0.9rem;
  border-radius: 12px !important;
  font: 700 14px Trebuchet MS,sans-serif;
  pointer-events: none;
  border: 1px solid var(--gold) !important;
  font-weight: 800;
}

.reward-line {
  color: #b8f0a8;
  min-height: 1.2em;
}

.chat {
  position: relative;
  width: min(400px, 100%);
  max-width: 400px;
  flex: 0 1 400px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  pointer-events: auto;
  min-width: 0;
}

.chat-log {
  max-height: 0;
  overflow: hidden;
  background: var(--glass) !important;
  border-radius: 0;
  padding: 0;
  font-size: 11px;
  color: #eee;
  border: 1px solid transparent !important;
  opacity: 0;
  transition: max-height 0.2s ease, opacity 0.15s ease, padding 0.15s ease;
}

.chat.expanded .chat-log {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(50vh, 520px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.2rem 0;
  opacity: 1;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.chat.expanded .chat-log::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Stack above input: newest at bottom, older pushed up. Fade only. */
.chat.collapsed .chat-log.chat-log-flash {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 4px);
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  overflow: visible;
  display: flex !important;
  transition: opacity 0.42s ease;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  justify-content: flex-end;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
  text-align: left;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  opacity: 1;
  pointer-events: none;
}

.chat.expanded .chat-log.chat-log-reading {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  justify-content: flex-start;
  gap: 0.25rem;
  text-align: left;
  pointer-events: auto;
}

.chat.expanded .chat-log.chat-log-reading .chat-line.chat-flash {
  display: block;
  width: max-content;
  max-width: 100%;
  flex: 0 0 auto;
  align-self: flex-start;
  margin-inline: 0 auto;
}

/* Keep reading column layout while staggered fade-out runs (no glass wrap artifact). */
.chat.expanded .chat-log.chat-log-reading.chat-log-leaving {
  pointer-events: none;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.chat.collapsed .chat-log.chat-log-flash.chat-log-leaving {
  opacity: 0;
  pointer-events: none;
  background: transparent !important;
}

.chat-line {
  margin: 0.15rem 0;
  word-break: break-word;
}

.chat-line.chat-flash {
  position: static;
  margin: 0;
  margin-inline: 0 auto;
  box-sizing: border-box;
  align-self: flex-start !important;
  flex: 0 0 auto;
  /* block + max-content: hug text, stay left. inline-block reflowed into a row/center. */
  display: block;
  width: max-content;
  max-width: 100%;
  padding: 0.45rem 0.95rem;
  border-radius: 0 !important;
  background: url('../assets/bg-tab.webp') center / 100% 100% no-repeat;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: #f4efe6;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
  text-align: left;
  overflow: hidden;
  animation: chat-fade 5s linear forwards;
}

@keyframes chat-fade {
  0%, 80% { opacity: 1; }
  100% { opacity: 0; }
}

.chat-form {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.chat-form-bar {
  position: relative;
  width: 100%;
  gap: 0;
  min-height: 2.4rem;
  padding: 0.1rem 0.2rem 0.1rem 0.35rem;
  border-radius: 12px !important;
  background: url('../assets/bg-search.webp') center / 100% 100% no-repeat !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.chat-form.chat-form-bar input {
  flex: 1;
  min-width: 0;
  height: 2.2rem;
  border: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  color: #f4efe6 !important;
  font-weight: 700;
  padding: 0 0.35rem 0 0.75rem !important;
  font-size: 0.9rem;
  border-radius: 0 !important;
  outline: none !important;
  -webkit-appearance: none;
  appearance: none;
}

.chat-form.chat-form-bar input::placeholder {
  color: rgba(244, 239, 230, 0.55);
}

.chat-form.chat-form-bar input:focus,
.chat-form.chat-form-bar input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
  background-color: transparent !important;
}

.chat-form-bar .chat-send {
  flex-shrink: 0;
  width: 2.2rem;
  height: 2.2rem;
  min-width: 2.2rem !important;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #f4efe6 !important;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.chat-form-bar .chat-send:hover {
  filter: brightness(1.15);
}

.chat-form-bar .chat-send svg {
  display: block;
}

.chat-toggle,
.chat-send {
  flex-shrink: 0;
  min-width: 34px !important;
  width: 34px;
  padding: 0.35rem 0 !important;
  line-height: 1;
  font-size: 0.85rem;
}

.chat-form input {
  flex: 1;
  min-width: 0;
  border-radius: 10px !important;
  border: 1px solid var(--stroke) !important;
  background: rgba(0, 0, 0, 0.45) !important;
  color: #fff !important;
  padding: 0.4rem 0.55rem;
  font-size: 12px;
}

.chat-form input:focus {
  outline: none;
  border-color: rgba(180, 220, 205, 0.45) !important;
}

.chum-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  touch-action: none;
  user-select: none;
  font-weight: 700;
  opacity: 1;
}

.stone-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  touch-action: none;
  user-select: none;
  font-weight: 700;
  opacity: 1;
}

.stone-cd {
  display: none !important;
}

.stone-btn.stone-cooling::after,
.chum-btn.stone-cooling::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  /* Elapsed angle grows clockwise from 12 o'clock; dark = still cooling. */
  background: conic-gradient(
    from -90deg,
    transparent var(--stone-cd, 0deg),
    rgba(6, 10, 14, 0.72) 0
  );
  pointer-events: none;
}

.stone-ghost {
  background: transparent !important;
  box-shadow: none !important;
}

.stone-ghost .stone-ghost-ico {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: none;
}

.chum-count {
  min-width: 1.35em;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28) !important;
  color: inherit !important;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 0.85em;
}

.chum-btn.chum-maxed {
  filter: grayscale(0.35) brightness(0.78);
  opacity: 0.75;
  color: rgba(255, 255, 255, 0.55) !important;
}

.chum-btn.chum-maxed .chum-count {
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.45);
}

.chum-btn.chum-armed {
  filter: saturate(1.15) brightness(1.08);
  box-shadow: 0 0 0 3px rgba(255, 243, 192, 0.45) !important;
}

.chum-ghost {
  position: fixed;
  z-index: 80;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 0;
  background: transparent !important;
  color: #2a1a08;
  display: grid;
  place-items: center;
  font-weight: 800;
  pointer-events: none;
  box-shadow: none !important;
}

/* Beat global `.ico { 1em }` so art fills the ghost. */
.chum-ghost .ico,
.chum-ghost .ico.ico-art {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  vertical-align: 0;
}
.chum-ghost .ico svg,
.chum-ghost .ico img,
.chum-ghost .ico .ico-img,
.chum-ghost img,
.chum-ghost svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: contain;
  pointer-events: none;
  filter: none;
}

.chum-ghost.chum-ghost-cancel {
  opacity: 0.85;
  filter: saturate(0.7) brightness(0.95);
}

body.chum-dragging {
  cursor: grabbing;
  user-select: none;
}

body.chum-dragging #pond {
  cursor: grabbing;
}

.inv-slots {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f0d78c !important;
  margin-top: -0.25rem;
  margin: 0 !important;
}

.inv-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  align-items: stretch;
  width: 100%;
}

.inv-sort {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 0.4rem 1.7rem 0.4rem 0.55rem;
  border: 2px solid var(--mill-green-to) !important;
  border-radius: 10px !important;
  background-color: transparent !important;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='white' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"),
    var(--grad-green-tl) !important;
  background-repeat: no-repeat, no-repeat;
  background-position: right 0.55rem center, 0 0;
  background-size: 12px 8px, cover;
  box-shadow: var(--morphism-up) !important;
  color: #fff !important;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
}

.wood-select {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.wood-select-btn {
  text-align: left;
  appearance: none;
}

.bazaar-toolbar-row > .wood-select {
  flex: 1;
  min-width: 7rem;
}

.wood-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  appearance: none !important;
}

.wood-select-menu {
  --plat-edge: 12px;
  --plat-corner: 24px;
  position: fixed;
  /* Above .modal (z≈50) — menu is portaled to body */
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin: 0;
  padding: calc(var(--plat-edge) + 0.35rem) calc(var(--plat-edge) + 0.4rem);
  background-color: #2a1a0e;
  background-image: url('../assets/grid-platform.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
  overflow: visible;
}

.wood-select-menu[hidden] {
  display: none;
}

.wood-select-list {
  position: relative;
  z-index: 9;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.wood-select-opt {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  margin: 0;
  padding: 0.38rem 0.55rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #f6efe4;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 0.92rem;
  text-align: left;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.wood-select-opt::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: url('../assets/bg-tab.webp') center / 100% 100% no-repeat;
  pointer-events: none;
}

.wood-select-opt.is-on::before {
  filter: hue-rotate(85deg) saturate(1.85) brightness(0.92);
}

.wood-select-mark {
  width: 1em;
  flex: 0 0 1em;
  color: #f0d78c;
  text-align: center;
}

.wood-select-opt:hover::before,
.wood-select-opt:focus-visible::before {
  filter: brightness(1.12);
}

.wood-select-opt.is-on:hover::before,
.wood-select-opt.is-on:focus-visible::before {
  filter: hue-rotate(85deg) saturate(1.85) brightness(1.05);
}

.wood-select-opt:focus-visible {
  outline: none;
}

.inv-toolbar .btn {
  width: 100%;
  min-height: 40px;
  border-radius: 10px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  font-size: 0.78rem !important;
  white-space: nowrap;
}

.inv-btn-rotten.neo-btn {
  background: linear-gradient(to bottom right, #7a2424, #c45b5b) !important;
  border-color: #e07070 !important;
  color: #fff !important;
  box-shadow: var(--morphism-up) !important;
}

.inv-tool-ico {
  display: inline-grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.inv-tool-ico .ico,
.inv-tool-ico .ico-img,
.inv-tool-ico svg,
.inv-tool-ico img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.inv-btn-rotten .inv-tool-ico {
  filter: brightness(0) invert(1);
}

.inv-skip {
  display: flex;
  gap: 0.35rem;
  align-items: flex-start;
  font-size: 0.78rem;
  color: #e8fff8;
  max-width: 60%;
}

.inv-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  max-height: 48vh;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.inv-card {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
}

.inv-card.rarity-uncommon {
  border-color: rgba(110, 200, 120, 0.55);
}

.inv-card.rarity-rare {
  border-color: rgba(90, 160, 255, 0.65);
}

.inv-card.rarity-epic {
  border-color: rgba(210, 130, 255, 0.7);
}

.inv-card.rarity-legendary {
  border-color: rgba(255, 196, 80, 0.85);
  box-shadow: 0 0 0 1px rgba(255, 200, 80, 0.25);
}

.inv-card-main {
  min-width: 0;
  flex: 1;
}

.inv-title {
  font-weight: 800;
  color: #fff8e8;
}

.inv-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  font-size: 0.78rem;
  color: #d7ebe4;
  margin-top: 0.15rem;
}

.inv-rarity {
  font-weight: 700;
}

.inv-price {
  color: #f0d78c;
  font-weight: 700;
}

.inv-spoil {
  font-size: 0.72rem;
  color: #9fd0c4;
  margin-top: 0.1rem;
}

.inv-bonus {
  font-size: 0.75rem;
  color: #c9b6ff;
  margin-top: 0.15rem;
}

.inv-empty {
  opacity: 0.6;
  text-align: center;
  padding: 0.6rem;
}

.shop-currencies {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.28rem;
  font-weight: 800;
  align-items: center;
  min-width: 0;
  flex: 1;
}

.cur-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.15rem 0.4rem;
  border-radius: 9999px !important;
  background: rgba(0, 0, 0, 0.35) !important;
  border: 1px solid var(--stroke) !important;
  font-size: 0.78rem;
  color: var(--text) !important;
  line-height: 1.2;
}

.tackle-card .shop-currencies {
  gap: 0.25rem;
}

.tackle-card .cur-pill {
  gap: 0.22rem;
  padding: 0.18rem 0.42rem;
  font-size: 0.78rem;
}

.tackle-card .cur-pill-ico {
  display: inline-grid;
  place-items: center;
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
}

.tackle-card .cur-pill-ico .ico,
.tackle-card .cur-pill-ico .ico-img,
.tackle-card .cur-pill-ico svg,
.tackle-card .cur-pill-ico img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.tackle-card .cur-pill-timeon strong {
  color: #9fd4ff;
}

.tackle-card .cur-pill-alny strong {
  color: var(--wizard-gold);
}

.tackle-card .cur-pill strong {
  font-size: inherit;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tackle-card {
  width: min(1120px, 97vw) !important;
  max-height: min(90vh, 820px) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.55rem !important;
  height: min(90vh, 820px) !important;
}

.tackle-layout {
  display: grid !important;
  grid-template-columns: 148px minmax(0, 1fr) 260px !important;
  gap: 0.65rem !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
  align-items: stretch !important;
}

.tackle-slots {
  display: grid !important;
  flex-direction: unset !important;
  gap: 0.3rem !important;
  grid-template-columns: 1fr !important;
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  overflow: visible !important;
}

.tack-slot {
  text-align: center !important;
  padding: 0.28rem 0.15rem !important;
  border-radius: 10px !important;
  border: 2px solid rgba(140, 170, 160, 0.3) !important;
  background: rgba(0, 0, 0, 0.28) !important;
  cursor: pointer;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 0.05rem;
  color: var(--text) !important;
  min-height: 0 !important;
  height: auto !important;
  justify-content: center;
}

.tack-slot.active {
  box-shadow: none !important;
  border-color: var(--gold) !important;
  background: rgba(240, 215, 140, 0.1) !important;
}

.tack-slot-label {
  display: block;
  font-size: 0.52rem !important;
  opacity: 0.75;
  text-transform: uppercase;
  line-height: 1.1;
}

.tack-slot-name {
  font-size: 0.8rem;
  font-weight: 700;
}

.tackle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(160px,1fr));
  gap: 0.5rem;
}

.tack-card {
  border: 2px solid #9bc;
  border-radius: 12px;
  padding: 0.5rem;
  background: #f4faf7;
  font-size: 0.75rem;
}

.tack-card.equipped {
  border-color: #1a8;
  background: #dff5e8;
}

.tack-card.locked {
  opacity: 0.55;
}

.tack-card-title {
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.tackle-stats {
  font-size: 0.7rem !important;
  background: rgba(0,0,0,0.28) !important;
  border-radius: 12px;
  padding: 0.4rem 0.5rem;
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  color: #e8f4f0 !important;
  max-height: none !important;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0.2rem;
  border-bottom: 1px solid #dde8e4;
  position: relative;
  cursor: help;
}

.chum-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
  gap: 0.4rem !important;
}

.chum-card {
  border: 1px solid var(--stroke) !important;
  border-radius: 10px !important;
  padding: 0.4rem !important;
  font-size: 0.72rem !important;
  background: rgba(0, 0, 0, 0.25) !important;
  color: var(--text) !important;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 90px;
}

.inv-grid {
  --inv-cell: 4.75rem;
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--inv-cell)), 1fr)) !important;
  grid-auto-rows: minmax(var(--inv-cell), auto);
  gap: 0.55rem !important;
  max-height: min(58vh, 520px) !important;
  overflow: auto;
  width: 100%;
  max-width: none !important;
  margin: 0;
  align-content: start;
  padding: 0.45rem;
  box-sizing: border-box;
}

.inv-cell {
  border: 2px solid #89a;
  border-radius: 12px;
  padding: 0.4rem;
  min-height: 100px;
  background: #f7fbf9;
  font-size: 0.72rem;
}

.inv-cell.rarity-epic {
  border-color: #a5f;
}

.inv-cell.rarity-legendary {
  border-color: #fc3;
  box-shadow: 0 0 8px #fc36;
}

.inv-cell.spoiled {
  opacity: 0.55;
  filter: grayscale(0.6);
}

.inv-cell-name {
  font-weight: 800;
}

.spoil-badge {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.05rem 0.3rem;
  border-radius: 6px;
  font-size: 0.65rem;
}

.spoil-ok {
  background: #2a5a3a;
  color: #cfc;
}

.spoil-warm {
  background: #5a4a20;
  color: #fe8;
}

.spoil-hot {
  background: #5a3020;
  color: #fca;
}

.spoil-dead {
  background: #333;
  color: #ccc;
}

#inv-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0;
  width: 100%;
}

.inv-desk-bar #inv-filters {
  display: flex;
  grid-template-columns: none;
  width: auto;
}

#inv-filters .chip {
  width: 100%;
  min-height: 36px;
  border-radius: 10px !important;
  padding: 0.35rem 0.15rem;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
}

.bazaar-tabs, .bazaar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.4rem 0;
}

.tr-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1.25rem !important;
  min-height: 180px;
  margin: 1rem 0;
  padding: 0.5rem 0 0.25rem;
}

.pod-col {
  text-align: center;
  width: 110px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 14px 14px 0 0;
  padding: 0.55rem 0.35rem 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 0;
}

.pod-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #111 !important;
  border: 3px solid #fff;
  box-shadow: 0 4px 10px #0003;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

.pod-avatar.dim {
  background: #ccc;
}

.pod-stand {
  background: linear-gradient(180deg,#d4af37,#a67c00);
  border-radius: 8px 8px 0 0;
  margin: 0.3rem auto 0;
  width: 90%;
}

.pod-stand.place-1 {
  background: linear-gradient(180deg,#ffe566,#d4af37);
}

.pod-stand.place-2 {
  background: linear-gradient(180deg,#ddd,#888);
}

.pod-stand.place-3 {
  background: linear-gradient(180deg,#e6a57e,#a65);
}

.pod-name {
  font-weight: 800;
  font-size: 0.85rem;
}

.pod-score {
  font-size: 0.8rem;
}

.pod-reward {
  font-size: 0.7rem;
  color: #9fe8b8 !important;
}

.tr-match-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.28) !important;
  padding: 0.6rem;
  border-radius: 12px;
  color: var(--text) !important;
}

.tr-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.tr-list th, .tr-list td {
  padding: 0.3rem 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  text-align: left;
  color: var(--text);
}

.tr-list tr.you {
  background: rgba(40, 140, 110, 0.25) !important;
  font-weight: 700;
}

.tourney-results {
  width: min(720px, 96vw) !important;
  max-height: 92vh;
  overflow: auto;
}

.bazaar-card {
  width: min(720px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.bazaar-body {
  overflow: auto;
  max-height: min(52vh, 480px);
  flex: 1;
  min-height: 0;
  padding-right: 0.15rem;
}

.bazaar-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.bazaar-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.bazaar-search,
.bazaar-sort {
  flex: 1;
  min-width: 7rem;
  padding: 0.4rem 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(180, 220, 205, 0.25);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
}

.bazaar-lot {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.55rem 0.6rem;
  margin-bottom: 0.45rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: var(--text);
}

.bazaar-lot.rarity-uncommon { border-color: rgba(110, 200, 120, 0.55); }
.bazaar-lot.rarity-rare { border-color: rgba(90, 160, 255, 0.65); }
.bazaar-lot.rarity-epic { border-color: rgba(210, 130, 255, 0.7); }
.bazaar-lot.rarity-legendary {
  border-color: rgba(255, 196, 80, 0.85);
  box-shadow: 0 0 0 1px rgba(255, 200, 80, 0.25);
}

.bazaar-lot-main {
  display: flex;
  gap: 0.55rem;
  min-width: 0;
  flex: 1;
}

.bazaar-lot-ico {
  width: 3.1rem;
  height: 3.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 2rem;
}

.bazaar-lot-ico .ico {
  font-size: inherit;
}

.bazaar-lot-title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.bazaar-rarity-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.bazaar-lot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.35rem;
}

.bazaar-chip {
  font-size: 0.72rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
}

.bazaar-lot-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  flex-shrink: 0;
}

.bazaar-own-badge,
.bazaar-status {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.bazaar-status-active { background: rgba(61, 139, 90, 0.35); color: #b8f0c8; }
.bazaar-status-sold,
.bazaar-status-sold_pending { background: rgba(230, 195, 92, 0.28); color: #ffe7a0; }
.bazaar-status-returned,
.bazaar-status-expired { background: rgba(120, 140, 150, 0.3); color: #c8d4d8; }
.bazaar-status-cancelled_seller,
.bazaar-status-cancelled_spoil { background: rgba(196, 91, 91, 0.28); color: #f0b0b0; }

.bazaar-sell-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.bazaar-sell-form label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.85rem;
}

.bazaar-sell-form input,
.bazaar-sell-form select {
  padding: 0.4rem 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(180, 220, 205, 0.28);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
}

.bazaar-sell-picker {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 28vh;
  overflow: auto;
}

.bazaar-pick {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  gap: 0.4rem;
  align-items: center;
  text-align: left;
  padding: 0.4rem 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  cursor: pointer;
}

.bazaar-pick.selected {
  border-color: rgba(61, 180, 140, 0.7);
  box-shadow: 0 0 0 1px rgba(61, 180, 140, 0.25);
}

.bazaar-sell-preview {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
}

.bazaar-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 1.4rem 0.75rem;
  text-align: center;
}

.bazaar-empty-title {
  font-weight: 800;
  font-size: 1.05rem;
}

.bazaar-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding-top: 0.55rem;
  margin-top: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.bazaar-pager-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.bazaar-listings-count {
  font-size: 0.8rem;
}

.craft-compare {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.6rem;
  font-size: 0.8rem;
}

.craft-compare-head, .craft-delta-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.3fr 1fr 0.7fr;
  gap: 0.25rem;
  align-items: center;
}

.craft-compare-head {
  font-weight: 700;
  color: var(--text-dim) !important;
  font-size: 0.72rem;
}

.delta-up strong {
  color: #5ee0a0 !important;
}

.delta-down strong {
  color: #f08080 !important;
}

.delta-same strong {
  color: #9ab !important;
}

.craft-cost {
  margin: 0.4rem 0;
  font-weight: 700;
}

.stat-tip {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 5;
  background: #1e2a28;
  color: #e8fff4;
  font-size: 0.7rem;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  box-shadow: 0 6px 16px #0005;
  white-space: normal;
}

.stat-row:hover .stat-tip, .stat-row:focus-within .stat-tip {
  display: block;
}

.tack-slot-ico {
  display: block;
  font-size: 1.7rem !important;
  line-height: 1;
}

.chum-controls {
  position: relative;
  display: flex;
  gap: 0.3rem;
  align-items: flex-end;
  overflow: visible;
}

.chum-btn-wrap {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
  width: auto;
  overflow: visible;
}

/* Game tools — lobby-tile proportions: wide, slightly shorter, icon + caption. */
.chum-controls .hud-wood-btn-icon,
.hud-bottom-tools .chum-btn.hud-wood-btn,
.hud-bottom-tools .stone-btn.hud-wood-btn {
  min-width: 4.6rem !important;
  width: 5.1rem !important;
  min-height: 4.15rem !important;
  height: 4.15rem !important;
  max-height: 4.15rem !important;
  aspect-ratio: auto !important;
  padding: 0.22rem 0.12rem 0.18rem !important;
  border-radius: 11px !important;
  gap: 0.12rem !important;
  justify-content: center !important;
}

.chum-controls .hud-wood-ico {
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
}

.chum-type-btn {
  font-weight: 800;
}

.hud-bottom-tools .chum-btn.hud-wood-btn {
  color: #fff !important;
  background: url('../assets/bg-bth-home.webp') center / 100% 100% no-repeat !important;
  box-shadow: none !important;
  border: none !important;
}

.hud-bottom-tools .chum-btn .chum-btn-ico {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.hud-bottom-tools .chum-btn .chum-btn-empty {
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  text-transform: lowercase;
  pointer-events: none;
  user-select: none;
}

.hud-wood-caption {
  flex: 0 0 auto;
  max-width: 100%;
  padding: 0 0.1rem;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.stone-btn.hud-wood-btn {
  display: flex !important;
}


.hud-bottom-tools .chum-btn .chum-btn-ico .ico,
.hud-bottom-tools .chum-btn .chum-btn-ico .ico.ico-art,
.hud-bottom-tools .chum-btn .chum-btn-ico .ico.ico-art img,
.hud-bottom-tools .chum-btn .chum-btn-ico .ico .ico-img,
.hud-bottom-tools .chum-btn .chum-btn-ico svg,
.hud-bottom-tools .chum-btn .chum-btn-ico img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.hud-bottom-tools .chum-count {
  position: absolute;
  top: 0.2rem;
  right: 0.25rem;
  min-width: 1.1rem;
  padding: 0.05rem 0.28rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.2;
}

.chum-type-menu {
  position: absolute;
  bottom: calc(100% + 0.35rem);
  top: auto;
  right: 0;
  left: auto;
  z-index: 45;
  width: max-content;
  max-width: 100vw;
  overflow: visible;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  pointer-events: auto;
}

.chum-pick-grid {
  --chum-pick-cell: 3.25rem;
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap-reverse;
  justify-content: flex-start;
  align-content: flex-end;
  gap: 0.35rem;
  width: calc(4 * var(--chum-pick-cell) + 3 * 0.35rem);
  padding: 0.15rem;
  border: none;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  box-sizing: border-box;
}

.chum-pick-slot {
  width: var(--chum-pick-cell);
  height: var(--chum-pick-cell);
  flex: 0 0 var(--chum-pick-cell);
  flex-shrink: 0;
}

.chum-pick-slot .inv-slot-ico {
  z-index: 1;
}

.chum-pick-grid .chum-pick-slot .inv-slot-timer {
  z-index: 2;
  background: rgba(18, 14, 10, 0.92);
}

.tr-advice {
  margin: 0.8rem 0;
  padding: 0.6rem 0.75rem;
  background: rgba(30, 90, 75, 0.35) !important;
  border-left: 4px solid var(--teal) !important;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text) !important;
}

.tr-advice-title {
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.tr-advice p {
  margin: 0.25rem 0;
}

.mail-row {
  padding: 0.35rem 0;
  border-bottom: 1px solid #cde;
  font-size: 0.85rem;
}

.inv-life {
  font-size: 0.7rem;
  color: #9fd0c4;
  margin-top: 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.inv-empty-slot {
  min-height: 100px;
  border: 2px dashed #b7cfc8;
  background: rgba(255,255,255,0.25);
  opacity: 0.55;
}

.bait-hints {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0.25rem 0;
  font-size: 0.68rem;
  color: var(--text-dim) !important;
}

.bait-hint-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.bait-hint-label {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-right: 0.25rem;
}

.hint-often .bait-hint-label {
  color: #6d6 !important;
}

.hint-normal .bait-hint-label {
  color: #9ab !important;
}

.hint-rare .bait-hint-label {
  color: #888 !important;
}

.bait-silhouettes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.bait-sil {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  background: #eef6f2;
  border-radius: 8px;
  padding: 0.1rem 0.3rem;
  font-size: 0.62rem;
}

.bait-sil em {
  font-style: normal;
}

.hint-rare .bait-sil {
  opacity: 0.65;
}

.lz-loadout {
  background: #1a8 !important;
  color: #fff;
}

.mail-badge {
  display: inline-flex;
  min-width: 1.1rem;
  height: 1.1rem;
  margin-left: 0.35rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #c45c26;
  color: #fff;
  font-size: 0.7rem;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  position: absolute;
  top: 4px;
  right: 6px;
  margin: 0 !important;
}

.bazaar-bid-row {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  margin-top: 0.35rem;
}

.bazaar-bid-row input {
  width: 5.5rem;
  padding: 0.3rem;
  border-radius: 8px;
  border: 1px solid #8ab;
}

.pod-medal {
  font-size: 1.4rem;
  line-height: 1;
  margin-bottom: 0.15rem;
}

.lake-zone.coming-soon {
  opacity: 0.65;
}

.loadout-check {
  display: flex !important;
  margin: 0 !important;
  font-size: 0.75rem !important;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.85;
  color: #e8f4f0;
  flex-shrink: 0;
}

.inv-filters .chip, .tackle-tabs .chip, .bazaar-tabs .chip, .bazaar-filters .chip {
  border: 1px solid rgba(140, 190, 170, 0.35) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #d5ebe3 !important;
}

.inv-filters .chip.active, .tackle-tabs .chip.active, .bazaar-tabs .chip.active, .bazaar-filters .chip.active {
  background: #1f9a78 !important;
  border-color: #167a5e !important;
  color: #fff !important;
}

.inv-desk-bar .inv-filters .chip,
.inv-desk-bar .inv-filters .chip.active {
  border: none !important;
  background: url('../assets/bg-tab.webp') center / 100% 100% no-repeat !important;
  color: #fff !important;
}

.inv-slot {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  min-width: 0;
  justify-self: center;
  align-self: center;
  box-sizing: border-box;
  container-type: inline-size;
  border-radius: 0.75rem !important;
  border: none !important;
  background: url('../assets/icons/grid-iclons/grid-common.webp') center / cover no-repeat !important;
  box-shadow: none;
  display: grid;
  grid-template: 1fr / 1fr;
  place-items: center;
  cursor: pointer;
  padding: 0.12rem;
  color: inherit;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  transition: box-shadow 0.15s ease, outline-color 0.15s ease;
}

.chum-pick-grid .inv-slot.chum-pick-slot {
  isolation: isolate;
  opacity: 1;
  overflow: visible !important;
  width: var(--chum-pick-cell, 3.25rem) !important;
  height: var(--chum-pick-cell, 3.25rem) !important;
  max-width: var(--chum-pick-cell, 3.25rem) !important;
  min-width: var(--chum-pick-cell, 3.25rem) !important;
  flex: 0 0 var(--chum-pick-cell, 3.25rem);
  background:
    url('../assets/icons/grid-iclons/grid-common.webp') center / cover no-repeat,
    #3a3026 !important;
}

.inv-slot-fish {
  --inv-pad: 0.32rem;
  --rarity-glow: rgba(180, 160, 120, 0.35);
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0;
}

.inv-slot-fish.rarity-uncommon { --rarity-glow: rgba(110, 200, 120, 0.5); }
.inv-slot-fish.rarity-rare { --rarity-glow: rgba(90, 160, 255, 0.55); }
.inv-slot-fish.rarity-epic { --rarity-glow: rgba(210, 130, 255, 0.6); }
.inv-slot-fish.rarity-legendary { --rarity-glow: rgba(255, 196, 80, 0.65); }

/* Soft rarity bloom under the fish portrait. */
.inv-slot-fish::before {
  content: '';
  grid-area: 1 / 1;
  z-index: 1;
  place-self: center;
  width: 64%;
  height: 42%;
  translate: 0 18%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, var(--rarity-glow) 0%, transparent 72%);
  pointer-events: none;
}

.inv-slot-fish .inv-slot-grid,
.inv-slot-fish .inv-slot-fish-art {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  display: block;
}

.inv-slot-fish .inv-slot-grid {
  z-index: 0;
  border-radius: 0.75rem;
}

.inv-slot-fish .inv-slot-fish-art {
  z-index: 2;
  object-fit: contain;
  border-radius: 0.75rem;
  place-self: center;
  width: calc(100% - (var(--inv-pad) * 2));
  height: calc(100% - (var(--inv-pad) * 2));
  filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--rarity-glow) 70%, transparent));
}

.inv-slot-fish .inv-slot-ico-fallback {
  z-index: 2;
  width: 70%;
  height: 70%;
}

.inv-slot:hover {
  box-shadow: 0 0 0 2px rgba(232, 196, 58, 0.35);
}

.inv-slot-fish:hover {
  border: none !important;
}

.inv-slot.selected {
  z-index: 1;
  overflow: visible;
  border: none !important;
  box-shadow: 0 0 0 2px rgba(240, 215, 140, 0.45), 0 0 10px rgba(240, 215, 140, 0.28);
}

.inv-slot-fish.selected {
  border: none !important;
  /* !important: beats .inv-slot-fish { box-shadow: none !important } */
  box-shadow: 0 0 0 2px rgba(240, 215, 140, 0.45), 0 0 10px rgba(240, 215, 140, 0.3) !important;
}

.inv-slot-empty {
  cursor: default;
  opacity: 1;
  background: url('../assets/icons/grid-iclons/grid-common.webp') center / cover no-repeat !important;
  border: none !important;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
  filter: brightness(0.72);
}

.inv-slot-ico {
  grid-area: 1 / 1;
  width: 86%;
  height: 86%;
  max-width: 86%;
  max-height: 86%;
  min-width: 0;
  min-height: 0;
  font-size: unset;
  line-height: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
}

.inv-slot-ico .ico,
.inv-slot-ico .ico.ico-art,
.inv-slot-ico .ico.ico-art img,
.inv-slot-ico .ico .ico-img,
.inv-slot-ico svg,
.inv-slot-ico img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain;
  overflow: hidden;
  display: block;
}

.chum-pick-slot.is-disabled {
  opacity: 0.45;
  filter: grayscale(0.4);
  cursor: not-allowed;
}

.inv-slot-buff,
.inv-slot-can,
.inv-slot-timer {
  position: absolute;
  z-index: 2;
  font-size: 0.58rem;
  font-weight: 800;
  pointer-events: none;
  line-height: 1;
}

.inv-slot-buff {
  top: 4px;
  right: 5px;
  left: auto;
  color: #c9b6ff;
}

.inv-slot-can {
  top: 4px;
  right: 5px;
  color: #5ec8ff;
}

.inv-slot-buff + .inv-slot-can,
.inv-slot:has(.inv-slot-buff) .inv-slot-can {
  top: 1.05rem;
}

.inv-slot-dead {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: #e88;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  pointer-events: none;
}

.inv-slot-badge {
  position: absolute;
  top: var(--inv-pad, 0.18rem);
  left: var(--inv-pad, 0.18rem);
  z-index: 4;
  max-width: calc(100% - (var(--inv-pad, 0.18rem) * 2));
  padding: 0.18rem 0.42rem 0.2rem 0.38rem;
  border-radius: 0.55rem 0 0.35rem 0;
  font-size: clamp(0.56rem, 3cqi, 0.72rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow:
    0 0 2px rgba(30, 24, 10, 0.95),
    0 1px 0 rgba(30, 24, 10, 0.85),
    -1px 0 0 rgba(30, 24, 10, 0.55),
    1px 0 0 rgba(30, 24, 10, 0.55);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inv-slot-badge-new {
  background: #e8c43a;
}

.inv-slot-badge-spoiled {
  background: #c45c4a;
}

.inv-slot-timer {
  position: absolute;
  bottom: var(--inv-pad, 0.18rem);
  left: var(--inv-pad, 0.18rem);
  right: var(--inv-pad, 0.18rem);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  padding: 0.22rem 0.22rem 0.28rem;
  text-align: center;
  color: #fff;
  font-size: clamp(0.52rem, 2.8cqi, 0.68rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  background: rgba(0, 0, 0, 0.55);
  border-radius: 0 0 8px 8px;
  pointer-events: none;
}

.inv-slot-hourglass {
  width: 0.72rem;
  height: 0.72rem;
  flex-shrink: 0;
  display: block;
}

.inv-slot-qty {
  position: absolute;
  z-index: 2;
  right: 4px;
  bottom: 3px;
  min-width: 1.05rem;
  padding: 0.08rem 0.22rem;
  border-radius: 6px;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.1;
  pointer-events: none;
  color: #f4f1e6;
  background: rgba(0, 0, 0, 0.55);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.inv-slot.rarity-uncommon,
.inv-slot.rarity-rare,
.inv-slot.rarity-epic,
.inv-slot.rarity-legendary {
  border: none !important;
}

.inv-slot.rarity-epic:not(.inv-slot-fish) {
  box-shadow: 0 0 0 1px rgba(210, 130, 255, 0.45), 0 0 8px rgba(210, 130, 255, 0.2);
}

.inv-slot.rarity-legendary:not(.inv-slot-fish) {
  box-shadow: 0 0 0 1px rgba(255, 196, 80, 0.55), 0 0 8px rgba(255, 196, 80, 0.22);
}

.inv-slot-fish.rarity-uncommon,
.inv-slot-fish.rarity-rare,
.inv-slot-fish.rarity-epic,
.inv-slot-fish.rarity-legendary {
  border: none !important;
  box-shadow: none !important;
}

.inv-slot-fish.rarity-epic.selected,
.inv-slot-fish.rarity-legendary.selected,
.inv-slot-fish.selected {
  box-shadow: 0 0 0 2px rgba(240, 215, 140, 0.45), 0 0 10px rgba(240, 215, 140, 0.3) !important;
}

.inv-slot.rarity-epic.selected {
  box-shadow: 0 0 0 2px rgba(240, 215, 140, 0.4), 0 0 12px rgba(210, 130, 255, 0.4);
}

.inv-slot.rarity-legendary.selected {
  box-shadow: 0 0 0 2px rgba(240, 215, 140, 0.4), 0 0 12px rgba(255, 196, 80, 0.4);
}

.inv-slot.spoiled {
  filter: none;
  opacity: 1;
}

.inv-slot.spoiled .inv-slot-fish-art,
.inv-slot.spoiled .inv-slot-ico {
  filter: grayscale(0.45);
}

.inv-slot-fish.spoiled::before {
  opacity: 0.28;
  filter: grayscale(0.6);
}

.inv-detail {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  position: relative;
}

.inv-detail .detail-sub {
  font-size: 0.8rem;
  line-height: 1.35;
  color: rgba(244, 239, 230, 0.82);
  margin-top: 0.15rem;
}

.inv-detail-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 0;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.inv-detail.inv-panel-platform {
  padding: calc(var(--plat-edge, 14px) + 0.55rem) !important;
  overflow: visible !important;
}

.inv-main > .inv-detail {
  align-self: start;
  height: fit-content;
  min-height: 0;
  max-height: 100%;
}

#inventory-modal .inv-main > .inv-detail.inv-panel-platform,
#bestiary-modal .inv-main > .inv-detail.inv-panel-platform {
  background-color: #2a1a0e !important;
  background-image: url('../assets/grid-platform.webp') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  border: none !important;
  border-radius: 8px !important;
  box-shadow:
    0 -18px 40px rgba(0, 0, 0, 0.72),
    0 -4px 14px rgba(0, 0, 0, 0.45),
    0 12px 40px rgba(0, 0, 0, 0.45) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: visible !important;
  padding: calc(var(--plat-edge, 14px) + 0.55rem) !important;
}

.detail-empty {
  opacity: 0.55;
  text-align: center;
  padding: 1.5rem 0.5rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.detail-top {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  min-width: 0;
  width: 100%;
}

.detail-visual {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-shrink: 0;
  width: 5.5rem;
  max-width: 38%;
  gap: 0.3rem;
}

.detail-actions {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.45rem;
}

.detail-actions .btn,
.detail-tab-btn {
  flex: 0 0 auto;
  width: 100% !important;
  min-width: 0;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  border: none !important;
  border-radius: 12px !important;
  background: url('../assets/bg-tab.webp') center / 100% 100% no-repeat !important;
  box-shadow: none !important;
  color: #fff !important;
  font-weight: 800;
  font-size: 0.92rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.detail-actions .btn.detail-tab-conserve,
.detail-tab-btn.detail-tab-conserve,
.detail-actions [data-conserve] {
  position: relative;
  isolation: isolate;
  background: transparent !important;
  filter: none !important;
  overflow: hidden;
}

.detail-actions .btn.detail-tab-conserve::before,
.detail-tab-btn.detail-tab-conserve::before,
.detail-actions [data-conserve]::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: url('../assets/bg-tab.webp') center / 100% 100% no-repeat;
  filter: hue-rotate(85deg) saturate(1.85) brightness(0.92);
  pointer-events: none;
}

.detail-actions .btn.detail-tab-sell,
.detail-tab-btn.detail-tab-sell,
.detail-actions [data-sell] {
  background: url('../assets/bg-price.webp') center / 100% 100% no-repeat !important;
  filter: none;
}

.detail-ico {
  position: relative;
  font-size: 2.35rem;
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  display: grid;
  place-items: center;
  border-radius: 0.75rem;
  background: url('../assets/icons/grid-iclons/grid-common.webp') center / cover no-repeat;
  flex-shrink: 0;
  overflow: hidden;
}

.detail-ico.detail-ico-fish {
  --inv-pad: 0.32rem;
  padding: 0;
  background: transparent;
  grid-template: 1fr / 1fr;
}

/* Junk/bait/etc: fill the cell like inv-slot (1em was tiny in a ~5.5rem box). */
.detail-ico:not(.detail-ico-fish) > .ico,
.detail-ico:not(.detail-ico-fish) > .ico.ico-art {
  width: 82%;
  height: 82%;
  font-size: unset;
}

.detail-ico:not(.detail-ico-fish) > .ico.ico-art img,
.detail-ico:not(.detail-ico-fish) > .ico svg,
.detail-ico:not(.detail-ico-fish) > .ico .ico-img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain;
  display: block;
}

.detail-ico-fish .inv-slot-grid,
.detail-ico-fish .inv-slot-fish-art,
.detail-ico-fish .inv-slot-ico-fallback {
  grid-area: 1 / 1;
  pointer-events: none;
}

.detail-ico-fish .inv-slot-grid {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.75rem;
  display: block;
}

.detail-ico-fish .inv-slot-fish-art {
  place-self: center;
  width: calc(100% - (var(--inv-pad) * 2));
  height: calc(100% - (var(--inv-pad) * 2));
  object-fit: contain;
  border-radius: 0.75rem;
  display: block;
  filter: none;
}

.detail-ico-fish .inv-slot-ico-fallback {
  width: 70%;
  height: 70%;
  place-self: center;
}

.detail-ico .ico {
  font-size: inherit;
}

.detail-ico .inv-slot-timer {
  font-size: 0.58rem;
  padding: 0.12rem 0.2rem;
}

.detail-meta {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem;
}

.detail-name {
  font-size: 1.15rem;
  line-height: 1.15;
  min-width: 0;
  overflow-wrap: anywhere;
}

.detail-life {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  align-self: stretch;
  width: 100%;
  box-sizing: border-box;
  padding: 0.2rem 0.35rem 0.28rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.68rem;
  font-weight: 800;
  color: #f2e6d0;
  white-space: nowrap;
  line-height: 1;
}

.detail-life-ico {
  width: 0.75rem;
  height: 0.75rem;
  object-fit: contain;
}

.detail-rows {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: #d8cbb4;
  line-height: 1.25;
  min-width: 0;
}

.detail-row > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-row strong {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}

.detail-row .ico,
.detail-row .ico-img,
.detail-row img {
  width: 0.95em;
  height: 0.95em;
  object-fit: contain;
  vertical-align: -0.1em;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem;
  margin-top: 0.1rem;
}

.detail-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.35rem;
  padding: 0.15rem 0.55rem;
  border: none;
  border-radius: 6px;
  background: url('../assets/bg-tag.webp') center / 100% 100% no-repeat;
  font-size: 0.72rem;
  font-weight: 800;
  color: #f4efe6;
  line-height: 1;
  white-space: nowrap;
}

.detail-tag-rarity.rarity-uncommon { color: #9fdf9a; }
.detail-tag-rarity.rarity-rare { color: #8ec4ff; }
.detail-tag-rarity.rarity-epic { color: #e59bff; }
.detail-tag-rarity.rarity-legendary { color: #ffd56a; }

.detail-tag-dead {
  color: #ffb4a8;
}

.detail-tab-sell .ico,
.detail-tab-sell .ico-img,
.detail-tab-sell img,
.detail-tab-conserve .ico,
.detail-tab-conserve .ico-img,
.detail-tab-conserve img,
.detail-actions [data-sell] img,
.detail-actions [data-conserve] img,
.detail-actions .ico,
.detail-actions .ico-img,
.detail-actions img {
  width: 1.4em;
  height: 1.4em;
  object-fit: contain;
  flex-shrink: 0;
}

.inv-sell.neo-btn,
.detail-actions [data-sell].neo-btn,
.detail-actions [data-craft].neo-btn {
  box-shadow: none !important;
}

.detail-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #8fd;
  padding: 0.35rem 0.5rem;
}

.detail-badge.soft {
  color: #9ab;
}

.detail-price {
  font-size: 0.8rem;
  color: #f0d78c;
  margin-top: 0.2rem;
}

.tackle-equip {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.35rem !important;
  min-height: 0 !important;
  overflow: hidden !important;
  color: var(--text) !important;
  background: rgba(0, 0, 0, 0.28) !important;
}

.tackle-equip-title {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
  flex-shrink: 0;
}

.tack-slot-grade {
  font-size: 0.65rem;
  font-weight: 800;
  color: #9fd;
}

.tackle-main {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.35rem !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.tackle-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-height: 0 !important;
  align-items: center;
  flex-shrink: 0;
}

.tack-tabs-hint {
  font-size: 0.75rem;
  opacity: 0.65;
}

.tackle-grid, .shop-sims.tackle-grid {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 0.35rem !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: 0.1rem 0.15rem 0.1rem 0 !important;
  flex: 1 1 auto !important;
  align-content: start;
  max-height: none !important;
  min-height: 0 !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(160, 200, 180, 0.35) transparent;
}

.tack-tile {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  border-radius: 12px;
  border: 2px solid rgba(140, 170, 160, 0.35);
  background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(0,0,0,0.32));
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  align-self: start;
}

.tack-tile:hover {
  border-color: rgba(120, 220, 180, 0.55);
}

.tack-tile.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(240, 215, 140, 0.3);
}

.tack-tile.equipped {
  border-color: #3ecf9a;
}

.tack-tile.is-next {
  box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.9);
}

.spoil-conserve-banner {
  width: 100%;
  margin: 0 0 8px;
}
.spoil-conserve-banner.hidden {
  display: none;
}

.tack-tile.locked {
  opacity: 0.42;
}

.tack-tile-ico {
  width: 72%;
  height: 72%;
  max-width: 72%;
  max-height: 72%;
  min-height: 0;
  font-size: unset;
  line-height: 1;
  display: grid;
  place-items: center;
}

.tack-tile-ico .ico,
.tack-tile-ico .ico.gear-stack,
.tack-tile-ico .ico.ico-art,
.tack-tile-ico .ico.ico-art img,
.tack-tile-ico svg,
.tack-tile-ico img,
.tack-tile-ico .ico.gear-stack > svg:first-child,
.tack-tile-ico .ico svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.tack-tile-grade {
  position: absolute;
  top: 4px;
  right: 6px;
  bottom: auto;
  font-size: 0.7rem;
  font-weight: 900;
  color: var(--gold);
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

.tack-tile-star {
  position: absolute;
  top: 3px;
  left: 5px;
  color: #f0d78c;
  font-size: 0.7rem;
}

.tack-tile-own {
  position: absolute;
  top: 3px;
  right: 5px;
  color: #6d6;
  font-size: 0.65rem;
}

.tack-tile-lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  background: rgba(0,0,0,0.25);
  border-radius: 10px;
}

.tackle-side {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.35rem !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(160, 200, 180, 0.35) transparent;
}

.tackle-detail {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.3rem !important;
  padding: 0.4rem 0.5rem !important;
}

.tackle-detail .tack-sel-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tackle-detail .detail-ico {
  width: 36px;
  height: 36px;
  font-size: 1.35rem;
  border-radius: 8px;
}

.tackle-detail .tack-sel-meta {
  flex: 1 1 7rem;
  min-width: 0;
}

.tackle-detail .detail-name {
  font-size: 0.82rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tackle-detail .detail-sub {
  font-size: 0.66rem;
}

.tackle-detail .tack-sel-act {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: flex-end;
  flex-shrink: 0;
  max-width: 46%;
}

.tackle-detail .tack-sel-act .btn {
  width: auto !important;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0.25rem 0.65rem;
}

.tackle-detail .tack-sel-act .detail-badge {
  padding: 0.15rem 0.35rem;
}

.tackle-detail .tack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.tackle-detail .tack-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.68rem;
  line-height: 1.2;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tackle-detail .tack-chip .detail-stat-ico {
  font-size: 0.9rem;
}

.tackle-detail .tack-chip .ico,
.tackle-detail .tack-chip .ico-img,
.tackle-detail .tack-chip svg,
.tackle-detail .tack-chip img {
  width: 0.9em;
  height: 0.9em;
}

.tackle-detail .tack-chip strong {
  color: #8fd;
  font-variant-numeric: tabular-nums;
}

.tackle-detail .detail-empty {
  padding: 0.45rem 0.25rem;
}

.tackle-detail .detail-price,
.tackle-detail .detail-junk,
.tackle-detail .bait-hints {
  margin: 0;
  font-size: 0.68rem;
}

.tackle-detail .detail-block {
  padding: 0.25rem 0.4rem;
  font-size: 0.7rem;
}

.stats-title {
  font-weight: 800;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
}

.tackle-stats .stat-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.2rem !important;
  color: #e8f4f0;
  border-bottom: none !important;
  cursor: help;
  padding: 0.02rem 0 !important;
  font-size: 0.68rem;
}

.tackle-stats .stat-row > span:not(.stat-row-ico) {
  flex: 1;
}

.tackle-stats .stat-row-ico {
  font-size: 0.95rem;
  margin-right: 0.1rem;
}

.tackle-stats .stat-tip {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 5;
  background: #1e2a28;
  color: #e8fff4;
  font-size: 0.68rem;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
}

.tackle-stats .stat-row:hover .stat-tip {
  display: block;
}

.tackle-chum {
  flex-shrink: 0;
  max-height: 140px;
  overflow: auto;
  background: rgba(0, 0, 0, 0.28) !important;
  color: var(--text) !important;
}

.chum-head {
  font-weight: 800;
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
}

.chum-card-name {
  font-weight: 700;
}

.chum-card-meta {
  opacity: 0.65;
  font-size: 0.65rem;
}

.chum-card .btn {
  width: 100%;
  margin-top: auto;
  min-height: 32px;
  padding: 0.25rem;
  font-size: 0.72rem;
}

.craft-card {
  width: min(420px,94vw);
  color: #e8f4f0;
}

.craft-card .craft-compare-head,.craft-card .craft-delta-row {
  color: #cde;
}

.craft-actions {
  display: flex;
  gap: .5rem;
  margin-top: .75rem;
}

.craft-actions .btn {
  width: auto;
  flex: 1;
}

.detail-ico.sil {
  filter: brightness(0) opacity(0.55);
}

.bestiary-desc {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: rgba(244, 239, 230, 0.88);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 901px) {
  #bestiary-modal .inv-detail .detail-name {
    font-size: clamp(2rem, 2.4vw, 2.35rem);
    line-height: 1.1;
  }
}

@media (max-width: 900px) {
  #bestiary-modal .inv-detail .detail-name {
    font-size: clamp(1.45rem, 4.8vw, 1.85rem);
    line-height: 1.12;
  }
}

.bestiary-section {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.bestiary-section + .bestiary-section {
  margin-top: 0.65rem;
}

.bestiary-section-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: #f4efe6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.bestiary-section .detail-tags .detail-tag {
  min-height: 1.85rem;
  padding: 0.35rem 0.75rem;
}

.bestiary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
}

.bestiary-stat-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  min-width: 0;
  min-height: 2.15rem;
  padding: 0.25rem 0.35rem;
  border-radius: 10px;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
}

.bestiary-stat-pill.stat-weight {
  background-image: url('../assets/bg-weight.webp');
}

.bestiary-stat-pill.stat-points {
  background-image: url('../assets/bg-points.webp');
}

.bestiary-stat-pill.stat-price {
  background-image: url('../assets/bg-price.webp');
}

.bestiary-stat-ico {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  display: grid;
  place-items: center;
}

.bestiary-stat-ico .ico,
.bestiary-stat-ico .ico-img,
.bestiary-stat-ico svg,
.bestiary-stat-ico img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

.bestiary-stat-label {
  flex: 0 0 auto;
  opacity: 0.92;
}

.bestiary-stat-pill strong {
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bestiary-bait-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: start;
}

.bestiary-bait-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bestiary-bait-col + .bestiary-bait-col {
  border-left: 1px solid rgba(240, 220, 180, 0.22);
  padding-left: 0.55rem;
}

.bestiary-bait-col-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.bestiary-bait-col.hint-often .bestiary-bait-col-title {
  color: #7dce7a;
}

.bestiary-bait-col.hint-normal .bestiary-bait-col-title {
  color: #e0b36a;
}

.bestiary-bait-col.hint-rare .bestiary-bait-col-title {
  color: #e87a7a;
}

/* 2×2 = 4 reserved slots (12 / 34); grows past 4 if needed. */
.bestiary-bait-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: auto;
  grid-auto-flow: row;
  gap: 0.35rem;
  align-content: start;
  width: 100%;
  max-width: 100%;
}

.bestiary-bait-tile,
.bestiary-bait-slot {
  width: 100%;
  max-width: none;
  min-width: 0;
  height: auto;
  aspect-ratio: 1 / 1;
  justify-self: stretch;
}

.bestiary-bait-tile {
  cursor: pointer;
  touch-action: manipulation;
  /* Slightly tighter bottom corners than default inv-slot (0.75rem). */
  border-radius: 0.75rem 0.75rem 0.4rem 0.4rem !important;
}

.bestiary-bait-tile.unknown {
  opacity: 0.75;
  cursor: default;
}

.bestiary-bait-q {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.35rem;
  font-weight: 800;
  color: #9ab;
  line-height: 1;
}

.bestiary-bait-slot {
  visibility: hidden;
  pointer-events: none;
}

.bestiary-bait-tile:hover,
.bestiary-bait-tile.selected {
  box-shadow: none;
}

.bestiary-bait-tile .inv-slot-timer {
  min-height: 28%;
  padding: 0.2rem 0.12rem 0.24rem;
  font-size: clamp(0.48rem, 2.6cqi, 0.62rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 0 0 5px 5px;
}

/* Recipe uses: same tile+timer caption as bait prefs / fish spoil bar. */
.bestiary-use-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.28rem;
  width: 100%;
  max-width: 100%;
  /* ~4×6 rows without scroll; longer lists still scroll inside. */
  max-height: min(68vw, 17.5rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.bestiary-use-tile {
  cursor: default;
}

.tackle-grid::-webkit-scrollbar, .shop-sims.tackle-grid::-webkit-scrollbar, .tackle-side::-webkit-scrollbar {
  width: 6px;
}

.tackle-grid::-webkit-scrollbar-thumb, .shop-sims.tackle-grid::-webkit-scrollbar-thumb, .tackle-side::-webkit-scrollbar-thumb {
  background: rgba(160, 200, 180, 0.35);
  border-radius: 99px;
}

.tackle-detail, .tackle-stats {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  color: var(--text) !important;
}

#shop-modal .tackle-detail {
  color: #f0e6d4 !important;
  background: transparent;
}

.tackle-stats .stats-title {
  margin-bottom: 0.15rem;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tackle-stats-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.04rem 0.4rem;
}

.tackle-stats .stat-row strong {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.bazaar-hint {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.detail-stat-ico {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.95;
}

.detail-stat > span:not(.detail-stat-ico) {
  flex: 1;
}

.stat-row-ico {
  font-size: 1.25rem;
  line-height: 1;
  margin-right: 0.25rem;
  flex-shrink: 0;
}

.bait-pref, .junk-req {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-right: 0.45rem;
  white-space: nowrap;
}

.junk-req.have {
  color: #7dcea0;
}

.junk-req.need {
  color: #f4a261;
}

.detail-block {
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffb4a2;
  background: rgba(180, 60, 40, 0.18);
  border: 1px solid rgba(244, 162, 97, 0.35);
  border-radius: 10px;
  padding: 0.4rem 0.55rem;
}

.detail-actions .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.25);
}

.bait-pref .ico, .junk-req .ico {
  font-size: 1.4rem;
}

.toast-ico {
  display: grid;
  place-items: center;
  flex: 0 0 2.35rem;
  width: 2.35rem;
  height: 2.35rem;
  min-width: 2.35rem;
  max-width: 2.35rem;
  min-height: 2.35rem;
  max-height: 2.35rem;
  overflow: hidden;
  align-self: center;
  margin: 0;
}

.toast-ico .ico,
.toast-ico .ico.ico-art,
.toast-ico svg,
.toast-ico img,
.toast-ico .ico.ico-art img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block;
  object-fit: contain;
}

#toast {
  display: flex;
  align-items: center;
}

#toast.hidden {
  display: none;
}

.tile-ico {
  font-size: 1.85rem;
  line-height: 1;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
}

.tr-match-stats, .tr-advice, .bait-sil {
  background: rgba(0, 0, 0, 0.28) !important;
  color: var(--text) !important;
  border-color: var(--stroke) !important;
}

.tr-list th, .tr-list td, .mail-row {
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--text) !important;
}

.pod-name, .pod-score, .pod-reward {
  color: var(--text) !important;
}

.bazaar-sell-form input, .bazaar-sell-form select, .bazaar-bid-row input {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid var(--stroke) !important;
  color: var(--text) !important;
  border-radius: 10px;
  padding: 0.4rem 0.5rem;
}

@keyframes lobbyIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.bz-lock-hint {
  display: inline;
  font-size: 0.62rem;
  opacity: 0.7;
  font-weight: 700;
}

.pod-place {
  font-weight: 800;
  opacity: 0.7;
  margin-top: 0.25rem;
}

.tr-me {
  text-align: center;
  font-weight: 700;
  margin: 0.5rem 0;
  color: var(--gold);
}

#mail-claim {
  margin-top: 0.65rem;
  width: 100%;
}

.tack-branch {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.tack-branch-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.22rem;
  min-width: 0;
}

.tack-branch-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  padding: 0.45rem 0.1rem 0.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tackle-chum[hidden] {
  display: none !important;
}

.session-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(4, 16, 14, 0.72);
  backdrop-filter: blur(4px);
}

.session-overlay.hidden {
  display: none !important;
}

.session-overlay-card.inv-panel-platform {
  --plat-edge: 5px;
  --plat-corner: 12px;
  width: min(22rem, 92vw);
  max-width: min(22rem, 92vw);
  text-align: center;
  padding: 0.65rem 1.15rem !important;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: center;
}

.session-overlay-card .inv-plat-corner {
  width: var(--plat-corner);
  height: var(--plat-corner);
}

.session-overlay-text {
  margin: 0;
  max-width: 100%;
  font-size: 1.38rem;
  font-weight: 800;
  color: #f4efe6;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.session-overlay-card .btn.wood-cta {
  width: 100%;
  min-width: 12rem;
}

.btn.wood-cta,
.btn.btn-primary.neo-btn.wood-cta {
  width: 100%;
  min-height: 48px;
  border: none !important;
  box-shadow: none !important;
  color: #fff !important;
  background-color: transparent !important;
  background-image:
    linear-gradient(rgba(28, 18, 8, 0.45), rgba(10, 6, 3, 0.52)),
    url('../assets/bg-tab.webp') !important;
  background-size: 100% 100%, 100% 100% !important;
  background-repeat: no-repeat !important;
  filter: saturate(0.88) brightness(0.96);
}

.btn.wood-cta:hover,
.btn.btn-primary.neo-btn.wood-cta:hover {
  filter: saturate(1) brightness(1.08);
}

/* —— Daily tasks —— */
.daily-panel {
  position: relative;
  width: min(26rem, 94vw) !important;
  max-width: 440px !important;
  min-width: 0;
  height: fit-content !important;
  max-height: min(86vh, 640px);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  overflow: visible !important;
  box-sizing: border-box;
  padding: calc(var(--plat-edge, 14px) + 0.65rem) calc(var(--plat-edge, 14px) + 0.55rem) !important;
}

.daily-head {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex-shrink: 0;
  padding-right: 2.6rem;
}

.daily-head-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
}

.daily-head-row h2,
.daily-title-heading {
  margin: 0;
  text-align: left;
  font-size: clamp(1.35rem, 4vw, 1.75rem) !important;
  line-height: 1.15;
  min-width: 0;
  letter-spacing: 0.01em;
}

.modal-x,
.daily-close {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.14) !important;
  box-shadow: none !important;
  display: grid !important;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
}

.daily-countdown {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
}

.daily-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  overflow: visible;
  min-height: 0;
  flex: 0 0 auto;
  padding-right: 0;
}

.daily-row {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(240, 215, 140, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.daily-row.ready {
  border-color: rgba(232, 196, 58, 0.5);
  box-shadow: 0 0 0 1px rgba(232, 196, 58, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.daily-row.claimed {
  opacity: 0.72;
}

.daily-row-top {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
}

.daily-title {
  flex: 1;
  min-width: 0;
  font-weight: 800;
  font-size: 0.9rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  color: #f0e6d4;
}

.daily-row-bottom {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.chip-diff {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

.daily-row.diff-easy .chip-diff {
  color: #8fd3c0;
}

.daily-row.diff-med .chip-diff {
  color: #e6c35c;
}

.daily-row.diff-hard .chip-diff {
  color: #f4a261;
}

.daily-bar {
  flex: 1;
  min-width: 0;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.daily-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8a5a2b, #e8c43a);
  transition: width 0.25s ease;
}

.daily-progress {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: rgba(240, 230, 212, 0.7);
  white-space: nowrap;
}

.daily-row-action {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.daily-reward {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 800;
  color: #f0d78c;
  font-size: 0.95rem;
}

.daily-dia {
  display: inline-grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  line-height: 0;
}

.daily-dia .ico,
.daily-dia .ico-img,
.daily-dia svg,
.daily-dia img {
  width: 1rem !important;
  height: 1rem !important;
  object-fit: contain;
  display: block;
}

.daily-claimed {
  font-size: 0.75rem;
  font-weight: 800;
  color: #8fd3c0;
}

.daily-reroll {
  width: 100%;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 800;
  flex-shrink: 0;
  min-height: 2.6rem;
  border: none !important;
  border-radius: 12px !important;
  background: url('../assets/bg-price.webp') center / 100% 100% no-repeat !important;
  box-shadow: none !important;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.daily-reroll-ico {
  display: inline-grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  filter: brightness(0) invert(1);
}

.daily-reroll-ico svg {
  width: 1.1rem;
  height: 1.1rem;
}

.daily-claim {
  border: none !important;
  border-radius: 10px !important;
  background: url('../assets/bg-tab.webp') center / 100% 100% no-repeat !important;
  box-shadow: none !important;
  color: #fff !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  min-height: 2rem;
  padding: 0.25rem 0.55rem !important;
}

/* —— Снасти wood shell (inventory/bestiary pattern) —— */
#shop-modal .tackle-shell {
  width: fit-content;
  max-width: min(1120px, 97vw);
  height: auto;
  max-height: min(90vh, 820px);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 0;
}

#shop-modal .tackle-chrome {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  min-width: 0;
}

#shop-modal .tackle-chrome .inv-chrome-title {
  margin: 0;
  flex-shrink: 0;
  font-size: clamp(2.25rem, 3.4vw, 2.85rem);
  line-height: 1;
}

@media (min-width: 901px) {
  #inventory-modal .inv-chrome-title,
  #bestiary-modal .inv-chrome-title {
    font-size: clamp(2.25rem, 3.4vw, 2.85rem);
    line-height: 1;
  }
}

#shop-modal .tackle-chrome .shop-currencies {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  padding: 0;
  align-items: stretch;
  min-width: min(19rem, 40vw);
  flex: 0 1 auto;
  max-width: min(24rem, 48vw);
  justify-content: stretch;
}

@media (min-width: 901px) {
  #shop-modal .tackle-chrome .shop-currencies {
    min-width: 22.5rem;
    max-width: 30.5rem;
    grid-template-columns: repeat(3, minmax(7rem, 1fr));
    gap: 0.45rem;
  }

  #shop-modal .cur-pill {
    padding: 0.28rem 1.05rem 0.28rem 0.65rem;
  }

  #shop-modal .cur-pill strong {
    font-size: 1.1rem;
  }
}

#shop-modal .tackle-chrome .inv-close {
  margin: 0;
  flex-shrink: 0;
}

#shop-modal .cur-pill {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 2.4rem;
  /* Same as HUD .stat-cur: icon inset left, extra pad right so number reads centered */
  padding: 0.25rem 0.95rem 0.25rem 0.7rem;
  border: none !important;
  border-radius: 10px !important;
  background: url('../assets/bg-tag.webp') center / 100% 100% no-repeat !important;
  color: #fff !important;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1;
  box-shadow: none !important;
  overflow: hidden;
}

#shop-modal .cur-pill-ico {
  display: inline-grid;
  place-items: center;
  width: 1.3rem;
  height: 1.3rem;
  flex: 0 0 1.3rem;
}

#shop-modal .cur-pill-ico .ico,
#shop-modal .cur-pill-ico svg,
#shop-modal .cur-pill-ico img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

#shop-modal .cur-pill strong {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  font-size: 1.22rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#shop-modal .cur-pill-timeon strong { color: #9fd4ff; }
#shop-modal .cur-pill-alny strong { color: var(--wizard-gold, #f0d78c); }

.tackle-body {
  display: grid;
  grid-template-columns: max-content max-content;
  gap: 1.05rem;
  flex: 0 1 auto;
  min-height: 0;
  overflow: visible;
  align-items: start;
  width: fit-content;
  max-width: 100%;
}

.tackle-rail {
  width: fit-content;
  max-width: 100%;
  height: auto;
  max-height: none;
  align-self: start;
  overflow: visible;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}

.tackle-rail::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.tackle-rail .tackle-slots {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.45rem !important;
  grid-template-columns: unset !important;
  width: fit-content;
  overflow: visible !important;
  padding: 0.4rem 0.35rem;
  box-sizing: content-box;
}

#shop-modal .tack-slot {
  aspect-ratio: 1;
  width: 3.55rem;
  min-width: 3.55rem;
  padding: 0.15rem 0.08rem !important;
  border-radius: 10px !important;
  border: 2px solid rgba(80, 55, 30, 0.55) !important;
  background: url('../assets/icons/grid-iclons/grid-common.webp') center / cover no-repeat !important;
  color: #f4efe6 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center;
  gap: 0.05rem;
  cursor: pointer;
  min-height: 0 !important;
  height: auto !important;
  box-sizing: border-box;
  overflow: visible;
  opacity: 0.68;
  filter: saturate(0.7) brightness(0.85);
  transition: transform 0.15s ease, opacity 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  transform-origin: center center;
}

#shop-modal .tack-slot.active {
  border-color: #e8c56a !important;
  box-shadow: 0 0 0 2px rgba(232, 197, 106, 0.35), 0 0 14px rgba(232, 197, 106, 0.35) !important;
  background: url('../assets/icons/grid-iclons/grid-common.webp') center / cover no-repeat !important;
  transform: scale(1.1);
  opacity: 1;
  filter: brightness(1.08) saturate(1.05);
  z-index: 2;
}

.tack-slot-ico {
  width: 48%;
  max-width: 1.75rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.tack-slot-ico .ico,
.tack-slot-ico svg,
.tack-slot-ico img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tack-slot-label {
  font-size: 0.52rem !important;
  font-weight: 800;
  text-align: center;
  line-height: 1.05;
  opacity: 0.9;
  text-transform: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 0.1rem;
}

.tackle-panel {
  /* PC: fit content, but always reserve ≥3 tile columns. */
  --tack-cell: 5rem;
  --tack-gap: 0.4rem;
  --tack-grid-min: calc(3 * var(--tack-cell) + 2 * var(--tack-gap));
  --tack-grid-max: calc(6 * var(--tack-cell) + 5 * var(--tack-gap));
  --tack-sims-pad: 0.7rem;
  --tack-panel-pad: calc(var(--plat-edge, 14px) + 0.2rem);
  --tack-panel-min: calc(var(--tack-grid-min) + 2 * (var(--tack-panel-pad) + var(--tack-sims-pad)));
  --tack-panel-max: calc(var(--tack-grid-max) + 2 * (var(--tack-panel-pad) + var(--tack-sims-pad)));
  min-height: 0 !important;
  height: auto !important;
  width: fit-content !important;
  min-width: var(--tack-panel-min) !important;
  max-width: min(100%, var(--tack-panel-max));
  display: flex !important;
  flex-direction: column !important;
  overflow: visible !important;
  align-self: start;
  justify-self: start;
  box-sizing: border-box;
  padding: var(--tack-panel-pad) !important;
  border-radius: 8px !important;
}

/* Bait/chum: 3 cols ≤900, 5 cols on PC — same --tack-cell (5rem) as other slots. */
.tackle-panel.is-flat-grid {
  --tack-grid-max: calc(5 * var(--tack-cell) + 4 * var(--tack-gap));
}

.tackle-panel.is-flat-grid .tack-branch-row {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.tackle-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  padding: 0 0.1rem 0;
}

.tackle-panel-title {
  margin: 0;
  font-size: max(2.55rem, 2rem);
}

.tackle-panel-head .loadout-check {
  font-size: 0.68rem;
  opacity: 0.8;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.tackle-panel-body {
  flex: 0 1 auto !important;
  min-height: 0;
  height: auto !important;
  width: 100%;
  min-width: 0;
  /* Override .inv-body { overflow: hidden } — keep scroll, hide the bar. */
  overflow: auto !important;
  position: relative;
  z-index: 1;
  scrollbar-width: none;
}

.tackle-panel-body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

#shop-modal .tackle-grid,
#shop-modal .shop-sims.tackle-grid {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0.28rem !important;
  grid-template-columns: unset !important;
  overflow: visible !important;
  /* Top pad so selected/equipped glow isn't clipped by the panel body. */
  padding: 0.85rem var(--tack-sims-pad, 0.7rem) var(--tack-sims-pad, 0.7rem) !important;
  max-height: none !important;
  min-height: 0;
  width: 100% !important;
  box-sizing: border-box;
}

#shop-modal .tack-branch {
  width: 100%;
  min-width: 0;
  align-items: stretch;
}

.tack-branch-row {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box;
  gap: 0.22rem !important;
}

@media (min-width: 901px) {
  /* Reserve 5-col width for every slot so panel doesn't jump vs bait/chum. */
  #shop-modal .tackle-panel {
    --tack-grid-max: calc(5 * var(--tack-cell) + 4 * var(--tack-gap));
    min-width: var(--tack-panel-max) !important;
  }

  #shop-modal .tackle-grid,
  #shop-modal .shop-sims.tackle-grid {
    width: max-content !important;
    min-width: var(--tack-grid-max, calc(5 * 5rem + 4 * 0.4rem));
    max-width: 100%;
    align-items: start !important;
  }

  #shop-modal .tack-branch {
    width: max-content;
    min-width: var(--tack-grid-max, calc(5 * 5rem + 4 * 0.4rem));
  }

  #shop-modal .tack-branch-row {
    grid-template-columns: repeat(auto-fit, var(--tack-cell, 5rem)) !important;
    width: max-content !important;
    min-width: var(--tack-grid-max, calc(5 * 5rem + 4 * 0.4rem));
    max-width: var(--tack-grid-max, calc(5 * 5rem + 4 * 0.4rem));
    justify-content: start;
    gap: var(--tack-gap, 0.4rem) !important;
  }

  #shop-modal .tackle-panel.is-flat-grid .tack-branch-row {
    grid-template-columns: repeat(5, var(--tack-cell, 5rem)) !important;
    max-width: var(--tack-grid-max);
  }

  #shop-modal .tack-tile {
    width: var(--tack-cell, 5rem);
    max-width: var(--tack-cell, 5rem);
    justify-self: start;
  }
}

.tack-branch-label {
  font-size: 1.05rem !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  border-bottom: none !important;
  padding: 0.2rem 0.1rem 0.15rem !important;
}

#shop-modal .tack-tile {
  --tack-glow: rgba(180, 160, 120, 0.45);
  border-radius: 14px;
  border: 2px solid rgba(70, 48, 28, 0.7);
  background: #1a120c;
  overflow: hidden;
}

#shop-modal .tack-tile-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
}

#shop-modal .tack-tile-ico {
  position: relative;
  z-index: 1;
}

#shop-modal .tack-tile.rarity-common { --tack-glow: rgba(180, 160, 120, 0.5); }
#shop-modal .tack-tile.rarity-uncommon {
  border-color: rgba(110, 200, 120, 0.55);
  --tack-glow: rgba(93, 207, 122, 0.65);
}
#shop-modal .tack-tile.rarity-rare {
  border-color: rgba(80, 140, 220, 0.65);
  --tack-glow: rgba(90, 160, 255, 0.7);
}
#shop-modal .tack-tile.rarity-epic {
  border-color: rgba(160, 90, 220, 0.65);
  --tack-glow: rgba(210, 130, 255, 0.7);
}
#shop-modal .tack-tile.rarity-legendary {
  border-color: rgba(230, 170, 60, 0.8);
  --tack-glow: rgba(255, 196, 80, 0.75);
}
#shop-modal .tack-tile.rarity-mythic {
  border-color: rgba(255, 90, 160, 0.85);
  --tack-glow: rgba(255, 90, 160, 0.75);
}
#shop-modal .tack-tile.rarity-relic {
  border-color: rgba(200, 140, 255, 0.75);
  --tack-glow: rgba(160, 210, 255, 0.75);
}

#shop-modal .tack-tile.selected {
  border-color: var(--tack-glow);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--tack-glow) 55%, transparent),
    0 0 14px var(--tack-glow),
    0 0 28px color-mix(in srgb, var(--tack-glow) 55%, transparent);
}

#shop-modal .tack-tile.equipped:not(.selected) {
  border-color: color-mix(in srgb, var(--tack-glow) 80%, #5dcf7a);
}

#shop-modal .tack-tile.unowned,
#shop-modal .tack-tile.locked {
  filter: grayscale(0.85) brightness(0.72);
}

#shop-modal .tack-tile.unowned.selected,
#shop-modal .tack-tile.locked.selected {
  filter: grayscale(0.35) brightness(0.9);
}

.tack-tile-new {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  padding: 0.2rem 0.55rem 0.2rem 0.35rem;
  font-size: 0.52rem;
  font-weight: 800;
  color: #2a1a0e;
  background: linear-gradient(135deg, #f0d060 0%, #e8b040 100%);
  border-radius: 0 0 10px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transform: rotate(-2deg);
  transform-origin: top left;
}

.tack-tile-eq {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28%;
  padding: 0.28rem 0.25rem 0.32rem;
  font-size: clamp(0.52rem, 2.6cqi, 0.68rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border-radius: 0 0 12px 12px;
  pointer-events: none;
}

.detail-ico-eq {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28%;
  padding: 0.28rem 0.25rem 0.32rem;
  font-size: clamp(0.58rem, 2.8cqi, 0.75rem);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border-radius: 0 0 12px 12px;
  pointer-events: none;
}

.detail-tag-rarity.rarity-mythic { color: #ff3b3b; }
.detail-tag-rarity.rarity-relic {
  /* Keep default .detail-tag pill chrome; rainbow lives on the inner span. */
  color: #9fd4ff;
}
.detail-tag-relic-text {
  color: #9fd4ff;
  background-image: linear-gradient(
    90deg,
    #ff5a5a 0%,
    #ffb84d 18%,
    #ffe566 36%,
    #6dff8a 54%,
    #5ec8ff 72%,
    #c08cff 88%,
    #ff5a5a 100%
  );
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .detail-tag-relic-text {
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

.detail-ico.rarity-mythic,
.detail-ico.rarity-relic,
.detail-ico.rarity-legendary,
.detail-ico.rarity-epic,
.detail-ico.rarity-rare,
.detail-ico.rarity-uncommon,
.detail-ico.rarity-common {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

.inv-slot-fish.rarity-mythic { --rarity-glow: rgba(255, 90, 160, 0.65); }
.inv-slot-fish.rarity-relic { --rarity-glow: rgba(140, 200, 255, 0.65); }

#shop-modal .tackle-detail.inv-detail {
  flex: 0 0 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: visible !important;
  background-color: #2a1a0e !important;
  background-image: url('../assets/grid-platform.webp') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#shop-modal .tackle-detail .detail-visual {
  width: 5rem;
  max-width: none;
  position: relative;
  flex-shrink: 0;
}

#shop-modal .tackle-detail .detail-ico {
  width: 5rem;
  height: 5rem;
  font-size: 2.6rem;
  border-radius: 14px;
}

#shop-modal .tackle-detail .detail-name {
  font-size: 1.55rem;
  line-height: 1.12;
  white-space: normal;
  text-overflow: unset;
  overflow: visible;
}

#shop-modal .tackle-detail .detail-sub {
  font-size: 0.95rem;
  line-height: 1.35;
  margin-top: 0.2rem;
}

#shop-modal .tackle-detail .detail-actions {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.4rem;
}

#shop-modal .tackle-detail .detail-actions .btn {
  flex: 0 0 auto;
  width: 100% !important;
  white-space: nowrap;
}

.gear-btn-equip {
  position: relative;
  isolation: isolate;
  background: transparent !important;
  filter: none !important;
  overflow: hidden;
}

.gear-btn-equip::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: url('../assets/bg-tab.webp') center / 100% 100% no-repeat;
  pointer-events: none;
}

.gear-btn-equip.is-equipped {
  cursor: default;
  pointer-events: none;
}

.gear-btn-equip.is-equipped::before {
  filter: hue-rotate(85deg) saturate(1.85) brightness(0.92);
}

.gear-btn-equip.just-equipped {
  animation: gear-equip-in 0.35s ease;
}

@keyframes gear-equip-in {
  from { filter: brightness(1.15); }
  to { filter: none; }
}

.gear-btn-craft[data-buy-chum].is-loading {
  color: transparent !important;
  pointer-events: none;
}

.gear-btn-craft[data-buy-chum].is-loading::after {
  content: '';
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 1.15rem;
  height: 1.15rem;
  margin: -0.575rem 0 0 -0.575rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: tts-spin 0.6s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .gear-btn-equip.just-equipped,
  .gear-btn-craft[data-buy-chum].is-loading::after {
    animation: none;
  }
}

.gear-btn-craft {
  background: url('../assets/bg-price.webp') center / 100% 100% no-repeat !important;
}

/* Same wood plank as siblings; green via filtered ::before (text stays white). */
.gear-btn-craft[data-buy-chum],
.btn[data-buy-chum].gear-btn-craft {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
  line-height: 1;
  background: transparent !important;
  filter: none !important;
  overflow: hidden;
}

.gear-btn-craft[data-buy-chum]::before,
.btn[data-buy-chum].gear-btn-craft::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: url('../assets/bg-tab.webp') center / 100% 100% no-repeat;
  filter: hue-rotate(85deg) saturate(1.85) brightness(0.92);
  pointer-events: none;
}

.chum-buy-label,
.chum-buy-price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.chum-buy-price {
  gap: 0.35rem;
  font-weight: 800;
}

.chum-buy-price strong {
  color: #9fd4ff;
  font-size: 1.05em;
  line-height: 1;
}

.gear-btn-craft[data-buy-chum] .chum-buy-price > .ico,
.btn[data-buy-chum].gear-btn-craft .chum-buy-price > .ico,
.detail-actions .chum-buy-price > .ico,
.detail-actions .chum-buy-price > .ico .ico-img,
.detail-actions .chum-buy-price > .ico img {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  line-height: 0;
  flex-shrink: 0;
  align-self: center;
  object-fit: contain;
}

.gear-btn-craft[data-buy-chum] .chum-buy-price > .ico .ico-img,
.gear-btn-craft[data-buy-chum] .chum-buy-price > .ico img,
.btn[data-buy-chum].gear-btn-craft .chum-buy-price > .ico .ico-img,
.btn[data-buy-chum].gear-btn-craft .chum-buy-price > .ico img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.chum-buy-price .gear-price-pack {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1;
}

.gear-btn-details {
  background: url('../assets/bg-tab.webp') center / 100% 100% no-repeat !important;
  filter: none !important;
}

/* Gear detail modal */
#gear-detail-modal {
  z-index: 80;
  background: rgba(6, 10, 8, 0.72);
  overflow-y: auto;
  place-items: safe center;
}

#gear-detail-modal .gear-detail-card.inv-panel-platform,
.gear-detail-card {
  width: min(420px, 94vw) !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: calc(var(--plat-edge, 14px) + 0.3rem) !important;
  background-color: #1a100a !important;
  background-image:
    linear-gradient(180deg, rgba(10, 6, 4, 0.45) 0%, rgba(10, 6, 4, 0.2) 40%, rgba(10, 6, 4, 0.55) 100%),
    url('../assets/grid-platform.webp') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.65) !important;
}

.gear-detail-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 0;
  overflow: visible;
}

.gear-detail-top {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
}

.gear-detail-top .gear-detail-close {
  margin: 0 0 0 auto;
  flex-shrink: 0;
  position: static !important;
  top: auto !important;
  right: auto !important;
}

.gear-detail-top .detail-ico {
  width: 5.5rem;
  height: 5.5rem;
  flex-shrink: 0;
  border-radius: 14px;
  border: 2px solid rgba(70, 48, 28, 0.75);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.gear-detail-meta {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding-top: 0.1rem;
}

.gear-detail-meta .detail-name {
  font-size: clamp(1.85rem, 4.2vw, 2.35rem);
  line-height: 1.08;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.gear-detail-meta .detail-sub {
  margin: 0;
  font-size: 0.72rem;
  color: rgba(244, 239, 230, 0.82);
  line-height: 1.3;
}

.gear-detail-meta .detail-title-row .detail-name {
  font-size: clamp(2rem, 4.6vw, 2.55rem);
  line-height: 1.05;
}

.gear-detail-meta .detail-title-row .detail-sub {
  flex-shrink: 0;
  align-self: flex-end;
  white-space: nowrap;
  text-align: right;
  font-size: 0.62rem;
  opacity: 0.88;
}

#shop-modal .tackle-detail .detail-title-row .detail-name {
  font-size: clamp(2rem, 2.4vw, 2.25rem);
  line-height: 1.05;
}

#shop-modal .tackle-detail .detail-title-row .detail-sub {
  flex-shrink: 0;
  align-self: flex-end;
  white-space: nowrap;
  text-align: right;
  margin-top: 0;
  font-size: 0.78rem;
  opacity: 0.88;
}

.detail-title-desc {
  min-width: 0;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(244, 239, 230, 0.85);
}

/* Keep name inline in the same flow as " — desc" (override tackle -webkit-box clamp). */
.detail-title-desc .detail-name,
#shop-modal .tackle-detail .detail-title-desc .detail-name,
.gear-detail-meta .detail-title-desc .detail-name {
  display: inline !important;
  width: auto !important;
  max-width: none;
  overflow: visible;
  white-space: normal;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  -webkit-box-orient: initial;
  font-size: clamp(2rem, 4.2vw, 2.35rem);
  line-height: 1.12;
}

.gear-detail-top .detail-visual,
#shop-modal .tackle-detail .detail-visual {
  align-items: center;
  gap: 0.28rem;
}

.gear-detail-top .detail-visual .detail-ico,
#shop-modal .tackle-detail .detail-visual .detail-ico {
  width: 100%;
}

.detail-stock {
  width: 100%;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .gear-detail-meta .detail-title-row .detail-name,
  #shop-modal .tackle-detail .detail-title-row .detail-name {
    font-size: clamp(1.82rem, 5.2vw, 1.95rem);
  }

  .detail-title-desc {
    font-size: 0.72rem;
  }

  .detail-title-desc .detail-name,
  #shop-modal .tackle-detail .detail-title-desc .detail-name,
  .gear-detail-meta .detail-title-desc .detail-name {
    font-size: clamp(1.45rem, 4.8vw, 1.85rem);
  }

  .detail-stock {
    font-size: 0.62rem;
  }
}

.gear-detail-meta .detail-tag {
  align-self: flex-start;
  margin: 0.05rem 0 0;
  margin-inline-start: 0;
}

.gear-stat-chip {
  position: relative;
  z-index: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.65rem;
  padding: 0.5rem 1.15rem 0.5rem 0.95rem;
  border: none;
  border-radius: 0;
  background: none;
  font-size: 0.92rem;
  color: rgba(244, 239, 230, 0.95);
  line-height: 1.2;
  box-sizing: border-box;
}

.gear-tag-skin {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: stretch;
  pointer-events: none;
}

.gear-tag-l,
.gear-tag-r {
  flex: 0 0 auto;
  height: 100%;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.gear-tag-l {
  aspect-ratio: 112 / 124;
  background-image: url('../assets/tag-left.webp');
  background-position: left center;
}

.gear-tag-c {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  background: url('../assets/tag-center.webp') center / auto 100% repeat-x;
}

.gear-tag-r {
  aspect-ratio: 99 / 124;
  background-image: url('../assets/tag-right.webp');
  background-position: right center;
}

.gear-stat-chip > :not(.gear-tag-skin) {
  position: relative;
  z-index: 1;
}

.gear-stat-chip .detail-stat-ico {
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  line-height: 0;
  align-self: center;
}

.gear-stat-chip .detail-stat-ico .ico,
.gear-stat-chip .detail-stat-ico svg,
.gear-stat-chip .detail-stat-ico img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gear-stat-chip-label {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.2;
}

.gear-stat-chip strong {
  color: #7ddea0;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  flex-shrink: 0;
  line-height: 1;
}

.gear-craft-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.65rem 1rem 0.65rem;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(8, 5, 3, 0.55) 0%, rgba(6, 4, 2, 0.68) 100%),
    url('../assets/grid-platform.webp') center / cover no-repeat;
  border: 1px solid rgba(90, 60, 35, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 6px 18px rgba(0, 0, 0, 0.35);
}

.gear-craft-title {
  font-weight: 800;
  font-size: 1.12rem;
  margin: 0;
  color: #fff;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.gear-craft-list {
  display: flex;
  flex-direction: column;
  gap: 0rem;
  padding: 0;
  border-radius: 0;
  background: none;
}

.gear-req {
  display: grid;
  grid-template-columns: 2.45rem 1fr auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.12rem 0;
  font-size: 0.92rem;
  border-bottom: none;
}

.gear-req-ico {
  width: 2.45rem;
  height: 2.45rem;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-sizing: border-box;
  overflow: hidden;
  line-height: 0;
}

.gear-req-ico > .ico,
.gear-req-ico > svg,
.gear-req-ico > img {
  width: 1.85rem;
  height: 1.85rem;
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
  display: block;
  margin: 0;
  flex-shrink: 0;
}

.gear-req-ico .ico {
  display: grid;
  place-items: center;
  line-height: 0;
}

.gear-req-ico .ico svg,
.gear-req-ico .ico img,
.gear-req-ico .ico .ico-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.gear-req-name {
  color: #d28c54;
  font-weight: 700;
  min-width: 0;
  line-height: 1.25;
}

.gear-req-count {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  justify-self: end;
}

.gear-req.need .gear-req-count { color: #ff5a4a; }
.gear-req.ok .gear-req-name { color: #7ddea0; }
.gear-req.ok .gear-req-count { color: #7ddea0; }

.gear-fish-note {
  font-size: 0.8rem;
  margin: 0.05rem 0 0.15rem;
  line-height: 1.4;
  color: rgba(210, 200, 190, 0.72);
}

.gear-level-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  min-height: 2.35rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: rgba(12, 8, 5, 0.72);
  border: 1.5px solid rgba(200, 140, 70, 0.55);
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0.2rem 0 0;
}

.gear-level-pill.ok { color: #7ddea0; border-color: rgba(125, 222, 160, 0.45); }
.gear-level-pill.need { color: #e8a060; }

.gear-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.gear-price-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.35rem;
  padding: 0.4rem 1.25rem 0.4rem 1.05rem;
  border: none;
  border-radius: 12px;
  background: url('../assets/bg-tag.webp') center / 100% 100% no-repeat;
  color: #f0d78c;
  font-weight: 800;
  line-height: 1;
  box-sizing: border-box;
}

.gear-price-pill.gear-price-alt {
  cursor: pointer;
}

.gear-price-pill.gear-price-alt:hover {
  filter: brightness(1.08);
}

.gear-price-pill > .ico,
.gear-price-pill > svg,
.gear-price-pill > img {
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  line-height: 0;
  align-self: center;
  order: 2;
}

.gear-price-pill .ico svg,
.gear-price-pill .ico img,
.gear-price-pill > svg,
.gear-price-pill > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gear-price-pill strong {
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  line-height: 1;
  order: 1;
  color: #f0d78c;
}

.gear-price-timeon strong { color: #9fd4ff; }

.gear-price-or {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  padding: 0 0.15rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.gear-price-pack {
  font-size: 0.85rem;
  color: rgba(244, 239, 230, 0.75);
}

.gear-detail-actions {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.45rem;
  margin-top: 0.15rem;
}

.gear-detail-actions .btn {
  flex: 0 0 auto;
  width: 100%;
  min-height: 50px;
  border: none !important;
  border-radius: 12px !important;
  font-weight: 800;
  font-size: 1.02rem;
  color: #fff !important;
  box-shadow: none !important;
}

.gear-detail-actions .gear-btn-craft,
.gear-detail-actions .gear-btn-equip {
  flex: none;
  width: 100%;
  min-height: 52px;
  font-size: 1.08rem;
}

.gear-detail-card[data-state="locked"] .gear-btn-craft,
#tackle-detail[data-state="locked"] .gear-btn-craft {
  background-image:
    linear-gradient(rgba(50, 50, 50, 0.72), rgba(35, 35, 35, 0.72)),
    url('../assets/bg-tab.webp') !important;
  background-size: 100% 100%, 100% 100% !important;
  opacity: 0.85;
}

.gear-detail-card[data-state="ready"] .gear-btn-craft,
#tackle-detail[data-state="ready"] .gear-btn-craft {
  background: url('../assets/bg-tab.webp') center / 100% 100% no-repeat !important;
}

.gear-detail-card[data-state="owned"] .gear-btn-equip,
#tackle-detail[data-state="owned"] .gear-btn-equip {
  background: transparent !important;
}

.gear-detail-actions .gear-btn-craft[data-buy-chum],
.gear-detail-card .gear-btn-craft[data-buy-chum] {
  position: relative;
  isolation: isolate;
  background: transparent !important;
  filter: none !important;
  overflow: hidden;
}

.gear-detail-actions .gear-btn-craft[data-buy-chum]::before,
.gear-detail-card .gear-btn-craft[data-buy-chum]::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: url('../assets/bg-tab.webp') center / 100% 100% no-repeat;
  filter: hue-rotate(85deg) saturate(1.85) brightness(0.92);
  pointer-events: none;
}

.gear-summary {
  margin-top: 0.35rem;
  margin-bottom: 0.15rem;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background:
    linear-gradient(180deg, rgba(16, 10, 6, 0.4) 0%, rgba(10, 6, 4, 0.55) 100%),
    url('../assets/grid-platform.webp') center / cover no-repeat;
  border: 1px solid rgba(90, 60, 35, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 6px 16px rgba(0, 0, 0, 0.3);
  padding: 0;
}

.gear-summary > summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e8c56a;
  list-style: none;
  padding: 0.55rem 0.85rem;
  margin: 0;
  background: url('../assets/bg-tab.webp') center / 100% 100% no-repeat;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
}

.gear-summary > summary::-webkit-details-marker { display: none; }

.gear-summary-star {
  flex-shrink: 0;
  font-size: 0.95rem;
  line-height: 1;
  color: #f0d78c;
}

.gear-summary-label {
  flex: 1 1 auto;
  min-width: 0;
}

.gear-summary-caret {
  flex-shrink: 0;
  width: 0;
  height: 0;
  border-left: 0.38rem solid transparent;
  border-right: 0.38rem solid transparent;
  border-bottom: 0.48rem solid #e8c56a;
  transition: transform 0.15s ease;
}

.gear-summary:not([open]) > summary .gear-summary-caret {
  transform: rotate(180deg);
}

.gear-summary .gear-stats-grid {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  padding: 0.55rem 0.55rem 0.7rem;
}

@media (min-width: 901px) {
  /* Content-sized shell + place-items:center made the right detail jump on every height change. */
  #shop-modal.modal {
    place-items: start center;
    padding-top: max(1.25rem, 3.5vh);
    overflow-y: auto;
  }

  #shop-modal .tackle-shell {
    display: grid;
    grid-template-columns: max-content max-content max-content;
    grid-template-rows: auto auto;
    align-content: start;
    justify-content: start;
    width: fit-content;
    max-width: min(97vw, 1180px);
    height: auto;
    max-height: none;
    column-gap: 1.05rem;
    row-gap: 0.45rem;
  }

  #shop-modal .tackle-chrome {
    grid-column: 1 / -1;
    width: 100%;
  }

  #shop-modal .tackle-body {
    display: contents;
  }

  #shop-modal .tackle-rail {
    grid-column: 1;
    grid-row: 2;
    width: fit-content;
    height: auto;
    max-height: none;
    overflow: visible;
    align-self: start;
    justify-self: start;
  }

  #shop-modal .tackle-rail .tackle-slots {
    gap: 0.4rem !important;
    overflow: visible !important;
    padding: 0.45rem 0.4rem;
  }

  #shop-modal .tack-slot {
    width: 4.25rem;
    min-width: 4.25rem;
    padding: 0.15rem 0.08rem !important;
    border-radius: 12px !important;
  }

  #shop-modal .tack-slot-ico {
    max-width: 2.15rem;
  }

  #shop-modal .tack-slot-label {
    font-size: 0.62rem !important;
  }

  #shop-modal .tackle-panel {
    grid-column: 2;
    grid-row: 2;
    height: auto !important;
    width: fit-content !important;
    min-width: var(--tack-panel-min) !important;
    max-width: min(100%, var(--tack-panel-max));
    max-height: min(calc(90vh - 7rem), 720px);
    align-self: start;
    justify-self: start;
  }

  #shop-modal .tackle-panel-head {
    width: 100%;
    min-width: 0;
  }

  #shop-modal .tackle-panel-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #shop-modal .tackle-panel-body {
    flex: 0 1 auto !important;
    height: auto !important;
    width: 100%;
    overflow: auto !important;
    max-height: min(calc(90vh - 11rem), 640px);
  }

  #shop-modal .tackle-detail.inv-detail {
    grid-column: 3;
    grid-row: 2;
    height: auto !important;
    min-height: 12.5rem;
    width: min(400px, 36vw);
    max-height: none !important;
    align-self: start;
    justify-self: start;
    overflow: visible !important;
    background-color: #1a100a !important;
    background-image:
      linear-gradient(180deg, rgba(10, 6, 4, 0.45) 0%, rgba(10, 6, 4, 0.2) 40%, rgba(10, 6, 4, 0.55) 100%),
      url('../assets/grid-platform.webp') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
  }

  #shop-modal .tackle-detail .inv-detail-body {
    flex: 0 0 auto;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
  }

  #shop-modal .tackle-detail .gear-detail-meta .detail-name {
    font-size: clamp(1.55rem, 2vw, 2rem);
  }

  #shop-modal .tackle-detail .gear-detail-meta .detail-title-row .detail-name,
  #shop-modal .tackle-detail .detail-title-row .detail-name {
    font-size: clamp(2rem, 2.2vw, 2.25rem);
  }

  #shop-modal .tackle-detail .detail-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
  }

  #shop-modal .tackle-detail .detail-title-desc .detail-name {
    display: inline !important;
    width: auto !important;
    max-width: none;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    -webkit-box-orient: initial;
    overflow: visible;
  }

  #shop-modal .tackle-detail .detail-sub {
    height: fit-content;
    min-height: 0;
  }

  #shop-modal .tackle-detail .detail-actions {
    margin-top: 0.45rem;
    min-height: 2.6rem;
  }
}

.onboarding {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  /* Keep inset modest — card uses % of this box, not vw (vw+padding overflowed phones) */
  padding: max(0.75rem, var(--safe-t, 0px)) max(0.5rem, var(--safe-r, 0px))
    max(0.75rem, var(--safe-b, 0px)) max(0.5rem, var(--safe-l, 0px));
  background: rgba(4, 16, 14, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  overflow-x: hidden;
  box-sizing: border-box;
}
.onboarding.hidden { display: none; }
.onboarding-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(400px, 100%) !important;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  text-align: center;
  padding: calc(var(--plat-edge, 14px) + 0.85rem) calc(var(--plat-edge, 14px) + 0.65rem) !important;
  gap: 0.45rem;
  animation: modalPop 0.38s var(--ease-out) both;
}
.onboarding-title {
  margin: 0;
  font-family: var(--font-brand) !important;
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
  color: #f4efe6;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.onboarding-body {
  margin: 0;
  font-size: clamp(0.92rem, 2.8vw, 1.05rem);
  font-weight: 700;
  line-height: 1.45;
  color: rgba(244, 239, 230, 0.92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
/* Empty slots still sat in the flex column (mystery gap under title/body) */
.onboarding-card #ob-body:empty,
.onboarding-card .ob-langs:empty {
  display: none;
}
#ob-body, #ob-coach-text {
  white-space: pre-line;
}
.ob-langs {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.ob-langs .wood-cta {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 46px;
  box-sizing: border-box;
  font-size: clamp(0.95rem, 3vw, 1.05rem);
}
.ob-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 0;
  width: 100%;
}
.ob-actions .wood-cta {
  flex: 1 1 calc(50% - 0.35rem);
  min-width: min(100%, 9rem);
  width: auto;
  min-height: 46px;
}
.ob-coach-card {
  --plat-edge: 10px;
  --plat-corner: 20px;
  padding: calc(var(--plat-edge) + 0.65rem) calc(var(--plat-edge) + 0.55rem) !important;
}
.ob-coach {
  position: fixed;
  left: 50%;
  bottom: 6.5rem;
  transform: translateX(-50%);
  z-index: 32;
  width: min(420px, 92vw);
  pointer-events: none;
}
.ob-coach.hidden { display: none; }
.ob-coach .onboarding-card { pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {
  .onboarding-card {
    animation: none !important;
  }
}

/* Millennium fish-tab tokens (QuestsContainer TAB_THEME.fish) — modal + lobby inline */
#daily-modal,
#lobby-daily {
  --q-accent: #4a6b3a;
  --q-panel: #1e2e18;
  --q-header-from: #3d5c32;
  --q-header-to: #2a4024;
  --q-badge-from: #4a6b3a;
  --q-badge-to: #2f4a28;
  --q-ring: #9bc48a;
  --q-amount: #243820;
  --q-card-border: #5a7d48;
  --q-body: #f5e9b4;
  --q-approve: linear-gradient(to bottom left, #085216, #57b94e);
  --q-orange: linear-gradient(to bottom left, #b34500, #ff881b);
  --q-morph-up: 0px 4px 0px rgba(0, 0, 0, 0.1), 0px 8px 8px rgba(0, 0, 0, 0.4),
    inset 0px 2px 4px rgba(255, 255, 255, 0.25), inset 0px -2px 4px rgba(0, 0, 0, 0.3);
  --q-morph-down: inset 0 2px 8px rgba(0, 0, 0, 0.8);
}
#daily-modal {
  align-items: center;
  justify-content: center;
  justify-items: center;
  padding: 2.75rem 1rem;
}
.quests-float {
  position: relative;
  width: min(32rem, 94vw);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.quests-close {
  position: absolute;
  top: -2.35rem;
  right: -0.15rem;
  z-index: 3;
}
.quests-panel {
  position: relative;
  margin-top: 2.15rem;
  padding: 1.25rem 0.75rem 0.75rem;
  border-radius: 0.75rem 0.75rem 1.5rem 1.5rem;
  border: 1px solid var(--q-accent);
  background: var(--q-panel);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}
.quests-panel::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.14;
  background: url("../assets/ui/bg-calendar.webp") center / 420px repeat;
  z-index: 0;
}
.quests-folder {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 2;
  width: 100.5%;
  transform: translate(-50%, -70%);
  pointer-events: none;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.35));
}
.quests-folder img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}
.quests-folder-title {
  position: absolute;
  left: 0;
  top: 25%;
  width: 42%;
  max-width: 12rem;
  padding: 0.15rem 1rem 0 0.75rem;
  color: #fff;
  font-weight: 900;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.quests-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: min(62vh, 28rem);
}
.quests-empty {
  margin: 0.55rem 0.2rem 0.2rem;
  color: #fff;
  font-weight: 800;
  text-align: center;
}
.quest-card {
  position: relative;
  padding-top: 0.75rem;
  transform-origin: center top;
}
.quest-card-frame {
  border-radius: 1rem;
  /* visible so Millennium-sized check glyphs aren't clipped */
  overflow: hidden;
  border: 2px solid var(--q-card-border);
  background: var(--q-panel);
  transition: border-color 0.5s, box-shadow 0.5s;
}
.quest-card.is-ready .quest-card-frame {
  border-color: #22c55e;
  box-shadow: 0 0 16px 3px rgba(34, 197, 94, 0.75), 0 0 28px 8px rgba(34, 197, 94, 0.3);
}
.quest-badge {
  position: absolute;
  right: 0.5rem;
  top: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
.quest-badge-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  border: 2.5px solid var(--q-ring);
  background: linear-gradient(180deg, var(--q-badge-from), var(--q-badge-to));
  box-shadow: 0 0 12px rgba(74, 107, 58, 0.55);
}
.quest-badge-ring img {
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.1rem;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
.quest-badge > span {
  margin-top: -0.7rem;
  padding: 0.12rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(155, 196, 138, 0.4);
  background: var(--q-amount);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}
.quest-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.625rem 4.5rem 0.625rem 0.75rem;
  border-radius: 0.85rem 0.85rem 0 0;
  overflow: hidden;
  background: linear-gradient(180deg, var(--q-header-from), var(--q-header-to));
}
.quest-card-head h3 {
  margin: 0;
  flex: 1;
  min-width: 0;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.quest-pill {
  position: relative;
  flex: 0 0 auto;
  min-width: 5rem;
  width: 128px;
  padding: 0.15rem 1.15rem;
  border-radius: 999px;
  border: 1px solid #0a2450;
  background: rgba(10, 36, 80, 0.8);
  overflow: hidden;
  text-align: center;
  box-shadow: var(--q-morph-down);
}
.quest-pill > span {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: 999px;
  background: var(--q-approve);
  box-shadow: var(--q-morph-up);
}
.quest-pill b {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.quest-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: stretch;
  padding: 0.5rem;
  background: var(--q-body);
}
.quest-card-body.is-wide {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}
.quest-tasks {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.375rem;
  min-width: 0;
  height: 100%;
  overflow: visible;
}
.quest-task {
  border-radius: 0.5rem;
  padding: 0.25rem 0.5rem;
  transition: background-color 0.3s;
  overflow: visible;
}
.quest-task.is-done { background: #d4f0c4; }
.quest-task-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: visible;
}
.quest-task-line p {
  margin: 0;
  flex: 1;
  min-width: 0;
  color: #3a2f1f;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Same mark as Millennium QuestRowCheck — SVG glyph, not a clipped bg-image. */
.quest-check {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.1rem;
  border-radius: 9999px;
  border: 2px solid #b89868;
  background: linear-gradient(180deg, #ebe1c9 0%, #d5c8a8 100%);
  box-shadow:
    inset 0 1px 2px rgba(90, 70, 40, 0.18),
    0 0.5px 0 rgba(255, 255, 255, 0.35);
  overflow: visible;
}
.quest-check.is-done {
  background: linear-gradient(180deg, #f0e6cc 0%, #dccfb0 100%);
}
.quest-check-glyph {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px !important;
  height: 28px !important;
  max-width: none;
  max-height: none;
  transform: translate(-50%, -50%);
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(0 0.5px 0 rgba(20, 90, 16, 0.55));
}
.quest-bar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.quest-bar {
  flex: 1;
  height: 0.5rem;
  border-radius: 999px;
  background: #c4b48a;
  overflow: hidden;
}
.quest-bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--q-approve);
}
.quest-bar-n {
  flex: 0 0 auto;
  color: #5a4a32;
  font-size: 0.625rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.quest-or {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.1rem 0.5rem;
  color: #8a7350;
  font-size: 0.625rem;
  font-weight: 700;
}
.quest-or span {
  flex: 1;
  border-top: 1px dashed rgba(138, 115, 80, 0.7);
}
.quest-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding-left: 0.5rem;
  border-left: 1px solid #ddd0b8;
}
.quest-reward {
  position: relative;
  flex-shrink: 0;
  width: 2.5rem;
  padding-top: 0.25rem;
  padding-bottom: 0.15rem;
}
.quest-reward-ico {
  width: 2.25rem;
  height: 2.25rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quest-reward-ico img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
  margin-bottom: 0.85rem;
}
.quest-reward > span {
  position: absolute;
  left: 50%;
  bottom: 0.1rem;
  transform: translateX(-50%);
  padding: 0.1rem 0.375rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(155, 196, 138, 0.4);
  background: var(--q-amount);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}
.quest-go {
  flex-shrink: 0;
  border: 1px solid #4c7e52;
  border-radius: 0.75rem;
  padding: 0.5rem 1rem;
  background: var(--q-approve);
  color: #fff;
  font-family: inherit;
  font-weight: 900;
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--q-morph-up);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.2s;
}
.quest-go:active {
  transform: scale(0.98);
  box-shadow: var(--q-morph-down);
}
.quest-go.is-wide {
  width: 100%;
  min-height: 2.85rem;
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
}
.quest-go.is-claim {
  border-color: #ff881b;
  background: var(--q-orange);
}
@media (min-width: 480px) {
  .quests-folder-title {
    top: 0.45rem;
    width: 55%;
    max-width: 18rem;
    font-size: 1.125rem;
  }
  .quest-side {
    flex-direction: row;
    gap: 0.375rem;
  }
  .quest-reward-ico {
    width: 2.5rem;
    height: 2.5rem;
  }
}

