:root {
  color-scheme: dark;
  --bg: #08111d;
  --panel: rgba(13, 27, 44, 0.84);
  --panel-solid: #101d2d;
  --panel-soft: #17283b;
  --text: #f1f5f9;
  --muted: #9fb0c3;
  --line: rgba(160, 183, 211, 0.18);
  --accent: #6dd6c8;
  --accent-strong: #39b8a8;
  --gold: #f3c66d;
  --rose: #e990a5;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(109, 214, 200, 0.16), transparent 28rem),
    linear-gradient(145deg, #050a12 0%, var(--bg) 52%, #10233c 100%);
  color: var(--text);
  font-family:
    Inter, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

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

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(360px, 430px);
  gap: 20px;
  width: min(430px, calc(100% - 32px));
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  justify-content: center;
}

.ocean-panel,
.side-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.ocean-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
}

.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 24px 0;
}

.eyebrow,
.section-title p,
#nowMeta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

h1,
h2,
p {
  letter-spacing: 0;
}

h1 {
  margin: 3px 0 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1;
}

h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold);
  font-size: 22px;
}

.sea-stage {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 16%, rgba(255, 232, 158, 0.2), transparent 9rem),
    radial-gradient(circle at 24% 18%, rgba(190, 221, 255, 0.1), transparent 12rem),
    linear-gradient(180deg, #102341 0%, #0b1830 44%, #071322 45%, #071a29 100%);
}

.sea-stage::before {
  position: absolute;
  inset: 46% 0 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(109, 214, 200, 0.08), transparent 28%),
    repeating-linear-gradient(
      174deg,
      rgba(255, 255, 255, 0.08) 0 1px,
      transparent 1px 16px
    );
  opacity: 0.36;
  pointer-events: none;
}

.sea-stage::after {
  position: absolute;
  right: -8%;
  bottom: -26%;
  left: -8%;
  height: 32%;
  content: "";
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 220, 139, 0.18), transparent 52%),
    linear-gradient(180deg, rgba(14, 61, 90, 0.42), rgba(6, 18, 31, 0.84));
  clip-path: ellipse(58% 42% at 50% 62%);
  pointer-events: none;
}

.star-field,
.moon-haze,
.moon-path,
.distant-bottles {
  pointer-events: none;
}

.star-field {
  position: absolute;
  inset: 0 0 46%;
  z-index: 1;
}

.star-field span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(238, 247, 255, 0.92);
  box-shadow: 0 0 9px rgba(202, 231, 255, 0.72);
  animation: twinkle 4.6s ease-in-out infinite alternate;
}

.star-field span:nth-child(1) {
  top: 13%;
  left: 9%;
}

.star-field span:nth-child(2) {
  top: 23%;
  left: 18%;
  width: 1px;
  height: 1px;
  animation-delay: -1.1s;
}

.star-field span:nth-child(3) {
  top: 10%;
  left: 31%;
  animation-delay: -2.5s;
}

.star-field span:nth-child(4) {
  top: 31%;
  left: 39%;
  width: 3px;
  height: 3px;
  animation-delay: -0.7s;
}

.star-field span:nth-child(5) {
  top: 18%;
  left: 53%;
  width: 1px;
  height: 1px;
  animation-delay: -3.2s;
}

.star-field span:nth-child(6) {
  top: 30%;
  left: 64%;
  animation-delay: -1.8s;
}

.star-field span:nth-child(7) {
  top: 9%;
  left: 71%;
  width: 1px;
  height: 1px;
}

.star-field span:nth-child(8) {
  top: 25%;
  left: 83%;
  width: 3px;
  height: 3px;
  animation-delay: -2.1s;
}

.star-field span:nth-child(9) {
  top: 15%;
  left: 92%;
}

.star-field span:nth-child(10) {
  top: 39%;
  left: 12%;
  width: 1px;
  height: 1px;
  animation-delay: -3.8s;
}

.star-field span:nth-child(11) {
  top: 42%;
  left: 27%;
  animation-delay: -1.4s;
}

.star-field span:nth-child(12) {
  top: 38%;
  left: 47%;
  width: 1px;
  height: 1px;
}

.star-field span:nth-child(13) {
  top: 44%;
  left: 58%;
  animation-delay: -2.8s;
}

.star-field span:nth-child(14) {
  top: 36%;
  left: 76%;
  width: 1px;
  height: 1px;
}

.star-field span:nth-child(15) {
  top: 47%;
  left: 88%;
  animation-delay: -0.9s;
}

.star-field span:nth-child(16) {
  top: 7%;
  left: 43%;
  width: 1px;
  height: 1px;
  animation-delay: -1.9s;
}

@keyframes twinkle {
  from {
    opacity: 0.32;
    transform: scale(0.82);
  }
  to {
    opacity: 1;
    transform: scale(1.35);
  }
}

.moon {
  position: absolute;
  z-index: 3;
  top: 42px;
  right: 13%;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #f6d98a;
  box-shadow: 0 0 34px rgba(243, 198, 109, 0.42);
  pointer-events: none;
}

.moon::after {
  position: absolute;
  top: 8px;
  left: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  content: "";
  background: rgba(255, 245, 203, 0.38);
  box-shadow:
    14px 14px 0 -2px rgba(215, 184, 112, 0.2),
    21px 6px 0 -3px rgba(215, 184, 112, 0.22);
}

.moon-haze {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: calc(13% - 45px);
  width: 136px;
  height: 136px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 228, 151, 0.18), transparent 68%);
}

.moon-path {
  position: absolute;
  z-index: 2;
  top: 48%;
  left: 45%;
  width: 22%;
  height: 42%;
  transform: translateX(-50%) perspective(220px) rotateX(58deg);
  transform-origin: top center;
}

.moon-path span {
  position: absolute;
  left: 50%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 229, 162, 0.78),
    rgba(255, 255, 255, 0.9),
    transparent
  );
  filter: blur(0.2px);
  opacity: 0.76;
  animation: shimmer 3.8s ease-in-out infinite alternate;
}

.moon-path span:nth-child(1) {
  top: 6%;
  width: 28%;
  transform: translateX(-50%);
}

.moon-path span:nth-child(2) {
  top: 18%;
  width: 42%;
  transform: translateX(-46%);
  animation-delay: -1.3s;
}

.moon-path span:nth-child(3) {
  top: 34%;
  width: 60%;
  transform: translateX(-55%);
  animation-delay: -2.2s;
}

.moon-path span:nth-child(4) {
  top: 52%;
  width: 78%;
  transform: translateX(-48%);
  animation-delay: -0.6s;
}

.moon-path span:nth-child(5) {
  top: 71%;
  width: 92%;
  transform: translateX(-54%);
  animation-delay: -1.7s;
}

.moon-path span:nth-child(6) {
  top: 88%;
  width: 110%;
  transform: translateX(-47%);
  animation-delay: -2.8s;
}

@keyframes shimmer {
  from {
    opacity: 0.24;
    filter: blur(0.8px);
  }
  to {
    opacity: 0.88;
    filter: blur(0);
  }
}

.distant-bottles {
  position: absolute;
  z-index: 4;
  inset: 48% 0 18%;
}

.distant-bottle {
  position: absolute;
  width: 18px;
  height: 8px;
  border: 1px solid rgba(205, 244, 239, 0.48);
  border-radius: 999px 5px 5px 999px;
  background:
    linear-gradient(90deg, rgba(255, 220, 139, 0.86) 0 18%, transparent 18%),
    rgba(109, 214, 200, 0.18);
  box-shadow:
    0 0 12px rgba(255, 226, 158, 0.5),
    0 0 2px rgba(255, 255, 255, 0.9) inset;
  opacity: 0.72;
  animation: glint 5.4s ease-in-out infinite alternate;
}

.distant-bottle::after {
  position: absolute;
  right: -8px;
  top: 2px;
  width: 12px;
  height: 2px;
  border-radius: 999px;
  content: "";
  background: linear-gradient(90deg, rgba(255, 239, 190, 0.7), transparent);
}

.distant-bottle.one {
  top: 11%;
  left: 18%;
  transform: rotate(-8deg) scale(0.78);
}

.distant-bottle.two {
  top: 24%;
  left: 33%;
  transform: rotate(10deg) scale(0.58);
  animation-delay: -1.5s;
}

.distant-bottle.three {
  top: 14%;
  left: 69%;
  transform: rotate(-13deg) scale(0.66);
  animation-delay: -2.3s;
}

.distant-bottle.four {
  top: 42%;
  left: 78%;
  transform: rotate(8deg) scale(0.92);
  animation-delay: -3.4s;
}

.distant-bottle.five {
  top: 49%;
  left: 12%;
  transform: rotate(16deg) scale(0.52);
  animation-delay: -0.9s;
}

@keyframes glint {
  from {
    opacity: 0.34;
    filter: brightness(0.82);
  }
  to {
    opacity: 0.96;
    filter: brightness(1.32);
  }
}

.wave {
  position: absolute;
  z-index: 5;
  right: -10%;
  bottom: -58px;
  left: -10%;
  height: 30%;
  border-radius: 50% 50% 0 0;
  background: rgba(57, 184, 168, 0.17);
  transform-origin: center bottom;
  animation: drift 7s ease-in-out infinite alternate;
  pointer-events: none;
}

.wave-two {
  bottom: -82px;
  height: 34%;
  background: rgba(80, 120, 170, 0.2);
  animation-duration: 9s;
}

.beach {
  position: absolute;
  z-index: 7;
  right: -4%;
  bottom: -4%;
  left: -4%;
  height: 17%;
  background:
    radial-gradient(ellipse at 34% 18%, rgba(255, 236, 181, 0.28), transparent 18%),
    radial-gradient(ellipse at 66% 12%, rgba(255, 247, 208, 0.16), transparent 16%),
    linear-gradient(180deg, rgba(231, 190, 127, 0.68), rgba(166, 116, 72, 0.92));
  clip-path: ellipse(62% 52% at 50% 78%);
  pointer-events: none;
}

.beach::before {
  position: absolute;
  inset: 16% 7% 0;
  content: "";
  background:
    radial-gradient(circle at 14% 58%, rgba(255, 246, 205, 0.28) 0 1px, transparent 2px),
    radial-gradient(circle at 45% 36%, rgba(90, 55, 38, 0.22) 0 1px, transparent 2px),
    radial-gradient(circle at 74% 52%, rgba(255, 246, 205, 0.26) 0 1px, transparent 2px),
    radial-gradient(circle at 87% 31%, rgba(90, 55, 38, 0.18) 0 1px, transparent 2px);
}

.beach-shell,
.starfish,
.stranded-bottle {
  position: absolute;
  display: block;
}

.beach-shell {
  width: 20px;
  height: 13px;
  border-radius: 16px 16px 5px 5px;
  background:
    repeating-linear-gradient(90deg, rgba(151, 94, 77, 0.42) 0 2px, transparent 2px 5px),
    #f3d2b7;
  box-shadow: 0 2px 7px rgba(61, 35, 25, 0.22);
}

.shell-one {
  left: 29%;
  bottom: 31%;
  transform: rotate(-12deg) scale(0.9);
}

.shell-two {
  left: 68%;
  bottom: 24%;
  transform: rotate(16deg) scale(0.68);
}

.starfish {
  left: 19%;
  bottom: 26%;
  width: 28px;
  height: 28px;
  background: #e68563;
  clip-path: polygon(
    50% 0,
    60% 34%,
    96% 32%,
    67% 54%,
    80% 90%,
    50% 68%,
    20% 90%,
    33% 54%,
    4% 32%,
    40% 34%
  );
  filter: drop-shadow(0 3px 5px rgba(61, 35, 25, 0.26));
  transform: rotate(-18deg);
}

.stranded-bottle {
  right: 24%;
  bottom: 30%;
  width: 72px;
  height: 24px;
  border: 2px solid rgba(205, 244, 239, 0.5);
  border-radius: 999px 13px 13px 999px;
  background:
    linear-gradient(90deg, rgba(122, 82, 48, 0.88) 0 12%, transparent 12%),
    linear-gradient(135deg, rgba(109, 214, 200, 0.25), rgba(255, 255, 255, 0.08));
  box-shadow:
    0 6px 14px rgba(44, 28, 20, 0.3),
    inset 0 0 12px rgba(255, 255, 255, 0.12);
  transform: rotate(-11deg);
}

.stranded-bottle::after {
  position: absolute;
  right: 8px;
  top: 4px;
  width: 18px;
  height: 6px;
  border-radius: 999px;
  content: "";
  background: rgba(255, 255, 255, 0.42);
}

.stranded-note {
  position: absolute;
  left: 24px;
  top: 7px;
  width: 20px;
  height: 10px;
  border-radius: 2px;
  background: rgba(243, 198, 109, 0.82);
}

@keyframes drift {
  from {
    transform: translateX(-24px) rotate(-1deg);
  }
  to {
    transform: translateX(24px) rotate(1deg);
  }
}

.bottle-button {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 52%;
  width: 132px;
  height: 172px;
  background: transparent;
  transform: translate(-50%, -50%) rotate(-12deg);
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.35));
  animation: floatBottle 4s ease-in-out infinite;
}

@keyframes floatBottle {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(-12deg);
  }
  50% {
    transform: translate(-50%, calc(-50% - 12px)) rotate(-8deg);
  }
}

.bottle-neck,
.bottle-body {
  display: block;
  margin: 0 auto;
  border: 2px solid rgba(213, 246, 238, 0.72);
  background: linear-gradient(135deg, rgba(109, 214, 200, 0.24), rgba(255, 255, 255, 0.08));
}

.bottle-neck {
  width: 38px;
  height: 48px;
  border-bottom: 0;
  border-radius: 8px 8px 2px 2px;
}

.bottle-body {
  position: relative;
  width: 96px;
  height: 112px;
  border-radius: 28px 28px 34px 34px;
}

.bottle-note {
  position: absolute;
  left: 23px;
  top: 36px;
  width: 48px;
  height: 32px;
  border-radius: 3px;
  background: rgba(243, 198, 109, 0.78);
}

.player-card {
  margin: 0;
  padding: 18px;
  border-top: 1px solid var(--line);
  background: rgba(5, 10, 18, 0.78);
}

.inline-reply {
  display: none;
  margin-top: 14px;
}

.inline-reply.show {
  display: block;
}

.activity-log {
  display: grid;
  gap: 8px;
  max-height: 120px;
  overflow: auto;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.activity-log li {
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #d7e2ef;
  font-size: 12px;
  line-height: 1.45;
}

.player-heading,
.time-row,
.reply-actions,
.record-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#queueStatus {
  min-width: 58px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--accent);
  text-align: center;
}

.story-text {
  min-height: 72px;
  margin: 18px 0;
  color: #d7e2ef;
  line-height: 1.7;
}

.progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.progress-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.time-row {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.controls button,
.segment-control button,
.reply-actions button,
.record-panel button {
  min-height: 42px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

#playPauseButton,
.primary-action,
#sendReplyButton {
  background: var(--accent);
  color: #041210;
  font-weight: 700;
}

.side-panel {
  display: none;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
  max-height: calc(100vh - 32px);
  padding: 18px;
  border-radius: 8px;
}

.panel-section {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-section:last-child {
  border-bottom: 0;
}

.section-title {
  margin-bottom: 12px;
}

.section-title h2 {
  font-size: 17px;
}

.segment-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.segment-control button.active {
  background: var(--gold);
  color: #191204;
  font-weight: 700;
}

.primary-action {
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
  border-radius: 8px;
}

.field-label {
  display: block;
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 10, 18, 0.42);
  color: var(--text);
  outline: none;
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 88px;
  resize: vertical;
  padding: 12px;
  line-height: 1.5;
}

textarea:focus,
input:focus,
select:focus {
  border-color: rgba(109, 214, 200, 0.82);
}

.reply-box textarea {
  min-height: 96px;
}

.reply-actions {
  margin-top: 10px;
}

.reply-actions button {
  flex: 1;
}

.record-panel {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.voice-reply-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.voice-reply-panel button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  background: rgba(255, 209, 111, 0.9);
  color: #221705;
  font-weight: 750;
}

.voice-reply-panel span {
  color: var(--muted);
  font-size: 12px;
}

#voiceReplyPreview {
  width: 100%;
  margin-top: 10px;
}

#recordStatus {
  color: var(--muted);
  font-size: 13px;
}

#recordPreview {
  width: 100%;
  margin-top: 10px;
}

.log-section ul {
  display: grid;
  gap: 8px;
  max-height: 180px;
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.log-section li {
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #d7e2ef;
  font-size: 13px;
  line-height: 1.45;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  max-width: min(460px, calc(100% - 28px));
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f1f5f9;
  color: #08111d;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

body.warm-mode {
  --bg: #151018;
  --panel: rgba(35, 21, 31, 0.86);
  --panel-solid: #211722;
  --panel-soft: #312235;
  --accent: #f0ad8e;
  --accent-strong: #d98466;
  --gold: #ffd37d;
  --rose: #eba1b6;
}

body.warm-mode .wave {
  background: rgba(240, 173, 142, 0.18);
}

.home-hero {
  position: relative;
  min-height: min(780px, calc(100vh - 250px));
  aspect-ratio: 768 / 1664;
  overflow: hidden;
  isolation: isolate;
  background: #17233b;
}

.home-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("assets/home-background.png");
  background-position: center;
  background-size: cover;
  transform: scale(1.01);
}

.home-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(11, 18, 36, 0.06) 0%, transparent 42%, rgba(8, 12, 24, 0.18) 66%, rgba(4, 10, 20, 0.64) 100%),
    radial-gradient(ellipse at 50% 78%, rgba(255, 217, 130, 0.12), transparent 30%);
}

.brand-lockup,
.my-bottle-button {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 14px rgba(13, 18, 40, 0.52);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 20px;
  font-weight: 650;
}

.crescent {
  color: #ffd16f;
  font-size: 21px;
}

.my-bottle-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 2px;
  background: transparent;
  font-size: 15px;
  font-weight: 650;
}

.my-bottle-button span {
  font-size: 19px;
  transform: rotate(18deg);
}

.hero-copy {
  position: absolute;
  z-index: 3;
  right: 24px;
  bottom: 166px;
  left: 24px;
  color: rgba(255, 255, 255, 0.95);
  text-align: center;
  text-shadow: 0 3px 18px rgba(8, 11, 24, 0.68);
}

.hero-copy p {
  margin: 0;
  font-size: 18px;
  line-height: 1.95;
  font-weight: 520;
}

.hero-actions {
  position: absolute;
  z-index: 3;
  right: 22px;
  bottom: 78px;
  left: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hero-actions button {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 9px;
  min-height: 70px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  background: rgba(37, 93, 136, 0.56);
  color: #fff;
  text-align: left;
  box-shadow: 0 12px 30px rgba(11, 17, 35, 0.26);
  backdrop-filter: blur(14px);
}

.hero-actions button:nth-child(2) {
  background: rgba(116, 87, 133, 0.5);
  touch-action: none;
}

.hero-actions span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #ffd27d;
  font-size: 24px;
  text-shadow: 0 0 12px rgba(255, 210, 125, 0.62);
}

.hero-actions strong {
  align-self: end;
  font-size: 17px;
  line-height: 1.1;
}

.hero-actions small {
  align-self: start;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.bottle-count-picker {
  position: absolute;
  z-index: 4;
  right: 28px;
  bottom: 154px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 146px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(28, 40, 72, 0.62);
  box-shadow: 0 16px 34px rgba(7, 12, 28, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.96);
  transition: 0.18s ease;
  backdrop-filter: blur(16px);
}

.bottle-count-picker.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.bottle-count-picker::after {
  position: absolute;
  right: 34px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  content: "";
  background: rgba(28, 40, 72, 0.62);
  transform: rotate(45deg);
}

.bottle-count-picker button {
  position: relative;
  z-index: 1;
  min-height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 650;
}

.tab-sheet {
  position: absolute;
  z-index: 4;
  right: 18px;
  bottom: 82px;
  left: 18px;
  display: none;
  max-height: 58%;
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: rgba(18, 32, 58, 0.62);
  box-shadow: 0 20px 44px rgba(5, 10, 22, 0.32);
  color: #fff;
  backdrop-filter: blur(18px);
}

.tab-sheet.show {
  display: block;
}

.sheet-head {
  margin-bottom: 14px;
}

.sheet-head p {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.sheet-head h2 {
  margin: 0;
  font-size: 22px;
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.type-grid button,
.sheet-primary,
.google-button {
  min-height: 42px;
  border-radius: 14px;
  color: #fff;
}

.type-grid button {
  background: rgba(255, 255, 255, 0.12);
}

.type-grid button.active {
  background: rgba(255, 209, 111, 0.88);
  color: #231805;
  font-weight: 750;
}

.sheet-primary {
  width: 100%;
  margin-top: 13px;
  background: rgba(255, 209, 111, 0.9);
  color: #221705;
  font-weight: 750;
}

.history-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-list li {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
}

.history-list strong {
  font-size: 14px;
}

.history-list span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
}

.email-login-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
}

.code-row {
  margin-top: 8px;
}

.email-login-row button {
  min-height: 42px;
  border-radius: 14px;
  background: rgba(255, 209, 111, 0.9);
  color: #221705;
  font-weight: 750;
}

.profile-label {
  display: block;
  margin: 12px 0 6px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.tab-sheet input,
.tab-sheet select,
.tab-sheet textarea {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.tab-sheet textarea {
  min-height: 72px;
}

.bottom-nav {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 72px;
  padding: 8px 18px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(13, 31, 55, 0.58);
  backdrop-filter: blur(16px);
}

.bottom-nav button {
  display: grid;
  place-items: center;
  gap: 3px;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
}

.bottom-nav span {
  font-size: 24px;
  line-height: 1;
}

.bottom-nav .active {
  color: #ffd16f;
}

.side-panel > .panel-section:first-child > div:first-child {
  margin-bottom: 12px;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .ocean-panel {
    width: min(430px, 100%);
    justify-self: center;
  }

  .side-panel {
    max-height: none;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
  }

  .ocean-panel,
  .side-panel {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .topbar,
  .player-card {
    margin: 0;
  }

  .topbar {
    padding: 24px 22px 0;
  }

  .player-card {
    padding: 18px;
  }

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

  .sea-stage {
    min-height: 300px;
  }

  .home-hero {
    min-height: 660px;
    width: 100%;
  }

  .hero-actions {
    right: 16px;
    left: 16px;
    gap: 10px;
  }

  .hero-actions button {
    grid-template-columns: 34px 1fr;
    padding: 12px 11px;
  }

  .hero-actions strong {
    font-size: 15px;
  }
}
