:root {
  --bg: #070711;
  --panel: rgba(17, 17, 28, 0.78);
  --panel-strong: rgba(17, 17, 28, 0.94);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.68);
  --accent: #fffc00;
  --danger: #ff4d6d;
  --radius: 22px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at top, #1d1b39 0%, #070711 50%, #020207 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}

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

button {
  touch-action: manipulation;
}

.app {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.stage {
  position: relative;
  width: min(100vw, 520px);
  height: 100dvh;
  max-height: 980px;
  --keyboard-offset: 0px;
  background: #000;
  overflow: hidden;
  contain: layout paint;
  overscroll-behavior: none;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

video,
canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
}

video {
  background: #000;
  object-position: center center;
}

.video-backdrop {
  z-index: 0;
  object-fit: cover;
  filter: blur(22px) brightness(0.72) saturate(1.18);
  transform: scale(1.08);
}

.video-preview {
  z-index: 1;
  background: transparent;
  object-fit: contain;
}

canvas {
  z-index: 2;
  background: #000;
}

.capture-canvas {
  display: none;
}

.focus-reticle {
  position: absolute;
  z-index: 5;
  width: 76px;
  height: 76px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1.18);
  transition: opacity 0.2s ease, transform 0.2s ease;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(2px);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.24), inset 0 0 0 8px rgba(255, 255, 255, 0.08);
}

.focus-reticle::after {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.04);
}

.focus-reticle.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.editor-canvas {
  display: block;
}

.text-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  contain: layout paint;
  pointer-events: none;
}

.text-sticker {
  position: absolute;
  width: 100%;
  min-height: 1.8em;
  padding: 0.28em 0.55em 0.34em;
  transform: translateY(-50%);
  background: transparent;
  color: white;
  font-weight: 700;
  direction: ltr;
  unicode-bidi: plaintext;
  writing-mode: horizontal-tb;
  line-height: 1.16;
  text-align: center;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  outline: 0;
  cursor: ns-resize;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  text-shadow: none;
  transition: box-shadow 0.14s ease, transform 0.14s ease, background 0.14s ease, opacity 0.14s ease;
  transform-origin: center;
}

.text-sticker.has-bg {
  background: rgba(0, 0, 0, 0.58);
}

.text-sticker.font-italic { font-style: italic; }
.text-sticker.font-bold { text-transform: uppercase; }
.text-sticker.font-serif { font-family: Georgia, serif; font-weight: 400; }

.text-sticker.editing {
  cursor: text;
  touch-action: manipulation;
  user-select: text;
}

.text-sticker.dragging {
  cursor: grabbing;
  transform: translateY(-50%) scale(1.02);
}

.text-sticker:empty::before {
  content: attr(data-placeholder);
  color: rgba(255, 255, 255, 0.58);
}

.text-editor {
  z-index: 2;
  height: auto;
  min-height: 1.8em;
  border: 0;
  resize: none;
  opacity: 0;
  pointer-events: none;
  caret-color: currentColor;
}

.text-editor.visible {
  opacity: 1;
  pointer-events: auto;
}

.text-editor::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.topbar,
.bottombar,
.toolbox,
.text-tools,
.textbox {
  position: absolute;
  z-index: 10;
  left: 14px;
  right: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.topbar {
  top: calc(14px + env(safe-area-inset-top));
  justify-content: space-between;
  pointer-events: none;
}

.topbar > * {
  pointer-events: auto;
}

.reply-context {
  position: absolute;
  top: 0;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(58vw, 230px);
  padding: 7px 10px 7px 8px;
  border: 1px solid rgba(0, 200, 255, 0.3);
  border-radius: 999px;
  color: white;
  background: rgba(7, 20, 29, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
  transform: translateX(-50%);
  pointer-events: none;
}

.reply-context-icon {
  width: 28px;
  height: 28px;
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 50%;
  color: #07151d;
  background: #00c8ff;
  font-size: 18px;
  font-weight: 900;
}

.reply-context-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
  line-height: 1.05;
}

.reply-context-copy strong,
.reply-context-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-context-copy strong {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reply-context-copy small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
}

.reply-context-lock {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: #00c8ff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 999px;
  background: var(--panel);
  backdrop-filter: blur(16px);
  font-weight: 750;
  letter-spacing: -0.02em;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent);
}

.bottombar {
  bottom: calc(18px + env(safe-area-inset-bottom));
  justify-content: center;
}

.toolbox {
  display: flex;
  top: calc(114px + env(safe-area-inset-top));
  right: 14px;
  left: auto;
  width: 126px;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  padding: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0s;
}

.text-tools {
  top: auto;
  right: 0;
  left: 0;
  bottom: calc(env(safe-area-inset-bottom) + var(--keyboard-offset));
  display: flex;
  flex-direction: column;
  width: auto;
  gap: 12px;
  align-items: stretch;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 18px 18px 0 0;
  background: rgba(18, 18, 18, 0.94);
  backdrop-filter: blur(22px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

.edit-stage.has-keyboard-offset .text-tools {
  bottom: var(--keyboard-offset);
  padding-bottom: 14px;
}

.text-tools.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0s;
}

.text-tools-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.font-selector {
  display: flex;
  gap: 8px;
}

.font-btn {
  background: transparent;
  border: 2px solid transparent;
  border-radius: 8px;
  color: white;
  min-width: 40px;
  min-height: 34px;
  padding: 3px 7px;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.font-btn.active {
  border-color: white;
  background: rgba(255, 255, 255, 0.1);
}

.font-btn.italic { font-style: italic; }
.font-btn.bold { font-weight: 800; text-transform: uppercase; }
.font-btn.serif { font-family: Georgia, serif; }

.text-align-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  border-radius: 8px;
  color: white;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
}

.bg-toggle-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  color: white;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bg-toggle-btn.active {
  background: white;
  color: black;
}

.bg-toggle-btn .icon-a {
  font-weight: 800;
  font-size: 16px;
  border: 1.5px solid currentColor;
  padding: 1px 4px;
  border-radius: 3px;
}

.text-size-container {
  flex: 1;
  margin-left: 16px;
  margin-right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-items: center;
}

.text-size-range {
  -webkit-appearance: none;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.24);
  outline: none;
  border-radius: 2px;
}

.text-size-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.toolbox .btn,
.text-tools .btn {
  background: rgba(12, 12, 20, 0.62);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.toolbox.is-drawing {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
}

.toolbox.is-collapsed {
  opacity: 0;
  pointer-events: none;
  transform: translateX(12px) scale(0.96);
  visibility: hidden;
}

.textbox {
  display: flex;
  left: 16px;
  right: 16px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  background: var(--panel-strong);
  backdrop-filter: blur(18px);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.38);
}

.textbox input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  padding: 13px 14px;
  border-radius: 16px;
}

.btn {
  border: 0;
  color: white;
  background: var(--panel);
  border-radius: 999px;
  min-width: 46px;
  height: 46px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  transition: transform 0.14s ease, background 0.14s ease, opacity 0.14s ease;
}

.btn:active {
  transform: scale(0.96);
}

.btn.primary {
  width: 76px;
  height: 76px;
  border: 6px solid white;
  background: transparent;
  padding: 0;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.22), 0 16px 42px rgba(0, 0, 0, 0.42);
}

.btn.primary::after {
  content: "";
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: white;
  display: block;
}

.btn.accent {
  background: var(--accent);
  color: #111;
  font-weight: 800;
}

.btn.danger {
  background: rgba(255, 77, 109, 0.86);
}

.btn.small {
  min-width: 42px;
  width: 42px;
  height: 42px;
  padding: 0;
}

.btn.active {
  background: white;
  color: #111;
}

.color-palette {
  display: grid;
  grid-template-columns: repeat(3, 34px);
  gap: 7px;
  padding: 7px;
  border-radius: 22px;
  background: rgba(12, 12, 20, 0.68);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
}

.color-swatch {
  position: relative;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.color-swatch:active {
  transform: scale(0.9);
}

.color-swatch.active {
  border-color: white;
  box-shadow: 0 0 0 3px rgba(255, 252, 0, 0.82), inset 0 0 0 1px rgba(0, 0, 0, 0.22);
}

.color-swatch[style*="#ffffff"] {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28);
}

.color-swatch[style*="#ffffff"].active {
  box-shadow: 0 0 0 3px rgba(255, 252, 0, 0.82), inset 0 0 0 1px rgba(0, 0, 0, 0.34);
}

.range {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 42px;
  min-width: 42px;
  height: 84px;
  padding: 6px 0;
  accent-color: var(--accent);
  border-radius: 999px;
  background: rgba(12, 12, 20, 0.62);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.text-size-range {
  writing-mode: horizontal-tb;
  direction: ltr;
  width: 100%;
  min-width: 0;
  height: 4px;
  padding: 0;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: none;
  backdrop-filter: none;
}

.text-format-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.text-align-btn {
  width: 48px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  color: white;
  background: transparent;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
}

.text-align-btn svg {
  display: block;
}

.text-align-btn.active {
  border-color: white;
  background: rgba(255, 255, 255, 0.12);
}

.text-align-btn:active {
  transform: scale(0.94);
}

.text-tools .color-palette {
  display: flex;
  gap: 10px;
  padding: 2px 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.text-tools .color-swatch {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.text-tools .color-swatch.active {
  border: 2px solid white;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.text-size-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.text-size-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: white;
  background: rgba(255, 255, 255, 0.14);
  font-size: 22px;
  font-weight: 700;
}

.edit-stage.is-text-editing .bottombar {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.delete-bin {
  position: absolute;
  z-index: 22;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom) + var(--keyboard-offset));
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 50%;
  background: rgba(12, 12, 20, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 22px) scale(0.84);
  transition: opacity 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.delete-bin span {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: rgba(255, 77, 109, 0.9);
}

.delete-bin-icon {
  width: 27px;
  height: 27px;
}

.delete-bin.visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.delete-bin.active {
  background: rgba(255, 77, 109, 0.35);
  transform: translate(-50%, -4px) scale(1.08);
}

.hint {
  position: absolute;
  z-index: 9;
  left: 24px;
  right: 24px;
  bottom: calc(110px + env(safe-area-inset-bottom));
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
  pointer-events: none;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8);
}

.status {
  position: absolute;
  z-index: 30;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  max-width: 84%;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--panel-strong);
  backdrop-filter: blur(18px);
  color: white;
  text-align: center;
  line-height: 1.45;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.48);
  display: none;
}

.install-sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.58) 52%, rgba(0, 0, 0, 0.88) 100%);
}

.install-card {
  position: relative;
  width: min(100%, 430px);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  background: rgba(12, 12, 20, 0.92);
  backdrop-filter: blur(24px);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52);
}

.install-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.install-card h1 {
  margin: 10px 36px 8px 0;
  font-size: clamp(24px, 7vw, 34px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.install-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.45;
}

.install-action {
  width: 100%;
  height: 52px;
}

.install-action:disabled {
  cursor: wait;
  opacity: 0.62;
}

.install-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.bottles-stage {
  position: relative;
  width: min(100vw, 520px);
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 22px;
  padding: calc(22px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(255, 252, 0, 0.16) 0%, transparent 32%),
    radial-gradient(circle at 82% 14%, rgba(0, 200, 255, 0.18) 0%, transparent 30%),
    #080810;
}

.bottles-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, black 0%, transparent 74%);
  pointer-events: none;
}

.bottles-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.bottles-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
}

.profile-button {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.bottles-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bottles-header h1 {
  margin: 0;
  font-size: clamp(38px, 12vw, 58px);
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.bottles-empty {
  position: relative;
  z-index: 1;
  align-self: center;
  display: grid;
  justify-items: center;
  padding: 34px 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  background: rgba(13, 13, 22, 0.86);
  backdrop-filter: blur(24px);
  text-align: center;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.bottles-empty-mark {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 22px;
  border-radius: 22px;
  background: #101018;
  box-shadow: 0 18px 44px rgba(255, 252, 0, 0.16);
}

.bottles-empty-mark img,
.auth-mark img,
.auth-loading-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bottles-empty h2 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.035em;
}

.bottles-empty p {
  max-width: 280px;
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.45;
}

.bottles-empty-action {
  width: 100%;
  max-width: 250px;
  height: 54px;
}

.bottles-fab {
  position: absolute;
  z-index: 4;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #101018;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.44), 0 0 0 8px rgba(255, 252, 0, 0.12);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.bottles-fab:active {
  transform: scale(0.94);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.38), 0 0 0 6px rgba(255, 252, 0, 0.12);
}

.bottles-fab-icon {
  width: 28px;
  height: 28px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings-stage {
  position: relative;
  width: min(100vw, 520px);
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 22px;
  padding: calc(22px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(255, 252, 0, 0.14) 0%, transparent 34%),
    radial-gradient(circle at 82% 16%, rgba(0, 200, 255, 0.17) 0%, transparent 28%),
    #080810;
}

.settings-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, black 0%, transparent 76%);
  pointer-events: none;
}

.settings-header,
.settings-panel {
  position: relative;
  z-index: 1;
}

.settings-header {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.settings-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.settings-header h1 {
  margin: 0;
  font-size: clamp(38px, 12vw, 58px);
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.settings-panel {
  align-self: start;
  display: grid;
  gap: 12px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  background: rgba(13, 13, 22, 0.88);
  backdrop-filter: blur(24px);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.settings-action {
  width: 100%;
  height: 54px;
}

.auth-stage {
  position: relative;
  width: min(100vw, 520px);
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(255, 252, 0, 0.18) 0%, transparent 34%),
    radial-gradient(circle at 82% 16%, rgba(0, 200, 255, 0.2) 0%, transparent 28%),
    #080810;
}

.auth-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.26;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, black 0%, transparent 78%);
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 416px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  background: rgba(13, 13, 22, 0.9);
  backdrop-filter: blur(24px);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.auth-loading {
  min-height: 360px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.auth-loading .auth-copy {
  max-width: 320px;
  margin-bottom: 22px;
}

.auth-loading .auth-copy h1 {
  font-size: clamp(34px, 11vw, 52px);
}

.auth-loading-mark {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 28px;
  border-radius: 22px;
  background: #101018;
  box-shadow: 0 18px 48px rgba(255, 252, 0, 0.24);
  animation: auth-loading-pulse 1.7s ease-in-out infinite;
}

.auth-loading-indicator {
  display: flex;
  gap: 7px;
  align-items: center;
  height: 18px;
}

.auth-loading-indicator span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: auth-loading-bounce 1.1s ease-in-out infinite;
}

.auth-loading-indicator span:nth-child(2) {
  animation-delay: 0.14s;
}

.auth-loading-indicator span:nth-child(3) {
  animation-delay: 0.28s;
}

@keyframes auth-loading-pulse {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-5px) rotate(3deg);
  }
}

@keyframes auth-loading-bounce {
  0%,
  70%,
  100% {
    opacity: 0.32;
    transform: translateY(0) scale(0.82);
  }

  35% {
    opacity: 1;
    transform: translateY(-5px) scale(1);
  }
}

.auth-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 28px;
  border-radius: 18px;
  background: #101018;
  box-shadow: 0 18px 44px rgba(255, 252, 0, 0.22);
}

.auth-copy {
  margin-bottom: 28px;
}

.auth-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(36px, 12vw, 58px);
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.auth-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.auth-copy strong {
  color: white;
  font-weight: 800;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-label {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 800;
}

.auth-input {
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  outline: 0;
  border-radius: 18px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  padding: 0 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.auth-input:focus {
  border-color: rgba(255, 252, 0, 0.78);
  box-shadow: 0 0 0 4px rgba(255, 252, 0, 0.12);
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.otp-input {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-align: center;
}

.auth-submit {
  width: 100%;
  height: 56px;
  margin-top: 4px;
}

.auth-submit:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.auth-error,
.auth-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.auth-error {
  color: #ff8ba0;
}

.auth-note {
  color: rgba(255, 255, 255, 0.72);
}

.auth-link {
  justify-self: center;
  border: 0;
  color: rgba(255, 255, 255, 0.76);
  background: transparent;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
}

.auth-link:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.hidden {
  display: none !important;
}

/* Private conversation inbox */
.bottles-tabs {
  display: inline-flex;
  gap: 5px;
  margin-top: 24px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
}

.bottles-tab {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.58);
  background: transparent;
  padding: 0 13px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.bottles-tab.active {
  color: #11111a;
  background: white;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.22);
}

.bottles-tab-count,
.conversation-unread {
  min-width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #11111a;
  background: rgba(255, 252, 0, 0.92);
  font-size: 10px;
  letter-spacing: 0;
}

.bottles-tab-count.unread {
  color: #07151d;
  background: #00c8ff;
}

.conversation-list {
  position: relative;
  z-index: 1;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  padding-bottom: 92px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.conversation-row {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 21px;
  background: rgba(17, 17, 28, 0.76);
  backdrop-filter: blur(20px);
  transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.conversation-row.unread {
  border-color: rgba(0, 200, 255, 0.48);
  background: linear-gradient(110deg, rgba(0, 200, 255, 0.12), rgba(17, 17, 28, 0.78) 55%);
}

.conversation-row:active {
  transform: scale(0.985);
}

.conversation-row-main {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 0;
  color: white;
  background: transparent;
  padding: 14px;
  text-align: left;
  cursor: pointer;
}

.conversation-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 200, 255, 0.36);
  border-radius: 16px;
  color: #07151d;
  background: linear-gradient(145deg, #00c8ff, #a2f0ff);
  font-size: 20px;
  font-weight: 950;
  box-shadow: 0 9px 22px rgba(0, 200, 255, 0.18);
}

.conversation-row-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.conversation-row-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.conversation-row-copy strong,
.conversation-row-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-row-copy strong {
  min-width: 0;
  font-size: 17px;
  font-weight: 900;
}

.conversation-blocked-indicator {
  width: 21px;
  height: 21px;
  display: inline-grid;
  flex: 0 0 21px;
  place-items: center;
  border: 1px solid rgba(255, 77, 109, 0.38);
  border-radius: 50%;
  color: #ff8ca2;
  background: rgba(255, 77, 109, 0.1);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.conversation-row-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.conversation-row-meta {
  min-width: 42px;
  display: grid;
  justify-items: end;
  gap: 7px;
}

.conversation-row-meta time {
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.conversation-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  gap: 12px;
  align-items: start;
}

.bottles-stage.is-conversation {
  gap: 14px;
  padding-top: calc(16px + env(safe-area-inset-top));
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  animation: conversation-slide-in 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.is-conversation .conversation-header {
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  gap: 10px;
}

.conversation-back {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  font-size: 25px;
  font-weight: 300;
  cursor: pointer;
}

.is-conversation .conversation-back,
.is-conversation .conversation-menu-toggle {
  width: 40px;
  height: 40px;
}

.is-conversation .conversation-back {
  font-size: 0;
}

.conversation-header-copy {
  min-width: 0;
  padding-top: 2px;
}

.conversation-header-copy h1 {
  overflow: hidden;
  margin: 0;
  font-size: clamp(31px, 9vw, 48px);
  line-height: 0.92;
  letter-spacing: -0.055em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.is-conversation .conversation-header-copy {
  padding-top: 1px;
}

.is-conversation .conversation-header-copy .bottles-kicker {
  margin-bottom: 5px;
  font-size: 11px;
}

.is-conversation .conversation-header-copy h1 {
  font-size: clamp(28px, 8vw, 42px);
}

.conversation-lock {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 200, 255, 0.3);
  border-radius: 50%;
  color: #00c8ff;
  background: rgba(0, 200, 255, 0.1);
  font-size: 13px;
}

.conversation-menu-wrap {
  position: relative;
  z-index: 5;
}

.conversation-menu-toggle {
  width: 46px;
  height: 46px;
  display: grid;
  place-content: center;
  gap: 4px;
  border: 1px solid rgba(0, 200, 255, 0.3);
  border-radius: 50%;
  color: #00c8ff;
  background: rgba(0, 200, 255, 0.1);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease;
}

.is-conversation .conversation-menu-toggle {
  gap: 3px;
}

.conversation-menu-toggle:active {
  transform: scale(0.94);
}

.conversation-menu-toggle span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.conversation-menu,
.bottle-viewer-menu {
  animation: menu-pop 0.14s ease-out;
  transform-origin: top right;
}

.conversation-menu {
  position: absolute;
  z-index: 30;
  top: 54px;
  right: 0;
  width: 210px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(22, 22, 30, 0.96);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

.is-conversation .conversation-menu {
  top: 48px;
}

.conversation-menu button {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: white;
  background: transparent;
  padding: 14px 16px;
  text-align: left;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.conversation-menu button:last-child {
  border-bottom: 0;
}

.conversation-menu button.danger {
  color: #ff9cad;
}

.conversation-menu button:disabled {
  opacity: 0.45;
  cursor: wait;
}

@keyframes menu-pop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-4px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes conversation-slide-in {
  from {
    opacity: 0.35;
    transform: translate3d(28px, 0, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.conversation-panel {
  position: relative;
  z-index: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  padding-bottom: 2px;
}

.is-conversation .conversation-panel {
  gap: 8px;
  padding-bottom: 0;
}

/* Image-first conversation bubbles */
.conversation-bottles {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 14px 0;
  padding: 2px 2px 16px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-gutter: stable;
}

.is-conversation .conversation-bottles {
  gap: 12px 0;
  padding-bottom: 10px;
}

.conversation-day-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 8px 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.conversation-day-divider::before,
.conversation-day-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
}

.conversation-message {
  width: min(74%, 250px);
  min-width: 0;
  display: grid;
  justify-self: start;
  gap: 6px;
  transition: transform 0.2s ease;
}

.conversation-message.mine {
  justify-self: end;
}

.conversation-message.is-text {
  width: min(78%, 320px);
  gap: 4px;
}

.conversation-text-body {
  margin: 0;
  border: 1px solid rgba(0, 200, 255, 0.42);
  border-radius: 22px 22px 22px 8px;
  color: white;
  background: linear-gradient(145deg, rgba(0, 200, 255, 0.18), rgba(17, 17, 28, 0.92) 72%);
  padding: 12px 14px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  line-height: 1.42;
  user-select: text;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.conversation-message.mine .conversation-text-body {
  border-color: rgba(255, 252, 0, 0.5);
  border-radius: 22px 22px 8px 22px;
  background: linear-gradient(145deg, rgba(255, 252, 0, 0.2), rgba(17, 17, 28, 0.92) 72%);
  color: white;
}

.conversation-text-time {
  align-self: end;
  padding: 0 4px;
  color: rgba(255, 255, 255, 0.44);
  font-size: 10px;
  font-weight: 750;
}

.conversation-message.highlighted {
  transform: scale(1.025);
}

.conversation-message.highlighted .conversation-bottle-main {
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1), 0 18px 40px rgba(0, 0, 0, 0.36);
}

.conversation-reply-context {
  width: calc(100% - 10px);
  padding-left: 8px;
}

.conversation-reply-context.mine {
  justify-self: end;
  padding-right: 8px;
  padding-left: 0;
}

.conversation-reply-link {
  position: relative;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 3px 34px minmax(0, 1fr) 14px;
  gap: 7px;
  align-items: center;
  border: 0;
  color: white;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.conversation-reply-stem {
  width: 3px;
  height: 34px;
  border-radius: 999px;
  background: #00c8ff;
  box-shadow: 0 0 12px rgba(0, 200, 255, 0.38);
}

.conversation-reply-context.mine .conversation-reply-stem {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(255, 252, 0, 0.32);
}

.conversation-reply-preview {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.66);
  background: rgba(255, 255, 255, 0.1);
  font-size: 18px;
}

.conversation-reply-preview-empty {
  display: grid;
  place-items: center;
}

.conversation-reply-preview-empty svg,
.conversation-reply-arrow svg,
.conversation-bottle-image-empty svg,
.conversation-bottle-reply svg,
.conversation-blocked-notice svg,
.conversation-blocked-indicator svg,
.conversation-state-mark svg,
.conversation-empty-mark svg {
  display: block;
}

.conversation-image-loader {
  animation: conversation-icon-spin 0.9s linear infinite;
}

.conversation-reply-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.conversation-reply-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.conversation-reply-copy strong,
.conversation-reply-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-reply-copy strong {
  color: rgba(255, 255, 255, 0.8);
  font-size: 10px;
  font-weight: 850;
}

.conversation-reply-copy small {
  color: rgba(255, 255, 255, 0.42);
  font-size: 9px;
  font-weight: 700;
}

.conversation-reply-arrow {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1;
}

.conversation-bottle-main {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(0, 200, 255, 0.42);
  border-radius: 22px 22px 22px 8px;
  color: white;
  background: linear-gradient(145deg, rgba(0, 200, 255, 0.18), rgba(17, 17, 28, 0.92) 62%);
  padding: 8px;
  text-align: left;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.conversation-message.mine .conversation-bottle-main {
  border-color: rgba(255, 252, 0, 0.5);
  border-radius: 22px 22px 8px 22px;
  background: linear-gradient(145deg, rgba(255, 252, 0, 0.2), rgba(17, 17, 28, 0.92) 64%);
}

.conversation-message.context .conversation-bottle-main {
  border-color: rgba(255, 255, 255, 0.28);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(17, 17, 28, 0.88) 64%);
}

.conversation-bottle-main:active {
  transform: scale(0.975);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
}

.conversation-bottle-main:focus-visible,
.conversation-reply-link:focus-visible,
.conversation-bottle-reply:focus-visible,
.conversation-text-submit:focus-visible {
  outline: 2px solid white;
  outline-offset: 3px;
}

.conversation-bottle-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.68);
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.22), transparent 30%),
    rgba(0, 0, 0, 0.28);
}

.conversation-bottle-image::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: inherit;
  pointer-events: none;
}

.conversation-bottle-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  user-select: none;
}

.conversation-bottle-image-empty {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.58);
  font-size: 28px;
  font-weight: 900;
}

.conversation-bottle-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 3px;
}

.conversation-bottle-meta time {
  color: rgba(255, 255, 255, 0.44);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.conversation-bottle-reply {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-self: start;
  margin: 0;
  border: 0;
  border-radius: 999px;
  color: #8ceaff;
  background: transparent;
  padding: 1px 4px;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.conversation-message.mine .conversation-bottle-reply {
  justify-self: end;
}

.conversation-bottle-reply:hover,
.conversation-reply-link:hover .conversation-reply-arrow {
  color: white;
}

.conversation-blocked-notice {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 77, 109, 0.22);
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.64);
  background: rgba(255, 77, 109, 0.08);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.conversation-blocked-notice > span:first-child {
  color: #ff8ca2;
  font-size: 18px;
}

.conversation-composer {
  display: grid;
  gap: 7px;
}

.conversation-text-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
}

.conversation-text-input {
  width: 100%;
  height: 48px;
  min-height: 48px;
  max-height: 114px;
  resize: none;
  overflow-y: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  outline: 0;
  color: white;
  background: rgba(255, 255, 255, 0.09);
  padding: 13px 14px;
  line-height: 1.35;
  user-select: text;
  -webkit-user-select: text;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.conversation-text-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.conversation-text-submit {
  width: 48px;
  height: 48px;
  display: grid;
  flex: 0 0 48px;
  place-items: center;
  border: 1px solid rgba(255, 252, 0, 0.52);
  border-radius: 16px;
  color: #11111a;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(255, 252, 0, 0.14);
  cursor: pointer;
  transition: transform 0.14s ease, opacity 0.14s ease, filter 0.14s ease,
    color 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.conversation-text-submit.is-bottle {
  border-color: rgba(0, 200, 255, 0.58);
  color: #07151d;
  background: #00c8ff;
  box-shadow: 0 8px 18px rgba(0, 200, 255, 0.16);
}

.conversation-send-icon-enter-active,
.conversation-send-icon-leave-active {
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.conversation-send-icon-enter-from {
  opacity: 0;
  transform: scale(0.72) rotate(-12deg);
}

.conversation-send-icon-leave-to {
  opacity: 0;
  transform: scale(0.72) rotate(12deg);
}

.conversation-text-submit:not(:disabled):active {
  transform: scale(0.94);
}

.conversation-text-submit:disabled {
  cursor: not-allowed;
  opacity: 0.4;
  filter: saturate(0.5);
}

.conversation-state {
  position: relative;
  z-index: 1;
  align-self: center;
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 12px;
  color: white;
  text-align: center;
}

.conversation-state.compact {
  align-self: center;
}

.conversation-state h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.035em;
}

.conversation-state-mark {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 200, 255, 0.34);
  border-radius: 20px;
  color: #07151d;
  background: #00c8ff;
  font-size: 30px;
  font-weight: 900;
  box-shadow: 0 14px 36px rgba(0, 200, 255, 0.18);
}

.conversation-empty-mark {
  display: grid;
  place-items: center;
  color: #07151d;
  background: #00c8ff;
  font-size: 31px;
  font-weight: 900;
}

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

[hidden] {
  display: none !important;
}

@media (min-width: 700px) {
  body {
    overflow: auto;
  }

  .app {
    padding: 28px;
  }

  .stage {
    height: min(92dvh, 900px);
    border-radius: 34px;
  }

  .bottles-stage {
    min-height: min(92dvh, 900px);
    border-radius: 34px;
  }

  .settings-stage {
    min-height: min(92dvh, 900px);
    border-radius: 34px;
  }

  .auth-stage {
    min-height: min(92dvh, 900px);
    border-radius: 34px;
  }
}


.bottles-list {
  position: relative;
  z-index: 1;
  align-self: start;
  display: grid;
  gap: 10px;
  padding-bottom: 92px;
  overflow-y: auto;
}

.bottle-row {
  width: 100%;
  min-height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  color: white;
  background: rgba(13, 13, 22, 0.86);
  backdrop-filter: blur(20px);
  padding: 0 20px;
  text-align: left;
  font-size: 18px;
  font-weight: 850;
  cursor: pointer;
}

.bottle-viewer {
  position: absolute;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  background: #000;
  touch-action: none;
}

.bottle-viewer.closing {
  pointer-events: none;
}

.bottle-viewer img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bottle-viewer-close {
  position: absolute;
  z-index: 2;
  top: calc(18px + env(safe-area-inset-top));
  left: 18px;
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(20, 20, 28, 0.74);
  backdrop-filter: blur(14px);
  line-height: 1;
  cursor: pointer;
}

.bottle-viewer-status {
  color: rgba(255, 255, 255, 0.76);
  font-weight: 750;
}

.bottle-viewer-close-hint {
  position: absolute;
  z-index: 2;
  top: calc(78px + env(safe-area-inset-top));
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(20, 20, 28, 0.72);
  backdrop-filter: blur(14px);
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
  transform: translateX(-50%) translateY(-4px);
  opacity: 0.92;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.bottle-viewer-close-hint.active {
  border-color: rgba(255, 255, 255, 0.44);
  color: white;
  background: rgba(38, 38, 50, 0.88);
  transform: translateX(-50%) translateY(0);
}

.bottle-reply-hint {
  position: absolute;
  z-index: 2;
  right: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 10px 10px;
  border: 1px solid rgba(0, 200, 255, 0.28);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(5, 20, 28, 0.7);
  backdrop-filter: blur(16px);
  font-size: 12px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transform: translateX(50%);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.bottle-reply-hint.active {
  border-color: rgba(0, 200, 255, 0.8);
  background: rgba(0, 95, 124, 0.78);
  transform: translateX(50%) translateY(-7px) scale(1.03);
}

.bottle-reply-hint-arrow {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #07151d;
  background: #00c8ff;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
}

.bottle-download {
  position: absolute;
  z-index: 2;
  bottom: calc(22px + env(safe-area-inset-bottom));
}

.bottle-live-toast {
  position: fixed;
  z-index: 90;
  top: calc(16px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100vw - 32px), 420px);
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  color: #111;
  background: var(--accent);
  text-align: center;
  font-weight: 900;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.34);
}


.bottles-live-error {
  max-width: 300px;
  margin: 10px 0 0;
  color: #ff9cad;
  font-size: 12px;
  line-height: 1.35;
}

.bottle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 8px 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(17, 17, 28, 0.76);
}

.bottle-row.unread {
  border-color: rgba(255, 252, 0, 0.35);
  background: rgba(255, 252, 0, 0.07);
}

.bottle-row-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 0;
  color: white;
  background: transparent;
  padding: 10px 4px;
  text-align: left;
  cursor: pointer;
}

.bottle-unread-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: transparent;
}

.bottle-unread-dot.visible {
  background: var(--accent);
  box-shadow: 0 0 16px rgba(255, 252, 0, 0.58);
}

.bottle-row-name {
  min-width: 0;
  overflow: hidden;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottle-row-state {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.bottle-row-actions {
  display: flex;
  gap: 6px;
}

.bottle-row-actions button {
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.bottle-row-actions button.danger {
  color: #ff9cad;
}

.bottle-row-actions button:disabled {
  opacity: 0.45;
  cursor: wait;
}

@media (max-width: 420px) {
  .bottle-row {
    grid-template-columns: 1fr;
  }

  .bottle-row-actions {
    justify-content: flex-end;
    padding: 0 4px 4px;
  }
}


/* Bottle inbox mobile scrolling and viewer actions */
.bottles-stage {
  height: 100dvh;
  min-height: 0;
}

.bottles-list {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-gutter: stable;
}

.bottle-row {
  grid-template-columns: minmax(0, 1fr);
}

.bottle-row-main {
  width: 100%;
}

.bottle-viewer-menu-wrap {
  position: absolute;
  z-index: 3;
  top: calc(18px + env(safe-area-inset-top));
  right: 18px;
}

.bottle-viewer-menu-toggle {
  width: 46px;
  height: 46px;
  display: grid;
  place-content: center;
  gap: 4px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(20, 20, 28, 0.74);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.bottle-viewer-menu-toggle span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.bottle-viewer-menu {
  position: absolute;
  top: 54px;
  right: 0;
  width: 190px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(22, 22, 30, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

.bottle-viewer-menu button {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: white;
  background: transparent;
  padding: 14px 16px;
  text-align: left;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.bottle-viewer-menu button:last-child {
  border-bottom: 0;
}

.bottle-viewer-menu button.danger {
  color: #ff9cad;
}

.bottle-viewer-menu button:disabled {
  opacity: 0.45;
  cursor: wait;
}

@media (min-width: 700px) {
  .bottles-stage {
    height: min(92dvh, 900px);
    min-height: 0;
  }
}


/* Bottle report reason dialog */
.bottle-report-backdrop {
  position: absolute;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: end center;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
}

.bottle-report-dialog {
  width: min(100%, 420px);
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  color: white;
  background: rgba(20, 20, 28, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.bottle-report-dialog h2,
.bottle-report-dialog p {
  margin: 0;
}

.bottle-report-dialog p {
  color: var(--muted);
  font-size: 14px;
}

.bottle-report-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.bottle-report-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.bottle-report-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.bottle-report-actions .btn {
  width: 100%;
}


/* Standalone account settings page */
.account-settings-stage {
  height: 100dvh;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

.account-settings-header {
  grid-template-columns: 46px minmax(0, 1fr);
}

.settings-back {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  cursor: pointer;
}

.settings-scroll {
  position: relative;
  z-index: 1;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  padding-bottom: 18px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.settings-section {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 26px;
  background: rgba(13, 13, 22, 0.88);
  backdrop-filter: blur(24px);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.32);
}

.settings-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.settings-section-heading h2 {
  margin: 3px 0 0;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.035em;
}

.settings-section-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.settings-form {
  display: grid;
  gap: 12px;
}

.settings-help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.settings-help strong {
  color: white;
}

.settings-verified-badge {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: #9cf7bd;
  background: rgba(74, 222, 128, 0.11);
  font-size: 11px;
  font-weight: 850;
}

.settings-text-action {
  justify-self: center;
  border: 0;
  color: var(--muted);
  background: transparent;
  padding: 9px 12px;
  font-weight: 800;
  cursor: pointer;
}

.blocked-users-list {
  display: grid;
  gap: 8px;
}

.blocked-user-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.blocked-user-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #07151d;
  background: linear-gradient(145deg, #00c8ff, #a2f0ff);
  font-weight: 900;
}

.blocked-user-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blocked-user-unblock {
  min-width: 0;
  height: 38px;
  color: #07151d;
  background: #00c8ff;
  font-size: 12px;
  font-weight: 850;
}

.blocked-user-unblock:disabled {
  cursor: wait;
  opacity: 0.55;
}

.settings-otp-input {
  letter-spacing: 0.18em;
}

.settings-danger-section {
  margin-bottom: 4px;
}

.settings-action:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

@media (min-width: 700px) {
  .account-settings-stage {
    height: min(92dvh, 900px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bottles-stage.is-conversation {
    animation: none;
  }
}
