:root {
  --ink: #213f47;
  --ink-soft: #557078;
  --lake: #61c9c2;
  --lake-dark: #287f82;
  --lake-pale: #e8f8f6;
  --foam: #f8fdfc;
  --coral: #ee8d78;
  --coral-dark: #d66f5b;
  --lilac: #8f87c8;
  --yellow: #f2c96d;
  --line: rgba(51, 105, 111, 0.16);
  --shadow: 0 18px 55px rgba(44, 104, 108, 0.13);
  --shadow-small: 0 8px 24px rgba(44, 104, 108, 0.1);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 15px;
  --content: 1180px;
  --font-display: "Kaisei Decol", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo,
    sans-serif;
  color-scheme: light;
  font-family: var(--font-body);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #f7fcfb;
  line-height: 1.65;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(40, 127, 130, 0.27);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.025em;
}

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

.ambient {
  position: fixed;
  z-index: -2;
  width: 45vw;
  height: 45vw;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.ambient-one {
  top: -25vw;
  right: -10vw;
  background: radial-gradient(circle, rgba(117, 212, 201, 0.2), transparent 68%);
}

.ambient-two {
  bottom: -28vw;
  left: -18vw;
  background: radial-gradient(circle, rgba(238, 141, 120, 0.13), transparent 67%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, var(--lake), var(--lake-dark));
  border-radius: 13px 13px 17px 13px;
  box-shadow: 0 7px 15px rgba(40, 127, 130, 0.2);
  font-family: var(--font-display);
}

.brand-large {
  font-size: 1.45rem;
}

.brand-large .brand-mark {
  width: 43px;
  height: 43px;
  font-size: 1.2rem;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--lake-dark);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.subtle {
  color: var(--ink-soft);
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
}

.welcome-panel {
  position: relative;
  display: flex;
  min-height: 100vh;
  padding: clamp(34px, 5vw, 76px);
  overflow: hidden;
  flex-direction: column;
  background:
    linear-gradient(155deg, rgba(232, 248, 246, 0.92), rgba(202, 237, 232, 0.72)),
    #dff5f2;
}

.welcome-copy {
  position: relative;
  z-index: 2;
  max-width: 650px;
  margin: auto 0 20px;
}

.welcome-copy h1 {
  margin-bottom: 22px;
  font-family: var(--font-display);
  font-size: clamp(3rem, 5.3vw, 6rem);
  font-weight: 500;
  line-height: 1.08;
}

.welcome-copy > p:last-child {
  max-width: 540px;
  color: var(--ink-soft);
  font-size: 1.04rem;
}

.welcome-points {
  position: relative;
  z-index: 2;
  display: flex;
  padding: 0;
  margin: 18px 0 0;
  gap: 18px 28px;
  flex-wrap: wrap;
  color: #456a6f;
  font-size: 0.85rem;
  font-weight: 650;
  list-style: none;
}

.welcome-points span {
  color: var(--coral);
  font-size: 1.1rem;
}

.mini-lake {
  position: absolute;
  right: -10%;
  bottom: 4%;
  width: 68%;
  height: 40%;
  opacity: 0.72;
  pointer-events: none;
}

.water-line {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 70%;
  background: linear-gradient(180deg, rgba(94, 201, 194, 0.08), rgba(78, 172, 171, 0.2));
  border-radius: 50% 0 0;
  transform: skewY(-5deg);
}

.mini-fish {
  position: absolute;
  z-index: 1;
  filter: saturate(0.8);
  animation: mini-swim 7s ease-in-out infinite alternate;
}

.fish-a {
  top: 35%;
  right: 20%;
  font-size: 3.5rem;
}

.fish-b {
  top: 62%;
  right: 48%;
  font-size: 2.5rem;
  animation-delay: -2s;
}

.fish-c {
  top: 20%;
  right: 57%;
  font-size: 2rem;
  animation-delay: -4s;
}

.mini-bubble {
  position: absolute;
  z-index: 1;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
}

.bubble-a {
  top: 26%;
  right: 35%;
}

.bubble-b {
  top: 53%;
  right: 66%;
  width: 10px;
  height: 10px;
}

@keyframes mini-swim {
  to { transform: translateX(28px) translateY(-8px); }
}

.auth-panel {
  display: grid;
  min-height: 100vh;
  padding: 36px;
  place-items: center;
  background: rgba(255, 255, 255, 0.8);
}

.auth-card {
  width: min(100%, 460px);
  padding: clamp(30px, 5vw, 52px);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(60, 117, 120, 0.1);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.auth-card h2 {
  margin-bottom: 8px;
  font-size: 2rem;
}

.mobile-brand {
  display: none;
  color: var(--lake-dark);
  font-weight: 900;
}

.segmented {
  display: grid;
  padding: 5px;
  margin: 30px 0 24px;
  grid-template-columns: 1fr 1fr;
  background: #eef7f6;
  border-radius: 14px;
}

.segment {
  padding: 10px 16px;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: var(--ink-soft);
  font-weight: 700;
}

.segment.active {
  color: var(--ink);
  background: white;
  box-shadow: 0 3px 12px rgba(46, 101, 104, 0.1);
}

.auth-form,
.profile-form,
.modal form {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  padding: 13px 15px;
  color: var(--ink);
  background: white;
  border: 1px solid rgba(57, 107, 111, 0.23);
  border-radius: 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #98aaae;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--lake);
  box-shadow: 0 0 0 4px rgba(97, 201, 194, 0.1);
  outline: none;
}

.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 500;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--lake-dark);
}

.auth-note {
  margin: 22px 0 0;
  color: #71878c;
  font-size: 0.75rem;
  text-align: center;
}

.button {
  display: inline-flex;
  min-height: 44px;
  padding: 11px 19px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.button-primary {
  color: white;
  background: linear-gradient(140deg, #58bdb8, #378f91);
  box-shadow: 0 8px 20px rgba(40, 127, 130, 0.22);
}

.button-coral {
  color: white;
  background: linear-gradient(140deg, #f2a18f, var(--coral-dark));
  box-shadow: 0 8px 18px rgba(214, 111, 91, 0.22);
}

.button-outline,
.button-ghost {
  color: var(--lake-dark);
  background: white;
  border-color: rgba(40, 127, 130, 0.22);
}

.button-small {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.78rem;
}

.button-wide {
  width: 100%;
}

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.is-loading .spinner {
  display: inline-block;
}

.is-loading .button-label {
  opacity: 0.84;
}

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

.onboarding-shell {
  display: grid;
  min-height: 100vh;
  padding: 50px 24px;
  place-items: center;
  background: linear-gradient(155deg, #edf9f7, #fdf8f5);
}

.onboarding-card {
  width: min(100%, 760px);
  padding: clamp(28px, 5vw, 58px);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.onboarding-card h1 {
  margin: 12px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 500;
}

.step-chip {
  display: inline-flex;
  padding: 5px 10px;
  color: var(--lake-dark);
  background: var(--lake-pale);
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.two-column {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
}

.fish-picker {
  display: grid;
  padding: 0;
  border: 0;
  gap: 10px;
  grid-template-columns: repeat(6, 1fr);
}

.fish-picker legend,
.compact-fish-picker legend {
  margin-bottom: 9px;
  font-size: 0.88rem;
  font-weight: 700;
}

.fish-choice {
  position: relative;
  display: flex;
  min-height: 98px;
  padding: 10px 5px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 15px;
  font-size: 0.68rem;
  font-weight: 650;
}

.fish-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.fish-choice:has(input:checked) {
  background: var(--lake-pale);
  border-color: var(--lake-dark);
  box-shadow: 0 0 0 3px rgba(40, 127, 130, 0.08);
}

.fish-preview {
  font-size: 2.15rem;
  filter: saturate(0.9);
}

.fish-coral { filter: hue-rotate(330deg) saturate(1.25); }
.fish-aqua { filter: hue-rotate(160deg); }
.fish-lemon { filter: hue-rotate(5deg) saturate(0.85); }
.fish-lilac { filter: hue-rotate(220deg); }
.fish-mint { filter: hue-rotate(110deg) saturate(0.8); }
.fish-peach { filter: hue-rotate(345deg) saturate(0.75); }

.app-shell {
  min-height: 100vh;
}

.app-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: grid;
  height: 74px;
  padding: 0 max(24px, calc((100vw - var(--content)) / 2));
  align-items: center;
  grid-template-columns: 1fr auto 1fr;
  background: rgba(248, 253, 252, 0.88);
  border-bottom: 1px solid rgba(51, 105, 111, 0.09);
  backdrop-filter: blur(18px);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-link,
.mobile-nav-link {
  display: flex;
  cursor: pointer;
  background: transparent;
  border: 0;
  color: #72878b;
  font-weight: 700;
}

.nav-link {
  padding: 10px 15px;
  align-items: center;
  gap: 7px;
  border-radius: 12px;
  font-size: 0.87rem;
}

.nav-link.active {
  color: var(--lake-dark);
  background: var(--lake-pale);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
}

.user-fish-button {
  display: grid;
  width: 43px;
  height: 43px;
  padding: 0;
  cursor: pointer;
  place-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: var(--shadow-small);
  font-size: 1.45rem;
}

.page-container {
  width: min(calc(100% - 40px), var(--content));
  padding: 54px 0 100px;
  margin: 0 auto;
}

.page-intro {
  display: flex;
  margin-bottom: 30px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.page-intro h1 {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 4.3rem);
  font-weight: 500;
}

.page-intro > div > p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.now-studying-badge {
  display: flex;
  padding: 10px 15px;
  align-items: center;
  gap: 7px;
  color: var(--lake-dark);
  background: white;
  border: 1px solid var(--line);
  border-radius: 99px;
  box-shadow: var(--shadow-small);
  font-size: 0.84rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--coral);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(238, 141, 120, 0.45);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(238, 141, 120, 0); }
  100% { box-shadow: 0 0 0 0 rgba(238, 141, 120, 0); }
}

.study-controller {
  display: grid;
  padding: 22px 25px;
  margin-bottom: 24px;
  align-items: center;
  grid-template-columns: auto minmax(330px, 1fr);
  gap: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-small);
}

.controller-copy {
  display: flex;
  min-width: 250px;
  align-items: center;
  gap: 13px;
}

.controller-copy h2 {
  margin-bottom: 2px;
  font-size: 1.08rem;
}

.controller-copy p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.controller-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  color: white;
  background: var(--lake);
  border-radius: 15px;
  font-size: 1.4rem;
}

.study-start-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.study-running-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
}

.study-running-controls > div {
  display: grid;
  text-align: right;
}

.running-topic {
  max-width: 440px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-timer {
  font-size: 1.55rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.lake-card {
  position: relative;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.lake-toolbar {
  display: flex;
  padding: 23px 28px 18px;
  align-items: center;
  justify-content: space-between;
}

.lake-toolbar h2 {
  margin: 0;
  font-size: 1.25rem;
}

.icon-text-button,
.small-link {
  padding: 7px 9px;
  cursor: pointer;
  color: var(--lake-dark);
  background: transparent;
  border: 0;
  font-size: 0.78rem;
  font-weight: 800;
}

.lake-surface {
  position: relative;
  min-height: 470px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(235, 250, 249, 0.82), rgba(125, 205, 199, 0.55)),
    linear-gradient(110deg, #eaf9f7, #bce4e1);
  border-top: 1px solid rgba(60, 122, 124, 0.08);
}

.lake-glow {
  position: absolute;
  top: -150px;
  left: 15%;
  width: 55%;
  height: 300px;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.8), transparent 70%);
  transform: rotate(-13deg);
}

.lake-bubbles span {
  position: absolute;
  bottom: -25px;
  width: 12px;
  height: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  animation: rise 9s linear infinite;
}

.lake-bubbles span:nth-child(1) { left: 12%; animation-delay: -4s; }
.lake-bubbles span:nth-child(2) { left: 32%; width: 8px; height: 8px; animation-delay: -1s; }
.lake-bubbles span:nth-child(3) { left: 53%; width: 18px; height: 18px; animation-delay: -7s; }
.lake-bubbles span:nth-child(4) { left: 72%; animation-delay: -3s; }
.lake-bubbles span:nth-child(5) { left: 88%; width: 7px; height: 7px; animation-delay: -6s; }
.lake-bubbles span:nth-child(6) { left: 44%; width: 6px; height: 6px; animation-delay: -2s; }

@keyframes rise {
  from { transform: translateY(0); opacity: 0; }
  15% { opacity: 0.8; }
  to { transform: translateY(-500px); opacity: 0; }
}

.fish-layer,
.bottle-layer {
  position: absolute;
  inset: 0;
}

.swimming-fish {
  position: absolute;
  z-index: 4;
  top: var(--top);
  left: -90px;
  display: grid;
  padding: 9px;
  cursor: pointer;
  place-items: center;
  background: transparent;
  border: 0;
  animation: swim-across var(--duration) linear infinite;
  animation-delay: var(--delay);
}

.swimming-fish:hover,
.swimming-fish:focus-visible {
  animation-play-state: paused;
}

.swimming-fish .fish-emoji {
  display: block;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  filter: drop-shadow(0 8px 8px rgba(46, 98, 102, 0.18)) var(--fish-filter);
  transition: transform 160ms ease;
}

.swimming-fish:hover .fish-emoji {
  transform: scale(1.12);
}

.fish-label {
  position: absolute;
  bottom: -10px;
  left: 50%;
  max-width: 150px;
  padding: 4px 8px;
  overflow: hidden;
  color: #42666b;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 99px;
  font-size: 0.62rem;
  font-weight: 800;
  text-overflow: ellipsis;
  transform: translateX(-50%);
  white-space: nowrap;
}

@keyframes swim-across {
  0% { left: -100px; transform: translateY(0); }
  25% { transform: translateY(-13px); }
  50% { transform: translateY(7px); }
  75% { transform: translateY(-8px); }
  100% { left: calc(100% + 30px); transform: translateY(0); }
}

.floating-bottle {
  position: absolute;
  z-index: 3;
  display: grid;
  width: 42px;
  height: 58px;
  padding: 0;
  cursor: pointer;
  place-items: center;
  color: var(--coral-dark);
  background: rgba(255, 255, 255, 0.56);
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 17px 17px 22px 22px;
  box-shadow: 0 8px 22px rgba(46, 101, 104, 0.12);
  font-size: 1.15rem;
  transform: rotate(var(--rotation));
  animation: bob 3.8s ease-in-out infinite alternate;
  animation-delay: var(--delay);
}

@keyframes bob { to { transform: translateY(-11px) rotate(calc(var(--rotation) + 5deg)); } }

.lake-empty {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  padding: 40px;
  place-content: center;
  color: rgba(52, 102, 106, 0.64);
  text-align: center;
}

.lake-empty span {
  font-size: 3rem;
}

.lake-floor {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 55px;
  background: linear-gradient(180deg, rgba(225, 216, 174, 0), rgba(199, 192, 157, 0.35));
}

.plant {
  position: absolute;
  bottom: 6px;
  color: rgba(45, 139, 115, 0.6);
  font-size: 3.3rem;
  transform-origin: bottom;
}

.plant-one { left: 8%; transform: rotate(-14deg); }
.plant-two { right: 14%; transform: rotate(9deg); }
.plant-three { right: 39%; font-size: 2.2rem; }

.pebble {
  position: absolute;
  bottom: 7px;
  width: 44px;
  height: 12px;
  background: rgba(118, 137, 130, 0.2);
  border-radius: 50%;
}

.pebble-one { left: 28%; }
.pebble-two { right: 26%; width: 25px; }

.lake-hint {
  padding: 13px 26px;
  margin: 0;
  color: #70868b;
  background: #f9fdfc;
  font-size: 0.72rem;
  text-align: center;
}

.fish-drawer {
  position: fixed;
  z-index: 50;
  right: 24px;
  bottom: 28px;
  display: grid;
  width: min(calc(100% - 48px), 380px);
  padding: 23px;
  align-items: center;
  grid-template-columns: auto 1fr;
  gap: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(15px);
}

.drawer-close,
.modal-close {
  display: grid;
  width: 35px;
  height: 35px;
  padding: 0;
  cursor: pointer;
  place-items: center;
  color: #71878b;
  background: #f0f7f6;
  border: 0;
  border-radius: 50%;
  font-size: 1.25rem;
}

.drawer-close {
  position: absolute;
  top: 10px;
  right: 10px;
}

.drawer-fish {
  font-size: 3.4rem;
}

.drawer-name {
  margin-bottom: 2px;
  font-weight: 900;
}

.drawer-meta,
.drawer-elapsed {
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.drawer-topic {
  margin-bottom: 2px;
  font-size: 0.9rem;
  font-weight: 700;
}

.category-filters {
  display: flex;
  margin-bottom: 24px;
  gap: 8px;
  flex-wrap: wrap;
}

.category-chip {
  padding: 9px 16px;
  cursor: pointer;
  color: var(--ink-soft);
  background: white;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 800;
}

.category-chip.active {
  color: white;
  background: var(--lake-dark);
  border-color: var(--lake-dark);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.post-card {
  position: relative;
  display: flex;
  min-height: 250px;
  padding: 22px;
  overflow: hidden;
  flex-direction: column;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-small);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.post-card::after {
  position: absolute;
  right: -25px;
  bottom: -35px;
  width: 100px;
  height: 100px;
  content: "";
  background: var(--card-wash, var(--lake-pale));
  border-radius: 50%;
  opacity: 0.72;
}

.post-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.post-open-button {
  padding: 0;
  cursor: pointer;
  color: inherit;
  background: transparent;
  border: 0;
  text-align: left;
}

.post-card h2 {
  margin: 15px 0 10px;
  font-size: 1.13rem;
}

.post-excerpt {
  display: -webkit-box;
  margin-bottom: 18px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.84rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.post-badges {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.post-badge {
  display: inline-flex;
  padding: 4px 8px;
  color: var(--lake-dark);
  background: var(--lake-pale);
  border-radius: 99px;
  font-size: 0.65rem;
  font-weight: 900;
}

.post-badge.type {
  color: #95634f;
  background: #fff1ec;
}

.post-footer {
  position: relative;
  z-index: 1;
  display: flex;
  margin-top: auto;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.post-meta {
  margin: 0;
  color: #788d91;
  font-size: 0.7rem;
}

.like-button {
  display: inline-flex;
  min-width: 44px;
  min-height: 36px;
  padding: 7px 10px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  color: #8a7772;
  background: #fff8f5;
  border: 1px solid #f7ded7;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 800;
}

.like-button.liked {
  color: white;
  background: var(--coral);
  border-color: var(--coral);
}

.empty-card {
  padding: 70px 25px;
  color: var(--ink-soft);
  background: white;
  border: 1px dashed rgba(40, 127, 130, 0.25);
  border-radius: var(--radius-lg);
  text-align: center;
}

.empty-card > span {
  color: var(--lake);
  font-size: 2.4rem;
}

.empty-card h2 {
  margin-bottom: 6px;
  color: var(--ink);
}

.profile-grid {
  display: grid;
  margin-bottom: 20px;
  grid-template-columns: 310px 1fr;
  gap: 20px;
}

.profile-card,
.history-card {
  padding: 25px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-small);
}

.user-profile-card {
  position: relative;
  display: flex;
  min-height: 285px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.user-profile-card .small-link {
  position: absolute;
  top: 15px;
  right: 15px;
}

.my-fish {
  margin-bottom: 8px;
  font-size: 4.5rem;
  filter: drop-shadow(0 10px 8px rgba(45, 100, 102, 0.13));
}

.user-profile-card h2 {
  margin-bottom: 4px;
  font-size: 1.35rem;
}

.user-profile-card > p {
  margin-bottom: 5px;
  color: var(--ink-soft);
}

.privacy-note {
  padding: 4px 8px;
  margin-top: 13px;
  background: var(--lake-pale);
  border-radius: 99px;
  font-size: 0.65rem;
}

.section-heading {
  display: flex;
  margin-bottom: 15px;
  align-items: flex-start;
  justify-content: space-between;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.2rem;
}

.stat-row {
  display: grid;
  padding: 16px 0 22px;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.stat-row > div {
  display: grid;
  padding: 0 16px;
  border-right: 1px solid var(--line);
}

.stat-row > div:first-child { padding-left: 0; }
.stat-row > div:last-child { border-right: 0; }

.stat-row strong {
  font-size: 1.65rem;
}

.stat-row span {
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.weekly-chart {
  display: grid;
  height: 105px;
  padding-top: 18px;
  align-items: end;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.chart-column {
  display: grid;
  height: 100%;
  align-items: end;
  justify-items: center;
  grid-template-rows: 1fr auto;
  gap: 5px;
}

.chart-bar {
  width: min(100%, 30px);
  min-height: 4px;
  background: linear-gradient(180deg, var(--lake), #8fd8d2);
  border-radius: 8px 8px 3px 3px;
}

.chart-label {
  color: #829599;
  font-size: 0.63rem;
}

.history-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.history-list {
  display: grid;
  gap: 4px;
}

.history-item {
  display: grid;
  padding: 13px 4px;
  align-items: center;
  grid-template-columns: 1fr auto;
  gap: 15px;
  border-bottom: 1px solid var(--line);
}

.history-item:last-child { border-bottom: 0; }
.history-item strong { display: block; font-size: 0.86rem; }
.history-item span { color: var(--ink-soft); font-size: 0.7rem; }
.history-value { color: var(--lake-dark) !important; font-weight: 800; }

.history-empty {
  padding: 35px 5px;
  color: #84979a;
  font-size: 0.8rem;
  text-align: center;
}

.modal {
  width: min(calc(100% - 32px), 680px);
  max-height: calc(100vh - 36px);
  padding: 0;
  overflow: auto;
  color: var(--ink);
  background: white;
  border: 0;
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 90px rgba(28, 71, 75, 0.28);
}

.modal::backdrop {
  background: rgba(25, 61, 66, 0.42);
  backdrop-filter: blur(5px);
}

.modal > form,
.modal > article {
  padding: clamp(24px, 5vw, 40px);
}

.modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.modal-heading h2 {
  margin-bottom: 4px;
  font-size: 1.7rem;
}

.modal label small {
  color: #829599;
  font-weight: 500;
  text-align: right;
}

.modal-actions {
  display: flex;
  padding-top: 7px;
  justify-content: flex-end;
  gap: 10px;
}

.detail-body {
  margin: 26px 0;
  color: #3f5e64;
  white-space: pre-wrap;
}

.detail-footer {
  display: flex;
  justify-content: flex-end;
}

.compact-fish-picker {
  display: flex;
  padding: 0;
  gap: 9px;
  border: 0;
  flex-wrap: wrap;
}

.compact-fish-picker label {
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  cursor: pointer;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.compact-fish-picker input {
  position: absolute;
  opacity: 0;
}

.compact-fish-picker label:has(input:checked) {
  background: var(--lake-pale);
  border-color: var(--lake-dark);
}

.compact-fish-picker span { font-size: 1.7rem; }

.mobile-nav {
  display: none;
}

.toast-region {
  position: fixed;
  z-index: 100;
  top: 18px;
  right: 18px;
  display: grid;
  width: min(calc(100% - 36px), 380px);
  gap: 8px;
}

.toast {
  padding: 13px 16px;
  color: white;
  background: #315f66;
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 0.82rem;
  font-weight: 700;
  animation: toast-in 220ms ease-out;
}

.toast.error { background: #a9564e; }
.toast.success { background: #347c72; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
}

.noscript {
  position: fixed;
  z-index: 999;
  inset: 0;
  display: grid;
  padding: 30px;
  place-items: center;
  color: var(--ink);
  background: white;
  text-align: center;
}

@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 0.85fr 1fr; }
  .welcome-panel { padding: 35px; }
  .welcome-copy h1 { font-size: 3.7rem; }
  .welcome-points { display: none; }
  .post-grid { grid-template-columns: 1fr 1fr; }
  .study-controller { grid-template-columns: 1fr; gap: 16px; }
  .controller-copy { min-width: 0; }
  .profile-grid { grid-template-columns: 250px 1fr; }
}

@media (max-width: 760px) {
  body { padding-bottom: 68px; }
  .auth-shell { display: block; }
  .welcome-panel { display: none; }
  .auth-panel { min-height: calc(100vh - 68px); padding: 20px; background: linear-gradient(160deg, #e9f8f6, #fff8f5); }
  .auth-card { padding: 28px 23px; }
  .mobile-brand { display: block; }
  .fish-picker { grid-template-columns: repeat(3, 1fr); }
  .app-header { height: 65px; padding: 0 18px; grid-template-columns: 1fr auto; }
  .desktop-nav { display: none; }
  .page-container { width: min(calc(100% - 28px), var(--content)); padding: 35px 0 40px; }
  .page-intro { align-items: flex-start; flex-direction: column; }
  .page-intro h1 { font-size: 2.65rem; }
  .now-studying-badge { align-self: flex-start; }
  .study-controller { padding: 18px; }
  .study-start-controls { grid-template-columns: 1fr; }
  .study-running-controls { align-items: stretch; flex-direction: column; }
  .study-running-controls > div { text-align: left; }
  .lake-toolbar { padding: 18px 20px 15px; }
  .lake-surface { min-height: 430px; }
  .lake-hint { padding: 11px 16px; }
  .post-grid { grid-template-columns: 1fr; }
  .post-card { min-height: 225px; }
  .profile-grid,
  .history-grid { grid-template-columns: 1fr; }
  .user-profile-card { min-height: 245px; }
  .stat-row strong { font-size: 1.25rem; }
  .profile-card,
  .history-card { padding: 20px; }
  .mobile-nav {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    height: 68px;
    padding: 5px 12px max(5px, env(safe-area-inset-bottom));
    grid-template-columns: repeat(3, 1fr);
    background: rgba(255, 255, 255, 0.94);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(16px);
  }
  .mobile-nav-link { align-items: center; justify-content: center; flex-direction: column; gap: 0; font-size: 0.65rem; }
  .mobile-nav-link > span:first-child { font-size: 1.15rem; }
  .mobile-nav-link.active { color: var(--lake-dark); }
  .two-column { grid-template-columns: 1fr; }
  .modal-actions .button { flex: 1; }
}

/* ============================================================
   Real-time community aquarium
   The aquarium is a calm shared place; study remains a mode.
   ============================================================ */
#aquariumPage {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 100dvh;
  padding: 40px clamp(22px, 4vw, 64px) 128px;
  overflow: visible;
  background:
    radial-gradient(circle at 86% 2%, rgba(239, 192, 183, 0.2), transparent 30%),
    linear-gradient(180deg, #f5faf8 0%, #eaf5f3 42%, #e1f0ef 100%);
}

.aquarium-community-header,
.aquarium-control-deck,
#aquariumPage .lake-card,
.aquarium-setup-notice,
.focus-complete-prompt {
  width: min(1180px, 100%);
  margin-inline: auto;
}

.aquarium-community-header {
  display: flex;
  margin-bottom: 22px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.aquarium-community-header h1 {
  margin: 2px 0 5px;
  color: #294f58;
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 4vw, 4rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: 0.035em;
}

.aquarium-community-header > div:first-child > p:last-child {
  margin: 0;
  color: #607b80;
  font-size: 0.88rem;
}

.aquarium-live-counts {
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
}

.aquarium-live-counts > div {
  display: inline-flex;
  min-height: 48px;
  padding: 9px 14px;
  align-items: center;
  gap: 6px;
  color: #506f76;
  background: rgba(255, 255, 252, 0.8);
  border: 1px solid rgba(64, 104, 111, 0.12);
  border-radius: 17px;
  box-shadow: 0 9px 28px rgba(38, 70, 76, 0.07);
  backdrop-filter: blur(12px);
}

.aquarium-live-counts strong {
  color: #2f5b63;
  font-size: 1.12rem;
  font-variant-numeric: tabular-nums;
}

.aquarium-live-counts span:last-child {
  font-size: 0.7rem;
  font-weight: 700;
}

.presence-dot,
.status-orb {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: #78b7a2;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(120, 183, 162, 0.13);
}

.status-orb.status-social { background: #75ad98; }
.status-orb.status-focus { background: #d88f8c; }
.status-orb.status-break { background: #d6b16b; }
.status-orb.status-observe { background: #91a4ac; }

.aquarium-control-deck {
  display: grid;
  padding: 18px 20px;
  margin-bottom: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.52fr);
  gap: 22px;
  color: #3b6269;
  background: rgba(255, 253, 248, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 25px;
  box-shadow: 0 16px 44px rgba(42, 73, 78, 0.09);
  backdrop-filter: blur(18px);
}

.aquarium-status-control {
  display: grid;
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
}

.aquarium-status-control h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
}

.aquarium-status-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.status-choice {
  display: inline-flex;
  min-height: 46px;
  padding: 8px 10px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #6b8085;
  background: rgba(239, 246, 244, 0.76);
  border: 1px solid transparent;
  border-radius: 15px;
  cursor: pointer;
  font-size: 0.73rem;
  font-weight: 700;
  transition: 160ms ease;
}

.status-choice:hover,
.status-choice.active {
  color: #345f67;
  background: #fffdfa;
  border-color: rgba(68, 108, 114, 0.16);
  box-shadow: 0 7px 20px rgba(45, 78, 84, 0.08);
  transform: translateY(-1px);
}

.status-choice:disabled {
  cursor: default;
  opacity: 0.45;
  transform: none;
}

.aquarium-participation-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.aquarium-switch-row {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.aquarium-switch-row > span:first-child {
  display: grid;
  line-height: 1.3;
}

.aquarium-switch-row strong { font-size: 0.78rem; }
.aquarium-switch-row small { color: #7a9094; font-size: 0.62rem; }

.toggle-switch {
  position: relative;
  display: inline-flex;
  width: 46px;
  height: 27px;
  flex: 0 0 auto;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
}

.toggle-switch > span {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: #cddbd9;
  border-radius: 999px;
  transition: 160ms ease;
}

.toggle-switch > span::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 19px;
  height: 19px;
  content: "";
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 7px rgba(49, 76, 81, 0.2);
  transition: 160ms ease;
}

.toggle-switch input:checked + span { background: #7fb2a4; }
.toggle-switch input:checked + span::after { transform: translateX(19px); }
.toggle-switch input:focus-visible + span { outline: 3px solid rgba(40, 127, 130, 0.27); }

.aquarium-focus-button {
  min-height: 48px;
  padding-inline: 18px;
  border-radius: 16px;
}

.aquarium-settings {
  grid-column: 1 / -1;
  padding-top: 7px;
  border-top: 1px solid rgba(62, 101, 107, 0.09);
}

.aquarium-settings summary {
  cursor: pointer;
  color: #668085;
  font-size: 0.68rem;
  font-weight: 700;
}

.aquarium-settings[open] summary { margin-bottom: 8px; }
.aquarium-settings .compact { min-height: 44px; }

.muted-users-block {
  display: grid;
  padding-top: 8px;
  gap: 5px;
  color: #71878b;
  font-size: 0.65rem;
}

.muted-users-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.muted-users-list button {
  min-height: 34px;
  padding: 5px 10px;
  color: #5d777d;
  background: #edf3f1;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.62rem;
}

.aquarium-setup-notice {
  display: flex;
  padding: 14px 17px;
  margin-bottom: 18px;
  align-items: center;
  gap: 12px;
  color: #805c57;
  background: #fff0ea;
  border: 1px solid rgba(190, 119, 105, 0.18);
  border-radius: 18px;
}

.aquarium-setup-notice i { font-size: 1.35rem; }
.aquarium-setup-notice p { display: grid; margin: 0; }
.aquarium-setup-notice span { font-size: 0.7rem; }

#aquariumPage .lake-card {
  position: relative;
  inset: auto;
  height: auto;
  min-height: 0;
  overflow: hidden;
  background: #9fc9ce;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 32px;
  box-shadow: 0 24px 70px rgba(42, 79, 86, 0.18);
}

#aquariumPage .lake-toolbar {
  position: relative;
  z-index: 12;
  top: auto;
  right: auto;
  display: flex;
  min-height: 70px;
  padding: 14px 18px;
  align-items: center;
  justify-content: space-between;
  background: rgba(250, 251, 247, 0.9);
  border-bottom: 1px solid rgba(61, 103, 110, 0.1);
}

#aquariumPage .lake-toolbar > div { display: block; }
#aquariumPage .lake-toolbar h2 { margin: 1px 0 0; font-family: var(--font-display); font-size: 1.25rem; }

.presence-connection-status {
  display: flex;
  margin: 0;
  align-items: center;
  gap: 6px;
  color: #698086;
  font-size: 0.62rem;
  font-weight: 700;
}

.presence-connection-status > span {
  width: 7px;
  height: 7px;
  background: #79b49e;
  border-radius: 50%;
}

#aquariumPage .icon-text-button {
  min-width: 78px;
  min-height: 42px;
  background: #eef4f1;
  border-color: rgba(57, 99, 105, 0.1);
  backdrop-filter: none;
}

#aquariumPage .lake-surface {
  position: relative;
  inset: auto;
  height: clamp(500px, 58vw, 650px);
  min-height: 500px;
  overflow: hidden;
  background: #9fc9ce;
}

#aquariumPage .fish-layer {
  position: absolute;
  z-index: 7;
  inset: 0;
}

#aquariumPage .swimming-fish {
  z-index: 8;
  width: clamp(78px, 8vw, 112px);
  min-width: 62px;
  min-height: 62px;
  padding: 8px;
}

#aquariumPage .fish-label {
  bottom: -14px;
  display: grid;
  min-width: max-content;
  max-width: 132px;
  padding: 5px 8px;
  justify-items: center;
  gap: 1px;
  opacity: 1;
  color: #355c64;
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 10px;
  box-shadow: 0 5px 16px rgba(40, 71, 77, 0.1);
  line-height: 1.2;
  backdrop-filter: blur(8px);
}

#aquariumPage .fish-label strong {
  max-width: 116px;
  overflow: hidden;
  font-size: 0.63rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#aquariumPage .fish-label small {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #72878b;
  font-size: 0.52rem;
  font-weight: 700;
}

#aquariumPage .fish-label .status-orb {
  width: 6px;
  height: 6px;
  box-shadow: none;
}

.fish-reaction-bubble {
  position: absolute;
  z-index: 12;
  bottom: calc(100% + 5px);
  left: 56%;
  display: grid;
  width: max-content;
  max-width: min(190px, 42vw);
  padding: 8px 11px;
  gap: 1px;
  color: #3d6269;
  background: rgba(255, 253, 249, 0.96);
  border: 1px solid rgba(77, 114, 119, 0.12);
  border-radius: 13px 13px 13px 4px;
  box-shadow: 0 8px 24px rgba(42, 73, 78, 0.13);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  transform: translateX(-50%);
  animation: reaction-pop 280ms ease-out both;
}

.fish-reaction-bubble::after {
  position: absolute;
  bottom: -7px;
  left: 31%;
  width: 13px;
  height: 13px;
  content: "";
  background: inherit;
  border-right: 1px solid rgba(77, 114, 119, 0.12);
  border-bottom: 1px solid rgba(77, 114, 119, 0.12);
  transform: rotate(45deg);
}

.fish-reaction-bubble small {
  color: #8a999b;
  font-size: 0.5rem;
  font-weight: 700;
}

.fish-reaction-bubble > span { position: relative; z-index: 1; }

.fish-reaction-bubble.is-fish-voice {
  color: #315b63;
  border-radius: 16px 16px 16px 5px;
  box-shadow: 0 10px 27px rgba(42, 73, 78, 0.16);
}

.fish-reaction-bubble.is-direct-reaction {
  color: #6f5f64;
  background: rgba(255, 247, 243, 0.97);
}

.fish-reaction-bubble.is-bottle-notice {
  padding-right: 28px;
  color: #76575e;
  background: linear-gradient(120deg, rgba(255, 248, 242, 0.98), rgba(238, 248, 244, 0.98));
}

.fish-reaction-bubble.is-bottle-notice > i {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 9px;
  font-size: 0.72rem;
  transform: translateY(-50%);
}

@keyframes reaction-pop {
  from { opacity: 0; translate: 0 7px; scale: 0.96; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}

#aquariumPage .lake-empty {
  z-index: 6;
  max-width: 330px;
  padding: 18px;
  color: #54757b;
  background: rgba(244, 249, 245, 0.67);
  border-radius: 22px;
  backdrop-filter: blur(8px);
}

#aquariumPage .lake-empty img { width: 92px; }
#aquariumPage .lake-empty p { display: grid; margin: 0; }
#aquariumPage .lake-empty span { font-size: 0.7rem; }

.aquarium-quick-messages {
  display: flex;
  min-height: 64px;
  padding: 11px 15px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  background: rgba(251, 252, 248, 0.94);
  border-top: 1px solid rgba(58, 98, 105, 0.1);
}

.aquarium-quick-messages > span {
  margin-right: 5px;
  color: #71868a;
  font-size: 0.64rem;
  font-weight: 700;
}

.aquarium-quick-messages button,
.drawer-reaction-buttons button {
  min-height: 38px;
  padding: 7px 12px;
  color: #456c73;
  background: #edf4f1;
  border: 1px solid rgba(62, 103, 110, 0.1);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.66rem;
  font-weight: 700;
}

.aquarium-quick-messages button:hover,
.drawer-reaction-buttons button:hover { background: #fffdfa; }
.aquarium-quick-messages button:disabled,
.drawer-reaction-buttons button:disabled { cursor: default; opacity: 0.42; }

.aquarium-message-dock {
  display: flex;
  min-height: 78px;
  padding: 13px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(251, 252, 248, 0.96);
  border-top: 1px solid rgba(58, 98, 105, 0.1);
}

.aquarium-message-dock-copy,
.aquarium-message-dock-actions,
.aquarium-message-dock-copy > span:last-child {
  display: flex;
  align-items: center;
}

.aquarium-message-dock-copy { gap: 11px; }
.aquarium-message-dock-copy > span:last-child { align-items: flex-start; flex-direction: column; }
.aquarium-message-dock-copy strong { color: #365e65; font-size: 0.75rem; }
.aquarium-message-dock-copy small { color: #819497; font-size: 0.6rem; }

.message-dock-icon {
  display: grid;
  width: 40px;
  height: 40px;
  color: #4f8285;
  background: linear-gradient(145deg, #e7f5f2, #f8f3eb);
  border: 1px solid rgba(62, 103, 110, 0.1);
  border-radius: 14px;
  font-size: 1.1rem;
  place-items: center;
}

.aquarium-message-dock-actions { gap: 8px; }
.shared-bottles-button,
.lake-message-button {
  position: relative;
  display: inline-flex;
  min-height: 43px;
  padding: 9px 14px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}

.shared-bottles-button {
  color: #52747a;
  background: #f3f7f4;
  border: 1px solid rgba(62, 103, 110, 0.12);
}

.shared-bottles-button b {
  display: grid;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  color: white;
  background: #db8c80;
  border-radius: 99px;
  font-size: 0.55rem;
  place-items: center;
}

.lake-message-button {
  color: white;
  background: linear-gradient(135deg, #4f8587, #376b71);
  border: 0;
  box-shadow: 0 8px 22px rgba(45, 93, 99, 0.18);
}

.shared-bottles-button:disabled,
.lake-message-button:disabled { cursor: default; opacity: 0.45; }

.lake-message-modal { width: min(calc(100% - 28px), 720px); }
.lake-message-modal > article,
.bottle-share-modal > article,
.shared-bottles-modal > article { padding: clamp(22px, 4vw, 34px); }
.lake-message-heading p:last-child { margin: 4px 0 0; color: #7a8e92; font-size: 0.72rem; }

.lake-message-categories {
  display: grid;
  padding: 5px;
  margin: 22px 0 17px;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  background: #f1f6f3;
  border-radius: 18px;
}

.lake-message-categories button {
  display: grid;
  min-height: 62px;
  padding: 8px 6px;
  cursor: pointer;
  place-items: center;
  gap: 3px;
  color: #6c8488;
  background: transparent;
  border: 0;
  border-radius: 14px;
  font-size: 0.63rem;
  font-weight: 800;
}

.lake-message-categories button i { font-size: 1rem; }
.lake-message-categories button.active {
  color: #355f66;
  background: #fffdfa;
  box-shadow: 0 5px 15px rgba(46, 79, 84, 0.09);
}

.lake-message-panel {
  min-height: 246px;
  padding: 4px 1px;
}

.lake-message-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.lake-message-options button {
  display: grid;
  min-height: 66px;
  padding: 12px 13px;
  align-items: center;
  grid-template-columns: 34px minmax(0, 1fr) 22px;
  gap: 9px;
  cursor: pointer;
  color: #3f686e;
  background: #fbfcf8;
  border: 1px solid rgba(64, 104, 109, 0.13);
  border-radius: 17px;
  font-size: 0.71rem;
  font-weight: 750;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.lake-message-options button > i:first-child {
  display: grid;
  width: 34px;
  height: 34px;
  color: #568b8b;
  background: #eaf5f2;
  border-radius: 11px;
  font-size: 1rem;
  place-items: center;
}

.lake-message-options .send-mark { color: #9ab0b2; }
.lake-message-options button:hover {
  border-color: rgba(61, 113, 116, 0.27);
  box-shadow: 0 9px 22px rgba(43, 78, 83, 0.09);
  transform: translateY(-2px);
}

.lake-message-panel-intro,
.lake-message-empty,
.bottle-share-empty {
  display: flex;
  padding: 16px;
  align-items: center;
  gap: 12px;
  color: #5c777c;
  background: linear-gradient(135deg, #edf7f4, #faf7f0);
  border-radius: 17px;
}

.lake-message-panel-intro > span {
  display: grid;
  width: 42px;
  height: 42px;
  background: white;
  border-radius: 13px;
  font-size: 1.15rem;
  place-items: center;
}

.lake-message-panel-intro div,
.lake-message-empty p,
.bottle-share-empty p { display: grid; margin: 0; gap: 2px; }
.lake-message-panel-intro small,
.lake-message-empty span,
.bottle-share-empty span { color: #809296; font-size: 0.64rem; }
.lake-message-empty,
.bottle-share-empty { min-height: 150px; justify-content: center; text-align: left; }
.lake-message-empty > i,
.bottle-share-empty > i { font-size: 1.8rem; }

.bottle-share-entry-grid { display: grid; margin-top: 11px; grid-template-columns: 1fr 1fr; gap: 10px; }
.bottle-share-entry-grid button {
  display: grid;
  min-height: 105px;
  padding: 17px;
  align-items: center;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  cursor: pointer;
  color: #446b71;
  background: #fffdfa;
  border: 1px solid rgba(64, 104, 109, 0.13);
  border-radius: 18px;
  text-align: left;
}
.bottle-share-entry-grid button > i { font-size: 1.3rem; }
.bottle-share-entry-grid button > span { display: grid; gap: 3px; }
.bottle-share-entry-grid small { color: #839498; font-size: 0.61rem; }

.bottle-share-filters {
  display: inline-flex;
  padding: 4px;
  margin: 17px 0 13px;
  gap: 4px;
  background: #f0f5f2;
  border-radius: 999px;
}
.bottle-share-filters button {
  min-height: 36px;
  padding: 7px 13px;
  cursor: pointer;
  color: #71868a;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
}
.bottle-share-filters button.active { color: #3f666c; background: #fffdfa; box-shadow: 0 4px 12px rgba(48, 80, 84, 0.08); }
.bottle-share-list,
.shared-bottles-list { display: grid; max-height: min(52vh, 470px); overflow: auto; gap: 8px; }

.bottle-share-item {
  display: grid;
  padding: 13px;
  align-items: center;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 11px;
  background: #fcfcf8;
  border: 1px solid rgba(63, 104, 109, 0.11);
  border-radius: 17px;
}
.bottle-share-item-art,
.shared-bottle-row-art {
  display: grid;
  width: 40px;
  height: 40px;
  color: #b77d72;
  background: #fff1eb;
  border-radius: 13px;
  place-items: center;
}
.bottle-share-item > div { min-width: 0; }
.bottle-share-item strong { display: block; margin: 3px 0; overflow: hidden; color: #3e646b; font-size: 0.75rem; text-overflow: ellipsis; white-space: nowrap; }
.bottle-share-item p { display: -webkit-box; margin: 0; overflow: hidden; color: #7d9094; font-size: 0.61rem; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.bottle-share-item-badges { display: flex; gap: 4px; }
.bottle-share-item-badges small { padding: 2px 6px; color: #668084; background: #edf4f1; border-radius: 99px; font-size: 0.52rem; }
.bottle-share-item > button {
  min-height: 38px;
  padding: 7px 10px;
  cursor: pointer;
  color: #456e73;
  background: white;
  border: 1px solid rgba(62, 103, 110, 0.15);
  border-radius: 12px;
  font-size: 0.61rem;
  font-weight: 800;
}

.shared-bottle-row {
  display: grid;
  width: 100%;
  padding: 12px;
  align-items: center;
  grid-template-columns: 42px minmax(0, 1fr) 22px;
  gap: 11px;
  cursor: pointer;
  color: #45696f;
  background: #fcfcf8;
  border: 1px solid rgba(63, 104, 109, 0.11);
  border-radius: 17px;
  text-align: left;
}
.shared-bottle-row > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.shared-bottle-row small { color: #8a7773; font-size: 0.56rem; }
.shared-bottle-row strong { overflow: hidden; font-size: 0.74rem; text-overflow: ellipsis; white-space: nowrap; }
.shared-bottle-row em { color: #87989b; font-size: 0.56rem; font-style: normal; }
.fish-reaction-bubble.is-bottle-notice { cursor: pointer; }

#aquariumPage .lake-hint {
  display: block;
  position: static;
  padding: 0 16px 14px;
  margin: 0;
  color: #74898d;
  background: rgba(251, 252, 248, 0.94);
  font-size: 0.62rem;
  text-align: center;
}

.aquarium-study-dock {
  position: sticky;
  z-index: 24;
  bottom: 22px;
  left: auto;
  display: grid;
  width: min(760px, calc(100% - 32px));
  min-height: 88px;
  padding: 14px 16px;
  margin: -110px auto 22px;
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 13px;
  background: rgba(255, 253, 249, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 25px;
  box-shadow: 0 20px 54px rgba(36, 68, 74, 0.2);
  backdrop-filter: blur(18px);
  transform: none;
}

.focus-complete-prompt {
  display: flex;
  padding: 14px 17px;
  margin-top: 18px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(255, 253, 249, 0.9);
  border: 1px solid rgba(74, 113, 118, 0.1);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(40, 72, 77, 0.09);
}

.focus-complete-prompt > div { display: flex; align-items: center; gap: 10px; }
.focus-complete-prompt i { color: #79aa97; font-size: 1.55rem; }
.focus-complete-prompt p { display: grid; margin: 0; }
.focus-complete-prompt span { color: #74888d; font-size: 0.68rem; }

.fish-drawer {
  position: fixed;
  z-index: 80;
  right: 26px;
  bottom: 26px;
  display: grid;
  width: min(410px, calc(100% - 52px));
  max-height: calc(100dvh - 52px);
  padding: 24px;
  overflow-y: auto;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  background: rgba(255, 253, 249, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(32, 62, 68, 0.24);
  backdrop-filter: blur(20px);
}

.drawer-profile-content { min-width: 0; }
.drawer-name { margin: 3px 0; font-family: var(--font-display); font-size: 1.35rem; }
.drawer-meta, .drawer-elapsed { margin: 0; color: #73888c; font-size: 0.68rem; }
.drawer-bio { padding: 9px 11px; color: #4f6f75; background: #f0f5f2; border-radius: 12px; font-size: 0.72rem; }
.drawer-status { display: inline-flex; margin: 10px 0 5px; align-items: center; gap: 7px; font-size: 0.7rem; font-weight: 700; }
.drawer-topic { padding: 8px 10px; margin: 5px 0; color: #855e62; background: #f9ebe7; border-radius: 11px; font-size: 0.7rem; }
.drawer-reaction-section { margin-top: 13px; }
.drawer-reaction-section > p:first-child { margin: 0 0 7px; color: #687f84; font-size: 0.65rem; font-weight: 700; }
.drawer-reaction-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.drawer-reaction-hint { margin: 8px 0 0; color: #85969a; font-size: 0.59rem; }
.mute-fish-button { min-height: 38px; padding: 6px 10px; margin-top: 12px; color: #7b696b; background: transparent; border: 1px solid rgba(123, 105, 107, 0.18); border-radius: 12px; cursor: pointer; font-size: 0.62rem; }

.aquarium-intro-modal article { max-width: 560px; padding: 30px; text-align: center; }
.aquarium-intro-modal h2 { margin: 5px 0 18px; font-family: var(--font-display); font-size: 1.65rem; }
.aquarium-intro-modal ul { display: grid; padding: 0; margin: 0 0 22px; gap: 9px; list-style: none; text-align: left; }
.aquarium-intro-modal li { display: flex; padding: 10px 12px; align-items: flex-start; gap: 9px; background: #eff5f2; border-radius: 13px; font-size: 0.75rem; }
.aquarium-intro-modal li i { margin-top: 3px; color: #568087; font-size: 1.05rem; }
.aquarium-intro-fish img { width: 100px; filter: drop-shadow(0 9px 16px rgba(42, 75, 81, 0.13)); }
.focus-mode-note { display: flex; padding: 11px 13px; align-items: flex-start; gap: 9px; color: #6d6265; background: #f9ece8; border-radius: 13px; }
.focus-mode-note p { display: grid; margin: 0; }
.focus-mode-note span { font-size: 0.68rem; }

#aquariumPage.is-focus-mode .aquarium-control-deck,
#aquariumPage.is-focus-mode .aquarium-message-dock,
#aquariumPage.is-focus-mode .lake-hint {
  opacity: 0.62;
}

@media (max-width: 900px) {
  .aquarium-community-header { align-items: flex-start; flex-direction: column; }
  .aquarium-control-deck { grid-template-columns: 1fr; }
  .aquarium-status-control { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  #aquariumPage {
    width: 100%;
    height: auto;
    min-height: 100dvh;
    padding: calc(var(--mobile-header-height) + 19px) var(--mobile-gutter) calc(var(--mobile-nav-height) + 42px + env(safe-area-inset-bottom));
    overflow: visible;
  }

  .app-shell[data-active-page="aquarium"] .page-container {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .aquarium-community-header { margin-bottom: 15px; gap: 12px; }
  .aquarium-community-header h1 { max-width: 10em; font-size: clamp(2rem, 10vw, 2.7rem); }
  .aquarium-community-header > div:first-child > p:last-child { font-size: 0.72rem; line-height: 1.75; }
  .aquarium-live-counts { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .aquarium-live-counts > div { min-height: 52px; padding: 9px 10px; justify-content: center; }
  .aquarium-live-counts span:last-child { font-size: 0.61rem; }

  .aquarium-control-deck { padding: 15px; margin-bottom: 13px; gap: 15px; border-radius: 22px; }
  .aquarium-status-options { grid-template-columns: 1fr 1fr; }
  .status-choice { min-height: 46px; }
  .aquarium-participation-control { grid-template-columns: 1fr; }
  .aquarium-focus-button { width: 100%; }

  #aquariumPage .lake-card { position: relative; inset: auto; width: 100%; height: auto; border-radius: 25px; }
  #aquariumPage .lake-toolbar { position: relative; top: auto; right: auto; min-height: 63px; padding: 11px 13px; }
  #aquariumPage .lake-toolbar h2 { font-size: 1.08rem; }
  #aquariumPage .icon-text-button { display: inline-flex; width: auto; min-width: 44px; height: 44px; padding: 0 10px; font-size: 0.62rem; }
  #aquariumPage .icon-text-button span { font-size: 1rem; }
  #aquariumPage .lake-surface { position: relative; inset: auto; width: 100%; height: 510px; min-height: 510px; background-position: 54% center; }
  #aquariumPage .swimming-fish { width: clamp(70px, 22vw, 88px); min-height: 64px; padding: 7px; }
  #aquariumPage .fish-label { bottom: -18px; max-width: 110px; }
  #aquariumPage .fish-label strong { max-width: 96px; font-size: 0.59rem; }
  .fish-reaction-bubble { max-width: 142px; padding: 6px 8px; font-size: 0.57rem; }
  .fish-reaction-bubble.is-top-row {
    top: 9px;
    bottom: auto;
    left: calc(100% - 1px);
    transform: none;
  }
  .fish-reaction-bubble.is-top-row::after {
    top: 13px;
    bottom: auto;
    left: -7px;
    border: 0;
    border-bottom: 1px solid rgba(77, 114, 119, 0.12);
    border-left: 1px solid rgba(77, 114, 119, 0.12);
  }
  .fish-reaction-bubble.is-top-row.is-side-left {
    right: calc(100% - 1px);
    left: auto;
  }
  .fish-reaction-bubble.is-top-row.is-side-left::after {
    right: -7px;
    left: auto;
    border: 0;
    border-top: 1px solid rgba(77, 114, 119, 0.12);
    border-right: 1px solid rgba(77, 114, 119, 0.12);
  }
  .aquarium-message-dock { padding: 11px; align-items: stretch; flex-direction: column; gap: 10px; }
  .aquarium-message-dock-copy small { display: none; }
  .aquarium-message-dock-actions { display: grid; width: 100%; grid-template-columns: 1fr 1fr; }
  .shared-bottles-button,
  .lake-message-button { width: 100%; min-height: 47px; }
  .lake-message-modal { width: calc(100% - 20px); }
  .lake-message-modal > article,
  .bottle-share-modal > article,
  .shared-bottles-modal > article { padding: 20px 16px; }
  .lake-message-categories { margin: 18px 0 13px; }
  .lake-message-categories button { min-height: 58px; font-size: 0.58rem; }
  .lake-message-panel { min-height: 260px; }
  .lake-message-options { grid-template-columns: 1fr; }
  .lake-message-options button { min-height: 58px; }
  .bottle-share-entry-grid { grid-template-columns: 1fr; }
  .bottle-share-entry-grid button { min-height: 82px; }
  .bottle-share-item { grid-template-columns: 38px minmax(0, 1fr); }
  .bottle-share-item > button { min-height: 42px; grid-column: 1 / -1; }
  #aquariumPage .lake-hint { padding: 2px 14px 13px; }

  .aquarium-study-dock {
    position: sticky;
    bottom: calc(var(--mobile-nav-height) + 16px + env(safe-area-inset-bottom));
    left: auto;
    width: calc(100% - 12px);
    min-height: 0;
    padding: 12px;
    margin: -116px auto 20px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    border-radius: 21px;
    transform: none;
  }

  .aquarium-study-icon { display: none; }
  .aquarium-stop-button { width: 100%; min-height: 43px; grid-column: 1 / -1; }
  .focus-complete-prompt { align-items: stretch; flex-direction: column; }

  .fish-drawer {
    position: fixed;
    z-index: 85;
    right: 10px;
    bottom: calc(var(--mobile-nav-height) + 16px + env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
    max-height: min(68dvh, 560px);
    padding: 18px;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
    border-radius: 24px;
  }

  .drawer-fish { width: 68px; }
  .drawer-name { font-size: 1.15rem; }
  .drawer-reaction-section,
  .mute-fish-button { grid-column: 1 / -1; }
  .drawer-reaction-buttons button { min-height: 42px; }
  .aquarium-intro-modal article { padding: 23px 18px; }
  .aquarium-intro-modal h2 { font-size: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  .fish-reaction-bubble,
  .status-choice {
    animation: none !important;
    transition: none !important;
  }
}

/* A link attachment is separate from the message body, so event information scans quickly. */
.link-attachment {
  padding: 17px 18px 18px;
  margin: 3px 0 5px;
  background: linear-gradient(135deg, rgba(232, 242, 239, 0.8), rgba(248, 246, 239, 0.92));
  border: 1px solid rgba(65, 105, 109, 0.14);
  border-radius: 19px;
}

.link-attachment legend {
  display: inline-flex;
  padding: 0 7px;
  align-items: center;
  gap: 6px;
  color: #365d64;
  font-size: 0.78rem;
  font-weight: 850;
}

.link-attachment legend i {
  color: #638a89;
  font-size: 1rem;
}

.link-attachment legend small {
  padding: 3px 7px;
  color: #788e91;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  font-size: 0.55rem;
}

.link-attachment > p {
  margin: -1px 0 13px;
  color: #6d8588;
  font-size: 0.68rem;
  line-height: 1.6;
}

.link-attachment-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 11px;
}

.link-attachment-grid label {
  margin: 0;
}

.link-attachment-grid label > span:first-child {
  font-size: 0.68rem;
}

/* Bottle hover summary: available to mouse and keyboard without blocking the bottle click. */
.bottle-hover-preview {
  position: absolute;
  z-index: 24;
  top: 50%;
  left: calc(100% + 14px);
  display: grid;
  width: min(286px, 35vw);
  padding: 15px 16px;
  gap: 7px;
  color: #385b62;
  background: rgba(253, 252, 248, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 17px 17px 17px 5px;
  box-shadow: 0 16px 40px rgba(35, 68, 74, 0.2);
  opacity: 0;
  text-align: left;
  transform: translate3d(8px, -50%, 0) rotate(var(--inverse-rotation));
  transition: opacity 170ms ease, transform 170ms ease;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(16px);
}

.bottle-hover-preview.opens-left {
  right: calc(100% + 14px);
  left: auto;
  border-radius: 17px 17px 5px 17px;
  transform: translate3d(-8px, -50%, 0) rotate(var(--inverse-rotation));
}

.floating-bottle:hover,
.floating-bottle:focus-visible {
  z-index: 23;
  animation-play-state: paused;
  outline: none;
}

.floating-bottle:hover .bottle-hover-preview,
.floating-bottle:focus-visible .bottle-hover-preview {
  opacity: 1;
  transform: translate3d(0, -50%, 0) rotate(var(--inverse-rotation));
  visibility: visible;
}

.bottle-hover-badges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.bottle-hover-badges > span {
  display: inline-flex;
  min-height: 22px;
  padding: 3px 7px;
  align-items: center;
  gap: 3px;
  color: #55747a;
  background: #e7f0ed;
  border-radius: 999px;
  font-size: 0.54rem;
  font-weight: 800;
}

.bottle-hover-badges > .has-link {
  color: #825f63;
  background: #f7e9e4;
}

.bottle-hover-preview > strong {
  color: #31555d;
  font-family: var(--font-display);
  font-size: 0.9rem;
  line-height: 1.45;
}

.bottle-hover-excerpt {
  display: -webkit-box;
  overflow: hidden;
  color: #617b80;
  font-size: 0.66rem;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.bottle-hover-preview > small {
  display: inline-flex;
  padding-top: 3px;
  align-items: center;
  gap: 4px;
  color: #7c9093;
  font-size: 0.57rem;
  font-weight: 700;
}

@media (max-width: 760px), (hover: none) {
  .link-attachment-grid {
    grid-template-columns: 1fr;
  }

  .bottle-hover-preview {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bottle-hover-preview {
    transition: none;
  }
}

/* Reply arrival: the plant is a lake signal, while the toolbar keeps the action easy to find. */
.lake-toolbar > .lake-toolbar-actions {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.reply-inbox-button {
  display: inline-flex;
  min-height: 50px;
  padding: 5px 12px 5px 7px;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #315b62;
  background: linear-gradient(135deg, rgba(247, 252, 249, 0.98), rgba(231, 242, 238, 0.96));
  border: 1px solid rgba(74, 113, 116, 0.14);
  border-radius: 17px;
  box-shadow: 0 8px 22px rgba(45, 79, 83, 0.1);
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.reply-inbox-button[hidden] {
  display: none;
}

.reply-inbox-button:hover,
.reply-inbox-button:focus-visible {
  border-color: rgba(77, 123, 124, 0.28);
  box-shadow: 0 11px 26px rgba(45, 79, 83, 0.15);
  transform: translateY(-1px);
}

.reply-inbox-button:focus-visible {
  outline: 3px solid rgba(78, 134, 133, 0.22);
  outline-offset: 3px;
}

.reply-inbox-plant {
  display: grid;
  width: 48px;
  height: 40px;
  flex: 0 0 48px;
  place-items: center;
  overflow: hidden;
}

.reply-inbox-plant img {
  display: block;
  width: 58px;
  max-width: none;
  height: auto;
}

.reply-inbox-copy {
  display: grid;
  min-width: 78px;
  gap: 1px;
  line-height: 1.15;
}

.reply-inbox-copy small {
  color: #769095;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.reply-inbox-copy strong {
  font-size: 0.75rem;
  font-weight: 850;
  white-space: nowrap;
}

.reply-inbox-button > .ph {
  color: #779195;
  font-size: 0.82rem;
}

.reply-lily {
  top: auto;
  right: 4.5%;
  bottom: 8%;
  width: clamp(132px, 13vw, 164px);
  min-height: 104px;
}

.reply-lily::before,
.reply-lily::after {
  animation-iteration-count: 2;
}

.reply-lily-art {
  animation-iteration-count: 2;
}

.reply-lily-label {
  right: 4%;
  bottom: 0;
  padding: 6px 9px;
  color: #315b62;
  background: rgba(251, 253, 249, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(47, 78, 82, 0.1);
  font-size: 0.61rem;
  text-shadow: none;
  white-space: nowrap;
}

/* Dedicated official/reference URL field and the primary link inside a bottle. */
.url-input-wrap {
  position: relative;
  display: block;
}

.url-input-wrap > i {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 15px;
  color: #769095;
  font-size: 1rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.composer-modal .url-input-wrap input {
  width: 100%;
  padding-left: 43px;
}

.post-badge.link {
  align-items: center;
  gap: 4px;
  color: #426e72;
  background: #e3f0ec;
}

.detail-external-link {
  margin: -6px 0 26px;
}

.post-primary-link {
  display: flex;
  min-height: 66px;
  padding: 11px 14px;
  align-items: center;
  gap: 12px;
  color: #315b62;
  background: linear-gradient(135deg, #e6f1ed, #f6f4eb);
  border: 1px solid rgba(65, 108, 112, 0.14);
  border-radius: 18px;
  box-shadow: 0 9px 24px rgba(45, 77, 81, 0.08);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.post-primary-link:hover,
.post-primary-link:focus-visible {
  color: #284f56;
  border-color: rgba(65, 108, 112, 0.28);
  box-shadow: 0 13px 30px rgba(45, 77, 81, 0.13);
  transform: translateY(-2px);
}

.post-primary-link:focus-visible {
  outline: 3px solid rgba(72, 127, 129, 0.2);
  outline-offset: 3px;
}

.post-primary-link-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  color: #4f8081;
  background: rgba(255, 255, 255, 0.76);
  border-radius: 13px;
  font-size: 1.1rem;
}

.post-primary-link-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 3px;
}

.post-primary-link-copy strong {
  font-size: 0.82rem;
}

.post-primary-link-copy small {
  overflow: hidden;
  color: #71878a;
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-primary-link > .ph {
  flex: 0 0 auto;
  color: #6a878a;
  font-size: 1rem;
}

@media (max-width: 760px) {
  #appView[data-active-page="aquarium"] #aquariumPage .lake-toolbar {
    align-items: center;
    gap: 8px;
  }

  .lake-toolbar > .lake-toolbar-actions {
    flex: 0 0 auto;
    gap: 6px;
  }

  .reply-inbox-button {
    min-height: 44px;
    padding: 4px 8px 4px 4px;
    gap: 5px;
    border-radius: 14px;
  }

  .reply-inbox-plant {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .reply-inbox-plant img {
    width: 45px;
  }

  .reply-inbox-copy {
    min-width: 0;
  }

  .reply-inbox-copy small,
  .reply-inbox-button > .ph {
    display: none;
  }

  .reply-inbox-copy strong {
    font-size: 0.66rem;
  }

  .reply-lily {
    top: auto;
    right: 2%;
    bottom: 5%;
    width: 112px;
    min-height: 88px;
  }

  .reply-lily-count {
    top: 8%;
    right: 7%;
  }

  .reply-lily-label {
    right: 0;
    bottom: -2px;
    padding: 5px 7px;
    font-size: 0.53rem;
  }

  .post-primary-link {
    min-height: 62px;
    padding: 10px 12px;
    border-radius: 16px;
  }
}

@media (max-width: 390px) {
  .reply-inbox-plant {
    display: none;
  }

  .reply-inbox-button {
    padding-inline: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reply-inbox-button,
  .post-primary-link {
    transition: none;
  }
}

@media (max-width: 430px) {
  .onboarding-shell { padding: 18px 12px; }
  .onboarding-card { padding: 25px 18px; border-radius: 23px; }
  .fish-choice { min-height: 88px; }
  .page-intro h1 { font-size: 2.25rem; }
  .study-timer { font-size: 1.35rem; }
  .lake-surface { min-height: 390px; }
  .stat-row > div { padding: 0 8px; }
  .stat-row span { font-size: 0.62rem; }
  .modal { width: calc(100% - 18px); max-height: calc(100vh - 18px); border-radius: 23px; }
  .modal > form,
  .modal > article { padding: 22px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .swimming-fish {
    left: var(--static-left, 25%);
  }
}

/* ============================================================
   2026 Aquarium redesign — selected direction 3
   ============================================================ */

:root {
  --ink: #294a53;
  --ink-soft: #627b80;
  --lake: #75aeb0;
  --lake-dark: #315e68;
  --lake-pale: #e8f2f1;
  --foam: #fbfaf7;
  --coral: #d98f8f;
  --coral-dark: #a86669;
  --lilac: #9891b5;
  --yellow: #d8bb78;
  --line: rgba(54, 91, 99, 0.16);
  --shadow: 0 24px 64px rgba(38, 70, 76, 0.16);
  --shadow-small: 0 10px 30px rgba(43, 76, 83, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --content: 1180px;
  font-family: var(--font-body);
}

body {
  color: var(--ink);
  background: #f5f3ee;
  font-family: var(--font-body);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.015em;
}

.ambient {
  display: none;
}

.eyebrow {
  color: #50757c;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.brand {
  color: #33535b;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.brand-mark,
.brand-large .brand-mark {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: cover;
  background: #f8f4f1;
  border: 1px solid rgba(61, 92, 99, 0.15);
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(45, 73, 79, 0.12);
}

.brand-large {
  font-size: 1.55rem;
}

.button {
  min-height: 46px;
  padding: 11px 19px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.button-primary,
.button-coral {
  color: #fffdfb;
  background: #bf7c7d;
  border-color: #bf7c7d;
  box-shadow: 0 10px 24px rgba(147, 86, 88, 0.2);
}

.button-primary:hover,
.button-coral:hover {
  background: #aa6d70;
  border-color: #aa6d70;
}

input,
select,
textarea {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(55, 91, 98, 0.18);
  border-radius: 14px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #628e95;
  box-shadow: 0 0 0 4px rgba(91, 139, 146, 0.13);
}

/* Login and onboarding */
.auth-shell {
  grid-template-columns: minmax(0, 1.15fr) minmax(390px, 0.85fr);
  background: #f4f0eb;
}

.welcome-panel {
  isolation: isolate;
  min-height: 100dvh;
  overflow: hidden;
  color: #294b54;
  background: url("./assets/aquarium-background.png") center / cover no-repeat;
}

.welcome-panel::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: rgba(238, 246, 244, 0.38);
  backdrop-filter: saturate(0.82);
}

.welcome-copy {
  max-width: 570px;
  padding: 36px 0 14px;
}

.welcome-copy h1 {
  max-width: 560px;
  color: #284b54;
  font-size: clamp(3rem, 6vw, 6.4rem);
  line-height: 1.12;
  text-shadow: 0 2px 20px rgba(250, 252, 248, 0.65);
}

.welcome-copy > p:last-child {
  max-width: 520px;
  color: #49666d;
  font-size: 1rem;
}

.mini-lake {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(244, 250, 248, 0.32);
  backdrop-filter: blur(5px);
}

.mini-fish {
  width: 78px;
  height: auto;
  object-fit: contain;
}

.fish-a { filter: hue-rotate(0deg) saturate(0.9); }
.fish-b { filter: hue-rotate(155deg) saturate(0.62); }
.fish-c { filter: hue-rotate(62deg) saturate(0.56); }

.welcome-points {
  color: #48656d;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 18px;
  backdrop-filter: blur(10px);
}

.auth-panel {
  background: #f8f5f1;
}

.auth-card,
.onboarding-card {
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(63, 93, 99, 0.11);
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(45, 73, 79, 0.12);
  backdrop-filter: blur(18px);
}

.auth-card h2,
.onboarding-card h1 {
  color: #31535b;
  font-size: clamp(2rem, 4vw, 3rem);
}

.segmented {
  padding: 5px;
  background: #ebecea;
  border-radius: 999px;
}

.segment {
  border-radius: 999px;
}

.segment.active {
  color: #355f67;
  background: #fff;
  box-shadow: 0 5px 16px rgba(42, 76, 82, 0.09);
}

.fish-preview {
  width: 72px;
  height: 44px;
  object-fit: contain;
}

.fish-coral { filter: hue-rotate(0deg) saturate(0.9); }
.fish-aqua { filter: hue-rotate(150deg) saturate(0.55) brightness(0.9); }
.fish-lemon { filter: hue-rotate(54deg) saturate(0.62) brightness(1.05); }
.fish-lilac { filter: hue-rotate(230deg) saturate(0.5); }
.fish-mint { filter: hue-rotate(115deg) saturate(0.45) brightness(0.98); }
.fish-peach { filter: hue-rotate(345deg) saturate(0.62) brightness(1.05); }

/* Desktop app frame */
.app-shell {
  min-height: 100dvh;
  background: #f4f1ec;
}

.app-header {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  display: flex;
  width: 112px;
  height: 100dvh;
  padding: 24px 14px 20px;
  flex-direction: column;
  grid-template-columns: none;
  background: rgba(249, 247, 242, 0.93);
  border: 0;
  border-right: 1px solid rgba(48, 78, 84, 0.12);
  box-shadow: 6px 0 30px rgba(39, 68, 73, 0.05);
  backdrop-filter: blur(20px);
}

.app-header .brand {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-align: center;
}

.app-header .brand-mark {
  width: 60px;
  height: 60px;
  border-radius: 20px;
}

.desktop-nav {
  display: flex;
  width: 100%;
  margin-top: 52px;
  flex-direction: column;
  align-items: stretch;
  gap: 13px;
}

.nav-link {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 66px;
  padding: 9px 5px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #77898c;
  border-radius: 18px;
  font-size: 0.67rem;
  line-height: 1.2;
}

.nav-link i {
  font-size: 1.65rem;
}

.nav-link.active {
  color: #3d6a72;
  background: #e5efed;
  box-shadow: inset 0 0 0 1px rgba(64, 105, 111, 0.08);
}

.header-actions {
  width: 100%;
  margin-top: auto;
  justify-content: center;
}

.user-fish-button {
  width: 62px;
  height: 62px;
  padding: 8px;
  overflow: hidden;
  background: #f1ebe6;
  border-color: rgba(60, 94, 101, 0.13);
  box-shadow: 0 9px 24px rgba(46, 76, 82, 0.12);
}

.user-fish-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.page-container {
  width: auto;
  min-height: 100dvh;
  padding: 0;
  margin: 0 0 0 112px;
}

.page:not(#aquariumPage) {
  width: min(calc(100% - 72px), var(--content));
  padding: 58px 0 110px;
  margin: 0 auto;
}

/* Immersive aquarium */
#aquariumPage {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 660px;
  overflow: hidden;
}

.aquarium-intro {
  position: absolute;
  z-index: 12;
  top: 42px;
  left: clamp(28px, 4vw, 68px);
  display: block;
  max-width: 620px;
  margin: 0;
  pointer-events: none;
}

.aquarium-intro h1 {
  margin-bottom: 7px;
  color: #284b54;
  font-size: clamp(2.15rem, 4vw, 4.2rem);
  line-height: 1.18;
  text-shadow: 0 2px 22px rgba(247, 251, 248, 0.72);
}

.aquarium-intro > div:first-child > p:last-child {
  color: #557079;
  font-size: clamp(0.84rem, 1.2vw, 1rem);
  text-shadow: 0 1px 12px rgba(247, 251, 248, 0.85);
}

.now-studying-badge {
  position: absolute;
  top: 4px;
  left: calc(100% + 32px);
  width: max-content;
  color: #3a6870;
  background: rgba(253, 253, 249, 0.68);
  border-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  pointer-events: auto;
}

.study-controller {
  position: absolute;
  z-index: 14;
  bottom: 34px;
  left: 50%;
  display: grid;
  width: min(790px, calc(100% - 72px));
  min-height: 96px;
  padding: 17px 18px;
  margin: 0;
  grid-template-columns: auto minmax(300px, 1fr);
  gap: 18px;
  background: rgba(254, 253, 249, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  box-shadow: 0 22px 56px rgba(37, 68, 74, 0.2);
  backdrop-filter: blur(20px);
  transform: translateX(-50%);
}

.controller-copy {
  min-width: 215px;
}

.controller-icon {
  width: 50px;
  height: 50px;
  color: #456f76;
  background: #e2edeb;
  border-radius: 17px;
}

.controller-icon i {
  font-size: 1.4rem;
}

.study-start-controls {
  grid-template-columns: minmax(170px, 1fr) auto;
  align-items: center;
}

.study-start-controls input {
  min-height: 52px;
  background: rgba(255, 255, 255, 0.84);
}

.study-start-controls .button {
  min-height: 52px;
}

.lake-card {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  background: #b7d7da;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.lake-toolbar {
  position: absolute;
  z-index: 11;
  top: 36px;
  right: 38px;
  padding: 0;
}

.lake-toolbar > div {
  display: none;
}

.icon-text-button {
  min-height: 44px;
  padding: 9px 14px;
  color: #456971;
  background: rgba(253, 253, 250, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.lake-surface {
  position: absolute;
  inset: 0;
  min-height: 100%;
  background: #acd1d4 url("./assets/aquarium-background.png") center / cover no-repeat;
  border: 0;
}

.fish-layer,
.bottle-layer {
  z-index: 4;
}

.bottle-layer {
  z-index: 5;
}

.swimming-fish {
  left: -150px;
  width: clamp(94px, 10vw, 148px);
  padding: 10px;
}

.swimming-fish .fish-asset {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 12px rgba(38, 73, 80, 0.18)) var(--fish-filter);
  transition: transform 180ms ease;
}

.swimming-fish:hover .fish-asset {
  transform: scale(1.08);
}

.fish-label {
  bottom: -2px;
  color: #426269;
  background: rgba(254, 253, 249, 0.78);
  box-shadow: 0 5px 14px rgba(42, 72, 77, 0.08);
  backdrop-filter: blur(7px);
}

@keyframes swim-across {
  0% { left: -170px; transform: translateY(0); }
  25% { transform: translateY(-10px); }
  50% { transform: translateY(6px); }
  75% { transform: translateY(-7px); }
  100% { left: calc(100% + 30px); transform: translateY(0); }
}

.floating-bottle {
  width: clamp(58px, 6vw, 88px);
  height: clamp(76px, 8vw, 116px);
  padding: 0;
  background: transparent url("./assets/message-bottle.png") center / contain no-repeat;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 0;
  filter: drop-shadow(0 12px 12px rgba(40, 71, 77, 0.16));
}

.floating-bottle.reply-bottle {
  filter: hue-rotate(142deg) saturate(0.65) drop-shadow(0 12px 12px rgba(40, 71, 77, 0.17));
}

.floating-bottle::after {
  position: absolute;
  right: -8px;
  bottom: -2px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: white;
  background: #bc7c7d;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  content: "";
  box-shadow: 0 5px 13px rgba(69, 72, 77, 0.18);
}

.floating-bottle.reply-bottle::after {
  background: #658b96;
}

.lake-empty {
  color: #496d75;
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.86);
}

.lake-empty span {
  display: none;
}

.lake-hint {
  position: absolute;
  z-index: 8;
  right: 38px;
  bottom: 18px;
  max-width: 300px;
  padding: 7px 12px;
  color: rgba(48, 81, 88, 0.72);
  background: rgba(255, 255, 255, 0.44);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.fish-drawer {
  right: 28px;
  bottom: 132px;
  grid-template-columns: 110px 1fr;
  background: rgba(254, 253, 249, 0.9);
  border-color: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
}

.drawer-fish {
  width: 104px;
  height: auto;
  object-fit: contain;
}

/* Community and profile pages */
.board-intro h1,
.profile-intro h1 {
  color: #31535b;
  font-size: clamp(2.6rem, 5vw, 4.8rem);
}

.category-filters {
  padding: 7px;
  background: #ebecea;
  border-radius: 999px;
}

.category-chip {
  border-radius: 999px;
}

.category-chip.active {
  color: #355f67;
  background: #fff;
  box-shadow: 0 5px 15px rgba(44, 75, 81, 0.08);
}

.post-grid {
  gap: 20px;
}

.post-card,
.profile-card,
.history-card,
.empty-card {
  border-color: rgba(63, 93, 99, 0.11);
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(43, 73, 79, 0.08);
}

.post-card {
  overflow: hidden;
  background: #fff;
}

.post-card::before {
  height: 5px;
}

.post-card h2 {
  color: #31545c;
  font-size: 1.25rem;
}

.post-reactions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reply-summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #6c8388;
  font-size: 0.75rem;
  font-weight: 700;
}

.my-fish {
  width: 132px;
  height: 88px;
  object-fit: contain;
}

/* Dialogs and reply thread */
.modal {
  width: min(calc(100% - 32px), 720px);
  background: #fcfbf8;
  border-radius: 26px;
}

.post-modal {
  width: min(calc(100% - 32px), 840px);
}

.modal::backdrop {
  background: rgba(31, 54, 58, 0.48);
  backdrop-filter: blur(8px);
}

.modal-close,
.drawer-close {
  color: #60787d;
  background: #eaf0ee;
}

.reply-section {
  padding-top: 26px;
  margin-top: 26px;
  border-top: 1px solid rgba(58, 90, 96, 0.13);
}

.reply-section-heading {
  display: flex;
  margin-bottom: 16px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.reply-section-heading h3 {
  margin: 0;
  color: #365861;
  font-size: 1.45rem;
}

.reply-count {
  color: #678086;
  font-size: 0.78rem;
  font-weight: 700;
}

.reply-list {
  display: grid;
  gap: 10px;
}

.reply-item {
  padding: 15px 17px;
  background: #f0f4f2;
  border-radius: 16px;
}

.reply-item p {
  margin-bottom: 7px;
  color: #385960;
  white-space: pre-wrap;
}

.reply-item footer {
  color: #74898d;
  font-size: 0.72rem;
}

.reply-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reply-item-actions,
.reply-edit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.reply-action-button {
  display: inline-flex;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(96, 126, 132, 0.2);
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #58767c;
  background: rgba(255, 255, 255, 0.7);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.reply-action-button:hover {
  border-color: rgba(76, 116, 123, 0.38);
  background: #fff;
  transform: translateY(-1px);
}

.reply-action-button.danger {
  color: #a46162;
}

.reply-action-button.save {
  border-color: #789ba1;
  color: #fff;
  background: #789ba1;
}

.reply-action-button.cancel {
  background: transparent;
}

.reply-edit-form {
  display: grid;
  gap: 10px;
}

.reply-edit-form textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px 14px;
  border: 1px solid rgba(91, 126, 133, 0.26);
  border-radius: 13px;
  color: #385960;
  background: rgba(255, 255, 255, 0.86);
  font: inherit;
  line-height: 1.75;
  resize: vertical;
}

.reply-edit-form textarea:focus {
  border-color: #789ba1;
  outline: 3px solid rgba(120, 155, 161, 0.16);
}

.reply-empty {
  padding: 20px;
  color: #70868a;
  background: #f3f4f1;
  border-radius: 16px;
  font-size: 0.82rem;
  text-align: center;
}

.reply-form {
  display: grid;
  padding-top: 20px;
  gap: 9px;
}

.reply-form > label {
  color: #3b5e66;
  font-size: 0.84rem;
  font-weight: 700;
}

.reply-compose-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 10px;
}

.reply-compose-row textarea {
  min-height: 92px;
  resize: vertical;
}

.reply-delivery-note {
  display: flex;
  margin: 0;
  align-items: center;
  gap: 6px;
  color: #648087;
  font-size: 0.74rem;
}

.compact-fish-picker img {
  width: 46px;
  height: 32px;
  object-fit: contain;
}

/* Tablet and mobile */
@media (max-width: 880px) {
  .app-header {
    top: 0;
    right: 0;
    bottom: auto;
    display: flex;
    width: 100%;
    height: 76px;
    padding: 10px 18px;
    flex-direction: row;
    justify-content: space-between;
    border-right: 0;
    border-bottom: 1px solid rgba(48, 78, 84, 0.11);
  }

  .app-header .brand {
    flex-direction: row;
    font-size: 1rem;
  }

  .app-header .brand-mark {
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }

  .desktop-nav {
    display: none;
  }

  .header-actions {
    width: auto;
    margin-top: 0;
  }

  .user-fish-button {
    width: 48px;
    height: 48px;
  }

  .page-container {
    margin-left: 0;
  }

  #aquariumPage {
    height: 100dvh;
    min-height: 700px;
    padding-top: 76px;
  }

  .lake-card,
  .lake-surface {
    top: 76px;
  }

  .aquarium-intro {
    top: 104px;
    left: 24px;
    max-width: calc(100% - 48px);
  }

  .aquarium-intro h1 {
    font-size: clamp(1.9rem, 7vw, 3.2rem);
  }

  .now-studying-badge {
    position: static;
    display: inline-flex;
    margin-top: 15px;
  }

  .lake-toolbar {
    top: 96px;
    right: 18px;
  }

  .icon-text-button {
    font-size: 0;
  }

  .icon-text-button span {
    font-size: 1.15rem;
  }

  .study-controller {
    bottom: 92px;
    width: calc(100% - 30px);
    min-height: 0;
    padding: 14px;
    grid-template-columns: 1fr;
    gap: 12px;
    border-radius: 24px;
  }

  .controller-copy {
    min-width: 0;
  }

  .controller-copy p {
    display: none;
  }

  .study-start-controls {
    grid-template-columns: 1fr;
  }

  .study-start-controls .button,
  .study-start-controls input {
    min-height: 48px;
  }

  .study-running-controls {
    align-items: stretch;
  }

  .lake-hint {
    display: none;
  }

  .mobile-nav {
    z-index: 45;
    display: grid;
    height: 72px;
    padding: 6px max(12px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    background: rgba(249, 247, 242, 0.94);
    border-top-color: rgba(48, 78, 84, 0.1);
    backdrop-filter: blur(20px);
  }

  .mobile-nav-link {
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1px;
    border-radius: 16px;
    font-size: 0.66rem;
  }

  .mobile-nav-link i {
    font-size: 1.4rem;
  }

  .mobile-nav-link.active {
    color: #3f6870;
    background: #e4eeec;
  }

  .page:not(#aquariumPage) {
    width: min(calc(100% - 36px), var(--content));
    padding: 110px 0 104px;
  }

  .fish-drawer {
    right: 15px;
    bottom: 186px;
    width: calc(100% - 30px);
  }
}

@media (max-width: 620px) {
  .auth-shell {
    display: block;
  }

  .welcome-panel {
    min-height: 390px;
    padding: 24px 22px 36px;
    background-position: center bottom;
  }

  .welcome-copy {
    padding-top: 34px;
  }

  .welcome-copy h1 {
    font-size: clamp(2.7rem, 14vw, 4.3rem);
  }

  .welcome-copy > p:last-child,
  .welcome-points,
  .mini-lake {
    display: none;
  }

  .auth-panel {
    min-height: auto;
    padding: 22px 16px 42px;
  }

  .auth-card,
  .onboarding-card {
    padding: 26px 20px;
    border-radius: 24px;
  }

  .brand-word {
    display: inline;
  }

  .aquarium-intro {
    top: 96px;
    left: 18px;
    max-width: calc(100% - 36px);
  }

  .aquarium-intro .eyebrow,
  .aquarium-intro > div:first-child > p:last-child {
    display: none;
  }

  .aquarium-intro h1 {
    margin-bottom: 0;
    font-size: 1.8rem;
  }

  .now-studying-badge {
    margin-top: 10px;
    padding: 7px 12px;
  }

  .study-controller {
    bottom: 82px;
    width: calc(100% - 20px);
  }

  .controller-icon {
    width: 42px;
    height: 42px;
  }

  .controller-copy h2 {
    font-family: var(--font-body);
    font-size: 0.95rem;
  }

  .swimming-fish {
    width: 92px;
  }

  .floating-bottle {
    width: 62px;
    height: 82px;
  }

  .fish-drawer {
    grid-template-columns: 86px 1fr;
    padding: 19px;
  }

  .drawer-fish {
    width: 82px;
  }

  .page-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .board-intro h1,
  .profile-intro h1 {
    font-size: 2.7rem;
  }

  .category-filters {
    overflow-x: auto;
    border-radius: 17px;
  }

  .reply-compose-row {
    grid-template-columns: 1fr;
  }

  .reply-compose-row .button {
    width: 100%;
  }

  .post-modal > article {
    padding: 24px 18px;
  }
}

/* ============================================================
   Login — direction 1: quiet aquarium glass
   ============================================================ */

.auth-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100dvh;
  overflow: hidden;
  grid-template-columns: minmax(0, 58%) minmax(430px, 42%);
  background: #badadd url("./assets/aquarium-background.png") center / cover no-repeat;
}

.auth-shell::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: rgba(231, 244, 243, 0.2);
}

.welcome-panel {
  position: relative;
  display: flex;
  min-height: 100dvh;
  padding: clamp(42px, 5vw, 76px) clamp(42px, 6vw, 92px);
  overflow: hidden;
  flex-direction: column;
  color: #294d56;
  background: transparent;
}

.welcome-panel::before {
  display: none;
}

.welcome-panel .brand-large {
  position: relative;
  z-index: 3;
  width: max-content;
  gap: 15px;
  color: #31555e;
  font-size: 1.42rem;
  letter-spacing: 0.13em;
}

.welcome-panel .brand-large .brand-mark {
  width: 58px;
  height: 58px;
  background: rgba(250, 247, 244, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 19px;
  box-shadow: 0 14px 34px rgba(43, 77, 83, 0.13);
}

.welcome-copy {
  position: relative;
  z-index: 3;
  max-width: 720px;
  padding: 0;
  margin: clamp(100px, 14vh, 150px) 0 0;
}

.welcome-copy .eyebrow {
  display: none;
}

.welcome-copy h1 {
  max-width: 720px;
  margin-bottom: 28px;
  color: #2b5059;
  font-family: var(--font-display);
  font-size: clamp(3.35rem, 5.2vw, 5.25rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.05em;
  text-wrap: balance;
  text-shadow: 0 2px 22px rgba(245, 250, 247, 0.78);
}

.welcome-copy > p:last-child {
  max-width: 560px;
  color: #4c6c74;
  font-size: clamp(0.96rem, 1.25vw, 1.12rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 16px rgba(250, 252, 249, 0.86);
}

.welcome-points {
  display: none;
}

.mini-lake {
  position: absolute;
  z-index: 2;
  top: 57%;
  right: auto;
  bottom: auto;
  left: 11%;
  display: block;
  width: 72%;
  height: 31%;
  opacity: 0.9;
  pointer-events: none;
  background: transparent;
  border: 0;
  backdrop-filter: none;
}

.mini-lake .water-line {
  display: none;
}

.mini-lake .mini-fish {
  position: absolute;
  display: block;
  width: clamp(70px, 7vw, 104px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(35, 75, 82, 0.16));
  animation: auth-fish-drift 7.5s ease-in-out infinite alternate;
}

.mini-lake .fish-a {
  top: 2%;
  right: 7%;
  filter: hue-rotate(145deg) saturate(0.54) brightness(0.92) drop-shadow(0 12px 18px rgba(35, 75, 82, 0.16));
}

.mini-lake .fish-b {
  top: 50%;
  right: 38%;
  width: clamp(64px, 6.2vw, 92px);
  filter: hue-rotate(340deg) saturate(0.72) brightness(1.05) drop-shadow(0 12px 18px rgba(35, 75, 82, 0.16));
  animation-delay: -2.4s;
}

.mini-lake .fish-c {
  top: 12%;
  right: 65%;
  width: clamp(58px, 5.5vw, 82px);
  filter: hue-rotate(55deg) saturate(0.48) brightness(1.06) drop-shadow(0 12px 18px rgba(35, 75, 82, 0.16));
  animation-delay: -4.8s;
}

.mini-lake .mini-bubble {
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.28);
}

@keyframes auth-fish-drift {
  from { transform: translate3d(-8px, 4px, 0) rotate(-1deg); }
  to { transform: translate3d(18px, -10px, 0) rotate(1deg); }
}

.auth-panel {
  position: relative;
  z-index: 4;
  display: grid;
  min-height: 100dvh;
  padding: clamp(54px, 7vh, 82px) clamp(42px, 5vw, 76px);
  place-items: center;
  background: rgba(239, 247, 245, 0.66);
  border-left: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 108px 0 0 108px / 148px 0 0 148px;
  box-shadow: -20px 0 60px rgba(51, 86, 92, 0.08);
  backdrop-filter: blur(18px) saturate(0.82);
}

.auth-card {
  width: min(100%, 470px);
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.auth-card h2 {
  margin-bottom: 10px;
  color: #345760;
  font-size: clamp(2.45rem, 3.6vw, 3.35rem);
  font-weight: 500;
  letter-spacing: 0.07em;
}

.auth-card > .subtle {
  margin-bottom: 0;
  color: #687f84;
  font-size: 0.88rem;
}

.auth-card .segmented {
  padding: 5px;
  margin: 34px 0 28px;
  background: rgba(219, 232, 230, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 999px;
}

.auth-card .segment {
  min-height: 45px;
  border-radius: 999px;
  color: #6c858a;
  font-size: 0.88rem;
}

.auth-card .segment.active {
  color: #3d626a;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 18px rgba(48, 81, 87, 0.09);
}

.auth-card .auth-form {
  gap: 19px;
}

.auth-card label {
  gap: 9px;
  color: #48666d;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.auth-input-wrap {
  position: relative;
  display: block;
  color: #789095;
}

.auth-input-wrap > i {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 20px;
  font-size: 1.16rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.auth-input-wrap input {
  min-height: 62px;
  padding: 16px 54px 16px 52px;
  color: #385b63;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(80, 120, 126, 0.13);
  border-radius: 17px;
  box-shadow: 0 8px 24px rgba(54, 88, 94, 0.06);
}

.auth-input-wrap input:focus {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(79, 123, 130, 0.5);
  box-shadow: 0 0 0 4px rgba(100, 151, 156, 0.12), 0 10px 28px rgba(54, 88, 94, 0.07);
}

.password-toggle {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 11px;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  cursor: pointer;
  place-items: center;
  color: #748c91;
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: 1.1rem;
  transform: translateY(-50%);
}

.password-toggle:hover {
  color: #446970;
  background: rgba(225, 237, 235, 0.7);
}

.auth-card .button-wide {
  min-height: 58px;
  margin-top: 4px;
  color: #fffdfb;
  background: #c9827d;
  border-color: #c9827d;
  border-radius: 17px;
  box-shadow: 0 14px 28px rgba(154, 90, 86, 0.2);
  font-size: 0.94rem;
}

.auth-card .button-wide:hover {
  background: #b87370;
  border-color: #b87370;
  transform: translateY(-1px);
}

.auth-card .auth-note {
  margin: 24px 0 0;
  color: #70868a;
  font-size: 0.7rem;
  line-height: 1.8;
  text-align: center;
}

.auth-card .check-row {
  grid-template-columns: 19px 1fr;
  align-items: start;
  gap: 10px;
  color: #607a7f;
  font-size: 0.74rem;
  line-height: 1.65;
}

.auth-card .check-row input {
  width: 18px;
  height: 18px;
  padding: 0;
  margin-top: 2px;
  accent-color: #6f999a;
}

@media (max-width: 1080px) {
  .auth-shell {
    grid-template-columns: minmax(0, 52%) minmax(430px, 48%);
  }

  .welcome-panel {
    padding-right: 42px;
  }

  .welcome-copy h1 {
    font-size: clamp(3rem, 5.4vw, 4.4rem);
  }

  .auth-panel {
    padding-right: 42px;
    padding-left: 54px;
    border-radius: 82px 0 0 82px / 120px 0 0 120px;
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: 0;
  }

  .auth-shell {
    display: block;
    min-height: 100dvh;
    overflow: visible;
    background-position: 42% center;
  }

  .welcome-panel {
    display: flex;
    min-height: 340px;
    padding: 24px 22px 48px;
    background: transparent;
  }

  .welcome-panel .brand-large {
    gap: 10px;
    font-size: 1.08rem;
  }

  .welcome-panel .brand-large .brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .welcome-copy {
    margin: 55px 0 0;
  }

  .welcome-copy h1 {
    max-width: 460px;
    margin-bottom: 17px;
    font-size: clamp(2.45rem, 11vw, 3.8rem);
    line-height: 1.22;
  }

  .welcome-copy > p:last-child {
    display: block;
    max-width: 390px;
    font-size: 0.84rem;
  }

  .mini-lake {
    display: none;
  }

  .auth-panel {
    min-height: calc(100dvh - 300px);
    padding: 38px 22px max(42px, env(safe-area-inset-bottom));
    background: rgba(242, 248, 246, 0.88);
    border-top: 1px solid rgba(255, 255, 255, 0.76);
    border-left: 0;
    border-radius: 44px 44px 0 0;
    box-shadow: 0 -18px 42px rgba(49, 83, 88, 0.08);
    backdrop-filter: blur(18px);
  }

  .auth-card {
    width: min(100%, 500px);
  }

  .auth-card h2 {
    font-size: clamp(2.2rem, 10vw, 3rem);
  }

  .mobile-brand {
    display: none;
  }
}

@media (max-width: 430px) {
  .welcome-panel {
    min-height: 308px;
  }

  .welcome-copy {
    margin-top: 40px;
  }

  .welcome-copy h1 {
    font-size: clamp(2.25rem, 11vw, 3rem);
  }

  .welcome-copy > p:last-child {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
  }

  .auth-panel {
    padding: 32px 18px 38px;
  }

  .auth-input-wrap input {
    min-height: 58px;
  }
}

/* 2026-08 home-first experience and calmer aquarium motion */
.desktop-nav {
  margin-top: 34px;
  gap: 8px;
}

.nav-link {
  min-height: 60px;
  font-size: 0.65rem;
}

.nav-label {
  max-width: 100%;
  text-align: center;
  white-space: nowrap;
}

.home-page {
  display: grid;
  gap: 22px;
}

.home-welcome {
  display: flex;
  min-height: 218px;
  padding: clamp(28px, 4vw, 44px);
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  background: #fbfaf7;
  border: 1px solid rgba(58, 89, 95, 0.1);
  border-radius: 30px;
  box-shadow: 0 16px 44px rgba(45, 72, 77, 0.08);
}

.home-welcome-copy {
  max-width: 760px;
}

.home-welcome h1 {
  margin-bottom: 12px;
  color: #2d5059;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.1vw, 4.25rem);
  font-weight: 500;
  line-height: 1.2;
  text-wrap: balance;
}

.home-welcome-copy > p:last-child {
  margin-bottom: 0;
  color: #60777c;
  font-size: 0.95rem;
}

.home-community-status {
  display: flex;
  min-width: 174px;
  padding: 16px 19px;
  align-items: center;
  gap: 11px;
  color: #4c6e74;
  background: #eef4f2;
  border: 1px solid rgba(62, 100, 105, 0.1);
  border-radius: 20px;
}

.home-community-status > div {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.home-community-status strong {
  color: #315a62;
  font-size: 1.45rem;
}

.home-community-status span:last-child {
  font-size: 0.77rem;
  font-weight: 700;
}

.study-controller.home-study-controller {
  position: relative;
  inset: auto;
  left: auto;
  width: 100%;
  min-height: 108px;
  padding: 22px 24px;
  margin: 0;
  grid-template-columns: auto minmax(300px, 1fr);
  gap: 24px;
  background: #ffffff;
  border: 1px solid rgba(58, 89, 95, 0.11);
  border-radius: 25px;
  box-shadow: 0 12px 36px rgba(44, 74, 80, 0.08);
  transform: none;
}

.home-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(290px, 0.7fr);
  gap: 22px;
}

.home-aquarium-card,
.home-message-card,
.home-progress-card {
  overflow: hidden;
  border: 1px solid rgba(58, 89, 95, 0.1);
  border-radius: 26px;
  box-shadow: 0 14px 38px rgba(44, 73, 79, 0.08);
}

.home-aquarium-card {
  display: flex;
  min-height: 472px;
  padding: 32px;
  grid-row: span 2;
  align-items: flex-end;
  background: #a9cfd3 url("./assets/aquarium-background.png") center / cover no-repeat;
}

.home-aquarium-card > div {
  max-width: 440px;
  padding: 24px 25px;
  color: #375b63;
  background: rgba(253, 251, 247, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 21px;
  box-shadow: 0 14px 34px rgba(35, 65, 72, 0.15);
  backdrop-filter: blur(12px);
}

.home-aquarium-card h2,
.home-message-card h2,
.home-progress-card h2 {
  margin-bottom: 8px;
  color: #31545c;
  font-family: var(--font-display);
  font-weight: 600;
}

.home-aquarium-card h2 {
  font-size: clamp(1.65rem, 2.6vw, 2.3rem);
}

.home-aquarium-card p:not(.eyebrow) {
  color: #5d747a;
  font-size: 0.88rem;
}

.home-aquarium-card .button {
  margin-top: 4px;
}

.home-message-card,
.home-progress-card {
  min-height: 225px;
  padding: 26px;
  background: #fff;
}

.home-message-card {
  position: relative;
  display: grid;
  padding-right: 100px;
}

.home-message-card > img {
  position: absolute;
  right: 17px;
  bottom: 16px;
  width: 82px;
  height: 112px;
  object-fit: contain;
  opacity: 0.86;
  transform: rotate(7deg);
}

.home-message-card h2,
.home-progress-card h2 {
  font-size: 1.28rem;
}

.home-latest-title {
  margin: 17px 0 4px;
  color: #3d5f66;
  font-size: 0.91rem;
  font-weight: 700;
  line-height: 1.55;
}

.home-latest-meta {
  margin-bottom: 10px;
  color: #7b8c90;
  font-size: 0.72rem;
}

.home-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.home-card-heading > i {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #4d7279;
  background: #e8f0ee;
  border-radius: 14px;
  font-size: 1.2rem;
}

.home-progress-values {
  display: grid;
  margin: 18px 0 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.home-progress-values > div {
  display: grid;
  gap: 1px;
}

.home-progress-values strong {
  color: #315961;
  font-size: 1.12rem;
  font-variant-numeric: tabular-nums;
}

.home-progress-values span {
  color: #7b8e92;
  font-size: 0.64rem;
}

.aquarium-intro {
  top: 30px;
  left: clamp(24px, 3vw, 46px);
  display: flex;
  max-width: min(680px, calc(100% - 190px));
  padding: 19px 21px;
  align-items: center;
  gap: 22px;
  background: rgba(253, 251, 247, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(38, 69, 75, 0.13);
  backdrop-filter: blur(14px);
}

.aquarium-intro h1 {
  margin-bottom: 4px;
  font-size: clamp(1.75rem, 2.7vw, 2.8rem);
  text-shadow: none;
}

.aquarium-intro > div:first-child > p:last-child {
  margin-bottom: 0;
  color: #59747a;
  text-shadow: none;
}

.aquarium-intro .now-studying-badge {
  position: static;
  flex: 0 0 auto;
  background: #f8f7f2;
  border-color: rgba(61, 99, 105, 0.12);
  pointer-events: auto;
}

.lake-toolbar {
  top: 30px;
  right: 30px;
}

.swimming-fish {
  top: var(--top);
  left: var(--static-left);
  width: clamp(76px, 7vw, 112px);
  animation: fish-drift var(--duration) ease-in-out infinite;
  animation-delay: var(--delay);
  will-change: transform;
}

.swimming-fish .fish-asset {
  animation: fish-turn var(--duration) steps(1, end) infinite;
  animation-delay: var(--delay);
  will-change: transform;
}

.swimming-fish:hover,
.swimming-fish:focus-visible,
.swimming-fish:hover .fish-asset,
.swimming-fish:focus-visible .fish-asset {
  animation-play-state: paused;
}

.fish-label {
  bottom: -5px;
  opacity: 0;
  transition: opacity 160ms ease;
}

.swimming-fish:hover .fish-label,
.swimming-fish:focus-visible .fish-label {
  opacity: 1;
}

@keyframes fish-drift {
  0%, 7% { transform: translate3d(0, 0, 0); }
  44%, 50% { transform: translate3d(var(--drift-x), var(--drift-y), 0); }
  94%, 100% { transform: translate3d(0, 0, 0); }
}

@keyframes fish-turn {
  0%, 49% { transform: scaleX(1); }
  50%, 99% { transform: scaleX(-1); }
  100% { transform: scaleX(1); }
}

.floating-bottle {
  width: clamp(46px, 4.8vw, 72px);
  height: clamp(62px, 6.8vw, 96px);
  animation-duration: 5.6s;
}

.floating-bottle::after,
.floating-bottle.reply-bottle::after {
  display: none;
}

.reply-owner-notice {
  display: flex;
  padding: 13px 15px;
  margin: 18px 0 0;
  align-items: center;
  gap: 7px;
  color: #4c6c73;
  background: #eaf1ef;
  border-radius: 14px;
  font-size: 0.78rem;
}

@media (max-width: 880px) {
  .page:not(#aquariumPage) {
    width: min(calc(100% - 28px), var(--content));
  }

  .home-page {
    gap: 16px;
  }

  .home-welcome {
    min-height: 0;
    padding: 26px;
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .home-welcome h1 {
    font-size: clamp(2rem, 8vw, 3.3rem);
  }

  .home-community-status {
    min-width: 0;
  }

  .study-controller.home-study-controller {
    bottom: auto;
    width: 100%;
    padding: 19px;
    grid-template-columns: 1fr;
  }

  .home-content-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .home-aquarium-card {
    min-height: 390px;
    grid-row: auto;
  }

  .aquarium-intro {
    top: 94px;
    left: 18px;
    max-width: calc(100% - 92px);
    padding: 14px 16px;
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .aquarium-intro h1 {
    font-size: clamp(1.55rem, 6vw, 2.2rem);
  }

  .aquarium-intro .eyebrow,
  .aquarium-intro > div:first-child > p:last-child {
    display: none;
  }

  .aquarium-intro .now-studying-badge {
    margin: 0;
    padding: 6px 10px;
  }

  .lake-toolbar {
    top: 94px;
  }

  .swimming-fish {
    width: clamp(70px, 18vw, 94px);
  }
}

@media (max-width: 620px) {
  .home-welcome {
    padding: 23px 21px;
    border-radius: 24px;
  }

  .home-welcome-copy > p:last-child {
    font-size: 0.84rem;
  }

  .home-aquarium-card {
    min-height: 350px;
    padding: 17px;
  }

  .home-aquarium-card > div {
    padding: 20px;
  }

  .home-message-card,
  .home-progress-card {
    padding: 22px;
  }

  .home-message-card {
    padding-right: 86px;
  }

  .home-message-card > img {
    right: 10px;
    width: 72px;
  }

  .home-progress-values {
    gap: 5px;
  }

  .home-progress-values strong {
    font-size: 1rem;
  }

  .aquarium-intro {
    top: 90px;
    max-width: calc(100% - 82px);
  }

  .lake-toolbar {
    top: 90px;
    right: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .swimming-fish,
  .swimming-fish .fish-asset,
  .floating-bottle {
    animation: none !important;
  }
}

/* Live study matching, profile detail and aquarium controls */
button,
input,
select,
textarea {
  font-family: var(--font-body);
}

.fish-label {
  bottom: -10px;
  min-width: max-content;
  padding: 5px 10px 6px;
  color: #355d65;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 7px 18px rgba(36, 68, 74, 0.13);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 1;
  backdrop-filter: blur(9px);
}

.fish-layer,
.bottle-layer {
  pointer-events: none;
}

.swimming-fish,
.floating-bottle {
  pointer-events: auto;
}

.swimming-fish.is-me .fish-label {
  color: #815c61;
  background: rgba(253, 239, 235, 0.94);
}

.swimming-fish.is-similar .fish-label::before {
  color: #c88383;
  content: "●";
  margin-right: 5px;
  font-size: 0.52rem;
}

.floating-bottle.is-similar {
  filter: drop-shadow(0 10px 13px rgba(55, 103, 108, 0.23)) drop-shadow(0 0 10px rgba(255, 247, 225, 0.72));
}

.aquarium-study-dock {
  position: absolute;
  z-index: 18;
  bottom: 28px;
  left: 50%;
  display: grid;
  width: min(740px, calc(100% - 92px));
  min-height: 88px;
  padding: 15px 16px;
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 15px;
  color: #335861;
  background: rgba(255, 253, 248, 0.91);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 25px;
  box-shadow: 0 18px 46px rgba(36, 67, 73, 0.2);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.aquarium-study-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: #527a80;
  background: #e5efed;
  border-radius: 17px;
  font-size: 1.35rem;
}

.aquarium-study-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.aquarium-study-copy span {
  color: #768b8f;
  font-size: 0.66rem;
}

.aquarium-study-copy strong {
  overflow: hidden;
  color: #355861;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aquarium-study-timer {
  min-width: 104px;
  color: #31545d;
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  text-align: right;
}

.aquarium-stop-button {
  min-height: 48px;
  color: #815d62;
  background: #f7e9e5;
  border-color: rgba(166, 103, 105, 0.15);
}

.fish-drawer {
  bottom: 138px;
  width: min(430px, calc(100% - 56px));
  padding: 23px;
  align-items: center;
  border-radius: 25px;
}

.drawer-match-badge {
  display: inline-flex;
  width: fit-content;
  padding: 4px 9px;
  margin-bottom: 6px;
  color: #815c61;
  background: #f5e7e3;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 700;
}

.drawer-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
}

.drawer-interest-list,
.profile-interest-list {
  display: flex;
  margin: 9px 0 10px;
  flex-wrap: wrap;
  gap: 6px;
}

.drawer-interest-list span,
.profile-interest-list span {
  padding: 4px 9px;
  color: #55747a;
  background: #e7f0ee;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 500;
}

.profile-interest-list {
  justify-content: center;
}

.lake-hint {
  bottom: 124px;
  max-width: 390px;
  color: rgba(43, 75, 82, 0.8);
  background: rgba(255, 253, 248, 0.7);
  border-radius: 16px;
}

@media (max-width: 880px) {
  .aquarium-study-dock {
    bottom: 86px;
    width: calc(100% - 26px);
    padding: 12px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    border-radius: 21px;
  }

  .aquarium-study-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .aquarium-study-timer {
    min-width: 88px;
    font-size: 1rem;
  }

  .aquarium-stop-button {
    min-height: 42px;
    grid-column: 2 / 4;
  }

  .fish-drawer {
    right: 13px;
    bottom: 202px;
    width: calc(100% - 26px);
  }

  .lake-hint {
    display: none;
  }
}

@media (max-width: 620px) {
  .fish-label {
    padding: 4px 8px 5px;
    font-size: 0.62rem;
  }

  .aquarium-study-copy span {
    display: none;
  }

  .aquarium-study-copy strong {
    font-size: 0.92rem;
  }

  .fish-drawer {
    grid-template-columns: 76px 1fr;
    padding: 18px;
  }

  .drawer-fish {
    width: 74px;
  }
}

/* Bottle owner actions */
.detail-footer {
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.post-owner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.button-danger-ghost {
  color: #9a6265;
  background: #fbf3f1;
  border-color: rgba(154, 98, 101, 0.15);
}

.button-danger {
  color: #fff;
  background: #a86669;
  border-color: #a86669;
  box-shadow: 0 9px 22px rgba(153, 92, 96, 0.2);
}

.button-danger:hover,
.button-danger-ghost:hover {
  transform: translateY(-1px);
}

.confirm-modal {
  width: min(calc(100% - 32px), 510px);
  text-align: center;
}

.confirm-modal > article {
  display: grid;
  justify-items: center;
}

.confirm-modal h2 {
  margin-bottom: 10px;
  color: #4a5f64;
  font-size: 1.65rem;
}

.confirm-modal article > p:not(.eyebrow) {
  max-width: 390px;
  color: #6e8084;
  font-size: 0.83rem;
}

.confirm-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 15px;
  place-items: center;
  color: #9a6265;
  background: #f7e9e5;
  border-radius: 19px;
  font-size: 1.45rem;
}

.confirm-modal .modal-actions {
  width: 100%;
  padding-top: 16px;
  justify-content: center;
}

@media (max-width: 620px) {
  .detail-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .post-owner-actions {
    width: 100%;
  }

  .post-owner-actions .button {
    flex: 1;
  }

  .reply-item-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .reply-item-actions {
    width: 100%;
  }
}

/* Threaded private replies */
.reply-item {
  position: relative;
  margin-left: var(--reply-indent, 0);
  transition: margin 180ms ease, background-color 180ms ease;
}

.reply-item.is-thread-reply::before {
  position: absolute;
  top: -11px;
  bottom: 50%;
  left: -15px;
  width: 10px;
  content: "";
  border-bottom: 1px solid rgba(87, 123, 130, 0.24);
  border-left: 1px solid rgba(87, 123, 130, 0.24);
  border-radius: 0 0 0 8px;
}

.reply-context {
  display: flex;
  margin-bottom: 7px !important;
  align-items: center;
  gap: 5px;
  color: #789095 !important;
  font-size: 0.68rem;
  font-weight: 700;
}

.reply-body {
  margin-bottom: 9px !important;
}

.reply-action-button.reply {
  color: #47727a;
  background: #edf4f2;
  border-color: rgba(76, 117, 123, 0.16);
}

.nested-reply-form {
  display: grid;
  padding-top: 14px;
  margin-top: 13px;
  gap: 9px;
  border-top: 1px solid rgba(81, 119, 125, 0.13);
}

.nested-reply-form > label {
  color: #456971;
  font-size: 0.76rem;
  font-weight: 700;
}

.nested-reply-form textarea {
  min-height: 90px;
  padding: 12px 14px;
  color: #385960;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(91, 126, 133, 0.23);
  border-radius: 13px;
  resize: vertical;
}

.nested-reply-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nested-reply-actions > p {
  display: flex;
  margin: 0;
  align-items: center;
  gap: 5px;
  color: #6d858a;
  font-size: 0.66rem;
}

.nested-reply-actions > div {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

@media (max-width: 620px) {
  .reply-item {
    margin-left: var(--reply-indent-mobile, 0);
  }

  .reply-item.is-thread-reply::before {
    left: -8px;
    width: 6px;
  }

  .nested-reply-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .nested-reply-actions > div {
    justify-content: flex-end;
  }
}

/* ============================================================
   Mobile app — independent phone layout
   Desktop keeps the immersive sidebar composition above.
   ============================================================ */
@media (max-width: 760px) {
  :root {
    --mobile-gutter: 16px;
    --mobile-header-height: 64px;
    --mobile-nav-height: 72px;
  }

  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    padding-bottom: 0;
    background: #f4f1ec;
  }

  button,
  input,
  select,
  textarea {
    font-size: 16px;
  }

  .app-shell {
    min-height: 100dvh;
    overflow-x: clip;
    background:
      radial-gradient(circle at 90% 2%, rgba(193, 218, 216, 0.24), transparent 28%),
      #f4f1ec;
  }

  .app-header {
    position: fixed;
    z-index: 50;
    inset: 0 0 auto;
    display: flex;
    width: 100%;
    height: var(--mobile-header-height);
    padding: 8px max(var(--mobile-gutter), env(safe-area-inset-right)) 8px max(var(--mobile-gutter), env(safe-area-inset-left));
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    background: rgba(249, 247, 242, 0.9);
    border: 0;
    border-bottom: 1px solid rgba(55, 84, 90, 0.09);
    box-shadow: 0 8px 24px rgba(47, 73, 78, 0.05);
    backdrop-filter: blur(18px) saturate(1.1);
  }

  .app-shell[data-active-page="aquarium"] .app-header {
    background: linear-gradient(to bottom, rgba(244, 249, 247, 0.88), rgba(244, 249, 247, 0.62));
    border-bottom-color: rgba(255, 255, 255, 0.34);
    box-shadow: none;
  }

  .app-header .brand {
    min-width: 0;
    flex-direction: row;
    gap: 9px;
    font-size: 1.02rem;
    letter-spacing: 0.06em;
  }

  .app-header .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    box-shadow: 0 6px 18px rgba(47, 74, 80, 0.1);
  }

  .app-header .brand-word {
    display: inline;
  }

  .desktop-nav {
    display: none;
  }

  .header-actions {
    width: auto;
    margin-top: 0;
  }

  .user-fish-button {
    width: 42px;
    height: 42px;
    padding: 6px;
    background: rgba(246, 239, 234, 0.92);
    box-shadow: 0 6px 18px rgba(47, 74, 80, 0.08);
  }

  .page-container {
    width: 100%;
    min-height: 100dvh;
    padding: 0;
    margin: 0;
  }

  .page,
  .page > *,
  .home-content-grid > *,
  .profile-grid > *,
  .history-grid > * {
    min-width: 0;
  }

  .page:not(#aquariumPage) {
    width: 100%;
    padding: calc(var(--mobile-header-height) + 18px) var(--mobile-gutter) calc(var(--mobile-nav-height) + 36px + env(safe-area-inset-bottom));
    margin: 0;
  }

  .page-intro {
    margin-bottom: 20px;
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .page-intro .eyebrow {
    margin-bottom: 5px;
    font-size: 0.62rem;
    letter-spacing: 0.2em;
  }

  .page-intro h1,
  .board-intro h1,
  .profile-intro h1 {
    margin-bottom: 7px;
    font-size: clamp(2.05rem, 10.5vw, 2.75rem);
    line-height: 1.18;
    overflow-wrap: anywhere;
    text-wrap: pretty;
  }

  .page-intro > div > p:last-child {
    margin: 0;
    color: #667d82;
    font-size: 0.82rem;
    line-height: 1.75;
  }

  /* Mobile home */
  .home-page {
    display: grid;
    gap: 14px;
  }

  .home-welcome {
    display: grid;
    min-height: 0;
    padding: 19px 4px 8px;
    align-items: start;
    justify-items: start;
    gap: 15px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .home-welcome-copy {
    max-width: 100%;
  }

  .home-welcome .eyebrow {
    margin-bottom: 8px;
    font-size: 0.61rem;
    letter-spacing: 0.2em;
  }

  .home-welcome h1 {
    max-width: 100%;
    margin-bottom: 9px;
    color: #2d5159;
    font-size: clamp(2.05rem, 10.5vw, 2.7rem);
    line-height: 1.24;
    overflow-wrap: anywhere;
    text-wrap: pretty;
  }

  .home-welcome-copy > p:last-child {
    color: #6b7f83;
    font-size: 0.79rem;
    line-height: 1.7;
  }

  .home-community-status {
    min-width: 0;
    padding: 9px 13px;
    gap: 8px;
    background: rgba(231, 240, 238, 0.9);
    border-radius: 999px;
  }

  .home-community-status strong {
    font-size: 1.05rem;
  }

  .home-community-status span:last-child {
    font-size: 0.68rem;
  }

  .study-controller.home-study-controller {
    position: static;
    display: grid;
    inset: auto;
    width: 100%;
    min-height: 0;
    padding: 17px;
    margin: 0;
    grid-template-columns: 1fr;
    gap: 15px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(59, 90, 96, 0.09);
    border-radius: 23px;
    box-shadow: 0 12px 34px rgba(44, 71, 77, 0.08);
    transform: none;
  }

  .home-study-controller .controller-copy {
    display: grid;
    min-width: 0;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 11px;
  }

  .home-study-controller .controller-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    grid-row: span 2;
  }

  .home-study-controller .controller-copy h2 {
    align-self: end;
    font-family: var(--font-body);
    font-size: 0.98rem;
  }

  .home-study-controller .controller-copy p {
    display: block;
    align-self: start;
    font-size: 0.66rem;
  }

  .home-study-controller .study-start-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .home-study-controller .study-start-controls input,
  .home-study-controller .study-start-controls .button {
    width: 100%;
    min-height: 50px;
  }

  .home-study-controller .study-start-controls input {
    padding: 12px 14px;
    background: #fbfbf9;
    border-radius: 15px;
  }

  .home-study-controller .study-start-controls .button {
    border-radius: 16px;
  }

  .home-study-controller .study-running-controls {
    display: grid;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 11px;
  }

  .home-study-controller .study-timer {
    font-size: 1.15rem;
  }

  .home-study-controller .study-running-controls .button {
    min-height: 46px;
    padding-inline: 15px;
  }

  .home-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .home-aquarium-card,
  .home-message-card,
  .home-progress-card {
    border-radius: 23px;
    box-shadow: 0 12px 32px rgba(43, 71, 77, 0.08);
  }

  .home-aquarium-card {
    min-height: 292px;
    padding: 15px;
    grid-row: auto;
    align-items: flex-end;
    background-position: center bottom;
  }

  .home-aquarium-card > div {
    width: 100%;
    max-width: none;
    padding: 18px;
    border-radius: 18px;
  }

  .home-aquarium-card h2 {
    font-size: 1.55rem;
  }

  .home-aquarium-card p:not(.eyebrow) {
    font-size: 0.76rem;
  }

  .home-aquarium-card .button {
    width: 100%;
    min-height: 46px;
  }

  .home-message-card,
  .home-progress-card {
    min-height: 0;
    padding: 20px;
  }

  .home-message-card {
    min-height: 188px;
    padding-right: 84px;
  }

  .home-message-card > img {
    right: 9px;
    bottom: 14px;
    width: 68px;
    height: 94px;
  }

  .home-message-card h2,
  .home-progress-card h2 {
    font-size: 1.18rem;
  }

  .home-latest-title {
    margin-top: 13px;
    font-size: 0.82rem;
  }

  .home-progress-values {
    margin: 16px 0 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .home-progress-values strong {
    font-size: 0.98rem;
  }

  .home-progress-values span {
    font-size: 0.57rem;
    line-height: 1.45;
  }

  /* Mobile bottle board */
  .board-intro .button-primary {
    width: 100%;
    min-height: 50px;
    border-radius: 16px;
  }

  .category-filters {
    display: flex;
    width: calc(100% + (var(--mobile-gutter) * 2));
    padding: 4px var(--mobile-gutter) 9px;
    margin: 0 calc(var(--mobile-gutter) * -1) 18px;
    overflow-x: auto;
    gap: 7px;
    background: transparent;
    border-radius: 0;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .category-filters::-webkit-scrollbar {
    display: none;
  }

  .category-chip {
    min-width: max-content;
    min-height: 42px;
    padding: 8px 16px;
    flex: 0 0 auto;
    color: #718589;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(67, 98, 104, 0.08);
    scroll-snap-align: start;
  }

  .category-chip.active {
    color: #375f67;
    background: #e4efed;
    border-color: rgba(59, 98, 104, 0.12);
    box-shadow: none;
  }

  .post-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .post-card {
    border-radius: 21px;
    box-shadow: 0 10px 28px rgba(43, 71, 77, 0.07);
  }

  .post-card > button:first-child {
    padding: 18px 18px 11px;
  }

  .post-card h2 {
    font-size: 1.18rem;
    line-height: 1.45;
    text-wrap: pretty;
  }

  .post-card p {
    font-size: 0.77rem;
    line-height: 1.8;
  }

  .post-footer {
    padding: 0 17px 16px;
  }

  /* Mobile profile */
  .profile-intro {
    position: relative;
    padding-right: 108px;
  }

  .profile-intro .button-ghost {
    position: absolute;
    top: 7px;
    right: 0;
    min-height: 42px;
    padding: 8px 14px;
    font-size: 0.72rem;
  }

  .profile-grid,
  .history-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .profile-card,
  .history-card {
    border-radius: 23px;
    box-shadow: 0 10px 30px rgba(43, 71, 77, 0.07);
  }

  .user-profile-card {
    min-height: 0;
    padding: 25px 20px 22px;
  }

  .user-profile-card .small-link {
    top: 17px;
    right: 17px;
    min-height: 40px;
    padding: 7px 13px;
  }

  .my-fish {
    width: 112px;
    height: 74px;
  }

  .user-profile-card h2 {
    margin-top: 6px;
    font-size: 1.65rem;
  }

  .profile-interest-list {
    max-width: 100%;
    justify-content: center;
  }

  .stats-card {
    padding: 22px 18px;
  }

  .stat-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .stat-row > div {
    min-width: 0;
    padding-inline: 3px;
  }

  .stat-row strong {
    font-size: 1.03rem;
    overflow-wrap: anywhere;
  }

  .stat-row span {
    font-size: 0.58rem;
    line-height: 1.45;
  }

  .weekly-chart {
    min-width: 0;
    gap: 5px;
  }

  .history-grid {
    margin-top: 14px;
  }

  .history-card {
    padding: 20px 18px;
  }

  /* Mobile aquarium */
  #aquariumPage {
    position: relative;
    width: 100%;
    height: 100dvh;
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }

  #aquariumPage .lake-card,
  #aquariumPage .lake-surface {
    inset: 0;
    top: 0;
    width: 100%;
    height: 100%;
  }

  #aquariumPage .lake-surface {
    background-position: 54% center;
  }

  .aquarium-intro {
    position: absolute;
    z-index: 14;
    top: calc(var(--mobile-header-height) + 12px);
    right: 62px;
    left: 12px;
    display: grid;
    width: auto;
    max-width: none;
    padding: 11px 13px;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    background: rgba(252, 250, 246, 0.83);
    border: 1px solid rgba(255, 255, 255, 0.66);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(38, 68, 74, 0.11);
    backdrop-filter: blur(14px);
    pointer-events: none;
  }

  .aquarium-intro .eyebrow,
  .aquarium-intro > div:first-child > p:last-child {
    display: none;
  }

  .aquarium-intro h1 {
    margin: 0;
    color: #315760;
    font-size: 1.16rem;
    line-height: 1.25;
    white-space: nowrap;
  }

  .aquarium-intro .now-studying-badge {
    display: inline-flex;
    min-width: max-content;
    padding: 6px 8px;
    margin: 0;
    gap: 5px;
    background: rgba(239, 245, 242, 0.92);
    border: 0;
    box-shadow: none;
    font-size: 0.62rem;
  }

  .aquarium-intro .now-studying-badge .pulse-dot {
    width: 6px;
    height: 6px;
  }

  .lake-toolbar {
    z-index: 16;
    top: calc(var(--mobile-header-height) + 14px);
    right: 12px;
  }

  .icon-text-button {
    display: grid;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    place-items: center;
    background: rgba(252, 250, 246, 0.86);
    border-radius: 15px;
    box-shadow: 0 8px 22px rgba(39, 69, 75, 0.1);
    font-size: 0;
  }

  .icon-text-button span {
    font-size: 1.2rem;
  }

  .swimming-fish {
    width: clamp(68px, 21vw, 88px);
    padding: 7px;
  }

  .fish-label {
    bottom: -7px;
    max-width: 92px;
    padding: 4px 7px 5px;
    overflow: hidden;
    font-size: 0.59rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .floating-bottle {
    width: 52px;
    height: 72px;
  }

  .aquarium-study-dock {
    z-index: 24;
    bottom: calc(var(--mobile-nav-height) + 22px + env(safe-area-inset-bottom));
    left: 12px;
    display: grid;
    width: calc(100% - 24px);
    min-height: 0;
    padding: 13px;
    margin: 0;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px 12px;
    border-radius: 21px;
    transform: none;
  }

  .aquarium-study-icon {
    display: none;
  }

  .aquarium-study-copy span {
    display: block;
    font-size: 0.58rem;
  }

  .aquarium-study-copy strong {
    font-size: 0.9rem;
  }

  .aquarium-study-timer {
    min-width: max-content;
    font-size: 0.98rem;
  }

  .aquarium-stop-button {
    width: 100%;
    min-height: 43px;
    grid-column: 1 / -1;
    border-radius: 14px;
  }

  .fish-drawer {
    position: absolute;
    z-index: 30;
    right: 12px;
    bottom: calc(var(--mobile-nav-height) + 22px + env(safe-area-inset-bottom));
    display: grid;
    width: calc(100% - 24px);
    max-height: min(52dvh, 440px);
    padding: 18px;
    overflow-y: auto;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 13px;
    background: rgba(253, 251, 247, 0.95);
    border-radius: 23px;
    box-shadow: 0 18px 48px rgba(35, 65, 71, 0.2);
  }

  .drawer-fish {
    width: 70px;
  }

  .drawer-name {
    font-size: 1.16rem;
  }

  .drawer-interest-list {
    margin: 7px 0;
  }

  .drawer-topic {
    font-size: 0.75rem;
  }

  .lake-hint {
    display: none;
  }

  /* Mobile bottom navigation */
  .mobile-nav {
    position: fixed;
    z-index: 60;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    display: grid;
    width: auto;
    height: var(--mobile-nav-height);
    padding: 6px;
    align-items: stretch;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
    background: rgba(251, 249, 245, 0.94);
    border: 1px solid rgba(62, 91, 97, 0.1);
    border-radius: 23px;
    box-shadow: 0 14px 36px rgba(38, 65, 71, 0.16);
    backdrop-filter: blur(20px) saturate(1.1);
  }

  .mobile-nav-link {
    display: flex;
    min-width: 0;
    min-height: 56px;
    padding: 5px 2px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1px;
    color: #7a898c;
    background: transparent;
    border-radius: 17px;
    font-size: 0.59rem;
    line-height: 1.2;
  }

  .mobile-nav-link i {
    font-size: 1.35rem;
  }

  .mobile-nav-link.active,
  .mobile-nav-link[aria-current="page"] {
    color: #365f67;
    background: #e4efed;
    box-shadow: inset 0 0 0 1px rgba(64, 101, 107, 0.06);
  }

  /* Mobile dialogs become bottom sheets */
  .modal,
  .post-modal,
  .composer-modal,
  .profile-modal,
  .confirm-modal {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    max-width: none;
    max-height: min(92dvh, 900px);
    padding: 0;
    margin: auto 0 0;
    overflow: auto;
    border-radius: 28px 28px 0 0;
  }

  .modal[open] {
    animation: mobile-sheet-in 220ms ease-out both;
  }

  .modal > form,
  .modal > article,
  .post-modal > article {
    padding: 22px 18px calc(24px + env(safe-area-inset-bottom));
  }

  .modal-heading {
    position: sticky;
    z-index: 2;
    top: -22px;
    padding-top: 2px;
    background: #fcfbf8;
  }

  .modal-heading h2 {
    font-size: 1.55rem;
  }

  .modal-close {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .two-column {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .modal-actions .button {
    width: 100%;
  }

  .detail-body {
    margin: 20px 0;
    font-size: 0.88rem;
    line-height: 1.9;
  }

  .reply-item {
    padding: 13px;
    border-radius: 15px;
  }

  .reply-item-meta,
  .detail-footer,
  .nested-reply-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .reply-item-actions,
  .post-owner-actions,
  .nested-reply-actions > div {
    width: 100%;
  }

  .reply-action-button,
  .post-owner-actions .button {
    min-height: 40px;
    flex: 1;
  }

  .reply-compose-row {
    grid-template-columns: 1fr;
  }

  .reply-compose-row .button {
    width: 100%;
  }

  .toast-region {
    top: calc(var(--mobile-header-height) + 8px);
    right: 12px;
    left: 12px;
    width: auto;
  }

  @keyframes mobile-sheet-in {
    from {
      opacity: 0;
      transform: translateY(28px);
    }
  }
}

/* Mobile authentication is a separate, compact entry experience. */
@media (max-width: 620px) {
  .auth-shell {
    display: block;
    min-height: 100dvh;
    overflow: visible;
    background: #eaf2ef;
  }

  .welcome-panel {
    min-height: 272px;
    padding: 18px 18px 54px;
    background-position: center 58%;
  }

  .welcome-panel .brand-large {
    gap: 8px;
    font-size: 1rem;
  }

  .welcome-panel .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .welcome-copy {
    max-width: 340px;
    padding: 0;
    margin: 38px 0 0;
  }

  .welcome-copy h1 {
    max-width: 330px;
    margin-bottom: 11px;
    font-size: clamp(2.25rem, 11vw, 3rem);
    line-height: 1.22;
  }

  .welcome-copy > p:last-child {
    display: block;
    max-width: 320px;
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.65;
  }

  .auth-panel {
    position: relative;
    z-index: 3;
    min-height: calc(100dvh - 240px);
    padding: 0 12px calc(28px + env(safe-area-inset-bottom));
    margin-top: -34px;
    background: transparent;
  }

  .auth-card {
    width: 100%;
    max-width: 480px;
    padding: 22px 18px;
    border-radius: 27px;
    box-shadow: 0 20px 48px rgba(42, 69, 75, 0.14);
  }

  .auth-card h2 {
    margin-bottom: 6px;
    font-size: 1.82rem;
  }

  .auth-card > .subtle {
    font-size: 0.72rem;
  }

  .auth-card .segmented {
    margin: 17px 0 18px;
  }

  .auth-card .segment {
    min-height: 45px;
    font-size: 0.76rem;
  }

  .auth-card .auth-form {
    gap: 13px;
  }

  .auth-card label > span:first-child {
    font-size: 0.69rem;
  }

  .auth-input-wrap input {
    min-height: 50px;
    padding-right: 46px;
    border-radius: 15px;
  }

  .auth-card .button-wide {
    min-height: 50px;
    margin-top: 3px;
    border-radius: 16px;
  }

  .auth-card .auth-note {
    margin-top: 16px;
    font-size: 0.63rem;
    line-height: 1.75;
  }

  .onboarding-shell {
    padding: 12px;
  }

  .onboarding-card {
    width: 100%;
    padding: 22px 18px;
    border-radius: 27px;
  }

  .fish-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  :root {
    --mobile-gutter: 13px;
  }

  .home-welcome h1,
  .page-intro h1,
  .board-intro h1,
  .profile-intro h1 {
    font-size: 2rem;
  }

  .home-progress-values strong,
  .stat-row strong {
    font-size: 0.9rem;
  }

  .aquarium-intro h1 {
    font-size: 1.02rem;
  }

  .aquarium-intro .now-studying-badge {
    font-size: 0.56rem;
  }
}

/* ============================================================
   Living aquarium motion
   Slow, layered animation keeps the lake calm while feeling alive.
   ============================================================ */
.lake-surface {
  isolation: isolate;
  background: #a9ced2;
}

.lake-surface::before {
  position: absolute;
  z-index: 0;
  inset: -3%;
  content: "";
  background: url("./assets/aquarium-background.png") center / cover no-repeat;
  transform: scale(1.025) translate3d(0, 0, 0);
  transform-origin: 50% 55%;
  animation: aquarium-breathe 24s ease-in-out infinite alternate;
  will-change: transform;
}

.lake-surface::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(234, 249, 247, 0.08), transparent 32%, rgba(55, 105, 113, 0.08)),
    radial-gradient(ellipse at center, transparent 46%, rgba(43, 82, 90, 0.1) 100%);
  pointer-events: none;
}

.lake-atmosphere {
  position: absolute;
  z-index: 3;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.lake-light-rays,
.lake-caustics,
.lake-current {
  position: absolute;
  display: block;
  pointer-events: none;
}

.lake-light-rays {
  top: -20%;
  left: 9%;
  width: 76%;
  height: 82%;
  background:
    linear-gradient(105deg, transparent 16%, rgba(255, 255, 244, 0.17) 28%, transparent 39%),
    linear-gradient(98deg, transparent 45%, rgba(255, 255, 247, 0.13) 57%, transparent 68%),
    linear-gradient(112deg, transparent 68%, rgba(255, 255, 250, 0.1) 77%, transparent 86%);
  filter: blur(7px);
  opacity: 0.8;
  transform: skewX(-8deg) rotate(-2deg);
  transform-origin: top center;
  animation: light-rays-sway 14s ease-in-out infinite alternate;
}

.lake-caustics {
  top: -4%;
  right: -8%;
  left: -8%;
  height: 38%;
  background:
    radial-gradient(ellipse at 12% 30%, transparent 42%, rgba(255, 255, 247, 0.22) 46%, transparent 51%),
    radial-gradient(ellipse at 38% 12%, transparent 45%, rgba(255, 255, 250, 0.18) 49%, transparent 55%),
    radial-gradient(ellipse at 65% 32%, transparent 41%, rgba(255, 255, 248, 0.19) 46%, transparent 52%),
    radial-gradient(ellipse at 88% 8%, transparent 42%, rgba(255, 255, 248, 0.17) 47%, transparent 53%);
  background-size: 210px 105px, 270px 120px, 230px 115px, 290px 125px;
  filter: blur(2px);
  opacity: 0.56;
  transform: translate3d(-1%, 0, 0) scale(1.05);
  animation: caustics-drift 18s ease-in-out infinite alternate;
}

.lake-current {
  top: 37%;
  left: -24%;
  width: 148%;
  height: 18%;
  background: linear-gradient(100deg, transparent 14%, rgba(235, 251, 248, 0.13) 43%, rgba(255, 255, 250, 0.2) 50%, rgba(235, 251, 248, 0.11) 57%, transparent 84%);
  filter: blur(10px);
  opacity: 0.5;
  transform: translate3d(-12%, 0, 0) rotate(-4deg);
  animation: water-current 21s ease-in-out infinite;
}

.water-mote {
  position: absolute;
  display: block;
  width: 3px;
  height: 3px;
  background: rgba(255, 255, 245, 0.64);
  border-radius: 50%;
  box-shadow: 0 0 7px rgba(255, 255, 244, 0.78);
  opacity: 0;
  animation: mote-drift 11s ease-in-out infinite;
}

.mote-one { top: 28%; left: 16%; animation-delay: -2s; }
.mote-two { top: 55%; left: 29%; width: 2px; height: 2px; animation-delay: -8s; }
.mote-three { top: 39%; left: 48%; animation-delay: -5s; }
.mote-four { top: 66%; left: 65%; width: 4px; height: 4px; animation-delay: -10s; }
.mote-five { top: 23%; left: 77%; width: 2px; height: 2px; animation-delay: -6s; }
.mote-six { top: 74%; left: 88%; animation-delay: -3s; }

.water-bubble {
  position: absolute;
  bottom: -34px;
  left: var(--bubble-left);
  display: block;
  width: var(--bubble-size);
  height: var(--bubble-size);
  border: 1px solid rgba(247, 255, 253, 0.68);
  border-radius: 50%;
  box-shadow:
    inset 2px 2px 3px rgba(255, 255, 255, 0.35),
    0 0 8px rgba(240, 255, 252, 0.18);
  opacity: 0;
  animation: bubble-rise var(--bubble-duration) linear infinite;
  animation-delay: var(--bubble-delay);
}

.bubble-one { --bubble-left: 8%; --bubble-size: 7px; --bubble-duration: 13s; --bubble-delay: -4s; --bubble-drift: 22px; }
.bubble-two { --bubble-left: 18%; --bubble-size: 13px; --bubble-duration: 17s; --bubble-delay: -11s; --bubble-drift: -18px; }
.bubble-three { --bubble-left: 31%; --bubble-size: 5px; --bubble-duration: 12s; --bubble-delay: -8s; --bubble-drift: 14px; }
.bubble-four { --bubble-left: 42%; --bubble-size: 9px; --bubble-duration: 15s; --bubble-delay: -2s; --bubble-drift: -24px; }
.bubble-five { --bubble-left: 55%; --bubble-size: 6px; --bubble-duration: 14s; --bubble-delay: -10s; --bubble-drift: 19px; }
.bubble-six { --bubble-left: 67%; --bubble-size: 15px; --bubble-duration: 19s; --bubble-delay: -6s; --bubble-drift: -16px; }
.bubble-seven { --bubble-left: 78%; --bubble-size: 8px; --bubble-duration: 13.5s; --bubble-delay: -12s; --bubble-drift: 25px; }
.bubble-eight { --bubble-left: 91%; --bubble-size: 5px; --bubble-duration: 11.5s; --bubble-delay: -7s; --bubble-drift: -12px; }
.bubble-nine { --bubble-left: 24%; --bubble-size: 4px; --bubble-duration: 10.5s; --bubble-delay: -3s; --bubble-drift: 17px; }
.bubble-ten { --bubble-left: 72%; --bubble-size: 6px; --bubble-duration: 16s; --bubble-delay: -14s; --bubble-drift: -21px; }

.fish-layer,
.bottle-layer {
  z-index: 5;
}

.bottle-layer {
  z-index: 6;
}

.lake-empty {
  z-index: 7;
}

.swimming-fish {
  animation-name: fish-roam;
  animation-timing-function: cubic-bezier(0.44, 0.02, 0.56, 0.98);
}

.fish-motion {
  display: block;
  width: 100%;
  transform-origin: 50% 55%;
  animation: fish-body-float var(--body-duration, 3.8s) ease-in-out infinite alternate;
  animation-delay: var(--body-delay, 0s);
  will-change: transform;
}

.swimming-fish .fish-asset {
  animation-name: fish-natural-turn;
  animation-timing-function: steps(1, end);
}

.swimming-fish:hover .fish-motion,
.swimming-fish:focus-visible .fish-motion {
  animation-play-state: paused;
}

.floating-bottle {
  animation: bottle-drift var(--bottle-duration, 7.6s) ease-in-out infinite;
  animation-delay: var(--delay);
  will-change: transform;
}

.floating-bottle::before {
  display: none;
}

.reply-lily {
  position: absolute;
  z-index: 9;
  top: 3.5%;
  right: 2.4%;
  display: grid;
  width: clamp(116px, 13vw, 160px);
  min-height: 96px;
  padding: 0;
  place-items: center;
  color: #355e65;
  background: transparent;
  border: 0;
  cursor: pointer;
  filter: drop-shadow(0 11px 14px rgba(48, 83, 86, 0.14));
  transform-origin: 54% 60%;
}

.reply-lily[hidden] {
  display: none;
}

.reply-lily::before,
.reply-lily::after {
  position: absolute;
  z-index: -1;
  right: 5%;
  bottom: 14%;
  left: 5%;
  height: 28%;
  content: "";
  border: 1px solid rgba(238, 253, 249, 0.55);
  border-radius: 50%;
  opacity: 0;
  animation: reply-lily-ripple 6.8s ease-out infinite;
  pointer-events: none;
}

.reply-lily::after {
  animation-delay: 3.4s;
}

.reply-lily-art {
  display: block;
  width: 100%;
  transform-origin: 52% 62%;
  animation: reply-lily-float 7.5s ease-in-out infinite alternate;
}

.reply-lily-art img {
  display: block;
  width: 100%;
  height: auto;
}

.reply-lily-count {
  position: absolute;
  top: 12%;
  right: 12%;
  display: grid;
  min-width: 26px;
  height: 26px;
  padding-inline: 7px;
  place-items: center;
  color: #fffdfa;
  background: #cf8585;
  border: 2px solid rgba(255, 253, 249, 0.92);
  border-radius: 999px;
  box-shadow: 0 5px 13px rgba(84, 75, 78, 0.18);
  font-size: 0.68rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.reply-lily-label {
  position: absolute;
  right: 9%;
  bottom: 9%;
  color: #315b62;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 10px rgba(246, 255, 252, 0.96);
}

.reply-lily:hover,
.reply-lily:focus-visible {
  filter: drop-shadow(0 13px 16px rgba(48, 83, 86, 0.2));
}

.reply-lily:focus-visible {
  outline: 3px solid rgba(63, 116, 119, 0.3);
  outline-offset: 4px;
  border-radius: 44%;
}

.lake-tap-ripple {
  position: absolute;
  z-index: 8;
  width: 18px;
  height: 8px;
  border: 1.5px solid rgba(247, 255, 253, 0.78);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(240, 255, 252, 0.3);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.35);
  animation: lake-ripple 1.15s ease-out forwards;
  pointer-events: none;
}

.lake-tap-ripple::after {
  position: absolute;
  inset: -1px;
  content: "";
  border: 1px solid rgba(247, 255, 253, 0.5);
  border-radius: inherit;
  animation: lake-ripple-inner 1.15s 90ms ease-out forwards;
}

@keyframes aquarium-breathe {
  0% { transform: scale(1.025) translate3d(-0.4%, -0.2%, 0); }
  100% { transform: scale(1.065) translate3d(0.7%, 0.4%, 0); }
}

@keyframes light-rays-sway {
  0% { opacity: 0.52; transform: skewX(-8deg) rotate(-3deg) translateX(-2%); }
  100% { opacity: 0.82; transform: skewX(-2deg) rotate(2deg) translateX(3%); }
}

@keyframes caustics-drift {
  0% { opacity: 0.38; transform: translate3d(-2%, -1%, 0) scale(1.04) rotate(-1deg); }
  100% { opacity: 0.62; transform: translate3d(3%, 3%, 0) scale(1.1) rotate(1.5deg); }
}

@keyframes water-current {
  0%, 100% { opacity: 0.25; transform: translate3d(-13%, -5px, 0) rotate(-4deg); }
  50% { opacity: 0.58; transform: translate3d(12%, 8px, 0) rotate(-1deg); }
}

@keyframes mote-drift {
  0%, 100% { opacity: 0; transform: translate3d(-7px, 10px, 0); }
  30% { opacity: 0.65; }
  68% { opacity: 0.3; transform: translate3d(18px, -18px, 0); }
}

@keyframes bubble-rise {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.72); }
  12% { opacity: 0.72; }
  64% { opacity: 0.48; }
  100% { opacity: 0; transform: translate3d(var(--bubble-drift), -108dvh, 0) scale(1.08); }
}

@keyframes fish-roam {
  0%, 4% { transform: translate3d(0, 0, 0) rotate(0deg); }
  18% { transform: translate3d(var(--route-x-one), var(--route-y-one), 0) rotate(-0.5deg); }
  34% { transform: translate3d(var(--route-x-two), var(--route-y-two), 0) rotate(0.65deg); }
  46%, 54% { transform: translate3d(var(--route-x-three), var(--route-y-three), 0) rotate(0deg); }
  69% { transform: translate3d(var(--route-x-two), var(--return-y-two), 0) rotate(-0.6deg); }
  85% { transform: translate3d(var(--route-x-one), var(--return-y-one), 0) rotate(0.5deg); }
  98%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}

@keyframes fish-natural-turn {
  0%, 49.99% { transform: scaleX(1); }
  50%, 99.99% { transform: scaleX(-1); }
  100% { transform: scaleX(1); }
}

@keyframes fish-body-float {
  0% { transform: translate3d(0, -2px, 0) rotate(-0.6deg); }
  100% { transform: translate3d(0, 3px, 0) rotate(0.7deg); }
}

@keyframes bottle-drift {
  0%, 100% { transform: translate3d(0, 1px, 0) rotate(var(--rotation)); }
  34% { transform: translate3d(var(--bottle-x-one), var(--bottle-y-one), 0) rotate(calc(var(--rotation) + var(--bottle-sway))); }
  68% { transform: translate3d(var(--bottle-x-two), var(--bottle-y-two), 0) rotate(calc(var(--rotation) - var(--bottle-sway))); }
}

@keyframes reply-lily-float {
  0% { transform: translate3d(-1px, 1px, 0) rotate(-0.7deg); }
  100% { transform: translate3d(2px, -2px, 0) rotate(0.8deg); }
}

@keyframes reply-lily-ripple {
  0%, 48% { opacity: 0; transform: scale(0.76); }
  55% { opacity: 0.48; }
  100% { opacity: 0; transform: scale(1.32); }
}

@keyframes bottle-water-ring {
  0%, 38% { opacity: 0; transform: scale(0.48); }
  46% { opacity: 0.62; }
  78%, 100% { opacity: 0; transform: scale(1.65); }
}

@keyframes lake-ripple {
  0% { opacity: 0.8; transform: translate(-50%, -50%) scale(0.35); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(5.4); }
}

@keyframes lake-ripple-inner {
  0% { opacity: 0.62; transform: scale(0.45); }
  100% { opacity: 0; transform: scale(3.6); }
}

@media (max-width: 760px) {
  .lake-surface::before {
    inset: -2%;
    animation-duration: 30s;
  }

  .lake-light-rays {
    left: -4%;
    width: 105%;
    opacity: 0.58;
  }

  .lake-caustics {
    height: 31%;
    opacity: 0.44;
  }

  .bubble-nine,
  .bubble-ten {
    display: none;
  }

  .reply-lily {
    top: 2%;
    right: -1%;
    width: 112px;
    min-height: 82px;
  }

  .reply-lily-count {
    top: 10%;
    right: 9%;
    min-width: 23px;
    height: 23px;
    padding-inline: 6px;
    font-size: 0.61rem;
  }

  .reply-lily-label {
    right: 6%;
    bottom: 7%;
    font-size: 0.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lake-surface::before,
  .lake-light-rays,
  .lake-caustics,
  .lake-current,
  .water-mote,
  .water-bubble,
  .swimming-fish,
  .swimming-fish .fish-asset,
  .fish-motion,
  .floating-bottle,
  .reply-lily,
  .reply-lily-art,
  .reply-lily::before,
  .reply-lily::after,
  .lake-tap-ripple,
  .lake-tap-ripple::after {
    animation: none !important;
  }

  .lake-surface::before {
    transform: scale(1.035);
  }
}

/* Education-aware profiles and bottle field matching */
.post-field-tags {
  display: flex;
  margin: 9px 0 10px;
  flex-wrap: wrap;
  gap: 5px;
}

.post-field-tags > span {
  display: inline-flex;
  min-height: 25px;
  padding: 4px 9px;
  align-items: center;
  color: #52747a;
  background: #e7f0ee;
  border: 1px solid rgba(72, 112, 119, 0.08);
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.2;
}

.detail-field-tags {
  margin: 12px 0 0;
}

.profile-form label[hidden],
.profile-modal label[hidden] {
  display: none !important;
}

.two-column.single-column {
  grid-template-columns: 1fr;
}

.profile-form label,
.profile-modal label,
.composer-modal label {
  transition: opacity 160ms ease;
}

@media (max-width: 760px) {
  .post-field-tags {
    margin: 8px 0;
    gap: 4px;
  }

  .post-field-tags > span {
    min-height: 24px;
    padding: 4px 8px;
    font-size: 0.59rem;
  }
}

/* Bottle message usability improvements */
.bottle-guide {
  position: absolute;
  z-index: 13;
  bottom: 24px;
  left: 26px;
  display: grid;
  width: min(360px, calc(100% - 52px));
  min-height: 72px;
  padding: 10px 12px;
  align-items: center;
  grid-template-columns: 42px minmax(0, 1fr) 28px;
  gap: 10px;
  cursor: pointer;
  color: #355b63;
  background: rgba(255, 253, 248, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 19px;
  box-shadow: 0 13px 32px rgba(35, 67, 73, 0.15);
  text-align: left;
  backdrop-filter: blur(16px);
  transition: width 180ms ease, min-height 180ms ease, background 180ms ease;
}

.bottle-guide:hover {
  background: rgba(255, 253, 248, 0.96);
}

.bottle-guide img {
  width: 36px;
  height: 50px;
  object-fit: contain;
}

.bottle-guide span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.bottle-guide strong {
  font-size: 0.78rem;
}

.bottle-guide small {
  color: #6a8186;
  font-size: 0.66rem;
  line-height: 1.55;
}

.bottle-guide-icon {
  color: #74898d;
  font-size: 1rem;
}

.bottle-guide.is-compact {
  width: 236px;
  min-height: 56px;
  grid-template-columns: 32px minmax(0, 1fr) 24px;
}

.bottle-guide.is-compact img {
  width: 27px;
  height: 38px;
}

.bottle-guide.is-compact small {
  display: none;
}

.board-tools {
  display: flex;
  margin-bottom: 13px;
  align-items: center;
  gap: 12px;
}

.post-search {
  position: relative;
  display: flex;
  min-width: 0;
  flex: 1 1 440px;
  align-items: center;
}

.post-search > i {
  position: absolute;
  z-index: 1;
  left: 16px;
  color: #668087;
  font-size: 1.05rem;
  pointer-events: none;
}

.post-search input {
  width: 100%;
  min-height: 50px;
  padding: 12px 48px 12px 45px;
  color: #345760;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(57, 91, 98, 0.13);
  border-radius: 17px;
  box-shadow: 0 8px 24px rgba(43, 71, 77, 0.05);
}

.post-search input:focus {
  border-color: rgba(61, 108, 114, 0.45);
  outline: 3px solid rgba(126, 177, 177, 0.15);
}

.post-search > button {
  position: absolute;
  z-index: 2;
  right: 8px;
  display: grid;
  width: 35px;
  height: 35px;
  padding: 0;
  cursor: pointer;
  place-items: center;
  color: #6b8287;
  background: #edf3f1;
  border: 0;
  border-radius: 11px;
}

.post-ownership-filters {
  display: flex;
  padding: 4px;
  flex: 0 0 auto;
  gap: 3px;
  background: #e9ece9;
  border-radius: 15px;
}

.ownership-chip {
  min-height: 42px;
  padding: 8px 13px;
  cursor: pointer;
  color: #6b8186;
  background: transparent;
  border: 0;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 800;
}

.ownership-chip.active {
  color: #355e66;
  background: #fff;
  box-shadow: 0 4px 13px rgba(43, 72, 78, 0.08);
}

.post-results-summary {
  min-height: 20px;
  margin: -12px 2px 13px;
  color: #71868a;
  font-size: 0.69rem;
}

.post-card.is-own-post {
  border-color: rgba(190, 126, 127, 0.28);
  box-shadow: 0 12px 34px rgba(143, 89, 91, 0.11);
}

.post-card.is-own-post::before {
  background: linear-gradient(90deg, #d99a98, #efc7bc);
}

.post-badge.owner {
  align-items: center;
  gap: 4px;
  color: #885e62;
  background: #f8e8e4;
}

.post-open-button {
  width: 100%;
  min-width: 0;
}

.post-field-tag,
.post-field-tags > .post-field-tag {
  display: inline-flex;
  min-height: 25px;
  padding: 4px 9px;
  align-items: center;
  cursor: pointer;
  color: #52747a;
  background: #e7f0ee;
  border: 1px solid rgba(72, 112, 119, 0.08);
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.2;
}

.post-field-tag:hover,
.post-field-tag:focus-visible {
  color: #315d65;
  background: #dbeae7;
  border-color: rgba(61, 103, 109, 0.25);
}

.detail-field-tags .post-field-tag::before {
  content: "#";
  margin-right: 2px;
  opacity: 0.65;
}

.post-external-link {
  display: inline;
  color: #39747b;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: rgba(57, 116, 123, 0.36);
  text-underline-offset: 3px;
}

.post-external-link i {
  margin-left: 3px;
  font-size: 0.82em;
}

.field-help-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-help-row > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (max-width: 760px) {
  #boardPage {
    max-width: 100%;
    overflow-x: clip;
  }

  .board-intro,
  .board-intro > div,
  .board-tools,
  .post-search,
  .post-grid,
  .post-card,
  .post-open-button,
  .post-footer {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .board-intro h1 {
    max-width: 100%;
    font-size: clamp(2rem, 10vw, 2.55rem);
    overflow-wrap: anywhere;
  }

  .board-intro .button-primary {
    max-width: 100%;
    white-space: normal;
  }

  .board-tools {
    display: grid;
    margin-bottom: 11px;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .post-search {
    display: flex;
    flex-basis: auto;
  }

  .post-search input {
    min-width: 0;
    min-height: 48px;
    border-radius: 15px;
  }

  .post-ownership-filters {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ownership-chip {
    min-width: 0;
    min-height: 40px;
    padding-inline: 7px;
    font-size: 0.68rem;
  }

  .category-filters {
    width: 100%;
    max-width: 100%;
    padding: 3px 0 9px;
    margin: 0 0 17px;
  }

  .post-results-summary {
    margin: -9px 1px 11px;
  }

  .post-card {
    padding: 0;
  }

  .post-card > .post-open-button {
    padding: 18px 18px 8px;
  }

  .post-card > .post-field-tags {
    padding: 0 18px;
    margin: 0 0 12px;
  }

  .post-card h2,
  .post-card p {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .post-footer {
    padding: 0 17px 16px;
  }

  .post-field-tag,
  .post-field-tags > .post-field-tag {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 0.61rem;
  }

  .bottle-guide {
    top: calc(var(--mobile-header-height) + 82px);
    bottom: auto;
    left: 12px;
    width: calc(100% - 24px);
    min-height: 68px;
    padding: 8px 10px;
    grid-template-columns: 38px minmax(0, 1fr) 28px;
    border-radius: 17px;
  }

  .bottle-guide img {
    width: 31px;
    height: 44px;
  }

  .bottle-guide.is-compact {
    width: 210px;
    min-height: 48px;
    grid-template-columns: 27px minmax(0, 1fr) 22px;
  }

  .bottle-guide.is-compact img {
    width: 23px;
    height: 32px;
  }

  .bottle-guide strong {
    font-size: 0.7rem;
  }

  .bottle-guide small {
    font-size: 0.59rem;
  }

  .detail-body {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .field-help-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

/* Final aquarium layout guards: keep the community layout above older theme layers. */
#appView[data-active-page="aquarium"] #aquariumPage {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 100dvh;
  padding: 40px clamp(22px, 4vw, 64px) 128px;
  overflow: visible;
}

#appView[data-active-page="aquarium"] #aquariumPage .lake-card {
  position: relative;
  inset: auto;
  width: min(1180px, 100%);
  height: auto;
  min-height: 0;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 32px;
}

#appView[data-active-page="aquarium"] #aquariumPage .lake-toolbar {
  position: relative;
  top: auto;
  right: auto;
}

#appView[data-active-page="aquarium"] #aquariumPage .lake-toolbar > div {
  display: block;
}

#appView[data-active-page="aquarium"] #aquariumPage .lake-surface {
  position: relative;
  inset: auto;
  width: 100%;
  height: clamp(500px, 58vw, 650px);
  min-height: 500px;
}

#appView[data-active-page="aquarium"] #aquariumPage .fish-drawer {
  position: fixed;
  right: 26px;
  bottom: 26px;
  left: auto;
  width: min(410px, calc(100% - 52px));
  transform: none;
}

@media (max-width: 760px) {
  #appView[data-active-page="aquarium"] .page-container {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  #appView[data-active-page="aquarium"] #aquariumPage {
    height: auto;
    min-height: 100dvh;
    padding: calc(var(--mobile-header-height) + 19px) var(--mobile-gutter) calc(var(--mobile-nav-height) + 42px + env(safe-area-inset-bottom));
    overflow: visible;
  }

  #appView[data-active-page="aquarium"] #aquariumPage .lake-card {
    inset: auto;
    width: 100%;
    height: auto;
    border-radius: 25px;
  }

  #appView[data-active-page="aquarium"] #aquariumPage .lake-surface {
    inset: auto;
    height: 510px;
    min-height: 510px;
  }

  #appView[data-active-page="aquarium"] #aquariumPage .fish-drawer {
    position: fixed;
    right: 10px;
    bottom: calc(var(--mobile-nav-height) + 16px + env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
    transform: none;
  }
}

/* Community-only aquarium: automatic presence and three simple states. */
.aquarium-status-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.aquarium-participation-control {
  grid-template-columns: 1fr;
}

.aquarium-auto-join-note {
  display: flex;
  min-height: 52px;
  padding: 10px 13px;
  margin: 0;
  align-items: center;
  gap: 10px;
  color: #416870;
  background: rgba(231, 243, 239, 0.78);
  border: 1px solid rgba(65, 104, 112, 0.09);
  border-radius: 16px;
}

.aquarium-auto-join-note > i {
  flex: 0 0 auto;
  color: #6ca792;
  font-size: 1.35rem;
}

.aquarium-auto-join-note > span {
  display: grid;
  gap: 2px;
}

.aquarium-auto-join-note strong {
  font-size: 0.76rem;
}

.aquarium-auto-join-note small {
  color: #72898d;
  font-size: 0.61rem;
  line-height: 1.45;
}

.aquarium-settings {
  width: 100%;
}

.community-stats-card .stat-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.community-stats-note {
  padding: 14px 15px;
  margin: 18px 0 0;
  color: #627d82;
  background: #edf5f2;
  border-radius: 15px;
  font-size: 0.72rem;
  line-height: 1.75;
}

.community-history-grid {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 760px) {
  .mobile-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .aquarium-status-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .status-choice {
    padding-inline: 6px;
    font-size: 0.66rem;
  }

  .aquarium-auto-join-note {
    min-height: 58px;
  }
}

/* Lake concept guide: fish are live presence, bottles are asynchronous messages. */
.lake-community-guide {
  display: grid;
  padding: 14px 16px 16px;
  background: rgba(251, 252, 248, 0.96);
  border-top: 1px solid rgba(58, 98, 105, 0.08);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.lake-community-guide p {
  display: flex;
  min-width: 0;
  min-height: 68px;
  padding: 12px 14px;
  margin: 0;
  align-items: center;
  gap: 11px;
  color: #476a71;
  background: rgba(232, 243, 240, 0.76);
  border: 1px solid rgba(64, 105, 112, 0.09);
  border-radius: 17px;
}

.lake-community-guide p:last-child {
  background: rgba(248, 237, 232, 0.74);
}

.lake-community-guide i {
  display: grid;
  flex: 0 0 auto;
  width: 39px;
  height: 39px;
  place-items: center;
  color: #56898a;
  background: rgba(255, 255, 255, 0.76);
  border-radius: 13px;
  font-size: 1.15rem;
}

.lake-community-guide p:last-child i {
  color: #a87475;
}

.lake-community-guide span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.lake-community-guide strong {
  color: #365d64;
  font-size: 0.73rem;
}

.lake-community-guide small {
  color: #74898d;
  font-size: 0.61rem;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .lake-community-guide {
    padding: 11px;
    grid-template-columns: 1fr;
  }

  .lake-community-guide p {
    min-height: 62px;
    padding: 10px 12px;
  }
}

/* ================================================================
   Public homepage
   A calm, editorial entrance to the Manabium lake. All selectors are
   scoped so the authenticated application keeps its existing layout.
   ================================================================ */

.public-site {
  --public-deep: #264e58;
  --public-ink: #315b64;
  --public-muted: #6f898d;
  --public-aqua: #79b9b7;
  --public-aqua-pale: #edf7f4;
  --public-paper: #fbfcf8;
  --public-blush: #d99a97;
  --public-sand: #d8c4a8;
  position: relative;
  min-height: 100vh;
  overflow: clip;
  color: var(--public-ink);
  background: var(--public-paper);
}

.public-site button,
.public-site a {
  font-family: var(--font-body);
}

.public-skip-link {
  position: fixed;
  z-index: 200;
  top: 10px;
  left: 10px;
  padding: 9px 14px;
  color: white;
  background: var(--public-deep);
  border-radius: 999px;
  text-decoration: none;
  transform: translateY(-150%);
}

.public-skip-link:focus {
  transform: translateY(0);
}

.public-header {
  position: fixed;
  z-index: 90;
  top: 18px;
  left: 50%;
  display: grid;
  width: min(calc(100% - 40px), 1160px);
  min-height: 68px;
  padding: 9px 11px 9px 17px;
  align-items: center;
  grid-template-columns: 1fr auto 1fr;
  color: #365c64;
  background: rgba(250, 252, 248, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 22px;
  box-shadow: 0 13px 40px rgba(48, 82, 88, 0.07);
  backdrop-filter: blur(18px) saturate(0.9);
  transform: translateX(-50%);
  transition: top 260ms ease, background 260ms ease, box-shadow 260ms ease;
}

.public-header.is-scrolled {
  top: 9px;
  background: rgba(250, 252, 248, 0.94);
  box-shadow: 0 15px 45px rgba(44, 77, 83, 0.12);
}

.public-depth-nav {
  position: fixed;
  z-index: 82;
  top: 50%;
  right: max(5px, calc((100vw - 1310px) / 2));
  display: grid;
  padding: 13px 10px;
  gap: 9px;
  background: rgba(248, 251, 247, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  box-shadow: 0 14px 36px rgba(43, 77, 84, 0.08);
  backdrop-filter: blur(16px);
  translate: 0 -50%;
}

.public-depth-nav a {
  position: relative;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #809699;
  text-decoration: none;
}

.public-depth-nav a::before {
  position: absolute;
  right: 39px;
  width: max-content;
  padding: 7px 10px;
  content: attr(data-depth-label);
  opacity: 0;
  color: #4d7076;
  background: rgba(250, 252, 248, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  box-shadow: 0 9px 24px rgba(44, 78, 84, 0.11);
  font-size: 0.59rem;
  font-weight: 800;
  pointer-events: none;
  translate: 7px 0;
  transition: opacity 220ms ease, translate 220ms ease;
}

.public-depth-nav a:hover::before,
.public-depth-nav a:focus-visible::before {
  opacity: 1;
  translate: 0 0;
}

.public-depth-nav a span {
  display: block;
  width: 6px;
  height: 6px;
  background: #93abad;
  border-radius: 50%;
  transition: background 250ms ease, box-shadow 250ms ease, scale 250ms ease;
}

.public-depth-nav a b {
  position: absolute;
  opacity: 0;
  font-family: var(--font-display);
  font-size: 0.5rem;
  font-weight: 500;
  transition: opacity 250ms ease;
}

.public-depth-nav a.is-current span {
  background: #c87f7b;
  box-shadow: 0 0 0 7px rgba(200, 127, 123, 0.12);
  scale: 1.18;
}

.public-depth-nav a.is-current b { opacity: 1; }
.public-depth-nav a.is-current span { opacity: 0; }

.public-brand {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 11px;
  color: var(--public-deep);
  font-family: var(--font-display) !important;
  font-size: 1.18rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-decoration: none;
}

.public-brand img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  background: #faf7f4;
  border: 1px solid rgba(73, 106, 111, 0.12);
  border-radius: 15px;
  box-shadow: 0 7px 18px rgba(53, 84, 90, 0.1);
}

.public-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 34px);
}

.public-nav a {
  position: relative;
  padding: 7px 0;
  color: #5f7a80;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.public-nav a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 1px;
  content: "";
  background: #7eaaa9;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms ease;
}

.public-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.public-nav a.is-current {
  color: var(--public-deep);
}

.public-nav a.is-current::after {
  transform: scaleX(1);
  transform-origin: left;
}

.public-header-actions {
  display: flex;
  justify-self: end;
  align-items: center;
  gap: 8px;
}

.public-login {
  padding: 10px 15px;
  cursor: pointer;
  color: #58747a;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease;
}

.public-login:hover {
  color: var(--public-deep);
  background: rgba(114, 160, 160, 0.1);
}

.public-button {
  --magnet-x: 0px;
  --magnet-y: 0px;
  position: relative;
  display: inline-flex;
  min-height: 54px;
  padding: 14px 23px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fffdf9;
  background: #bd7775;
  border: 1px solid #bd7775;
  border-radius: 999px;
  box-shadow: 0 13px 28px rgba(157, 92, 89, 0.2);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  overflow: hidden;
  transform: translate3d(var(--magnet-x), var(--magnet-y), 0);
  transition: background 190ms ease, border-color 190ms ease, box-shadow 190ms ease,
    transform 190ms ease;
  will-change: transform;
}

.public-button:hover {
  color: white;
  background: #a96665;
  border-color: #a96665;
  box-shadow: 0 16px 34px rgba(147, 79, 77, 0.25);
  transform: translate3d(var(--magnet-x), calc(var(--magnet-y) - 2px), 0);
}

.public-button-ripple {
  position: absolute;
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  pointer-events: none;
  translate: -50% -50%;
  animation: public-button-ripple 650ms ease-out forwards;
}

.public-button i {
  font-size: 1.05rem;
  transition: transform 180ms ease;
}

.public-button:hover i {
  transform: translateX(3px);
}

.public-button-small {
  min-height: 43px;
  padding: 10px 18px;
  box-shadow: 0 8px 18px rgba(157, 92, 89, 0.17);
  font-size: 0.76rem;
}

.public-hero {
  position: relative;
  min-height: max(760px, 100svh);
  overflow: clip;
  background: #dbeeed;
}

.public-hero::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(238, 247, 244, 0.92) 0%, rgba(238, 247, 244, 0.73) 38%, rgba(234, 246, 244, 0.13) 68%),
    linear-gradient(180deg, rgba(250, 251, 247, 0.28), transparent 35%, rgba(38, 91, 101, 0.08)),
    url("./assets/aquarium-background.png") center / cover;
  transform: scale(1.035) translate3d(
    calc(var(--public-pointer-x, 0) * -7px),
    calc(var(--public-pointer-y, 0) * -5px + var(--public-hero-shift, 0px)),
    0
  );
  transition: transform 120ms linear;
}

.public-hero::after {
  position: absolute;
  z-index: 2;
  right: -15%;
  bottom: -24%;
  left: -15%;
  height: 36%;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(233, 245, 242, 0.74));
  filter: blur(14px);
  pointer-events: none;
}

.public-hero-water {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

.public-ripple-canvas {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.86;
  pointer-events: none;
}

.public-light-ray {
  position: absolute;
  top: -18%;
  width: 16%;
  height: 115%;
  opacity: 0.3;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0));
  filter: blur(10px);
  transform: rotate(13deg);
  transform-origin: top;
  animation: public-ray 9s ease-in-out infinite alternate;
}

.ray-one { right: 18%; }
.ray-two { right: 39%; width: 8%; opacity: 0.16; animation-delay: -4s; }

.public-bubble {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.4);
  animation: public-bubble-rise 8s ease-in infinite;
}

.public-bubble-one { right: 8%; bottom: 7%; }
.public-bubble-two { right: 36%; bottom: 13%; width: 9px; height: 9px; animation-delay: -3.5s; }
.public-bubble-three { right: 20%; bottom: 28%; width: 12px; height: 12px; animation-delay: -6s; }

.public-swimmer {
  position: absolute;
  width: 160px;
  opacity: 0.72;
  filter: saturate(0.68) drop-shadow(0 10px 16px rgba(43, 83, 91, 0.12));
  will-change: transform;
}

.public-swimmer-one {
  right: 3%;
  bottom: 17%;
  animation: public-swim-one 14s ease-in-out infinite alternate;
}

.public-swimmer-two {
  top: 23%;
  right: 30%;
  width: 98px;
  opacity: 0.46;
  filter: hue-rotate(315deg) saturate(0.55) drop-shadow(0 8px 14px rgba(43, 83, 91, 0.1));
  animation: public-swim-two 18s ease-in-out infinite alternate;
}

.public-floating-bottle {
  position: absolute;
  top: 32%;
  right: 7%;
  width: 108px;
  opacity: 0.82;
  filter: drop-shadow(0 15px 16px rgba(45, 77, 82, 0.15));
  animation: public-bottle-drift 7s ease-in-out infinite;
}

.public-hero-inner {
  position: relative;
  z-index: 5;
  display: grid;
  width: min(calc(100% - 48px), 1160px);
  min-height: max(760px, 100svh);
  padding: 138px 0 92px;
  margin: 0 auto;
  align-items: center;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.76fr);
  gap: clamp(34px, 4.5vw, 64px);
}

.public-hero-copy {
  max-width: 700px;
}

.public-kicker,
.public-section-label {
  display: flex;
  margin-bottom: 17px;
  align-items: center;
  gap: 10px;
  color: #587c82;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.public-kicker span {
  display: block;
  width: 28px;
  height: 1px;
  background: #74a6a5;
}

.public-hero-copy h1 {
  margin-bottom: 27px;
  color: var(--public-deep);
  font-family: var(--font-display);
  font-size: clamp(3.1rem, 4.1vw, 4.4rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.025em;
  text-wrap: balance;
}

.public-heading-line { display: block; }

.public-hero-copy h1 .public-heading-line:first-child {
  font-size: 0.92em;
}

.public-hero-copy h1 em {
  position: relative;
  color: #ad716f;
  font-style: normal;
  white-space: nowrap;
}

.public-hero-copy h1 em::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 7px;
  content: "";
  opacity: 0.32;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='8' viewBox='0 0 200 8'%3E%3Cpath d='M1 5.4C33 1.6 55 7.1 92 4.2S151 3.7 199 2.4' fill='none' stroke='%23c68482' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.public-lead {
  max-width: 590px;
  margin-bottom: 31px;
  color: #56767c;
  font-size: clamp(0.92rem, 1.25vw, 1.04rem);
  font-weight: 500;
  line-height: 2.05;
  text-wrap: pretty;
}

.public-lead-line { display: block; }

.public-hero-actions,
.public-beta-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.public-text-link {
  display: inline-flex;
  min-height: 48px;
  padding: 8px 4px;
  align-items: center;
  gap: 8px;
  color: #55757a;
  border-bottom: 1px solid rgba(85, 117, 122, 0.36);
  font-size: 0.83rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease, border-color 180ms ease;
}

.public-text-link:hover { color: var(--public-deep); border-color: var(--public-deep); }

.public-trust-list {
  display: flex;
  padding: 0;
  margin: 26px 0 0;
  gap: 16px;
  flex-wrap: wrap;
  color: #688288;
  list-style: none;
  font-size: 0.71rem;
  font-weight: 700;
}

.public-trust-list li {
  display: flex;
  align-items: center;
  gap: 5px;
}

.public-trust-list i { color: #72a39f; font-size: 0.92rem; }

.public-lake-card {
  position: relative;
  width: min(100%, 470px);
  overflow: hidden;
  justify-self: end;
  background: rgba(248, 251, 247, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 34px;
  box-shadow: 0 28px 70px rgba(42, 81, 88, 0.17);
  backdrop-filter: blur(13px) saturate(0.9);
  transform: perspective(1100px)
    rotateX(var(--public-card-tilt-x, 0deg))
    rotateY(var(--public-card-tilt-y, 0deg))
    translate3d(calc(var(--public-pointer-x, 0) * 7px), calc(var(--public-pointer-y, 0) * 8px), 0);
  transform-style: preserve-3d;
  transition: transform 180ms ease-out, box-shadow 260ms ease;
  will-change: transform;
}

.public-lake-card::before {
  position: absolute;
  z-index: 8;
  inset: 0;
  content: "";
  opacity: var(--public-card-glow-opacity, 0);
  background: radial-gradient(
    260px circle at var(--public-card-glow-x, 50%) var(--public-card-glow-y, 50%),
    rgba(255, 255, 255, 0.42),
    transparent 68%
  );
  border-radius: inherit;
  mix-blend-mode: screen;
  pointer-events: none;
  transition: opacity 260ms ease;
}

.public-lake-card:hover {
  box-shadow: 0 38px 90px rgba(35, 74, 82, 0.23);
}

.public-lake-card-head {
  display: flex;
  min-height: 72px;
  padding: 18px 22px;
  align-items: center;
  justify-content: space-between;
  color: #52747a;
  background: rgba(250, 252, 248, 0.9);
}

.public-lake-card-head span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.73rem;
  font-weight: 800;
}

.public-lake-card-head span i {
  width: 8px;
  height: 8px;
  background: #74b39e;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(116, 179, 158, 0.1);
}

.public-lake-card-head small {
  color: #8ba0a3;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.public-lake-card-scene {
  position: relative;
  height: 390px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(182, 222, 222, 0.12), rgba(59, 126, 139, 0.14)),
    url("./assets/aquarium-background.png") center / cover;
}

.public-scene-touch {
  position: absolute;
  z-index: 7;
  top: 18px;
  left: 50%;
  display: inline-flex;
  padding: 7px 10px;
  align-items: center;
  gap: 6px;
  color: rgba(65, 101, 107, 0.76);
  background: rgba(247, 251, 248, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  translate: -50% 0;
  animation: public-touch-hint 4.8s ease-in-out infinite;
}

.public-scene-touch i { font-size: 0.78rem; }

.public-lake-card-scene::before {
  position: absolute;
  z-index: 1;
  inset: -20%;
  content: "";
  opacity: 0.24;
  background: linear-gradient(108deg, transparent 33%, rgba(255, 255, 255, 0.58) 48%, transparent 61%);
  filter: blur(5px);
  animation: public-caustic-drift 10s ease-in-out infinite alternate;
  pointer-events: none;
}

.public-lake-card-scene::after {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at 55% 15%, rgba(255, 255, 255, 0.45), transparent 34%);
}

.public-scene-fish {
  position: absolute;
  z-index: 2;
  width: 130px;
  filter: saturate(0.62) drop-shadow(0 8px 12px rgba(38, 78, 86, 0.13));
}

.scene-fish-one { translate: var(--public-card-layer-x-slow, 0px) var(--public-card-layer-y-slow, 0px); }
.scene-fish-two { translate: var(--public-card-layer-x-fast, 0px) var(--public-card-layer-y-fast, 0px); }
.public-scene-bottle { translate: var(--public-card-layer-x-fast, 0px) var(--public-card-layer-y-fast, 0px); }
.public-scene-signal { translate: var(--public-card-layer-x-slow, 0px) var(--public-card-layer-y-slow, 0px); }

.scene-fish-one { top: 92px; left: 40px; animation: public-scene-swim 9s ease-in-out infinite alternate; }
.scene-fish-two { right: 18px; bottom: 52px; width: 100px; filter: hue-rotate(320deg) saturate(0.55); animation: public-scene-swim-two 11s ease-in-out infinite alternate; }

.public-scene-bottle {
  position: absolute;
  z-index: 3;
  top: 55px;
  right: 76px;
  width: 82px;
  filter: drop-shadow(0 10px 10px rgba(45, 74, 80, 0.14));
  animation: public-bottle-drift 6.5s ease-in-out infinite -2s;
}

.public-scene-signal {
  position: absolute;
  z-index: 5;
  top: 172px;
  left: 78px;
  padding: 9px 13px;
  color: #58777c;
  background: rgba(252, 253, 249, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 14px 14px 14px 3px;
  box-shadow: 0 9px 18px rgba(45, 79, 85, 0.1);
  font-size: 0.66rem;
  font-weight: 700;
  animation: public-signal 5.5s ease-in-out infinite;
}

.public-scene-ripple {
  position: absolute;
  z-index: 1;
  width: 105px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 50%;
  animation: public-ripple 5s ease-out infinite;
}

.ripple-one { right: 56px; bottom: 73px; }
.ripple-two { top: 123px; left: 42px; width: 85px; animation-delay: -2.5s; }

.public-lake-card-foot {
  display: grid;
  min-height: 80px;
  padding: 17px 20px;
  align-items: center;
  grid-template-columns: 1fr 1.35fr;
  gap: 12px;
  background: rgba(250, 252, 248, 0.94);
}

.public-lake-card-foot span {
  display: grid;
  gap: 2px;
  color: #7b9094;
  font-size: 0.61rem;
  line-height: 1.45;
}

.public-lake-card-foot b { color: #466b72; font-size: 0.69rem; }

.public-scroll-cue {
  position: absolute;
  z-index: 7;
  bottom: 31px;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 7px;
  color: rgba(52, 90, 98, 0.68);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-decoration: none;
  transform: translateX(-50%);
}

.public-scroll-cue i {
  display: block;
  width: 1px;
  height: 33px;
  overflow: hidden;
  background: rgba(61, 103, 110, 0.22);
}

.public-scroll-cue i::after {
  display: block;
  width: 1px;
  height: 15px;
  content: "";
  background: #557f84;
  animation: public-scroll-line 2.2s ease-in-out infinite;
}

.public-quiet-band {
  position: relative;
  z-index: 8;
  display: grid;
  min-height: 180px;
  padding: 44px 24px;
  place-items: center;
  color: #55747a;
  background: #f8faf6;
  border-bottom: 1px solid rgba(67, 107, 113, 0.08);
}

.public-quiet-band p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.1vw, 1.9rem);
  letter-spacing: 0.06em;
  text-align: center;
}

.public-quiet-band strong { color: #a7706e; font-weight: 500; }

.public-section {
  position: relative;
  width: min(calc(100% - 48px), 1160px);
  padding: 120px 0;
  margin: 0 auto;
}

.public-section-heading {
  width: min(100%, 790px);
  margin-bottom: 54px;
}

.public-section-label {
  color: #789395;
}

.public-section-heading h2,
.public-experience-copy h2,
.public-difference-copy h2,
.public-safety-copy h2,
.public-beta-copy h2,
.public-final-cta h2 {
  margin-bottom: 22px;
  color: var(--public-deep);
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.35vw, 3.15rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.035em;
  text-wrap: balance;
}

.public-section-heading > p:last-child,
.public-experience-copy > p,
.public-difference-copy > p,
.public-beta-copy > p {
  max-width: 680px;
  margin-bottom: 0;
  color: #6e878c;
  font-size: 0.9rem;
  line-height: 2;
}

.public-about { padding-bottom: 145px; }

.public-need-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.public-need-card {
  position: relative;
  min-height: 340px;
  padding: 35px 31px 30px;
  overflow: hidden;
  background: rgba(238, 246, 243, 0.68);
  border: 1px solid rgba(81, 125, 129, 0.09);
  border-radius: 28px;
  transition: box-shadow 250ms ease, transform 250ms ease;
}

.public-need-card::before,
.public-safety-grid article::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  opacity: 0;
  background: radial-gradient(
    220px circle at var(--public-hover-x, 50%) var(--public-hover-y, 50%),
    rgba(255, 255, 255, 0.8),
    transparent 72%
  );
  pointer-events: none;
  transition: opacity 280ms ease;
}

.public-need-card:hover::before,
.public-safety-grid article:hover::before { opacity: 0.72; }

.public-need-card > *,
.public-safety-grid article > * {
  position: relative;
  z-index: 1;
}

.public-need-card::after {
  position: absolute;
  right: -45px;
  bottom: -55px;
  width: 150px;
  height: 150px;
  content: "";
  background: radial-gradient(circle, rgba(255, 255, 255, 0.78), transparent 68%);
  border-radius: 50%;
}

.public-need-card:hover {
  box-shadow: 0 22px 50px rgba(49, 87, 94, 0.1);
  transform: translateY(-5px);
}

.public-need-card:hover > i {
  box-shadow: 0 16px 30px rgba(63, 100, 105, 0.12);
  rotate: -4deg;
  translate: 0 -4px;
}

.public-need-card.need-career { background: rgba(247, 237, 231, 0.66); }
.public-need-card.need-event { background: rgba(240, 239, 246, 0.7); }

.public-card-number {
  position: absolute;
  top: 25px;
  right: 27px;
  color: rgba(72, 109, 115, 0.34);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.public-need-card > i {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 49px;
  place-items: center;
  color: #668f90;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(63, 100, 105, 0.07);
  font-size: 1.55rem;
  transition: box-shadow 300ms ease, rotate 300ms ease, translate 300ms ease;
}

.need-career > i { color: #b47b78; }
.need-event > i { color: #857eaf; }

.public-need-card h3 {
  margin-bottom: 13px;
  color: #365f67;
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.public-need-card p {
  margin-bottom: 21px;
  color: #6d858a;
  font-size: 0.8rem;
  line-height: 1.85;
}

.public-need-card small {
  color: #82979a;
  font-size: 0.68rem;
  font-weight: 700;
}

.public-experience {
  display: grid;
  width: 100%;
  max-width: none;
  padding: 130px max(24px, calc((100vw - 1160px) / 2));
  align-items: center;
  grid-template-columns: minmax(400px, 1fr) minmax(350px, 0.9fr);
  gap: clamp(55px, 8vw, 120px);
  background: #eff6f3;
}

.public-experience-visual {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.75), transparent 42%),
    linear-gradient(150deg, rgba(174, 213, 210, 0.58), rgba(227, 241, 237, 0.75));
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 42% 58% 46% 54% / 56% 44% 56% 44%;
  box-shadow: inset 0 0 70px rgba(255, 255, 255, 0.32), 0 30px 70px rgba(50, 90, 96, 0.12);
}

.public-experience-visual::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(115deg, transparent 22%, rgba(255, 255, 255, 0.26) 40%, transparent 58%);
  animation: public-water-shimmer 9s ease-in-out infinite alternate;
}

.public-experience-bottle {
  position: absolute;
  z-index: 4;
  top: 92px;
  left: 12%;
  width: 190px;
  filter: drop-shadow(0 24px 23px rgba(39, 78, 84, 0.18));
  animation: public-bottle-drift 7s ease-in-out infinite;
  translate: 0 var(--public-parallax-fast, 0px);
}

.public-experience-lily {
  position: absolute;
  z-index: 3;
  right: 4%;
  bottom: 40px;
  width: 250px;
  filter: drop-shadow(0 20px 22px rgba(39, 78, 84, 0.14));
  animation: public-lily-float 8s ease-in-out infinite;
  translate: 0 var(--public-parallax-slow, 0px);
}

.public-orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  animation: public-ripple 6s ease-out infinite;
}

.orbit-one { top: 80px; left: 4%; width: 250px; height: 95px; }
.orbit-two { right: 0; bottom: 64px; width: 280px; height: 82px; animation-delay: -3s; }

.public-experience-note {
  position: absolute;
  z-index: 6;
  padding: 11px 14px;
  color: #526f75;
  background: rgba(252, 252, 247, 0.91);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 15px;
  box-shadow: 0 12px 24px rgba(45, 79, 84, 0.12);
  font-size: 0.68rem;
  font-weight: 700;
}

.note-question { top: 283px; left: 27%; }
.note-reply { right: 10%; bottom: 90px; color: #7c696c; }

.public-experience-copy { max-width: 510px; }

.public-step-list {
  display: grid;
  padding: 0;
  margin: 39px 0 0;
  gap: 5px;
  list-style: none;
}

.public-step-list li {
  display: grid;
  min-height: 88px;
  padding: 17px 0;
  align-items: center;
  grid-template-columns: 42px 1fr;
  gap: 16px;
  border-bottom: 1px solid rgba(67, 105, 110, 0.12);
  transition: padding 240ms ease, background 240ms ease;
}

.public-step-list li:hover {
  padding-inline: 12px;
  background: rgba(255, 255, 255, 0.38);
  border-radius: 16px;
}

.public-step-list li > span {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  color: #6e9595;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 0.73rem;
}

.public-step-list div { display: grid; gap: 3px; }
.public-step-list b { color: #456a71; font-size: 0.84rem; }
.public-step-list small { color: #799094; font-size: 0.7rem; line-height: 1.6; }

.public-difference { padding-top: 145px; padding-bottom: 145px; }
.public-difference-copy { max-width: 800px; margin-bottom: 55px; }

.public-difference-route {
  display: grid;
  padding: 33px;
  align-items: center;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 18px;
  background: rgba(239, 246, 243, 0.67);
  border: 1px solid rgba(69, 109, 115, 0.09);
  border-radius: 28px;
}

.public-difference-route > div {
  display: flex;
  min-height: 92px;
  padding: 18px;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.63);
  border-radius: 20px;
  transition: box-shadow 260ms ease, translate 260ms ease;
}

.public-difference-route > div:hover {
  box-shadow: 0 15px 32px rgba(47, 82, 88, 0.09);
  translate: 0 -4px;
}

.public-difference-route > div > i {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #688f91;
  background: #edf6f3;
  border-radius: 15px;
  font-size: 1.2rem;
}

.public-difference-route span { display: grid; gap: 3px; }
.public-difference-route b { color: #456a71; font-size: 0.79rem; }
.public-difference-route small { color: #829598; font-size: 0.65rem; }
.route-arrow { color: #93a7a9; }

.public-safety {
  position: relative;
  overflow: hidden;
  color: #dbe8e6;
  background: #315f67;
}

.public-safety-water {
  position: absolute;
  inset: 0;
  opacity: 0.17;
  background:
    linear-gradient(180deg, rgba(18, 55, 64, 0.35), rgba(21, 61, 70, 0.82)),
    url("./assets/aquarium-background.png") center / cover;
  filter: saturate(0.6) contrast(0.92);
  transform: scale(1.08) translateY(var(--public-parallax-slow, 0px));
  transition: transform 100ms linear;
}

.public-safety-water::after {
  position: absolute;
  inset: -30%;
  content: "";
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.16) 49%, transparent 63%);
  animation: public-water-shimmer 12s ease-in-out infinite alternate;
}

.public-safety-inner {
  display: grid;
  padding-top: 130px;
  padding-bottom: 130px;
  align-items: center;
  grid-template-columns: 0.83fr 1.17fr;
  gap: clamp(55px, 8vw, 110px);
}

.public-safety-copy { position: relative; z-index: 2; }
.public-safety-copy .public-section-label { color: #a9c8c5; }
.public-safety-copy h2 {
  color: #f6f7f2;
  font-size: clamp(2rem, 3.05vw, 2.85rem);
  letter-spacing: 0.025em;
}
.public-safety-copy > p { margin-bottom: 32px; color: #c7d8d6; font-size: 0.84rem; line-height: 2; }

.public-button-light {
  color: #315f67;
  background: #f6f5ef;
  border-color: #f6f5ef;
  box-shadow: 0 15px 34px rgba(18, 49, 55, 0.24);
}

.public-button-light:hover { color: #284e56; background: white; border-color: white; }

.public-safety-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.public-safety-grid article {
  position: relative;
  min-height: 210px;
  padding: 27px 24px;
  overflow: hidden;
  background: rgba(244, 249, 246, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 23px;
  backdrop-filter: blur(8px);
}

.public-safety-grid article::before {
  background: radial-gradient(
    220px circle at var(--public-hover-x, 50%) var(--public-hover-y, 50%),
    rgba(160, 214, 209, 0.2),
    transparent 72%
  );
}

.public-safety-grid article > i {
  display: grid;
  width: 43px;
  height: 43px;
  margin-bottom: 28px;
  place-items: center;
  color: #d9e8e5;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  font-size: 1.18rem;
}

.public-safety-grid h3 { margin-bottom: 9px; color: #f0f5f2; font-size: 0.91rem; }
.public-safety-grid p { margin-bottom: 0; color: #b9cecb; font-size: 0.69rem; line-height: 1.85; }

.public-beta { padding-top: 135px; padding-bottom: 135px; }

.public-beta-card {
  display: grid;
  min-height: 410px;
  padding: 55px 64px;
  overflow: hidden;
  align-items: center;
  grid-template-columns: 1.15fr 0.65fr;
  gap: 45px;
  background: linear-gradient(135deg, #f4ece8, #f7f7f1 58%, #e8f3f0);
  border: 1px solid rgba(92, 120, 123, 0.08);
  border-radius: 36px;
  box-shadow: 0 24px 65px rgba(55, 87, 92, 0.09);
}

.public-beta-copy { position: relative; z-index: 2; }
.public-beta-copy h2 { font-size: clamp(1.9rem, 3.2vw, 2.8rem); }
.public-beta-actions { margin-top: 30px; }

.public-beta-card > img {
  width: min(100%, 310px);
  justify-self: end;
  mix-blend-mode: multiply;
  opacity: 0.83;
  filter: saturate(0.72) contrast(0.93);
  transform: rotate(2deg);
}

.public-final-cta {
  position: relative;
  display: grid;
  min-height: 520px;
  padding: 100px 24px;
  overflow: hidden;
  place-items: center;
  align-content: center;
  background: #e9f4f1;
  text-align: center;
}

.public-final-cta::before,
.public-final-cta::after {
  position: absolute;
  width: 210px;
  height: 150px;
  content: "";
  opacity: 0.35;
  background: url("./assets/fish-watercolor.png") center / contain no-repeat;
  filter: saturate(0.58);
}

.public-final-cta::before { top: 17%; left: 4%; animation: public-swim-one 12s ease-in-out infinite alternate; }
.public-final-cta::after { right: 4%; bottom: 10%; transform: scaleX(-1); animation: public-swim-two 13s ease-in-out infinite alternate; }

.public-final-cta::before { translate: 0 var(--public-parallax-slow, 0px); }
.public-final-cta::after { translate: 0 var(--public-parallax-fast, 0px); }

.public-final-cta > p {
  position: relative;
  z-index: 2;
  margin-bottom: 16px;
  color: #829b9d;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.public-final-cta h2 { position: relative; z-index: 2; margin-bottom: 30px; }
.public-final-cta .public-button { position: relative; z-index: 2; }
.public-final-cta small { position: relative; z-index: 2; margin-top: 15px; color: #829799; font-size: 0.68rem; }

.public-final-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 280px;
  height: 110px;
  border: 1px solid rgba(103, 151, 151, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: public-final-ripple 5s ease-out infinite;
}

.public-footer {
  display: grid;
  min-height: 190px;
  padding: 42px max(24px, calc((100vw - 1160px) / 2));
  align-items: center;
  grid-template-columns: auto 1fr auto;
  gap: 25px;
  color: #70878a;
  background: #f9faf6;
  border-top: 1px solid rgba(70, 108, 113, 0.09);
}

.public-footer p { margin: 0; font-size: 0.72rem; }
.public-footer button { padding: 8px 0; cursor: pointer; color: #5f7b80; background: transparent; border: 0; border-bottom: 1px solid #a7b8b9; font-size: 0.72rem; font-weight: 700; }
.public-footer small { grid-column: 1 / -1; color: #9aa9aa; font-size: 0.61rem; }

.public-site.public-motion-ready [data-reveal] {
  opacity: 0;
  translate: 0 27px;
  transition: opacity 760ms cubic-bezier(0.22, 1, 0.36, 1),
    translate 760ms cubic-bezier(0.22, 1, 0.36, 1),
    scale 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.public-site.public-motion-ready [data-reveal].is-visible {
  opacity: 1;
  translate: 0 0;
  scale: 1;
}

.public-site.public-motion-ready .public-experience-visual[data-reveal] { translate: -42px 18px; }
.public-site.public-motion-ready .public-experience-copy[data-reveal],
.public-site.public-motion-ready .public-discovery-scene[data-reveal] { translate: 42px 18px; }
.public-site.public-motion-ready .public-experience-visual[data-reveal].is-visible,
.public-site.public-motion-ready .public-experience-copy[data-reveal].is-visible,
.public-site.public-motion-ready .public-discovery-scene[data-reveal].is-visible { translate: 0 0; }

.public-site.public-motion-ready .public-need-card[data-reveal],
.public-site.public-motion-ready .public-safety-grid article[data-reveal] { scale: 0.975; }

.public-site.public-motion-ready .public-hero-copy.is-visible > * {
  animation: public-copy-arrive 760ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.public-site.public-motion-ready .public-hero-copy.is-visible > :nth-child(2) { animation-delay: 80ms; }
.public-site.public-motion-ready .public-hero-copy.is-visible > :nth-child(3) { animation-delay: 150ms; }
.public-site.public-motion-ready .public-hero-copy.is-visible > :nth-child(4) { animation-delay: 220ms; }
.public-site.public-motion-ready .public-hero-copy.is-visible > :nth-child(5) { animation-delay: 290ms; }

.public-site.public-motion-ready .public-section-heading.is-visible .public-heading-line,
.public-site.public-motion-ready .public-discovery-copy.is-visible .public-heading-line,
.public-site.public-motion-ready .public-experience-copy.is-visible .public-heading-line,
.public-site.public-motion-ready .public-difference-copy.is-visible .public-heading-line,
.public-site.public-motion-ready .public-safety-copy.is-visible .public-heading-line,
.public-site.public-motion-ready .public-final-cta.is-visible .public-heading-line {
  animation: public-line-reveal 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.public-site.public-motion-ready .public-heading-line:nth-child(2) { animation-delay: 110ms !important; }

.public-site.public-motion-ready .public-need-card:nth-child(2),
.public-site.public-motion-ready .public-safety-grid article:nth-child(2) { transition-delay: 90ms; }
.public-site.public-motion-ready .public-need-card:nth-child(3),
.public-site.public-motion-ready .public-safety-grid article:nth-child(3) { transition-delay: 180ms; }
.public-site.public-motion-ready .public-safety-grid article:nth-child(4) { transition-delay: 270ms; }

/* Public authentication dialog */
.auth-modal {
  width: min(calc(100% - 28px), 520px);
  max-height: min(92dvh, 820px);
  padding: 0;
  overflow: visible;
  color: #365b63;
  background: transparent;
  border: 0;
  border-radius: 30px;
}

.auth-modal[open] { animation: public-modal-in 240ms cubic-bezier(0.22, 1, 0.36, 1); }

.auth-modal::backdrop {
  background: rgba(30, 58, 64, 0.46);
  backdrop-filter: blur(8px) saturate(0.78);
}

.auth-modal .auth-card {
  width: 100%;
  max-height: min(92dvh, 820px);
  padding: 40px 44px 37px;
  overflow: auto;
  background: rgba(247, 249, 245, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 30px;
  box-shadow: 0 35px 90px rgba(24, 52, 57, 0.28);
}

.auth-modal .auth-card h2 {
  margin-bottom: 7px;
  color: #345a62;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-align: center;
}

.auth-modal .auth-card > .subtle { text-align: center; }
.auth-modal .auth-card .segmented { margin-top: 25px; margin-bottom: 21px; }
.auth-modal .auth-input-wrap input { min-height: 55px; }
.auth-modal .auth-card .button-wide { min-height: 53px; }

.auth-modal-brand {
  display: flex;
  margin-bottom: 18px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #365d65;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.auth-modal-brand img { width: 38px; height: 38px; border-radius: 13px; }

.auth-modal-close {
  position: absolute;
  z-index: 5;
  top: 13px;
  right: 13px;
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  cursor: pointer;
  place-items: center;
  color: #6d8589;
  background: rgba(228, 238, 235, 0.9);
  border: 0;
  border-radius: 50%;
  font-size: 1.1rem;
  transition: background 180ms ease, transform 180ms ease;
}

.auth-modal-close:hover { background: #dae9e6; transform: rotate(5deg); }

@keyframes public-ray {
  from { opacity: 0.18; transform: rotate(10deg) translateX(-15px); }
  to { opacity: 0.36; transform: rotate(15deg) translateX(22px); }
}

@keyframes public-bubble-rise {
  0% { opacity: 0; transform: translate3d(0, 10px, 0) scale(0.8); }
  18% { opacity: 0.75; }
  100% { opacity: 0; transform: translate3d(14px, -210px, 0) scale(1.08); }
}

@keyframes public-swim-one {
  0% { transform: translate3d(-24px, 5px, 0) rotate(-2deg); }
  45% { transform: translate3d(4px, -15px, 0) rotate(1deg); }
  100% { transform: translate3d(34px, 9px, 0) rotate(-1deg); }
}

@keyframes public-swim-two {
  0% { transform: translate3d(24px, -9px, 0) scaleX(-1) rotate(1deg); }
  52% { transform: translate3d(-8px, 12px, 0) scaleX(-1) rotate(-2deg); }
  100% { transform: translate3d(-31px, -3px, 0) scaleX(-1) rotate(1deg); }
}

@keyframes public-scene-swim {
  0% { transform: translate3d(-12px, 8px, 0) rotate(-2deg); }
  50% { transform: translate3d(21px, -7px, 0) rotate(1deg); }
  100% { transform: translate3d(44px, 5px, 0) rotate(-1deg); }
}

@keyframes public-scene-swim-two {
  0% { transform: translate3d(18px, -7px, 0) scaleX(-1) rotate(1deg); }
  100% { transform: translate3d(-38px, 12px, 0) scaleX(-1) rotate(-2deg); }
}

@keyframes public-bottle-drift {
  0%, 100% { transform: translate3d(-3px, 0, 0) rotate(-3deg); }
  45% { transform: translate3d(6px, -13px, 0) rotate(2deg); }
  72% { transform: translate3d(10px, -6px, 0) rotate(1deg); }
}

@keyframes public-lily-float {
  0%, 100% { transform: translate3d(-3px, 2px, 0) rotate(-1deg); }
  50% { transform: translate3d(8px, -9px, 0) rotate(1.5deg); }
}

@keyframes public-ripple {
  0% { opacity: 0; transform: scale(0.74); }
  22% { opacity: 0.72; }
  100% { opacity: 0; transform: scale(1.24); }
}

@keyframes public-final-ripple {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
  25% { opacity: 0.75; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2.3); }
}

@keyframes public-signal {
  0%, 24%, 100% { opacity: 0; transform: translateY(8px); }
  35%, 78% { opacity: 1; transform: translateY(0); }
  90% { opacity: 0; transform: translateY(-5px); }
}

@keyframes public-scroll-line {
  0% { transform: translateY(-17px); }
  100% { transform: translateY(34px); }
}

@keyframes public-water-shimmer {
  from { transform: translateX(-13%) rotate(1deg); }
  to { transform: translateX(13%) rotate(-1deg); }
}

@keyframes public-caustic-drift {
  from { opacity: 0.12; transform: translate3d(-18%, -3%, 0) rotate(-4deg); }
  to { opacity: 0.34; transform: translate3d(18%, 4%, 0) rotate(3deg); }
}

@keyframes public-copy-arrive {
  from { opacity: 0; translate: 0 16px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes public-line-reveal {
  from { opacity: 0; clip-path: inset(0 100% 0 0); translate: 0 18px; }
  to { opacity: 1; clip-path: inset(0 0 0 0); translate: 0 0; }
}

@keyframes public-touch-hint {
  0%, 100% { opacity: 0.48; translate: -50% 0; }
  45% { opacity: 0.94; translate: -50% -3px; }
}

@keyframes public-button-ripple {
  from { opacity: 0.72; scale: 0; }
  to { opacity: 0; scale: 19; }
}

@keyframes public-modal-in {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1040px) {
  .public-depth-nav { display: none; }
  .public-header { grid-template-columns: 1fr auto; }
  .public-nav { display: none; }
  .public-hero-inner { grid-template-columns: minmax(0, 1fr) minmax(340px, 0.72fr); gap: 30px; }
  .public-hero-copy h1 { font-size: clamp(2.75rem, 4.7vw, 3.65rem); }
  .public-lake-card-scene { height: 350px; }
  .public-experience { grid-template-columns: minmax(350px, 0.9fr) minmax(330px, 1fr); }
  .public-experience-visual { min-height: 510px; }
  .public-safety-inner { grid-template-columns: 0.8fr 1.2fr; gap: 45px; }
  .public-beta-card { padding: 50px; }
}

@media (max-width: 820px) {
  .public-header {
    top: 10px;
    width: calc(100% - 22px);
    min-height: 62px;
    padding: 8px 9px 8px 13px;
    border-radius: 19px;
  }

  .public-header.is-scrolled { top: 7px; }
  .public-brand { gap: 8px; font-size: 1rem; }
  .public-brand img { width: 38px; height: 38px; border-radius: 13px; }
  .public-header-actions .public-login { display: none; }
  .public-button-small { min-height: 41px; padding: 9px 15px; }

  .public-hero { min-height: auto; }
  .public-hero::before {
    background:
      linear-gradient(180deg, rgba(235, 246, 243, 0.79) 0%, rgba(235, 246, 243, 0.74) 44%, rgba(220, 239, 237, 0.1) 76%),
      linear-gradient(90deg, rgba(237, 247, 244, 0.7), rgba(237, 247, 244, 0.08)),
      url("./assets/aquarium-background.png") center / cover;
  }

  .public-hero-inner {
    min-height: auto;
    padding: 121px 0 92px;
    grid-template-columns: 1fr;
    gap: 46px;
  }

  .public-hero-copy { max-width: 690px; }
  .public-lake-card { width: min(100%, 560px); justify-self: center; }
  .public-lake-card {
    transform: none;
  }
  .public-lake-card-scene { height: 330px; }
  .public-scroll-cue { display: none; }
  .public-swimmer-one { right: -5%; bottom: 47%; }
  .public-swimmer-two { top: 33%; right: 4%; }
  .public-floating-bottle { top: 50%; right: 5%; }

  .public-section { padding-top: 92px; padding-bottom: 92px; }
  .public-need-grid { grid-template-columns: 1fr; }
  .public-need-card { min-height: 255px; }
  .public-need-card > i { margin-bottom: 30px; }

  .public-experience {
    padding: 92px 24px;
    grid-template-columns: 1fr;
    gap: 65px;
  }

  .public-experience-visual { width: min(100%, 580px); min-height: 480px; margin: 0 auto; }
  .public-experience-copy { max-width: 650px; }

  .public-difference-route { grid-template-columns: 1fr; }
  .route-arrow { justify-self: center; transform: rotate(90deg); }

  .public-safety-inner { grid-template-columns: 1fr; }
  .public-safety-copy { max-width: 640px; }
  .public-beta-card { grid-template-columns: 1fr; }
  .public-beta-card > img { width: 230px; justify-self: center; }
}

@media (max-width: 560px) {
  .public-header { border-radius: 17px; }
  .public-header .public-brand span { font-size: 0.92rem; }
  .public-button-small { padding-inline: 14px; font-size: 0.7rem; }

  .public-hero-inner,
  .public-section { width: min(calc(100% - 32px), 1160px); }

  .public-hero-inner { padding-top: 112px; padding-bottom: 66px; }
  .public-kicker { margin-bottom: 14px; font-size: 0.61rem; letter-spacing: 0.13em; }
  .public-hero-copy h1 { margin-bottom: 20px; font-size: clamp(2.55rem, 12.5vw, 3.6rem); line-height: 1.32; }
  .public-hero-copy h1 em { white-space: normal; }
  .public-heading-line { display: inline; }
  .public-lead-line { display: inline; }
  .public-lead { margin-bottom: 25px; font-size: 0.86rem; line-height: 1.9; }
  .public-lead br { display: none; }
  .public-hero-actions { gap: 9px; }
  .public-hero-actions .public-button { width: 100%; }
  .public-text-link { margin-inline: auto; }
  .public-trust-list { margin-top: 20px; gap: 9px 13px; font-size: 0.64rem; }

  .public-lake-card { border-radius: 27px; }
  .public-lake-card-head { min-height: 62px; padding: 14px 16px; }
  .public-lake-card-head small { display: none; }
  .public-lake-card-scene { height: 300px; }
  .public-scene-fish { width: 105px; }
  .scene-fish-one { left: 18px; }
  .scene-fish-two { right: 4px; width: 86px; }
  .public-scene-bottle { right: 42px; width: 70px; }
  .public-scene-signal { left: 44px; }
  .public-lake-card-foot { min-height: 72px; padding: 14px; grid-template-columns: 1fr 1.35fr; }
  .public-lake-card-foot span { font-size: 0.55rem; }
  .public-swimmer-one { width: 120px; }
  .public-swimmer-two { display: none; }
  .public-floating-bottle { width: 78px; }

  .public-quiet-band { min-height: 150px; padding-inline: 30px; }
  .public-quiet-band p { font-size: 1.1rem; line-height: 1.9; }

  .public-section { padding-top: 78px; padding-bottom: 78px; }
  .public-section-heading { margin-bottom: 35px; }
  .public-section-heading h2,
  .public-experience-copy h2,
  .public-difference-copy h2,
  .public-safety-copy h2,
  .public-beta-copy h2,
  .public-final-cta h2 { font-size: clamp(1.75rem, 8.3vw, 2.35rem); line-height: 1.5; }
  .public-section-heading h2 br,
  .public-experience-copy h2 br,
  .public-difference-copy h2 br { display: none; }

  .public-need-card { min-height: 245px; padding: 29px 25px; border-radius: 24px; }
  .public-need-card > i { width: 52px; height: 52px; margin-bottom: 25px; }

  .public-experience { padding: 80px 16px; }
  .public-experience-visual { min-height: 390px; border-radius: 35% 65% 42% 58% / 55% 43% 57% 45%; }
  .public-experience-bottle { top: 55px; width: 140px; }
  .public-experience-lily { right: -2%; bottom: 24px; width: 180px; }
  .note-question { top: 215px; left: 20%; }
  .note-reply { right: 5%; bottom: 68px; }

  .public-difference-route { padding: 17px; border-radius: 24px; }
  .public-difference-route > div { min-height: 82px; padding: 14px; }

  .public-safety-inner { width: min(calc(100% - 32px), 1160px); padding-top: 86px; padding-bottom: 86px; }
  .public-safety-grid { grid-template-columns: 1fr; }
  .public-safety-grid article { min-height: 180px; }

  .public-beta-card { padding: 37px 25px; border-radius: 28px; gap: 35px; }
  .public-beta-actions { align-items: stretch; flex-direction: column; }
  .public-beta-actions .public-login { min-height: 48px; }

  .public-final-cta { min-height: 500px; padding-inline: 30px; }
  .public-final-cta::before,
  .public-final-cta::after { width: 130px; opacity: 0.22; }
  .public-final-cta::before { left: -5%; }
  .public-final-cta::after { right: -5%; }

  .public-footer { min-height: 230px; align-content: center; grid-template-columns: 1fr auto; }
  .public-footer p { grid-column: 1 / -1; }
  .public-footer small { grid-column: 1 / -1; }

  .auth-modal { width: calc(100% - 16px); max-height: 94dvh; margin-bottom: 8px; }
  .auth-modal .auth-card { max-height: 94dvh; padding: 32px 20px 26px; border-radius: 26px; }
  .auth-modal .auth-card h2 { font-size: 1.7rem; }
  .auth-modal .auth-input-wrap input { min-height: 53px; padding-left: 47px; }
  .auth-modal .auth-card .auth-form { gap: 15px; }
  .auth-modal-close { top: 10px; right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .public-site *,
  .public-site *::before,
  .public-site *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .public-site.public-motion-ready [data-reveal] { opacity: 1; translate: none; scale: 1; }
  .public-ripple-canvas { display: none; }
  .public-lake-card { transform: none; }
}

/* ================================================================
   Fish-to-bottle discovery
   Connects a live fish profile to the author's public bottle trail.
   ================================================================ */

.fish-drawer:not([hidden]) {
  animation: fish-drawer-arrive 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.drawer-bottle-section {
  padding: 13px;
  margin-top: 13px;
  background:
    linear-gradient(145deg, rgba(235, 246, 243, 0.96), rgba(248, 240, 235, 0.76));
  border: 1px solid rgba(64, 105, 112, 0.09);
  border-radius: 17px;
}

.drawer-bottle-heading {
  display: flex;
  margin-bottom: 9px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.drawer-bottle-heading p {
  display: grid;
  margin: 0;
  gap: 1px;
}

.drawer-bottle-heading p > span {
  color: #7f9699;
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.drawer-bottle-heading strong {
  color: #3b6168;
  font-size: 0.73rem;
}

.drawer-bottle-count {
  display: grid;
  min-width: 28px;
  height: 28px;
  padding-inline: 7px;
  place-items: center;
  color: #805f63;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  box-shadow: 0 5px 13px rgba(49, 83, 89, 0.08);
  font-size: 0.65rem;
  font-weight: 800;
}

.drawer-bottle-preview {
  display: grid;
  gap: 6px;
}

.drawer-bottle-card {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 56px;
  padding: 9px 32px 9px 10px;
  cursor: pointer;
  text-align: left;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(71, 111, 117, 0.08);
  border-radius: 12px;
  gap: 4px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.drawer-bottle-card:hover {
  border-color: rgba(73, 119, 125, 0.23);
  box-shadow: 0 8px 18px rgba(47, 82, 88, 0.09);
  transform: translateY(-2px);
}

.drawer-bottle-card > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.drawer-bottle-card small {
  color: #b17170;
  font-size: 0.52rem;
  font-weight: 800;
}

.drawer-bottle-card time {
  color: #91a1a3;
  font-size: 0.49rem;
}

.drawer-bottle-card strong {
  overflow: hidden;
  color: #46676d;
  font-size: 0.64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-bottle-card > i {
  position: absolute;
  top: 50%;
  right: 10px;
  color: #729095;
  transform: translateY(-50%);
}

.drawer-bottle-empty {
  display: flex;
  min-height: 58px;
  margin: 0;
  align-items: center;
  gap: 8px;
  color: #7c9194;
  font-size: 0.6rem;
  line-height: 1.55;
}

.drawer-bottle-empty i { color: #b5807d; font-size: 1.1rem; }

.drawer-view-bottles {
  display: inline-flex;
  min-height: 36px;
  padding: 7px 11px;
  margin-top: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #fffdfa;
  background: #648b91;
  border: 0;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 800;
  transition: background 180ms ease, transform 180ms ease;
}

.drawer-view-bottles:hover { background: #52777e; transform: translateY(-1px); }

.post-author-filter {
  display: flex;
  padding: 12px 15px;
  margin: 13px 0 20px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #496c73;
  background: linear-gradient(110deg, #e8f4f1, #f8eeea);
  border: 1px solid rgba(68, 107, 113, 0.1);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(48, 82, 88, 0.06);
  font-size: 0.73rem;
}

.post-author-filter > span { display: flex; align-items: center; gap: 7px; }
.post-author-filter > span i { color: #699a98; font-size: 1.05rem; }
.post-author-filter button {
  display: inline-flex;
  min-height: 36px;
  padding: 7px 11px;
  cursor: pointer;
  align-items: center;
  gap: 5px;
  color: #765f63;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(117, 91, 96, 0.1);
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 700;
}

.aquarium-quick-messages .quick-message-featured {
  color: #815e62;
  background: linear-gradient(135deg, #fae9e4, #fff7ec);
  border-color: rgba(184, 118, 112, 0.16);
  box-shadow: 0 5px 14px rgba(125, 86, 84, 0.08);
}

.quick-message-featured i { margin-right: 3px; }

.quick-message-divider {
  flex: 0 0 1px;
  width: 1px;
  height: 24px;
  margin: 0 4px;
  background: rgba(68, 105, 111, 0.14);
}

@keyframes fish-drawer-arrive {
  from { opacity: 0; transform: translate3d(0, 22px, 0) scale(0.97); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

/* Public homepage: close-field discovery story */
.public-header::after {
  position: absolute;
  right: 14px;
  bottom: -1px;
  left: 14px;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, #76aaa8, #d78f8b);
  border-radius: 999px;
  transform: scaleX(var(--public-scroll-progress, 0));
  transform-origin: left;
}

.public-scene-signal.is-changing { animation: public-signal-change 520ms cubic-bezier(0.22, 1, 0.36, 1) both; }

.public-discovery {
  display: grid;
  padding-top: 130px;
  padding-bottom: 150px;
  align-items: center;
  grid-template-columns: minmax(350px, 0.82fr) minmax(460px, 1fr);
  gap: clamp(55px, 8vw, 105px);
}

.public-discovery-copy h2 {
  margin-bottom: 22px;
  color: var(--public-deep);
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.6vw, 3.35rem);
  font-weight: 500;
  line-height: 1.42;
  letter-spacing: 0.05em;
}

.public-discovery-copy > p:last-of-type {
  color: #6e878c;
  font-size: 0.88rem;
  line-height: 2;
}

.public-discovery-points {
  display: grid;
  padding: 0;
  margin: 32px 0 0;
  list-style: none;
  gap: 3px;
}

.public-discovery-points li {
  display: grid;
  min-height: 78px;
  padding: 14px 0;
  align-items: center;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  border-bottom: 1px solid rgba(66, 105, 111, 0.11);
}

.public-discovery-points li > span {
  color: #c27e7b;
  font-family: var(--font-display);
  font-size: 0.72rem;
}

.public-discovery-points div { display: grid; gap: 2px; }
.public-discovery-points b { color: #456a71; font-size: 0.8rem; }
.public-discovery-points small { color: #7f9497; font-size: 0.67rem; line-height: 1.6; }

.public-discovery-scene {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.68), transparent 27%),
    linear-gradient(155deg, #d9eeeb, #eef5f1 60%, #f5eae5);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 46% 54% 42% 58% / 54% 43% 57% 46%;
  box-shadow: inset 0 0 70px rgba(255, 255, 255, 0.32), 0 30px 70px rgba(50, 90, 96, 0.12);
}

.public-discovery-current {
  position: absolute;
  top: 16%;
  right: -10%;
  width: 82%;
  height: 18%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  filter: blur(10px);
  transform: rotate(-8deg);
  animation: discovery-current 9s ease-in-out infinite alternate;
}

.public-discovery-fish {
  position: absolute;
  z-index: 3;
  top: 82px;
  left: 42px;
  display: grid;
  width: 155px;
  padding: 0;
  place-items: center;
  background: transparent;
  border: 0;
  animation: discovery-fish 7.5s ease-in-out infinite alternate;
  translate: 0 var(--public-parallax-slow, 0px);
}

.public-discovery-fish img {
  width: 145px;
  filter: hue-rotate(155deg) saturate(0.52) drop-shadow(0 12px 15px rgba(38, 78, 86, 0.16));
}

.public-discovery-fish span {
  display: grid;
  min-width: 105px;
  padding: 7px 11px;
  margin-top: -12px;
  color: #42676e;
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 13px;
  box-shadow: 0 8px 18px rgba(46, 78, 84, 0.1);
}

.public-discovery-fish b { font-size: 0.68rem; }
.public-discovery-fish small { color: #7d9194; font-size: 0.55rem; }

.public-discovery-profile {
  position: absolute;
  z-index: 4;
  right: 34px;
  bottom: 56px;
  display: grid;
  width: min(340px, 65%);
  padding: 23px;
  color: #476970;
  background: rgba(252, 252, 248, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 25px;
  box-shadow: 0 22px 45px rgba(47, 83, 90, 0.16);
  backdrop-filter: blur(13px);
  gap: 9px;
  animation: discovery-profile 8.5s ease-in-out infinite alternate;
  translate: 0 var(--public-parallax-fast, 0px);
}

.public-discovery-match {
  display: inline-flex;
  width: max-content;
  padding: 5px 8px;
  align-items: center;
  gap: 5px;
  color: #966966;
  background: #f8e9e5;
  border-radius: 999px;
  font-size: 0.55rem;
  font-weight: 800;
}

.public-discovery-profile > strong { font-family: var(--font-display); font-size: 1.03rem; font-weight: 500; }
.public-discovery-profile article {
  display: grid;
  padding: 10px 12px;
  background: rgba(236, 245, 242, 0.84);
  border-radius: 13px;
  gap: 2px;
}
.public-discovery-profile article small { color: #b37975; font-size: 0.52rem; font-weight: 800; }
.public-discovery-profile article b { overflow: hidden; font-size: 0.65rem; text-overflow: ellipsis; white-space: nowrap; }
.public-discovery-profile > button {
  display: inline-flex;
  padding: 7px 0 0;
  align-items: center;
  gap: 5px;
  color: #5a7d82;
  background: transparent;
  border: 0;
  font-size: 0.6rem;
  font-weight: 800;
}

.public-discovery-signal {
  position: absolute;
  z-index: 6;
  top: 228px;
  left: 95px;
  display: inline-flex;
  padding: 10px 13px;
  align-items: center;
  gap: 7px;
  color: #765f63;
  background: rgba(255, 249, 244, 0.93);
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 15px 15px 15px 4px;
  box-shadow: 0 10px 23px rgba(49, 82, 88, 0.12);
  font-size: 0.63rem;
  font-weight: 800;
  animation: discovery-signal 6s ease-in-out infinite;
  translate: 0 var(--public-parallax-slow, 0px);
}

@keyframes public-signal-change {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes discovery-current {
  from { transform: translate3d(-7%, -4px, 0) rotate(-8deg); opacity: 0.24; }
  to { transform: translate3d(9%, 8px, 0) rotate(-3deg); opacity: 0.56; }
}

@keyframes discovery-fish {
  from { transform: translate3d(-7px, 4px, 0) rotate(-1deg); }
  to { transform: translate3d(23px, -11px, 0) rotate(1deg); }
}

@keyframes discovery-profile {
  from { transform: translate3d(0, 4px, 0) rotate(0.2deg); }
  to { transform: translate3d(-5px, -7px, 0) rotate(-0.3deg); }
}

@keyframes discovery-signal {
  0%, 18%, 100% { opacity: 0.28; transform: translateY(7px); }
  30%, 82% { opacity: 1; transform: translateY(0); }
}

@media (max-width: 820px) {
  .public-discovery { grid-template-columns: 1fr; gap: 60px; }
  .public-discovery-copy { max-width: 680px; }
  .public-discovery-scene { width: min(100%, 620px); margin: 0 auto; }
}

@media (max-width: 760px) {
  .fish-drawer { align-items: start; }
  .drawer-bottle-section { grid-column: 1 / -1; }
  .post-author-filter { align-items: stretch; flex-direction: column; }
  .post-author-filter button { width: max-content; }
  .quick-message-divider { display: none; }
}

@media (max-width: 560px) {
  .public-discovery { padding-top: 82px; padding-bottom: 92px; }
  .public-discovery-copy h2 { font-size: clamp(1.75rem, 8.3vw, 2.35rem); line-height: 1.5; }
  .public-discovery-copy h2 br { display: none; }
  .public-discovery-scene { min-height: 430px; border-radius: 34% 66% 43% 57% / 52% 42% 58% 48%; }
  .public-discovery-fish { top: 52px; left: 12px; width: 126px; }
  .public-discovery-fish img { width: 118px; }
  .public-discovery-signal { top: 180px; left: 38px; }
  .public-discovery-profile { right: 18px; bottom: 31px; width: 74%; padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .fish-drawer:not([hidden]),
  .public-discovery-current,
  .public-discovery-fish,
  .public-discovery-profile,
  .public-discovery-signal,
  .public-scene-signal.is-changing {
    animation: none !important;
  }
}

/* Keep the reply inbox above legacy aquarium theme rules declared earlier in this file. */
#appView[data-active-page="aquarium"] #aquariumPage .lake-toolbar > .lake-toolbar-actions {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
}

#appView[data-active-page="aquarium"] #aquariumPage .reply-lily {
  top: auto;
  right: auto;
  bottom: 3.5%;
  left: 2.4%;
  width: clamp(126px, 12vw, 152px);
  min-height: 104px;
}

#appView[data-active-page="aquarium"] #aquariumPage .reply-lily-art,
#appView[data-active-page="aquarium"] #aquariumPage .reply-lily::before,
#appView[data-active-page="aquarium"] #aquariumPage .reply-lily::after {
  animation-iteration-count: 2;
}

#appView[data-active-page="aquarium"] #aquariumPage .reply-lily-label {
  right: 4%;
  bottom: 0;
  padding: 6px 9px;
  background: rgba(251, 253, 249, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(47, 78, 82, 0.1);
  font-size: 0.61rem;
  text-shadow: none;
  white-space: nowrap;
}

/* ============================================================
   Operations room / admin analytics
   ============================================================ */

.admin-page {
  padding-bottom: 76px;
}

.admin-intro {
  align-items: flex-end;
}

.admin-secure-badge {
  display: inline-flex;
  min-height: 42px;
  padding: 9px 15px;
  align-items: center;
  gap: 7px;
  color: #315e63;
  background: rgba(238, 248, 246, 0.86);
  border: 1px solid rgba(75, 132, 134, 0.16);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-range-form {
  display: grid;
  padding: 18px;
  margin-bottom: 22px;
  grid-template-columns: repeat(3, minmax(140px, 1fr)) auto;
  align-items: end;
  gap: 13px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(64, 111, 115, 0.12);
  border-radius: 20px;
  box-shadow: 0 14px 38px rgba(41, 78, 82, 0.07);
  backdrop-filter: blur(18px);
}

.admin-range-form label { display: grid; gap: 6px; color: #668186; font-size: 0.68rem; font-weight: 800; }
.admin-range-form input,
.admin-range-form select { width: 100%; min-height: 43px; color: #315e63; background: rgba(255, 255, 255, 0.92); }

.admin-loading {
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink-soft);
  font-weight: 700;
}

.admin-loading[hidden] { display: none; }

.admin-kpi-grid {
  display: grid;
  margin-bottom: 22px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.admin-kpi-grid article {
  position: relative;
  min-height: 132px;
  padding: 19px 17px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(235, 248, 246, 0.86));
  border: 1px solid rgba(64, 111, 115, 0.12);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(41, 78, 82, 0.06);
}

.admin-kpi-grid article::after {
  position: absolute;
  width: 66px;
  height: 66px;
  right: -24px;
  bottom: -27px;
  content: "";
  background: rgba(239, 139, 121, 0.14);
  border-radius: 50%;
}

.admin-kpi-grid span,
.admin-kpi-grid small {
  display: block;
  color: #6e898d;
  font-size: 0.7rem;
  font-weight: 750;
}

.admin-kpi-grid strong {
  display: block;
  margin: 11px 0 7px;
  color: #244f56;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1;
}

.admin-panel {
  padding: 24px;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(64, 111, 115, 0.12);
  border-radius: 24px;
  box-shadow: 0 16px 42px rgba(41, 78, 82, 0.07);
}

.admin-panel-heading {
  display: flex;
  margin-bottom: 20px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.admin-panel-heading h2 {
  margin: 3px 0 0;
  color: #284f56;
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.admin-panel-heading > p {
  margin: 0;
  color: #789095;
  font-size: 0.72rem;
}

.admin-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.admin-two-column > .admin-panel { min-width: 0; }

.admin-mini-kpis {
  display: grid;
  margin-bottom: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.admin-mini-kpis div {
  padding: 13px 10px;
  text-align: center;
  background: #f2f9f8;
  border-radius: 15px;
}

.admin-mini-kpis strong,
.admin-mini-kpis span { display: block; }
.admin-mini-kpis strong { color: #2d686c; font-size: 1.25rem; }
.admin-mini-kpis span { margin-top: 3px; color: #799095; font-size: 0.64rem; font-weight: 700; }

.admin-trend-chart {
  display: flex;
  min-height: 220px;
  padding: 24px 10px 6px;
  align-items: flex-end;
  gap: clamp(5px, 1vw, 12px);
  overflow-x: auto;
  border-bottom: 1px solid rgba(64, 111, 115, 0.14);
}

.admin-trend-column {
  display: grid;
  min-width: 28px;
  height: 180px;
  flex: 1 0 28px;
  grid-template-rows: 20px 1fr 22px;
  align-items: end;
  justify-items: center;
  gap: 4px;
}

.admin-trend-value,
.admin-trend-column small { color: #7b9296; font-size: 0.58rem; font-weight: 700; }
.admin-trend-bar {
  width: min(26px, 72%);
  height: var(--bar-height);
  min-height: 5px;
  background: linear-gradient(180deg, #70c9c3, #3d8589);
  border-radius: 8px 8px 3px 3px;
  box-shadow: 0 5px 14px rgba(61, 133, 137, 0.18);
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  white-space: nowrap;
}

.admin-table-wrap th,
.admin-table-wrap td {
  padding: 11px 10px;
  border-bottom: 1px solid rgba(64, 111, 115, 0.1);
  text-align: right;
}

.admin-table-wrap th:first-child,
.admin-table-wrap td:first-child { text-align: left; }
.admin-table-wrap th { color: #789095; font-size: 0.65rem; }
.admin-table-wrap td { color: #365f64; }
.admin-table-wrap td strong,
.admin-table-wrap td small { display: block; }
.admin-table-wrap td small { margin-top: 3px; color: #809499; }

.admin-enterprise-audience {
  display: grid;
  margin-top: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-enterprise-audience > article {
  padding: 15px;
  background: #f7fbfa;
  border: 1px solid rgba(64, 111, 115, 0.09);
  border-radius: 17px;
}

.admin-enterprise-audience h3 { margin: 0 0 11px; color: #315e63; font-size: 0.78rem; }
.admin-enterprise-audience article > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.admin-enterprise-audience section > strong { display: block; margin-bottom: 5px; color: #789095; font-size: 0.62rem; }
.admin-enterprise-audience p { display: flex; padding: 4px 0; margin: 0; justify-content: space-between; gap: 8px; color: #5d777c; font-size: 0.64rem; }
.admin-enterprise-audience b { color: #345e63; white-space: nowrap; }
.admin-enterprise-audience-empty { grid-column: 1 / -1; }

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

.admin-demographic-grid section {
  padding: 16px;
  background: #f4faf9;
  border-radius: 17px;
}

.admin-demographic-grid h3 { margin: 0 0 10px; color: #315e63; font-size: 0.84rem; }
.admin-demographic-grid p { display: flex; padding: 7px 0; margin: 0; justify-content: space-between; gap: 10px; border-bottom: 1px solid rgba(64, 111, 115, 0.08); color: #5d777c; font-size: 0.69rem; }
.admin-demographic-grid p strong { color: #345e63; text-align: right; }
.admin-demographic-grid p small { display: block; color: #8aa0a3; font-size: 0.58rem; }

.admin-privacy-note {
  display: flex;
  padding: 14px 16px;
  margin-top: 16px;
  align-items: center;
  gap: 12px;
  color: #557579;
  background: #eef8f6;
  border-radius: 15px;
  font-size: 0.72rem;
}
.admin-privacy-note i { color: #3d8b86; font-size: 1.4rem; }
.admin-privacy-note strong { display: block; margin-bottom: 2px; color: #315e63; }
.admin-mini-kpis span small { display: block; margin-top: 3px; color: #8aa0a3; font-size: 0.55rem; }

.admin-action-list { display: grid; gap: 10px; }
.admin-moderation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.admin-moderation-grid > section { min-width: 0; }
.admin-moderation-grid h3 { margin: 0 0 12px; color: #345e63; font-size: 0.85rem; }
.admin-action-list article {
  display: flex;
  padding: 13px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f7fbfa;
  border: 1px solid rgba(64, 111, 115, 0.09);
  border-radius: 15px;
}
.admin-action-list article > div:first-child { min-width: 0; }
.admin-action-list strong { color: #315c62; font-size: 0.8rem; }
.admin-action-list p { margin: 4px 0; overflow: hidden; color: #6c8387; font-size: 0.68rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-action-list small { color: #91a1a4; font-size: 0.6rem; }
.admin-status { display: inline-flex; padding: 3px 7px; margin-right: 7px; border-radius: 999px; color: #5d777c; background: #e9f4f2; font-size: 0.57rem; font-weight: 800; }
.admin-status.status-open { color: #9a5953; background: #fff0ed; }
.admin-status.status-resolved { color: #39756d; background: #e7f7f2; }
.admin-row-actions { display: flex; flex: 0 0 auto; gap: 5px; }
.admin-row-actions button { min-height: 34px; padding: 6px 9px; cursor: pointer; color: #3f6f74; background: white; border: 1px solid rgba(64, 111, 115, 0.18); border-radius: 9px; font-size: 0.62rem; font-weight: 800; }
.admin-empty { width: 100%; padding: 24px; margin: 0; color: #899b9f; text-align: center; font-size: 0.75rem; }

@media (max-width: 1180px) {
  .admin-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-demographic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-enterprise-audience article > div { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .admin-page { padding-bottom: 110px; }
  .admin-intro { align-items: flex-start; }
  .admin-range-form { grid-template-columns: 1fr 1fr; }
  .admin-range-form label:nth-child(3), .admin-range-form .button { grid-column: 1 / -1; }
  .admin-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-kpi-grid article { min-height: 116px; padding: 16px 14px; }
  .admin-two-column { grid-template-columns: 1fr; }
  .admin-panel { padding: 18px 15px; border-radius: 20px; }
  .admin-panel-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .admin-mini-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-demographic-grid { grid-template-columns: 1fr; }
  .admin-enterprise-audience { grid-template-columns: 1fr; }
  .admin-action-list article { align-items: flex-start; flex-direction: column; }
  .admin-moderation-grid { grid-template-columns: 1fr; }
  .admin-row-actions { width: 100%; }
  .admin-row-actions button { flex: 1; }
}

@media (max-width: 760px) {
  #appView[data-active-page="aquarium"] #aquariumPage .reply-lily {
    top: auto;
    right: auto;
    bottom: 2%;
    left: 1%;
    width: 102px;
    min-height: 88px;
  }

  #appView[data-active-page="aquarium"] #aquariumPage .reply-lily-label {
    right: 0;
    bottom: -2px;
    padding: 5px 7px;
    font-size: 0.53rem;
  }
}

/* Private bottle bookmarks: separate from public likes. */
.bookmark-button {
  display: inline-flex;
  min-height: 36px;
  padding: 7px 11px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  color: #55767b;
  background: #eef6f3;
  border: 1px solid rgba(67, 112, 116, 0.13);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  transition: transform 150ms ease, color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.bookmark-button:hover { transform: translateY(-1px); }
.bookmark-button.saved {
  color: #fff;
  background: linear-gradient(135deg, #5b908d, #3e7377);
  border-color: transparent;
  box-shadow: 0 7px 17px rgba(55, 109, 111, 0.18);
}

.bookmark-button-icon {
  width: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: 12px;
}

.detail-reaction-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.private-save-label {
  display: inline-flex;
  padding: 6px 9px;
  align-items: center;
  gap: 5px;
  color: #648084;
  background: #edf5f2;
  border-radius: 999px;
  font-size: 0.59rem;
  font-weight: 800;
}

.saved-history-item {
  width: 100%;
  grid-template-columns: 35px minmax(0, 1fr) 18px;
  cursor: pointer;
  color: inherit;
  background: transparent;
  border-top: 0;
  border-right: 0;
  border-left: 0;
  text-align: left;
}

.saved-history-item > div { min-width: 0; }
.saved-history-item strong,
.saved-history-item > div > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-history-icon {
  display: grid;
  width: 31px;
  height: 31px;
  color: #4e8382 !important;
  background: #e9f4f1;
  border-radius: 10px;
  place-items: center;
}

.community-stats-card .stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.community-history-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bottle-share-entry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bottle-share-entry-grid button { min-width: 0; padding: 14px; grid-template-columns: 32px minmax(0, 1fr); }
.bottle-share-filters button { display: inline-flex; align-items: center; gap: 4px; }

@media (max-width: 760px) {
  .community-history-grid { grid-template-columns: 1fr; }
  .bottle-share-entry-grid { grid-template-columns: 1fr; }
  .bottle-share-filters { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 17px; }
  .bottle-share-filters button { min-width: 0; padding-inline: 6px; justify-content: center; border-radius: 13px; font-size: 0.59rem; }
  .detail-reaction-actions { width: 100%; }
  .detail-reaction-actions > button { flex: 1; }
}

/* ==========================================================
   Lakeside library — long-form anonymous notes
   ========================================================== */
.library-door {
  position: absolute;
  right: clamp(-5px, .8vw, 14px);
  bottom: -8px;
  z-index: 5;
  width: 170px;
  height: 150px;
  padding: 0;
  cursor: pointer;
  color: #eff9f4;
  background: transparent;
  border: 0;
  filter: drop-shadow(0 12px 15px rgba(24, 57, 57, 0.2));
  transform-origin: 65% 88%;
  transition: filter 220ms ease, transform 220ms ease;
}

.library-door::before,
.library-door::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.library-door::before {
  right: -9px;
  bottom: -13px;
  width: 178px;
  height: 69px;
  opacity: 0.92;
  background:
    radial-gradient(ellipse at 12% 82%, #577a78 0 17%, transparent 18%),
    radial-gradient(ellipse at 31% 68%, #73918b 0 19%, transparent 20%),
    radial-gradient(ellipse at 53% 78%, #496e6d 0 22%, transparent 23%),
    radial-gradient(ellipse at 76% 66%, #6f8f89 0 20%, transparent 21%),
    radial-gradient(ellipse at 94% 84%, #456867 0 16%, transparent 17%);
  filter: saturate(.74);
}

.library-door::after {
  left: 42px;
  bottom: 17px;
  width: 95px;
  height: 23px;
  opacity: .42;
  border-top: 2px solid rgba(229, 248, 237, .52);
  border-radius: 50%;
  box-shadow: 0 -6px 0 -4px rgba(229, 248, 237, .42);
}

.library-door:hover,
.library-door:focus-visible { filter: brightness(1.06) drop-shadow(0 15px 20px rgba(24, 66, 69, 0.28)); transform: translateY(-2px) scale(1.015); }
.library-door:focus-visible { outline: 3px solid rgba(255, 247, 210, 0.9); outline-offset: 7px; border-radius: 60px 60px 18px 18px; }
.library-door.is-entering { transform: scale(1.045); filter: brightness(1.13) drop-shadow(0 0 24px rgba(255, 244, 187, 0.56)); }

.library-door-glow {
  position: absolute;
  left: 47px;
  bottom: 25px;
  width: 82px;
  height: 100px;
  background: radial-gradient(ellipse at 50% 66%, rgba(255, 235, 158, .6), rgba(180, 223, 192, .17) 50%, transparent 74%);
  border-radius: 58% 58% 24% 24%;
  filter: blur(2px);
  animation: library-door-breathe 4.8s ease-in-out infinite;
}

.library-door-panel {
  position: absolute;
  left: 54px;
  bottom: 24px;
  display: grid;
  width: 68px;
  height: 87px;
  color: rgba(255, 246, 199, .9);
  background:
    radial-gradient(ellipse at 50% 68%, rgba(232, 208, 133, .22), transparent 37%),
    linear-gradient(160deg, #294c4d, #183839 73%);
  border: 5px solid rgba(109, 139, 130, .82);
  border-bottom-width: 8px;
  border-radius: 48% 48% 16% 16% / 42% 42% 12% 12%;
  box-shadow: inset 0 0 22px rgba(242, 224, 158, .16), 0 4px 0 rgba(34, 64, 62, .32);
  place-items: center;
}

.library-door-panel i { margin-top: 11px; font-size: 1.35rem; text-shadow: 0 0 13px rgba(255, 231, 154, 0.72); }
.library-door-stones { position: absolute; inset: 0; }
.library-door-stones i { position: absolute; width: 48px; height: 35px; background: linear-gradient(145deg, #87a29a, #517675); border: 1px solid rgba(224, 237, 224, 0.2); border-radius: 57% 43% 52% 48%; box-shadow: inset 5px 6px 10px rgba(255,255,255,.1), 0 4px 7px rgba(37,65,64,.16); filter: saturate(.68); }
.library-door-stones i:nth-child(1) { left: 23px; bottom: 16px; transform: rotate(11deg) scale(1.08); }
.library-door-stones i:nth-child(2) { right: 7px; bottom: 13px; transform: rotate(-9deg) scale(1.1); }
.library-door-stones i:nth-child(3) { left: 30px; top: 35px; transform: rotate(58deg) scale(.88); }
.library-door-stones i:nth-child(4) { right: 24px; top: 30px; transform: rotate(-53deg) scale(.82); }
.library-door-stones i:nth-child(5) { left: 55px; top: 15px; transform: rotate(8deg) scale(.76); }
.library-door-stones i:nth-child(6) { right: 49px; bottom: 4px; transform: rotate(-4deg) scale(.76); }

.library-door-reeds { position: absolute; left: 12px; bottom: 31px; width: 48px; height: 77px; opacity: .82; pointer-events: none; }
.library-door-reeds i { position: absolute; bottom: 0; width: 25px; height: 64px; border-left: 3px solid rgba(68, 112, 91, .78); border-radius: 50%; transform-origin: bottom; }
.library-door-reeds i::before,
.library-door-reeds i::after { position: absolute; width: 17px; height: 8px; content: ""; background: rgba(83, 126, 99, .78); border-radius: 100% 0 100% 0; }
.library-door-reeds i::before { top: 18px; left: -4px; transform: rotate(-24deg); }
.library-door-reeds i::after { top: 34px; left: 3px; transform: scaleX(-1) rotate(-24deg); }
.library-door-reeds i:nth-child(1) { left: 6px; height: 58px; transform: rotate(-13deg); }
.library-door-reeds i:nth-child(2) { left: 20px; height: 72px; transform: rotate(4deg); }
.library-door-reeds i:nth-child(3) { left: 34px; height: 50px; transform: rotate(17deg); }

.library-door-label {
  position: absolute;
  right: 8px;
  bottom: 2px;
  display: grid;
  width: max-content;
  min-width: 118px;
  padding: 6px 11px;
  color: #edf4e8;
  background: rgba(56, 85, 78, .82);
  border: 1px solid rgba(205, 222, 199, .3);
  border-radius: 46% 54% 43% 57% / 35% 40% 60% 65%;
  box-shadow: inset 0 1px rgba(255,255,255,.1), 0 5px 12px rgba(30, 58, 57, .16);
  text-shadow: 0 1px 2px rgba(27, 52, 51, .36);
}
.library-door-label strong { font-family: var(--font-display); font-size: 0.64rem; letter-spacing: 0.05em; }
.library-door-label small { display: none; }
.library-door-tip {
  position: absolute;
  right: 6px;
  top: -42px;
  width: 180px;
  padding: 9px 12px;
  color: #496d68;
  background: rgba(233, 246, 237, .87);
  border: 1px solid rgba(79, 119, 106, .16);
  border-radius: 50% 48% 46% 52% / 54% 54% 46% 46%;
  box-shadow: 0 8px 20px rgba(34, 71, 67, .1);
  font-size: 0.55rem;
  font-weight: 700;
  line-height: 1.65;
  text-align: center;
  animation: library-tip-arrive 700ms cubic-bezier(.2,.8,.2,1) both 800ms;
}
.library-door-tip::after { position: absolute; right: 26px; bottom: -9px; width: 7px; height: 7px; content: ""; background: rgba(233, 246, 237, .82); border-radius: 50%; box-shadow: 9px 9px 0 -2px rgba(233, 246, 237, .74); }
.library-door-tip[hidden] { display: none; }
.fish-reaction-bubble.is-note-notice { cursor: pointer; border-color: rgba(106, 89, 130, 0.24); background: linear-gradient(145deg, #fffdfa, #f2edf7); }
.fish-reaction-bubble.is-note-notice > i { color: #806a91; }

@keyframes library-door-breathe { 0%, 100% { opacity: .56; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.07); } }
@keyframes library-tip-arrive { from { opacity: 0; transform: translateX(8px) scale(.96); } to { opacity: 1; transform: none; } }

.library-page {
  --library-ink: #294f52;
  --library-muted: #778d8e;
  --library-paper: #fffdf8;
  padding-bottom: 90px;
  color: var(--library-ink);
}

.library-page::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    radial-gradient(circle at 10% 4%, rgba(208, 237, 226, 0.52), transparent 28%),
    radial-gradient(circle at 92% 12%, rgba(238, 220, 199, 0.43), transparent 25%),
    linear-gradient(180deg, #f4faf7, #f8f5ee 62%, #f0f6f2);
}

.library-hero {
  position: relative;
  display: flex;
  min-height: 230px;
  padding: clamp(30px, 5vw, 62px);
  margin-bottom: 24px;
  overflow: hidden;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  background:
    linear-gradient(110deg, rgba(36, 79, 75, 0.96), rgba(68, 116, 104, 0.9)),
    url("./assets/aquarium-background.png") center 62% / cover;
  border-radius: 30px;
  box-shadow: 0 24px 55px rgba(38, 77, 72, 0.18);
  isolation: isolate;
}
.library-hero::before { position: absolute; right: -44px; top: -90px; z-index: -1; width: 320px; height: 320px; content: ""; opacity: .28; background: repeating-radial-gradient(circle at 20% 65%, transparent 0 17px, rgba(255,255,255,.5) 18px 19px); border-radius: 50%; }
.library-hero::after { position: absolute; right: 10%; bottom: -48px; z-index: -1; width: 180px; height: 150px; content: ""; opacity: .25; background: radial-gradient(ellipse, #e3d8b7 0 5%, transparent 6%) 0 0 / 26px 26px; transform: rotate(-8deg); }
.library-hero > div { max-width: 650px; }
.library-hero .eyebrow { color: #aee0d2; }
.library-hero h1 { margin: 6px 0 12px; color: #fffdf5; font-family: var(--font-display); font-size: clamp(2.35rem, 6vw, 4.6rem); font-weight: 500; letter-spacing: .04em; line-height: 1.05; }
.library-hero p:last-child { max-width: 610px; margin: 0; color: rgba(242, 251, 246, .82); font-size: .87rem; line-height: 1.9; }
.library-write-button { display: inline-flex; min-height: 49px; padding: 0 20px; flex: none; align-items: center; justify-content: center; gap: 8px; cursor: pointer; color: #315c58; background: linear-gradient(145deg, #fffdf6, #eaf4e8); border: 1px solid rgba(255,255,255,.62); border-radius: 16px; box-shadow: 0 12px 28px rgba(20, 59, 56, .2); font: inherit; font-size: .72rem; font-weight: 900; transition: transform 180ms ease, box-shadow 180ms ease; }
.library-write-button:hover { transform: translateY(-2px); box-shadow: 0 16px 31px rgba(20, 59, 56, .25); }
.library-write-button:focus-visible { outline: 3px solid rgba(242, 191, 148, .8); outline-offset: 3px; }
.library-write-button:disabled { cursor: not-allowed; opacity: .55; transform: none; }

.library-shelf-tabs { display: grid; margin-bottom: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.library-shelf-tab { display: flex; min-width: 0; min-height: 82px; padding: 14px 16px; align-items: center; gap: 12px; cursor: pointer; color: #607879; background: rgba(255, 253, 248, .75); border: 1px solid rgba(65, 104, 101, .12); border-radius: 20px; box-shadow: 0 7px 20px rgba(45, 78, 76, .05); text-align: left; transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease; }
.library-shelf-tab:hover { transform: translateY(-2px); }
.library-shelf-tab.active { color: #315d5e; background: #fffdf8; border-color: rgba(62, 111, 105, .27); box-shadow: 0 12px 28px rgba(45, 78, 76, .1); }
.shelf-tab-icon { display: grid; width: 45px; height: 45px; flex: none; color: #527f7b; background: #e7f2ed; border-radius: 14px; place-items: center; }
.shelf-tab-icon i { font-size: 1.25rem; }
.library-shelf-tab > span:last-child { display: grid; min-width: 0; gap: 3px; }
.library-shelf-tab strong { font-family: var(--font-display); font-size: .83rem; letter-spacing: .03em; }
.library-shelf-tab small { overflow: hidden; color: #91a19f; font-size: .56rem; text-overflow: ellipsis; white-space: nowrap; }

.library-tools { display: grid; padding: 14px; margin-bottom: 22px; align-items: center; grid-template-columns: minmax(230px, .7fr) minmax(0, 1.3fr); gap: 12px; background: rgba(255,253,248,.64); border: 1px solid rgba(68, 106, 103, .1); border-radius: 20px; }
.library-search { position: relative; }
.library-search > i { position: absolute; left: 15px; top: 50%; color: #78908e; font-size: 1rem; transform: translateY(-50%); }
.library-search input { width: 100%; height: 48px; padding: 0 45px; color: #31595b; background: #fff; border: 1px solid rgba(63, 103, 101, .15); border-radius: 15px; font: inherit; font-size: .7rem; }
.library-search input:focus { outline: 3px solid rgba(101, 171, 158, .17); border-color: #72a9a2; }
.library-search button { position: absolute; right: 7px; top: 7px; display: grid; width: 34px; height: 34px; cursor: pointer; color: #79918f; background: transparent; border: 0; border-radius: 10px; place-items: center; }
.note-type-filters { display: flex; overflow-x: auto; gap: 7px; scrollbar-width: thin; }
.note-type-filters button { display: inline-flex; min-width: max-content; min-height: 42px; padding: 0 13px; align-items: center; gap: 5px; cursor: pointer; color: #718988; background: #edf4f0; border: 1px solid transparent; border-radius: 13px; font: inherit; font-size: .61rem; font-weight: 800; }
.note-type-filters button.active { color: #fff; background: #477875; box-shadow: 0 7px 15px rgba(52, 105, 100, .16); }

.library-shelf-heading { display: flex; margin: 28px 2px 10px; align-items: end; justify-content: space-between; gap: 15px; }
.library-shelf-heading h2 { margin: 2px 0 0; font-family: var(--font-display); font-size: 1.55rem; font-weight: 600; }
.library-shelf-heading > p { margin: 0; color: #859896; font-size: .64rem; font-weight: 800; }
.library-bookcase { display: grid; height: 10px; margin-bottom: -2px; grid-template-columns: 1fr 1.1fr .8fr; }
.library-bookcase span { background: linear-gradient(180deg, #9e826b, #6f594c); border-radius: 5px 5px 2px 2px; box-shadow: 0 4px 7px rgba(69,51,40,.15); }
.library-bookcase span:nth-child(2) { filter: brightness(1.08); }
.library-bookcase span:nth-child(3) { filter: brightness(.94); }

.note-grid { display: grid; padding: 23px 19px 28px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; background: linear-gradient(180deg, rgba(125, 101, 79, .11), rgba(255, 252, 246, .78)); border: 1px solid rgba(91, 74, 61, .1); border-radius: 0 0 25px 25px; box-shadow: inset 0 12px 22px rgba(73, 56, 43, .05); }
.note-card {
  --note-accent: #6b9d97;
  --note-accent-soft: #e6f1ed;
  --note-cover: #f8fbf5;
  position: relative;
  min-width: 0;
  animation: note-arrive 420ms cubic-bezier(.2,.75,.2,1) both;
  animation-delay: calc(min(var(--note-order), 8) * 45ms);
}
.note-type-internship { --note-accent: #c77e6f; --note-accent-soft: #faeae4; --note-cover: #fff8f1; }
.note-type-technology { --note-accent: #518c92; --note-accent-soft: #e1eff0; --note-cover: #f4fbf9; }
.note-type-project { --note-accent: #8e7aa0; --note-accent-soft: #eee8f3; --note-cover: #fcf8ff; }
.note-type-learning { --note-accent: #ad8b4e; --note-accent-soft: #f6edda; --note-cover: #fffbef; }
@keyframes note-arrive { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
.note-open-button { position: relative; display: flex; width: 100%; min-height: 300px; padding: 25px 22px 18px 29px; overflow: visible; flex-direction: column; cursor: pointer; color: #345759; background: var(--note-cover); border: 1px solid color-mix(in srgb, var(--note-accent) 24%, transparent); border-radius: 5px 15px 15px 5px; box-shadow: 6px 9px 20px rgba(48, 67, 63, .11), inset 8px 0 0 var(--note-accent); text-align: left; transition: transform 200ms ease, box-shadow 200ms ease; }
.note-open-button::before { position: absolute; inset: 9px 9px 9px 17px; content: ""; pointer-events: none; opacity: .35; background: repeating-linear-gradient(180deg, transparent 0 25px, color-mix(in srgb, var(--note-accent) 28%, transparent) 26px 27px); border-radius: 8px; }
.note-type-project .note-open-button::before { background: radial-gradient(circle, color-mix(in srgb, var(--note-accent) 24%, transparent) 1px, transparent 1.6px) 0 0 / 18px 18px; }
.note-type-internship .note-open-button::before { background: linear-gradient(90deg, transparent 0 27px, color-mix(in srgb, var(--note-accent) 20%, transparent) 28px 29px, transparent 30px), repeating-linear-gradient(180deg, transparent 0 25px, color-mix(in srgb, var(--note-accent) 20%, transparent) 26px 27px); }
.note-open-button > * { position: relative; z-index: 1; }
.note-open-button:hover,
.note-open-button:focus-visible { z-index: 4; transform: translateY(-7px) rotate(-.4deg); box-shadow: 9px 18px 34px rgba(48,67,63,.17), inset 8px 0 0 var(--note-accent); }
.note-open-button:focus-visible { outline: 3px solid color-mix(in srgb, var(--note-accent) 45%, white); outline-offset: 4px; }
.note-cover-mark { display: grid; width: 43px; height: 43px; margin-bottom: 14px; color: var(--note-accent); background: var(--note-accent-soft); border-radius: 13px; place-items: center; }
.note-cover-mark i { font-size: 1.22rem; }
.note-card-topline { display: flex; min-width: 0; margin-bottom: 10px; align-items: center; justify-content: space-between; gap: 6px; }
.note-type-label { color: var(--note-accent); font-size: .57rem; font-weight: 900; letter-spacing: .04em; }
.note-status-label { padding: 3px 7px; color: #746e65; background: rgba(255,255,255,.8); border: 1px solid rgba(95,85,72,.13); border-radius: 99px; font-size: .49rem; font-weight: 800; }
.note-card h3 { display: -webkit-box; margin: 0 0 10px; overflow: hidden; color: #294d50; font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.note-card-summary { display: -webkit-box; margin: 0 0 13px; overflow: hidden; color: #708284; font-size: .65rem; line-height: 1.8; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.note-card-tags { display: flex; margin-top: auto; flex-wrap: wrap; gap: 5px; }
.note-card-tags span { padding: 4px 7px; color: var(--note-accent); background: color-mix(in srgb, var(--note-accent-soft) 82%, white); border-radius: 99px; font-size: .49rem; font-weight: 800; }
.note-card-footer { display: flex; padding-top: 13px; margin-top: 13px; align-items: center; justify-content: space-between; color: #899997; border-top: 1px solid rgba(67,91,88,.09); font-size: .53rem; font-weight: 700; }
.note-card-footer span:first-child { display: inline-flex; align-items: center; gap: 4px; }
.note-card-bookmark { position: absolute; right: 12px; top: 12px; z-index: 5; display: grid; width: 37px; height: 40px; cursor: pointer; color: #899c99; background: rgba(255,255,255,.9); border: 1px solid rgba(69,101,97,.12); border-radius: 11px 11px 3px 3px; box-shadow: 0 5px 12px rgba(40,65,62,.08); place-items: center; }
.note-card-bookmark.saved { color: #fff; background: var(--note-accent); }
.is-draft-note .note-open-button { opacity: .83; border-style: dashed; }
.note-hover-preview { position: absolute; left: 50%; bottom: calc(100% - 42px); z-index: 12; display: grid; width: min(310px, 92vw); padding: 17px; pointer-events: none; opacity: 0; color: #36585a; background: rgba(255, 254, 249, .97); border: 1px solid color-mix(in srgb, var(--note-accent) 25%, transparent); border-radius: 17px; box-shadow: 0 22px 46px rgba(35, 61, 58, .2); backdrop-filter: blur(14px); transform: translate(-50%, 9px) scale(.97); transition: opacity 170ms ease, transform 170ms ease; }
.note-open-button:hover .note-hover-preview,
.note-open-button:focus-visible .note-hover-preview { opacity: 1; transform: translate(-50%, 0) scale(1); }
.note-hover-preview small { color: var(--note-accent); font-size: .54rem; font-weight: 900; }
.note-hover-preview strong { margin: 6px 0; font-family: var(--font-display); font-size: .88rem; }
.note-hover-preview > span { color: #6c8180; font-size: .62rem; line-height: 1.75; }
.note-hover-preview em { display: inline-flex; margin-top: 10px; align-items: center; gap: 5px; color: var(--note-accent); font-size: .54rem; font-style: normal; font-weight: 900; }

.library-empty { display: grid; min-height: 260px; padding: 40px 20px; color: #788b89; background: rgba(255,253,248,.7); border: 1px dashed rgba(74,108,104,.2); border-radius: 24px; text-align: center; place-items: center; align-content: center; }
.library-empty > span { display: grid; width: 62px; height: 62px; margin-bottom: 12px; color: #6e9690; background: #e7f1ec; border-radius: 20px; place-items: center; }
.library-empty > span i { font-size: 1.7rem; }
.library-empty h2 { margin: 0 0 7px; color: #476c6b; font-family: var(--font-display); font-size: 1.15rem; }
.library-empty p { margin: 0; font-size: .66rem; }

.note-composer-modal { width: min(calc(100% - 28px), 820px); }
.note-composer-modal > form { padding: clamp(23px, 4vw, 38px); }
.note-safety-banner,
.note-publish-note { display: flex; padding: 13px 14px; align-items: center; gap: 11px; color: #526f6e; background: #edf5ef; border: 1px solid rgba(70,108,100,.11); border-radius: 15px; }
.note-safety-banner { margin: 12px 0 19px; }
.note-safety-banner > i,
.note-publish-note > i { flex: none; color: #56857a; font-size: 1.25rem; }
.note-safety-banner p,
.note-publish-note span { display: grid; margin: 0; gap: 2px; }
.note-safety-banner strong,
.note-publish-note strong { font-size: .68rem; }
.note-safety-banner span,
.note-publish-note small { color: #829390; font-size: .57rem; line-height: 1.6; }
.note-link-attachment { margin-top: 17px; }
.note-publish-note { margin-top: 15px; }
.note-composer-actions { flex-wrap: wrap; }

.note-detail-modal { --note-accent: #6b9d97; --note-accent-soft: #e6f1ed; width: min(calc(100% - 28px), 850px); }
.note-detail-modal.note-type-internship { --note-accent: #c77e6f; --note-accent-soft: #faeae4; }
.note-detail-modal.note-type-technology { --note-accent: #518c92; --note-accent-soft: #e1eff0; }
.note-detail-modal.note-type-project { --note-accent: #8e7aa0; --note-accent-soft: #eee8f3; }
.note-detail-modal.note-type-learning { --note-accent: #ad8b4e; --note-accent-soft: #f6edda; }
.note-detail-modal > article { padding: clamp(25px, 5vw, 48px); background: linear-gradient(180deg, #fffef9, #fbfaf6); }
.note-detail-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.note-detail-badges > span { display: inline-flex; padding: 6px 9px; align-items: center; gap: 5px; color: #687d7b; background: #eef3ef; border-radius: 99px; font-size: .55rem; font-weight: 900; }
.note-detail-badges .note-detail-type { color: var(--note-accent); background: var(--note-accent-soft); }
.note-detail-header { max-width: 690px; margin: 22px auto 0; }
.note-detail-header .eyebrow { color: var(--note-accent); }
.note-detail-header h2 { margin: 7px 0 11px; color: #294e51; font-family: var(--font-display); font-size: clamp(1.75rem, 4vw, 2.7rem); font-weight: 600; line-height: 1.45; }
.note-detail-header > p:last-of-type { color: #8a9996; font-size: .62rem; }
.note-detail-tags { display: flex; margin-top: 13px; flex-wrap: wrap; gap: 6px; }
.note-detail-tags button { padding: 5px 8px; cursor: pointer; color: var(--note-accent); background: var(--note-accent-soft); border: 0; border-radius: 99px; font: inherit; font-size: .54rem; font-weight: 800; }
.note-detail-summary { max-width: 690px; padding: 18px 20px; margin: 24px auto; color: #506e6e; background: var(--note-accent-soft); border-left: 4px solid var(--note-accent); border-radius: 4px 15px 15px 4px; font-family: var(--font-display); font-size: .88rem; line-height: 1.9; }
.note-detail-body { max-width: 690px; margin: 0 auto; color: #435f60; font-size: .74rem; line-height: 2.15; white-space: pre-wrap; }
.note-detail-body a { color: var(--note-accent); }
.note-detail-modal .detail-external-link { max-width: 690px; margin: 27px auto 0; }
.note-detail-actions { display: flex; max-width: 690px; padding: 20px 0; margin: 30px auto 0; align-items: center; flex-wrap: wrap; gap: 8px; border-top: 1px solid rgba(62,91,88,.11); border-bottom: 1px solid rgba(62,91,88,.11); }
.note-action-spacer { flex: 1; }
.note-comment-section { max-width: 690px; margin: 34px auto 0; }
.note-comment-list { display: grid; margin-top: 15px; gap: 9px; }
.note-comment-item { position: relative; padding: 15px 16px; color: #536d6d; background: #f3f6f2; border: 1px solid rgba(65,96,92,.09); border-radius: 16px; }
.note-comment-item > div { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.note-comment-kind { padding: 3px 7px; color: var(--note-accent); background: var(--note-accent-soft); border-radius: 99px; font-size: .5rem; font-weight: 900; }
.note-comment-item strong { color: #486565; font-size: .61rem; }
.note-comment-item small { color: #9aa6a3; font-size: .51rem; }
.note-comment-item p { margin: 9px 0 0; font-size: .67rem; line-height: 1.8; white-space: pre-wrap; }
.note-comment-item > button { position: absolute; right: 9px; top: 9px; padding: 6px; cursor: pointer; color: #9a8581; background: transparent; border: 0; font: inherit; font-size: .52rem; }
.note-comment-form { display: grid; padding: 17px; margin-top: 16px; grid-template-columns: 190px minmax(0, 1fr) auto; align-items: end; gap: 10px; background: #eef4f0; border-radius: 18px; }
.note-comment-form label { display: grid; gap: 6px; }
.note-comment-form label > span { color: #617a79; font-size: .57rem; font-weight: 900; }
.note-comment-form select,
.note-comment-form textarea { width: 100%; color: #3f5f60; background: #fff; border: 1px solid rgba(65,99,95,.14); border-radius: 12px; font: inherit; font-size: .62rem; }
.note-comment-form select { height: 46px; padding: 0 10px; }
.note-comment-form textarea { min-height: 70px; padding: 10px; resize: vertical; }
.note-comment-form .library-write-button { min-height: 46px; white-space: nowrap; }

@media (max-width: 980px) {
  .note-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-tools { grid-template-columns: 1fr; }
  .library-hero { min-height: 210px; }
}

@media (max-width: 760px) {
  .desktop-nav { gap: 2px; }
  .mobile-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mobile-nav-link { min-width: 0; padding-inline: 3px; }
  .library-door { right: -6px; bottom: -7px; width: 118px; height: 112px; }
  .library-door-panel { left: 38px; bottom: 18px; width: 47px; height: 60px; border-width: 3px 3px 6px; }
  .library-door-panel i { font-size: 1rem; }
  .library-door-glow { left: 31px; bottom: 19px; width: 61px; height: 75px; }
  .library-door-stones i { width: 32px; height: 23px; }
  .library-door-stones i:nth-child(1) { left: 17px; bottom: 12px; }
  .library-door-stones i:nth-child(2) { right: 3px; bottom: 11px; }
  .library-door-stones i:nth-child(3) { left: 21px; top: 28px; }
  .library-door-stones i:nth-child(4) { right: 17px; top: 26px; }
  .library-door-stones i:nth-child(5) { left: 39px; top: 13px; }
  .library-door-stones i:nth-child(6) { right: 31px; bottom: 3px; }
  .library-door-reeds { left: 4px; bottom: 25px; width: 34px; height: 57px; transform: scale(.76); transform-origin: bottom left; }
  .library-door-label { right: 2px; bottom: 2px; min-width: 92px; padding: 4px 7px; }
  .library-door-label strong { font-size: .58rem; }
  .library-door-tip { right: 1px; top: -48px; width: 160px; padding: 8px 10px; }
  .library-page { padding-bottom: 105px; }
  .library-hero { min-height: 260px; padding: 28px 22px; margin: -2px -2px 17px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 20px; border-radius: 23px; }
  .library-hero h1 { font-size: clamp(2.2rem, 12vw, 3.1rem); }
  .library-hero p:last-child { font-size: .68rem; line-height: 1.8; }
  .library-write-button { width: 100%; }
  .library-shelf-tabs { display: flex; padding: 2px 1px 8px; overflow-x: auto; gap: 8px; scroll-snap-type: x mandatory; }
  .library-shelf-tab { min-width: min(78vw, 270px); min-height: 72px; padding: 11px 13px; scroll-snap-align: start; }
  .shelf-tab-icon { width: 39px; height: 39px; }
  .library-tools { padding: 10px; border-radius: 17px; }
  .library-search input { height: 46px; }
  .note-type-filters button { min-height: 40px; }
  .library-shelf-heading { margin-top: 22px; }
  .library-shelf-heading h2 { font-size: 1.25rem; }
  .note-grid { padding: 17px 12px 22px; grid-template-columns: 1fr; gap: 13px; }
  .note-open-button { min-height: 254px; padding: 20px 18px 16px 25px; }
  .note-card h3 { font-size: .97rem; }
  .note-card-summary { font-size: .62rem; -webkit-line-clamp: 3; }
  .note-hover-preview { display: none; }
  .note-composer-modal { width: calc(100% - 14px); max-height: calc(100vh - 14px); }
  .note-composer-modal > form { padding: 22px 16px; }
  .note-composer-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .note-composer-actions > button:first-child { grid-column: 1 / -1; order: 3; }
  .note-composer-actions .library-write-button { width: auto; }
  .note-detail-modal { width: calc(100% - 14px); max-height: calc(100vh - 14px); }
  .note-detail-modal > article { padding: 22px 17px 30px; }
  .note-detail-header h2 { font-size: 1.65rem; }
  .note-detail-summary { padding: 15px 16px; margin: 20px auto; font-size: .76rem; }
  .note-detail-body { font-size: .68rem; line-height: 2; }
  .note-detail-actions { align-items: stretch; }
  .note-detail-actions > button { flex: 1; }
  .note-action-spacer { display: none; }
  .note-detail-actions .post-owner-actions { display: grid; width: 100%; grid-template-columns: 1fr 1fr; }
  .note-detail-actions .post-owner-actions[hidden] { display: none; }
  .note-comment-form { grid-template-columns: 1fr; }
  .note-comment-form .library-write-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .library-door-glow,
  .library-door-tip,
  .note-card { animation: none !important; }
  .library-door,
  .note-open-button,
  .library-shelf-tab,
  .library-write-button { transition: none !important; }
  .library-door.is-entering,
  .library-door:hover,
  .note-open-button:hover { transform: none; }
}
