.play-rules-button {
  z-index: 2;
  padding: 9px 15px;
  border-color: #c6e2fa;
  color: #205499;
  background: #f8fdff;
  box-shadow: 0 3px 7px #55a5d51c;
}

@media (max-width: 600px) {
  .play-rules-button {
    font-size: 12px;
    padding: 7px 10px;
  }
}

/* 首页按参考图还原：专用海底场景、活动横条与收入面板。 */

.brand-name {
  display: none;
}

body:has(.harbor-hero) {
  color: #093b7e;
  background: #e5f5ff;
}

body:has(.harbor-hero) .grain,
body:has(.harbor-hero) .depth-atmosphere {
  display: none;
}

body:has(.harbor-hero) main {
  padding-top: 0;
}

body:has(.harbor-hero) .note-launcher {
  display: none;
}

.ocean-home:has(.harbor-hero) {
  --harbor-seabed-top: #c5edff;
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - var(--site-header-height, 80px));
  overflow: hidden;
  padding: 0;
  background: #e7f5ff;
  isolation: isolate;
}

.harbor-hero {
  position: relative;
  height: clamp(300px, 22.1vw, 580px);
  color: #fff;
  background: #049edf url('/assets/home-hero-v3.6f5b6c2cd6d0.webp') center / cover no-repeat;
}

.ocean-home:not([data-mode='quiet']) .harbor-hero::before {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: clamp(36px, 4.4vw, 68px);
  background: linear-gradient(
    to bottom,
    transparent,
    color-mix(in srgb, var(--harbor-seabed-top) 24%, transparent) 46%,
    var(--harbor-seabed-top)
  );
  pointer-events: none;
}

/* 在线鱼群复用 presence 模块；裁剪游动边缘，文案保持在上层。 */

.harbor-hero .swimmers {
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.harbor-hero .swimmer {
  left: calc(36% + var(--x) * 0.6);
  top: calc(10% + var(--y) * 0.65);
}

@media (max-width: 767px) {
  .harbor-hero .swimmer {
    left: calc(28% + var(--x) * 0.6);
    top: calc(48% + var(--y) * 0.4);
  }
}

html body .harbor-hero .ocean-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding-block: 13px 14px;
  display: flex;
  align-items: center;
}

.harbor-hello {
  padding-left: clamp(20px, 5vw, 90px);
}

.harbor-hello h1 {
  margin: 0;
  color: #fff;
  font:
    400 clamp(42px, 3.6vw, 59px)/1.06 'Ma Shan Zheng Home',
    'Kaiti SC',
    STKaiti,
    var(--serif);
  letter-spacing: 0.04em;
  text-shadow: 0 2px 2px #1272bd55;
}

.harbor-hello h1 > span {
  display: inline-block;
  transform: rotate(-8deg);
  padding-left: 2px;
}

.harbor-hello h1 em {
  color: #ffdf6c;
  font-weight: 400;
  font-style: normal;
}

.harbor-hello > p {
  margin: 11px 0 17px;
  color: #fff;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  font-weight: 550;
  text-shadow: 0 1px 4px #0755a3;
}

.harbor-hello > p a {
  text-decoration: underline wavy #f4db71;
  text-underline-offset: 5px;
}

.harbor-online {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 22px;
  min-height: 62px;
  border: 2px solid #8bddec;
  background: radial-gradient(ellipse at 50% 35%, #fffef3 35%, #fff5d7 100%);
  border-radius: 999px;
  color: #064986;
  font-size: 16px;
  font-weight: 750;
  box-shadow:
    inset 0 2px 5px #d4bc8480,
    inset 0 -3px 5px #fffdf0,
    0 4px 7px #0069a342;
}

.harbor-online .harbor-icon {
  width: 30px;
  height: 30px;
  color: #12b7cb;
}

.harbor-online strong {
  font-size: 38px;
  line-height: 1.1;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.harbor-seabed {
  position: relative;
  flex: 1;
  min-height: 0;
  background: linear-gradient(var(--harbor-seabed-top), #e9f7ff 40%);
}

.harbor-seabed::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: 265px;
  background: url('/assets/home-scenes-v2.8d50b70685a2.webp') center bottom / 100% 300% no-repeat;
  pointer-events: none;
}

.harbor-seabed {
  isolation: isolate;
}

html body .harbor-content {
  padding-block: var(--harbor-content-top, 24px) 32px;
}

.ocean-home:not([data-mode='quiet']) {
  --harbor-content-top: clamp(6px, 0.7vw, 10px);
}

.harbor-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
}

.park-home-entry {
  --winter-snow-background: url('/assets/home-winter-snow-v1.8bc6fe19d17f.webp');
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.2fr minmax(0, 2fr) minmax(max-content, 0.8fr) 0.55fr;
  align-items: center;
  gap: 12px;
  min-height: 184px;
  padding: 22px 24px;
  border: 3px solid #fff;
  border-radius: 28px;
  background: #8faaf1;
  box-shadow: 0 5px 12px #2368aa32;
  color: #fff;
  text-decoration: none;
}

.park-winter-art {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: var(--winter-snow-background) center bottom / cover no-repeat;
  pointer-events: none;
}

.timer-stats span {
  display: block;
  font-size: 12px;
  color: #6589ad;
}

.timer-stats strong {
  display: block;
  margin-top: 6px;
  font-size: 23px;
  color: #174e91;
  font-variant-numeric: tabular-nums;
}

.timer-game-shell > header > .play-rules-button {
  position: absolute;
  inset: 12px 12px auto auto;
}

.timer-heading-mascot {
  position: absolute;
  left: 12px;
  top: 16px;
  width: 80px;
  height: 80px;
  object-fit: contain;
  pointer-events: none;
}

@media (max-width: 850px) {
  .timer-page {
    grid-template-columns: minmax(0, 1fr);
  }
  .timer-stats {
    margin-top: 12px;
    padding: 12px 0;
  }
  .timer-stats strong {
    font-size: 20px;
  }
  .timer-heading-mascot {
    width: 58px;
    height: 58px;
    top: 8px;
    left: 8px;
  }
}

/* 进入游戏后，主卡片接管共享版心。 */

:is(.timer-page, .wordle-page).is-in-game {
  grid-template-columns: minmax(0, 1fr);
}

.is-in-game > .wordle-ranking,
.is-in-game [data-play-intro],
.is-in-game :is(.timer-stats, .slice-stats) {
  display: none;
}

.park-home-entry::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 26px;
  background: var(--winter-snow-background) center top / cover no-repeat;
  mask-image: linear-gradient(#000 16%, transparent);
  pointer-events: none;
}

.park-winter-art::before,
.park-winter-art::after {
  content: '';
  position: absolute;
  bottom: 0;
  height: 100%;
  background-repeat: no-repeat;
  background-size: contain;
}

.park-winter-art::before {
  left: 0;
  width: min(27%, 355px);
  background-image: url('/assets/home-winter-fish-v1.2bf8a1bab4c7.webp');
  background-position: left bottom;
}

.park-winter-art::after {
  right: 0;
  width: min(19%, 255px);
  background-image: url('/assets/home-winter-photo-v1.3660ae80b61c.webp');
  background-position: right bottom;
}

.park-home-entry > small {
  position: absolute;
  top: 14px;
  left: 24px;
  padding: 6px 16px;
  border: 1px solid #ffb59b;
  border-radius: 999px;
  background: linear-gradient(#f8776c, #db4e51);
  box-shadow: 0 3px 6px #2c284957;
  color: #fff;
  font-weight: 750;
  transform: rotate(-5deg);
}

.park-home-entry > span {
  grid-column: 2;
  display: grid;
  gap: 4px;
  text-align: center;
  text-shadow:
    0 1px 2px #304d92,
    0 2px 4px #385795bf;
  -webkit-text-stroke: 1.2px #4666a9;
  paint-order: stroke fill;
}

.park-home-entry strong {
  color: #fff1bb;
  font:
    900 clamp(1.65rem, 3.4vw, 3.3rem) / 1.1 'Kaiti SC',
    STKaiti,
    KaiTi,
    serif;
}

.park-home-entry > b {
  justify-self: center;
  min-width: 158px;
  padding: 12px 20px;
  border: 2px solid #ffdb83;
  border-radius: 999px;
  background: linear-gradient(#fffdf2 10%, #ffdf8e);
  box-shadow:
    inset 0 -2px 0 #df9a3a66,
    0 4px 10px #39487855;
  color: #50341a;
  text-align: center;
  white-space: nowrap;
}

.park-home-entry:hover {
  text-decoration: none;
}

.park-home-entry:hover > b {
  background: linear-gradient(#fffef7 10%, #ffeaad);
}

.harbor-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.harbor-shortcut {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(5px, 0.7vw, 12px);
  min-height: 126px;
  padding: 8px clamp(8px, 1.1vw, 18px);
  border: 2px solid #ffffffed;
  border-radius: 28px;
  background: linear-gradient(155deg, var(--shortcut-light), var(--shortcut-tint));
  box-shadow:
    inset 0 -2px 0 #ffffff9c,
    0 5px 9px #2368aa2e;
  color: #12346d;
  text-decoration: none;
}

.shortcut-shop {
  --shortcut-light: #fffcf0;
  --shortcut-tint: #ffedbb;
  --shortcut-arrow: #895139;
  --shortcut-icon-position: 0 0;
}

.shortcut-pond {
  --shortcut-light: #eef8ff;
  --shortcut-tint: #b9e1fb;
  --shortcut-arrow: #2252a1;
  --shortcut-icon-position: 100% 0;
}

.shortcut-report {
  --shortcut-light: #f9f6ff;
  --shortcut-tint: #e0d8f9;
  --shortcut-icon-position: 0 100%;
}

.shortcut-wall {
  --shortcut-light: #effff8;
  --shortcut-tint: #bcf1e2;
  --shortcut-arrow: #146c5b;
  --shortcut-icon-position: 100% 100%;
}

a.harbor-shortcut:hover {
  box-shadow:
    inset 0 -2px 0 #ffffff9c,
    0 6px 16px #2368aa48;
  text-decoration: none;
}

.harbor-shortcut-art {
  width: clamp(64px, 7.4vw, 118px);
  aspect-ratio: 1;
  background: url('/assets/home-shortcuts-v1.e4f1ca63cee5.webp') var(--shortcut-icon-position) / 200% 200%
    no-repeat;
}

.harbor-shortcut strong,
.harbor-shortcut small {
  display: block;
}

.harbor-shortcut strong {
  font-size: clamp(1.05rem, 1.55vw, 1.55rem);
  line-height: 1.25;
}

.harbor-shortcut small {
  margin-top: 5px;
  font-size: 0.875rem;
}

.harbor-shortcut > b {
  display: grid;
  place-items: center;
  width: clamp(26px, 2.5vw, 38px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffffffb3;
  box-shadow: 0 3px 5px #28446e16;
  color: var(--shortcut-arrow);
  font-size: 1.5rem;
  line-height: 1;
}

@media (max-width: 1199px) {
  .harbor-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .park-home-entry {
    grid-template-columns: 0.85fr minmax(0, 2fr) auto 0.25fr;
  }
  .park-winter-art::before {
    width: 22%;
  }
  .park-winter-art::after {
    width: 15%;
  }
}

@media (max-width: 767px) {
  .harbor-shortcuts {
    gap: 8px;
  }
  .harbor-shortcut {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 3px;
    min-height: 80px;
    padding: 8px;
    border-radius: 17px;
  }
  .harbor-shortcut-art {
    width: clamp(36px, 12vw, 68px);
  }
  .harbor-shortcut strong {
    font-size: clamp(0.85rem, 4vw, 1.1rem);
  }
  .harbor-shortcut small {
    font-size: 0.75rem;
    line-height: 1.35;
  }
  .harbor-shortcut > b {
    display: none;
  }
  .park-home-entry {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    align-content: end;
    gap: 10px;
    min-height: 202px;
    padding: 48px 16px 14px;
    border-radius: 20px;
  }
  .park-winter-art {
    background:
      linear-gradient(90deg, #e6effff0 12%, #e6efffe0 49%, transparent 88%),
      var(--winter-snow-background) center bottom / cover no-repeat;
  }
  .park-winter-art::before {
    right: -16px;
    left: auto;
    width: 53%;
    background-position: right bottom;
  }
  .park-winter-art::after {
    display: none;
  }
  .park-home-entry > small {
    left: 16px;
  }
  .park-home-entry > span {
    grid-column: 1;
    max-width: 74%;
    text-align: left;
    color: #19396d;
    text-shadow: none;
    -webkit-text-stroke: 0;
  }
  .park-home-entry strong {
    color: #234787;
    font-size: clamp(1.35rem, 6.25vw, 1.8rem);
  }
  .park-home-entry > b {
    justify-self: start;
    min-width: 0;
    padding: 8px 14px;
  }
}

.harbor-personal {
  display: grid;
  gap: 20px;
  min-width: 0;
}

@media (min-width: 1200px) {
  .harbor-personal {
    grid-template-columns: minmax(0, 1.14fr) minmax(0, 1fr);
  }
}

.harbor-panel {
  min-width: 0;
  border: 2px solid #ffffffd9;
  border-radius: 28px;
  padding: 24px;
  background: linear-gradient(120deg, #fff, #f5fbff);
  box-shadow: 0 10px 26px #47a0d51c;
}

.harbor-personal > .harbor-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
}

/* 海浪托起卡片：错开相位，仅在允许动效时启用。 */

@keyframes harbor-card-wave {
  0%,
  100% {
    transform: translateY(2px) rotate(-0.18deg);
  }
  50% {
    transform: translateY(-3px) rotate(0.18deg);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .harbor-income {
    animation-delay: -3s;
  }
  .harbor-behavior {
    animation-delay: -5s;
  }
}

.harbor-panel > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 10px;
}

.harbor-panel h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #082e71;
}

.harbor-icon {
  flex: none;
  width: 36px;
  height: 36px;
  display: inline-block;
  vertical-align: middle;
  color: #07519b;
}

.icon-wallet {
  color: #a56926;
  filter: drop-shadow(0 1px 1px #e9ba7766);
}

.icon-crown {
  color: #9f6420;
}

.icon-controller {
  color: #133b6d;
}

.harbor-panel header p {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.harbor-panel header button {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid #d7ebff;
  border-radius: 30px;
  color: #0c4181;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  background: linear-gradient(#fff, #f0f8ff);
  box-shadow: 0 3px 5px #56acec40;
  min-height: 44px;
}

.harbor-panel header button:hover {
  border-color: #8cccf4;
  background: #fff;
}

.harbor-metrics {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 3fr);
  gap: 7px;
}

.harbor-today {
  position: relative;
  isolation: isolate;
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  min-height: 126px;
  border-radius: 22px;
  background: linear-gradient(115deg, #fff2cc, #fff1cdd9);
  padding: 12px 20px;
  box-shadow: 0 4px 10px #cfb67518;
}

.harbor-today > span {
  font-size: 14px;
  font-weight: 650;
  z-index: 1;
}
/* 图标保持小尺寸，用透明伪元素把点击区扩到约 44px，方便手机点中。 */
.harbor-info {
  position: relative;
  border: 0;
  background: none;
  color: #bc7b1d;
  font-size: 16px;
  padding: 0 2px;
}
.harbor-info::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}
.harbor-today > strong {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  font-size: clamp(27px, 2.5vw, 38px);
  font-weight: 850;
  letter-spacing: 1px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.harbor-today > small {
  font-size: 12px;
  color: #785c28;
  line-height: 1.3;
}

.harbor-today > .harbor-sleep {
  position: absolute;
  background-position: 100% 100%;
  width: clamp(92px, 8vw, 124px);
  height: auto;
  aspect-ratio: 1;
  right: 0;
  bottom: 22px;
  z-index: -1;
}

.harbor-metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  background: linear-gradient(#f4faff99, #e9f5ff99);
  border-radius: 22px;
  padding: 12px 0;
}

.harbor-metric-strip > div {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 11px;
  min-height: 64px;
  padding: 0 8px;
  border-left: 1px solid #b9dbff;
}

.harbor-metric-strip > div:first-child {
  border-left: 0;
}

.harbor-metric-strip > div > span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: clamp(0.7rem, 1vw, 0.875rem);
  font-weight: 600;
}

.harbor-metric-strip .harbor-icon {
  width: 20px;
  height: 20px;
}

.harbor-metric-strip strong {
  font-size: clamp(1.1rem, 1.65vw, 1.5rem);
  font-weight: 850;
  white-space: nowrap;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.harbor-actions {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.harbor-actions > button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 9px 3px;
  border: 1px solid #fff;
  border-radius: 23px;
  color: #0b3b7c;
  background: linear-gradient(#f6fcff, #e8f5ff);
  box-shadow: 0 4px 6px #70b9e536;
  transition:
    transform var(--motion-fast) ease,
    background var(--motion-fast) ease;
}
.harbor-fish {
  display: block;
  flex: none;
  background-image: url('/assets/home-actions-v2.4cd51ec26fbf.webp');
  background-repeat: no-repeat;
  background-size: 300% 200%;
}

.home-fish-0 {
  background-position: 0 0;
}

.home-fish-1 {
  background-position: 50% 0;
}

.home-fish-2 {
  background-position: 100% 0;
}

.home-fish-3 {
  background-position: 0 100%;
}

.home-fish-4 {
  background-position: 50% 100%;
}

.home-fish-5 {
  background-position: 100% 100%;
}

.harbor-actions .harbor-fish {
  width: 80px;
  height: 57px;
  max-width: 100%;
}

.harbor-actions > button > span {
  font-size: clamp(0.7rem, 1vw, 0.875rem);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.harbor-actions strong {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-size: 23px;
  line-height: 1.2;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

.harbor-actions b {
  font-weight: 800;
}

.harbor-actions small {
  font-size: 11px;
  font-weight: 400;
}
@media (hover: hover) and (pointer: fine) {
  .harbor-actions > button:hover {
    transform: translateY(-3px);
    background: linear-gradient(#fff9e9, #fff0c9);
  }
}
.harbor-actions > button.is-favorite {
  background: linear-gradient(#fff2cd, #fff4d9);
  box-shadow: 0 3px 5px #ccb97b40;
}

.contribution-page {
  padding-block: 36px;
}

.contribution-page > h1 {
  margin-bottom: 0;
}

.contribution-page .fishpark-wall {
  margin-block: 18px;
  color: #133b6d;
}

.contribution-page .fishpark-wall-list {
  display: grid;
  gap: 7px;
}

.contribution-feedback {
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid #d7ebff;
  border-radius: 999px;
  background: #f0f8ff;
  color: #0c4181;
  font-weight: 700;
}

.harbor-wall-row {
  width: 100%;
  min-width: 0;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 20px;
  color: #0b3b7c;
  background: #ffffffa8;
  text-align: left;
  font: inherit;
}

.harbor-wall-row:nth-child(even) {
  background: transparent;
}

.harbor-wall-row .harbor-fish {
  width: 34px;
  height: 32px;
}

.harbor-wall-name {
  font-size: 14px;
  white-space: nowrap;
}

.harbor-wall-tag {
  flex: none;
  padding: 4px 8px;
  border-radius: 9px;
  background: #ffe1ef;
  color: #b82f76;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.tag-1 {
  background: #d6ecff;
  color: #1b64b0;
}

.tag-2 {
  background: #ede0ff;
  color: #7442b4;
}

.tag-3 {
  background: #c9eee5;
  color: #24745f;
}

.tag-4 {
  background: #ffedc8;
  color: #9b681e;
}

.harbor-wall-description {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1.6;
}

.harbor-wall-row time {
  flex: none;
  color: #537daa;
  font-size: 10px;
}

.harbor-wall-arrow {
  color: #6497c9;
}

.harbor-wall-invite:hover {
  border-color: #b9ddf7;
  background: #fff;
}

.contribution-page .about-wall-note {
  font-size: 12px;
  text-align: center;
  margin: 12px 0 0;
  color: #6084a8;
}

.harbor-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  height: 70px;
  color: #fff;
}

.harbor-bottom > span {
  width: 54px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #3b9ce8);
}

.harbor-bottom > span:last-child {
  transform: rotate(180deg);
}

.harbor-bottom b {
  font-size: 30px;
  line-height: 1;
}

.harbor-bottom svg {
  width: 36px;
  height: 26px;
}

body:has(.harbor-hero) .site-footer {
  background: #e8f6ff;
  color: #6084a8;
  border-color: #b8def4;
  font-size: 11px;
  padding-block: 18px;
}

.harbor-dialog {
  width: min(440px, calc(100% - 32px));
  padding: 26px;
  border: 2px solid white;
  border-radius: 24px;
  background: #f0faff;
  color: #16487a;
  max-height: 80vh;
  overflow: auto;
  box-shadow: 0 20px 80px #04447d33;
}

.harbor-dialog::backdrop {
  background: #04365b88;
  backdrop-filter: blur(4px);
}

.harbor-dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.harbor-dialog h2 {
  margin: 0;
  font-size: 23px;
}

.harbor-dialog label {
  display: grid;
  gap: 6px;
  margin: 16px 0;
  font-size: 14px;
}

.harbor-dialog input {
  width: 100%;
  background: white;
  border: 1px solid #a7cee6;
  border-radius: 10px;
  padding: 10px;
  color: #16487a;
  font: inherit;
}

.harbor-dialog button {
  padding: 9px 16px;
  background: #ffdf80;
  border: 0;
  border-radius: 14px;
  color: #16487a;
  font-weight: 650;
}

.harbor-dialog header button {
  background: #e1f1fc;
  font-size: 23px;
  padding: 2px 12px;
}

.harbor-dialog p {
  font-size: 13px;
  line-height: 1.7;
}

.ocean-home:has(.harbor-hero) :focus-visible {
  outline: 3px solid #198fe5;
  outline-offset: 4px;
}

.harbor-hero :focus-visible {
  outline-color: #ffe294 !important;
}

@media (min-width: 1500px) {
  .harbor-panel {
    padding: 14px 18px 18px;
  }
  .harbor-metrics {
    min-height: 104px;
  }
  .harbor-actions > button {
    padding-bottom: 10px;
  }
  .harbor-actions .harbor-fish {
    height: 65px;
    width: 86px;
  }
  .harbor-wall-row {
    min-height: 48px;
  }
}

@media (max-width: 1250px) and (min-width: 1001px) {
  .harbor-panel > header {
    gap: 10px;
  }
  .harbor-panel h2 {
    font-size: 21px;
  }
  .harbor-panel header p {
    font-size: 10px;
  }
  .harbor-panel header button {
    padding: 8px 10px;
    font-size: 10px;
  }
  .harbor-metric-strip strong {
    font-size: 20px;
  }
  .harbor-metric-strip > div > span {
    font-size: 10px;
  }
  .harbor-today {
    padding-left: 12px;
  }
  .harbor-actions > button > span {
    font-size: 12px;
  }
  .harbor-actions .harbor-fish {
    width: 68px;
    height: 53px;
  }
  .harbor-wall-row {
    gap: 5px;
    padding-inline: 4px;
  }
  .harbor-wall-tag {
    padding: 4px 6px;
  }
}

@media (max-width: 1000px) {
  .harbor-hello {
    padding-left: 20px;
  }
  .harbor-hero {
    height: 270px;
  }
  .harbor-wall-row {
    min-height: 47px;
  }
  .harbor-wall-description {
    font-size: 13px;
  }
  .harbor-seabed::after {
    height: 190px;
  }
}

@media (max-width: 767px) {
  .harbor-hero {
    height: 350px;
  }
  .harbor-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #006ebc66, transparent 85%);
    pointer-events: none;
  }
  html body .harbor-hero .ocean-content {
    position: relative;
    z-index: 1;
    padding-top: 20px;
    align-items: flex-start;
  }
  .harbor-hello {
    padding: 0;
  }
  .harbor-hello h1 {
    font-size: 42px;
    line-height: 1.2;
  }
  .harbor-hello > p {
    font-size: 12px;
    line-height: 1.8;
    max-width: 275px;
    margin-top: 12px;
  }
  .harbor-online {
    margin-top: 80px;
    min-height: 39px;
    gap: 10px;
    padding: 7px 16px;
    font-size: 12px;
  }
  .harbor-online strong {
    font-size: 26px;
  }
  .harbor-online .harbor-icon {
    width: 23px;
    height: 23px;
  }
  html body .harbor-content {
    padding-top: var(--harbor-content-top, 12px);
    display: block;
  }
  .harbor-grid {
    gap: 14px;
  }
  .harbor-personal {
    gap: 14px;
  }
  .harbor-panel {
    border-radius: 24px;
    padding: 12px;
  }
  .harbor-panel > header {
    gap: 7px;
  }
  .harbor-panel h2 {
    font-size: 20px;
    gap: 8px;
  }
  .harbor-panel .harbor-icon {
    width: 29px;
    height: 29px;
  }
  .harbor-panel header p {
    font-size: 11px;
  }
  .harbor-panel header button {
    font-size: 12px;
    padding: 8px 11px;
    min-height: 44px;
    gap: 5px;
  }
  .harbor-metrics {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .harbor-today {
    min-height: 110px;
    padding-left: 20px;
  }
  .harbor-today > strong {
    font-size: 36px;
  }
  .harbor-today > .harbor-sleep {
    right: 12px;
    width: 112px;
    bottom: 15px;
  }
  .harbor-today > small {
    font-size: 12px;
  }
  .harbor-metric-strip {
    padding: 14px 0;
  }
  .harbor-metric-strip > div {
    gap: 8px;
    padding: 0 3px;
    min-height: 55px;
  }
  .harbor-metric-strip > div > span {
    font-size: 11px;
    gap: 3px;
  }
  .harbor-metric-strip .harbor-icon {
    width: 16px;
    height: 16px;
  }
  .harbor-metric-strip strong {
    font-size: 19px;
  }
  .harbor-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .harbor-actions .harbor-fish {
    width: 85px;
    height: 65px;
  }
  .harbor-actions > button > span {
    font-size: 13px;
  }
  .harbor-actions > button {
    padding-bottom: 10px;
    border-radius: 20px;
  }
  .harbor-actions strong {
    font-size: 23px;
  }
  .harbor-wall-row {
    padding: 6px 5px;
    gap: 6px;
    min-height: 52px;
  }
  .harbor-wall-tag {
    font-size: 10px;
    padding: 4px 6px;
  }
  .harbor-wall-description {
    font-size: 11px;
  }
  .harbor-wall-row .harbor-fish {
    width: 30px;
    height: 30px;
  }
  .harbor-wall-row time {
    font-size: 12px;
  }
  .harbor-wall-row:has(.harbor-wall-name) {
    flex-wrap: wrap;
  }
  .harbor-wall-row:has(.harbor-wall-name) .harbor-wall-description {
    flex-basis: 65%;
    margin-left: 36px;
  }
  .harbor-bottom {
    height: 70px;
  }
  .harbor-seabed::after {
    height: 180px;
    background-size: auto 540px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .harbor-actions > button {
    transition: none;
  }
  @media (hover: hover) and (pointer: fine) {
    .harbor-actions > button:hover {
      transform: none;
    }
  }
}

.harbor-seabed::after {
  mask-image: linear-gradient(transparent, #000 42%);
}

@media (min-width: 1001px) {
  .harbor-actions .harbor-fish {
    height: 55px;
    width: 76px;
  }
  .harbor-actions > button {
    padding-bottom: 8px;
  }
}

@media (max-width: 767px) {
  .harbor-actions .harbor-fish {
    width: 85px;
    height: 65px;
  }
}

.harbor-detail {
  background-image: url('/assets/home-details-v2.5cf52c57937e.webp');
  background-size: 200% 200%;
  background-repeat: no-repeat;
}

.harbor-detail.icon-wallet {
  background-position: 0 0;
}

.harbor-detail.icon-crown {
  background-position: 100% 0;
}

.harbor-detail.icon-controller {
  background-position: 0 100%;
}

.harbor-hello {
  padding-left: clamp(20px, 3.4vw, 56px);
  margin-top: -8px;
}

@media (min-width: 1251px) {
  .harbor-panel h2 {
    font-size: 26px;
  }
}

@media (max-width: 1000px) {
  .harbor-hello {
    padding-left: 20px;
  }
}

@media (max-width: 767px) {
  .harbor-hero {
    background-size: cover;
    background-position: 64% bottom;
  }
  .harbor-hello {
    padding: 0;
    margin-top: 0;
  }
}

@media (max-width: 767px) {
  .harbor-hero::after {
    background: linear-gradient(#006ebc40, #006ebc00 65%);
  }
}

/* 插画保持源图比例：动作精灵每格、细节精灵每格均为正方形。 */

.ocean-home .harbor-fish {
  height: auto;
  aspect-ratio: 1;
}

@media (min-width: 768px) {
  .harbor-hero {
    background-size: cover;
  }
}

/* 首页模式在同一棵 DOM 上切换，在线鱼群不重建。 */

.harbor-presence-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
  gap: 14px;
  padding: 4px 12px 4px 0;
  border-radius: 999px;
  background: #bdefff40;
  box-shadow: inset 0 1px 1px #ffffff66;
}

.harbor-mode-switch {
  display: inline-flex;
  gap: 12px;
}

.harbor-mode-switch button {
  min-width: 80px;
  min-height: 42px;
  padding: 8px 18px;
  border: 1px solid #a5d8f2;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff 15%, #f0fbff 60%, #caeaff);
  color: #12508d;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  box-shadow:
    inset 0 1px 2px #fff,
    0 2px 4px #0564a426;
  cursor: pointer;
}

.harbor-mode-switch button:hover {
  background: linear-gradient(#fff, #e0f6ff);
}

.harbor-mode-switch button:focus-visible {
  outline: 3px solid #074c87;
  outline-offset: 3px;
}

.harbor-mode-switch button[aria-pressed='true'] {
  border-color: #71b7d3;
  background: linear-gradient(#fffbed, #fff0c9);
  color: #164c76;
  box-shadow:
    inset 0 -2px 0 #d6b97680,
    0 1px 3px #0564a426;
}

.harbor-grid[hidden],
.harbor-reader-entries[hidden],
.harbor-bottom[hidden] {
  display: none;
}
/*
 * 偷摸全站皮肤（html[data-stealth='quiet']）。
 * 与夜间主题同类的主题层：各页面原样式保持明摸外观，这里统一覆盖为素色办公外观。
 * 前缀 body:is(.is-ocean, .is-depth) 覆盖所有页面，并把特异度抬到频道页导航规则之上，避免 !important；
 * 沉浸场景（下潜、升空、地球奇点）自带全屏外观，不套用。
 */
html[data-stealth='quiet']
  body:is(.is-ocean, .is-depth):not(:has(.endless-dive, .endless-rise, .earth-page)) {
  color: var(--quiet-ink);
  background: var(--quiet-paper);
}
html[data-stealth='quiet']
  body:is(.is-ocean, .is-depth):not(:has(.endless-dive, .endless-rise, .earth-page))::before,
html[data-stealth='quiet']
  body:is(.is-ocean, .is-depth):not(:has(.endless-dive, .endless-rise, .earth-page))
  :is(.depth-atmosphere, .grain, .channel-sea-motion) {
  display: none;
}
html[data-stealth='quiet']
  body:is(.is-ocean, .is-depth):not(:has(.endless-dive, .endless-rise, .earth-page))
  :is(#site-navigation, .site-header, .detail-navigation) {
  color: var(--quiet-accent);
  background: var(--quiet-surface);
  border: 0;
  border-bottom: 1px solid var(--quiet-line);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}
html[data-stealth='quiet']
  body:is(.is-ocean, .is-depth):not(:has(.endless-dive, .endless-rise, .earth-page))
  :is(.site-header .brand, .main-nav a, .detail-navigation a, .detail-navigation button) {
  color: var(--quiet-accent);
  text-shadow: none;
}
html[data-stealth='quiet']
  body:is(.is-ocean, .is-depth):not(:has(.endless-dive, .endless-rise, .earth-page))
  .main-nav
  a:is(:hover, [aria-current='page']) {
  color: var(--quiet-ink-strong);
  background: var(--quiet-hover);
  border-radius: 4px;
}
html[data-stealth='quiet']
  body:is(.is-ocean, .is-depth):not(:has(.endless-dive, .endless-rise, .earth-page))
  .main-nav
  a[aria-current='page']::after {
  background: var(--quiet-selected-line);
}
html[data-stealth='quiet']
  body:is(.is-ocean, .is-depth):not(:has(.endless-dive, .endless-rise, .earth-page))
  :is(.header-account, .boss-key-trigger, .header-draw, .detail-navigation-toggle) {
  color: var(--quiet-accent);
  background: var(--quiet-paper);
  border-color: var(--quiet-line-strong);
  border-radius: 6px;
  box-shadow: none;
}
html[data-stealth='quiet']
  body:is(.is-ocean, .is-depth):not(:has(.endless-dive, .endless-rise, .earth-page))
  :is(.header-account, .boss-key-trigger, .header-draw, .detail-navigation-toggle):hover {
  background: var(--quiet-hover);
  border-color: var(--quiet-selected-line);
}
html[data-stealth='quiet']
  body:is(.is-ocean, .is-depth):not(:has(.endless-dive, .endless-rise, .earth-page))
  :is(.brand-logo, .announcement-button img) {
  filter: grayscale(1);
  opacity: 0.75;
}
html[data-stealth='quiet']
  body:is(.is-ocean, .is-depth):not(:has(.endless-dive, .endless-rise, .earth-page))
  :is(#site-navigation, .site-header, .detail-navigation)
  :focus-visible {
  outline: 2px solid var(--quiet-accent);
  outline-offset: 4px;
}
html[data-stealth='quiet']
  body:is(.is-ocean, .is-depth):not(:has(.endless-dive, .endless-rise, .earth-page))
  .site-footer {
  color: var(--quiet-muted);
  background: var(--quiet-paper);
  border-color: var(--quiet-line);
}
html[data-stealth='quiet']
  body:is(.is-ocean, .is-depth):not(:has(.endless-dive, .endless-rise, .earth-page))
  .site-footer
  a {
  color: var(--quiet-accent);
}
html[data-stealth='quiet']
  body:is(.is-ocean, .is-depth):not(:has(.endless-dive, .endless-rise, .earth-page))
  .footer-mark {
  color: var(--quiet-selected-line);
}
/* 偷摸频道首页：横幅换线稿，分区与卡片改白底细框，封面保留原色、仅降饱和度。 */
/* 深色封面卡（无尽下潜）保留原配色，标题不改色。 */
html[data-stealth='quiet']
  :is(.lab-home, .chance-home, .discovery-home, .learn-home)
  :is(h1, h2, h3):not(.discovery-dive *) {
  color: var(--quiet-ink);
  text-shadow: none;
}
html[data-stealth='quiet'] .learn-home {
  background: transparent;
}
html[data-stealth='quiet']
  :is(.lab-home, .chance-home, .discovery-home, .learn-home)
  :is(.lab-banner, .discovery-banner, .daily-fish-card, .learn-home-hero) {
  color: var(--quiet-ink);
  background: var(--quiet-sketch) center bottom / cover no-repeat var(--quiet-wash);
  border: 1px solid var(--quiet-line);
  border-radius: 6px;
  box-shadow: none;
}
html[data-stealth='quiet']
  :is(.lab-home, .chance-home, .discovery-home, .learn-home)
  :is(.lab-banner, .discovery-banner, .daily-fish-card, .learn-home-hero)
  :is(p, span, a:not(.channel-primary, .discovery-banner-start)) {
  color: var(--quiet-muted);
  text-shadow: none;
}
html[data-stealth='quiet']
  :is(.lab-home, .chance-home, .discovery-home)
  :is(.lab-banner, .discovery-banner, .daily-fish-card, .daily-fish-identity)::before,
html[data-stealth='quiet']
  :is(.lab-home, .chance-home, .discovery-home)
  :is(.discovery-banner, .daily-fish-card, .daily-fish-identity)::after {
  display: none;
}
html[data-stealth='quiet']
  :is(.lab-home, .chance-home, .discovery-home, .learn-home)
  :is(
    .lab-featured,
    .chance-shore,
    .discovery-aside,
    .learn-memory-panel,
    .lab-tile,
    .chance-card,
    .chance-mood-card,
    .discovery-card,
    .learn-state-card,
    .daily-fish-welcome
  ) {
  color: var(--quiet-ink);
  background: var(--quiet-surface);
  border: 1px solid var(--quiet-line);
  border-radius: 6px;
  box-shadow: none;
}
html[data-stealth='quiet']
  :is(.lab-home, .chance-home, .discovery-home, .learn-home)
  :is(
    .chance-shore,
    .learn-memory-panel,
    .lab-tile,
    .chance-card,
    .chance-mood-card,
    .discovery-card
  )::before,
html[data-stealth='quiet']
  :is(.lab-home, .chance-home, .discovery-home, .learn-home)
  :is(
    .chance-shore,
    .learn-memory-panel,
    .lab-tile,
    .chance-card,
    .chance-mood-card,
    .discovery-card
  )::after {
  display: none;
}
html[data-stealth='quiet']
  :is(.lab-home, .chance-home, .discovery-home)
  :is(.lab-bubbles, .dive-cover-bubble) {
  display: none;
}
html[data-stealth='quiet'] .discovery-home .discovery-bubble {
  background: var(--quiet-paper);
  border: 1px solid var(--quiet-line);
  border-radius: 6px;
}
html[data-stealth='quiet']
  :is(.lab-home, .chance-home, .discovery-home, .learn-home)
  :is(
    .lab-cover,
    .draw-painted,
    .chance-card-art,
    .editorial-cover,
    .discovery-dive,
    .learn-state-art,
    .learn-summary-art,
    .daily-fish-mystery,
    .daily-fish-identity,
    .mood-mascot
  ) {
  filter: saturate(0.6);
}
html[data-stealth='quiet']
  :is(.lab-home, .chance-home, .discovery-home, .learn-home)
  :is(.lab-label, .channel-card-tag, .channel-badge, .daily-fish-label) {
  color: var(--quiet-accent);
  background: var(--quiet-hover);
  border-color: var(--quiet-line);
  box-shadow: none;
}
html[data-stealth='quiet']
  :is(.lab-home, .chance-home, .discovery-home, .learn-home)
  :is(
    .lab-action,
    .channel-primary,
    .discovery-banner-start,
    .discovery-banner-paths a,
    .discovery-refresh,
    .learn-button,
    .mood-card-arrow,
    .channel-filters button
  ) {
  color: var(--quiet-accent);
  background: var(--quiet-surface);
  border: 1px solid var(--quiet-line-strong);
  border-radius: 6px;
  box-shadow: none;
  text-shadow: none;
}
html[data-stealth='quiet']
  :is(.lab-home, .chance-home, .discovery-home, .learn-home)
  :is(.channel-primary, .discovery-banner-start, .learn-button)
  :is(b, span) {
  color: inherit;
  background: none;
}
html[data-stealth='quiet']
  :is(.lab-home, .discovery-home)
  .channel-filters
  button:is([aria-pressed='true'], .is-active) {
  color: var(--quiet-ink-strong);
  background: var(--quiet-selected);
  border-color: var(--quiet-selected-line);
}
.ocean-home[data-mode='quiet'] {
  background: var(--quiet-paper);
}
.ocean-home[data-mode='quiet'] .harbor-hero {
  background: var(--quiet-wash);
  color: var(--quiet-ink);
}
.ocean-home[data-mode='quiet'] .harbor-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--quiet-sketch) center bottom / cover no-repeat;
  opacity: 0.65;
  pointer-events: none;
}

.ocean-home[data-mode='quiet'] .harbor-hero::after {
  display: none;
}

.ocean-home[data-mode='quiet'] .harbor-hello h1,
.ocean-home[data-mode='quiet'] .harbor-hello > p {
  color: var(--quiet-ink);
  text-shadow: none;
}

.ocean-home[data-mode='quiet'] .harbor-hello h1 em {
  color: #728878;
}

.ocean-home[data-mode='quiet'] .harbor-hello > p a {
  text-decoration-color: #aebdaf;
}
.ocean-home[data-mode='quiet'] .harbor-online {
  background: var(--quiet-surface);
  color: var(--quiet-accent);
  border: 1px solid var(--quiet-line-strong);
  box-shadow: none;
}

.ocean-home[data-mode='quiet'] .harbor-online .harbor-icon {
  color: #6e8374;
}

.ocean-home[data-mode='quiet'] .harbor-presence-row {
  background: transparent;
  box-shadow: none;
}

.ocean-home[data-mode='quiet'] .harbor-mode-switch {
  box-shadow: none;
  border-color: #b9c6ba;
  background: var(--quiet-hover);
}
.ocean-home[data-mode='quiet'] .harbor-mode-switch button {
  border-color: var(--quiet-line-strong);
  background: var(--quiet-paper);
  box-shadow: none;
  color: #4c5f51;
}
.ocean-home[data-mode='quiet'] .harbor-mode-switch button[aria-pressed='true'] {
  border-color: var(--quiet-selected-line);
  background: var(--quiet-selected);
  color: #354e3c;
  box-shadow: inset 0 -2px 0 #8da18e66;
}
.ocean-home[data-mode='quiet'] .harbor-seabed {
  background: var(--quiet-paper);
}
.ocean-home[data-mode='quiet'] .harbor-seabed::after {
  display: none;
}

.harbor-reader-entries {
  padding-block: 0 12px;
  color: #37493f;
}

.harbor-reader-entries > header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
}

.harbor-reader-entries h2 {
  margin: 0;
  color: #34483b;
  font-size: 18px;
}

.harbor-reader-entries > header > span,
.harbor-reader-note {
  color: #6a766d;
  font-size: 12px;
}

.harbor-reader-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.harbor-reader-card {
  display: block;
  min-width: 0;
  overflow: hidden;
  padding: 8px 8px 0;
  border: 1px solid #d8ded3;
  border-radius: 8px;
  background: #fffefa;
  text-decoration: none;
  transition:
    border-color var(--motion-fast),
    box-shadow var(--motion-fast);
}
.harbor-reader-card:hover {
  border-color: #879b89;
  box-shadow: 0 8px 24px #304a3a0c;
}

.harbor-reader-preview {
  height: 96px;
  overflow: hidden;
  border: 1px solid #d7dce2;
  border-radius: 7px 7px 0 0;
  background: #f7f8fa;
  font-family: Arial, sans-serif;
}

.harbor-reader-preview > svg {
  display: block;
  width: 100%;
  height: 100%;
}

.harbor-reader-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-block: 8px;
}

.harbor-reader-copy strong {
  display: block;
  font-size: 14px;
}

.harbor-reader-copy > b {
  font-size: 16px;
  line-height: 24px;
}

.harbor-reader-note {
  margin: 10px 0 0;
  font-size: 11px;
}

@media (min-width: 768px) and (max-width: 1199px) {
  .harbor-reader-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .harbor-presence-row {
    margin-top: 50px;
    gap: 8px;
    padding: 4px 7px 4px 0;
  }
  .harbor-presence-row .harbor-online {
    margin-top: 0;
    padding: 7px 12px;
    gap: 7px;
  }
  .harbor-mode-switch button {
    min-width: 52px;
    min-height: 36px;
    padding: 6px 8px;
    font-size: 13px;
  }
  .harbor-mode-switch {
    gap: 6px;
  }
  .harbor-reader-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .harbor-reader-card {
    padding: 6px 6px 0;
  }
  .harbor-reader-preview {
    height: 64px;
  }
  .harbor-reader-copy {
    padding-block: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .harbor-reader-card {
    transition: none;
  }
}
