/* «Туман»: вкладка «Гавань» (js/screens/harbor.js, макет «Гавань — сборка»). После tuman.css. */

.hb .tm-sec { margin-top: 28px; }
.hb-title { padding-top: 22px; }
.hb-title .tm-dayword { margin: 10px 0 0; font-size: min(110px, 28.2vw); }
.hb-sticker { top: 44px; }
.hb-sticker b { font-size: 30px; white-space: nowrap; }
.hb-sticker span { font-family: var(--f-display); font-style: italic; font-size: 14px; font-weight: 800; color: rgba(246, 243, 236, .78); }

/* ── торговцы ───────────────────────────────────────────── */
.hb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hb-row { position: relative; overflow: hidden; height: 76px; border-radius: 20px; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center; gap: 12px; padding: 0 14px 0 10px; cursor: pointer; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .13);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); transition: transform .18s var(--ease), background .2s; }
.hb-row:active { transform: scale(.975); }
.hb-row.hl { background: rgba(255, 255, 255, .15); border-color: var(--accent); box-shadow: 0 12px 30px rgba(4, 12, 14, .28); }
/* по выгодному делу раз в несколько секунд пробегает блик */
.hb-row.hl::after { content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; background-size: 300% 100%;
  background-image: linear-gradient(105deg, rgba(255, 255, 255, 0) 42%, rgba(255, 244, 214, .2) 50%, rgba(255, 255, 255, 0) 58%);
  animation: hbSweep 4.6s ease-in-out 1.6s infinite; }
@keyframes hbSweep { 0% { background-position: 120% 0; } 45%, 100% { background-position: -40% 0; } }
.hb-face { position: relative; width: 56px; height: 56px; flex: none; }
.hb-face img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; display: block; }
.hb-ping { position: absolute; right: -1px; bottom: 1px; width: 14px; height: 14px; border-radius: 50%; background: var(--aqua); border: 2px solid #12262A;
  animation: hbPing 2s ease-out infinite; }
@keyframes hbPing { 0% { box-shadow: 0 0 0 0 rgba(169, 228, 208, .55); } 100% { box-shadow: 0 0 0 10px rgba(169, 228, 208, 0); } }
.hb-tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hb-tx .nm { font-size: 26px; line-height: .95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-tx .mt { font-size: 12.5px; font-weight: 600; color: rgba(246, 243, 236, .75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-row.hl .hb-tx .mt { color: rgba(246, 243, 236, .85); }
.hb-bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .16); overflow: hidden; margin-top: 3px; }
.hb-bar i { display: block; width: var(--p); height: 100%; border-radius: inherit; background: var(--accent); }
.hb-pill { height: 34px; padding: 0 12px; border-radius: 17px; display: flex; align-items: center; background: var(--aqua); color: #0E2320; font-size: 21px; font-weight: 900; }
.hb-pill .hb-num { font-weight: 900; }
.hb-val { display: flex; align-items: center; gap: 5px; font-family: var(--f-display); font-style: italic; font-size: 22px; font-weight: 900; }
.hb-val svg { width: 15px; height: 15px; flex: none; }
.hb-val.gold { color: var(--accent); }
.hb-val.mint { color: var(--aqua); }
.hb-num { font-weight: 900; display: inline-block; }
.hb-chev { color: rgba(246, 243, 236, .55); display: grid; }
.hb-chev svg { width: 20px; height: 20px; }
.hb-row.locked { background: none; border: 1px dashed rgba(246, 243, 236, .28); -webkit-backdrop-filter: none; backdrop-filter: none; color: rgba(246, 243, 236, .55);
  grid-template-columns: 56px minmax(0, 1fr) 56px; }
.hb-row.locked .hb-face img { filter: grayscale(1) brightness(.6); }
.hb-row.locked .mt { color: inherit; }
.hb-lvl { font-size: 40px; color: rgba(246, 243, 236, .22); text-align: center; }

/* ── магазин снастей ─────────────────────────────────────── */
.hb-shop { position: relative; margin-top: 20px; height: 150px; border-radius: 22px; overflow: hidden; cursor: pointer; box-shadow: 0 14px 30px rgba(3, 10, 12, .3);
  transition: transform .18s var(--ease); }
.hb-shop:active { transform: scale(.985); }
.hb-shop > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%;
  animation: hbKen 22s ease-in-out infinite alternate; will-change: transform; }
@keyframes hbKen { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.12) translate(-3%, 1%); } }
.hb-shop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 14, 16, .9) 0%, rgba(6, 14, 16, .55) 58%, rgba(6, 14, 16, .1) 100%); }
.hb-shop-in { position: absolute; left: 16px; top: 16px; bottom: 16px; right: 16px; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; }
.hb-shop-t { font-size: 34px; font-weight: 900; line-height: .9; }
.hb-shop-d { margin-top: 4px; font-size: 13px; font-weight: 600; color: rgba(246, 243, 236, .85); }
.hb-shop-btn { position: relative; overflow: hidden; height: 44px; padding: 0 18px; border-radius: 14px; border: 0; background: var(--accent); color: var(--accent-ink);
  font-size: 21px; font-weight: 900; display: flex; align-items: center; cursor: pointer; transition: transform .15s; }
.hb-shop-btn:active { transform: scale(.96); }
.hb-shine { position: absolute; inset: 0; pointer-events: none; background-size: 260% 100%; mix-blend-mode: screen;
  background-image: linear-gradient(105deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, .55) 50%, rgba(255, 255, 255, 0) 60%);
  animation: hbSweep 3.8s ease-in-out 2.2s infinite; }

/* ── своё хозяйство ─────────────────────────────────────── */
.hb-own .tm-place .ph { transition: transform .5s var(--ease); }
.hb-own .tm-place:active .ph { transform: scale(1.06); }

/* ── в море ──────────────────────────────────────────────── */
.hb-sea { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 22px; color: var(--ink); text-decoration: none; cursor: pointer;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .13); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  transition: transform .18s var(--ease); }
.hb-sea:active { transform: scale(.98); }
.hb-sea-sub { font-size: 13px; font-weight: 600; color: rgba(246, 243, 236, .78); max-width: 62%; }
.hb-sea-sub b { color: var(--accent); font-size: 17px; }
.hb-sea-t { font-size: 44px; font-weight: 900; line-height: .9; }
.hb-time { display: flex; align-items: flex-end; gap: 10px; }
.hb-time b { font-size: 72px; font-weight: 900; line-height: .8; letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hb-time span { padding-bottom: 5px; font-size: 18px; font-weight: 800; line-height: 1; color: rgba(246, 243, 236, .85); }
.hb-legs { display: grid; gap: 6px; }
.hb-legs span { position: relative; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.hb-legs span.done { background: var(--accent); }
.hb-legs span.now i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; transition: width 1s linear;
  background: linear-gradient(90deg, var(--accent) 0%, #FFF1C9 50%, var(--accent) 100%); background-size: 200% 100%; animation: hbFlow 2.4s linear infinite; }
@keyframes hbFlow { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.hb-boat { position: absolute; right: 14px; top: -18px; width: 108px; filter: drop-shadow(0 8px 10px rgba(3, 10, 14, .55)); animation: seaBob 3.2s ease-in-out infinite; }
.hb-boat.flip { transform: scaleX(-1); animation-name: hbBobFlip; }
@keyframes hbBobFlip { 0%, 100% { transform: scaleX(-1) translateY(0) rotate(2.5deg); } 50% { transform: scaleX(-1) translateY(5px) rotate(-2.5deg); } }
.hb-sea.event { border-color: var(--accent); animation: hbGold 2.2s ease-out infinite; }
.hb-sea.event .hb-sea-sub { color: var(--accent); }
@keyframes hbGold { 0% { box-shadow: 0 0 0 0 rgba(243, 210, 139, .45); } 100% { box-shadow: 0 0 0 12px rgba(243, 210, 139, 0); } }
.hb-sea.ready { border-color: rgba(169, 228, 208, .7); animation: hbMint 2.2s ease-out infinite; }
@keyframes hbMint { 0% { box-shadow: 0 0 0 0 rgba(169, 228, 208, .4); } 100% { box-shadow: 0 0 0 12px rgba(169, 228, 208, 0); } }
.hb-sea.choose { min-height: 124px; padding-right: 130px; overflow: hidden; }
.hb-sea-pic { position: absolute; right: 0; top: 0; bottom: 0; width: 122px; height: 100%; object-fit: cover;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 40%); mask-image: linear-gradient(90deg, transparent 0%, #000 40%); }
.hb-sea.choose .hb-sea-sub { max-width: none; }

/* ── клуб ────────────────────────────────────────────────── */
.hb-club { margin-top: 10px; height: 76px; border-radius: 20px; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) 96px; align-items: center; gap: 10px;
  padding-left: 16px; color: var(--ink); text-decoration: none; cursor: pointer; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .13);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); transition: transform .18s var(--ease); }
.hb-club:active { transform: scale(.975); }
.hb-club .nm { font-size: 28px; }
.hb-club .ph { align-self: stretch; background-size: cover; background-position: center; }

/* ── появление: заголовок, наклейка, строки волной, цифры накручиваются и вспыхивают ── */
.hb.intro .tm-dayword { animation: tmWordIn .9s cubic-bezier(.2, .8, .2, 1) both; }
.hb.intro .tm-dayline { animation: hbFade .6s .25s ease-out both; }
.hb.intro .hb-sticker { animation: tmStickerIn .7s .4s cubic-bezier(.3, 1.6, .5, 1) both; }
.hb.intro .hb-row { animation: hbRise .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(120ms + var(--i, 0) * 55ms); }
.hb.intro .hb-shop { animation: hbRise .6s cubic-bezier(.2, .8, .2, 1) .42s both; }
.hb.intro .hb-own .tm-place { animation: hbRise .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(520ms + var(--i, 0) * 60ms); }
.hb.intro .hb-sea { animation: hbRise .6s cubic-bezier(.2, .8, .2, 1) .72s both; }
.hb.intro .hb-club { animation: hbRise .6s cubic-bezier(.2, .8, .2, 1) .8s both; }
.hb.intro .hb-bar i { animation: hbGrow 1.1s cubic-bezier(.2, .8, .2, 1) .6s both; }
.hb.intro .hb-num { animation: hbPop .5s ease-out 1.05s both; }
.hb.intro .hb-sea.event, .hb.intro .hb-sea.ready { animation: hbRise .6s cubic-bezier(.2, .8, .2, 1) .72s both, hbGold 2.2s ease-out 1.4s infinite; }
@keyframes hbRise { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes hbFade { from { opacity: 0; transform: translateY(6px); } }
@keyframes hbGrow { from { width: 0; } }
@keyframes hbPop { 0% { transform: scale(1); } 40% { transform: scale(1.16); text-shadow: 0 0 18px rgba(255, 226, 170, .8); } 100% { transform: scale(1); } }
/* готово с прошлого захода — строка один раз вспыхивает мятным */
.hb-row.fresh::before { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; mix-blend-mode: screen; background-size: 300% 100%;
  background-image: linear-gradient(105deg, rgba(169, 228, 208, 0) 35%, rgba(169, 228, 208, .45) 50%, rgba(169, 228, 208, 0) 65%);
  animation: hbSweep 1.2s ease-out .9s both; }
.hb-row.fresh { animation: hbRise .55s cubic-bezier(.2, .8, .2, 1) both, hbFresh 1.2s ease-out .9s both; animation-delay: calc(120ms + var(--i, 0) * 55ms), .9s; }
@keyframes hbFresh { 0% { box-shadow: 0 0 0 0 rgba(169, 228, 208, .7); } 30% { transform: scale(1.02); } 100% { box-shadow: 0 0 0 14px rgba(169, 228, 208, 0); transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .hb *, .hb { animation: none !important; }
}
