/* ===== CSS Variables / Theme ===== */
:root {
  --ocean-deep: #1a5276;
  --ocean-mid: #2e86c1;
  --ocean-light: #85c1e9;
  --ocean-pale: #d4e6f1;
  --ocean-foam: #eaf2f8;
  --sand-warm: #f5e6ca;
  --sand-light: #fdf2e9;
  --sand-dark: #d4a574;
  --sand-brown: #a0522d;
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #eeeeee;
  --gray-300: #e0e0e0;
  --gray-400: #bdbdbd;
  --gray-500: #9e9e9e;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;
  --danger: #e74c3c;
  --success: #27ae60;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 50%;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --tab-height: 60px;
  --top-bar-height: 50px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ===== Reset ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  color: var(--gray-800);
  background: var(--ocean-foam);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== App Shell ===== */
#app {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--white);
  position: relative;
}

@media (min-width: 481px) {
  #app {
    border-left: 1px solid var(--gray-200);
    border-right: 1px solid var(--gray-200);
  }
}

/* ===== Top Bar ===== */
#top-bar {
  height: var(--top-bar-height);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ocean-deep), var(--ocean-mid));
  color: var(--white);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

#top-bar h1 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.back-btn {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--white);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

/* ===== View Container ===== */
#view-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.view {
  min-height: 100%;
}

body.public-route { overflow-y: auto; }
body.public-route #app { max-width: none; min-height: 100%; height: auto; }
body.public-route #view-container { overflow: visible; }

.landing-view { min-height: 100vh; background: linear-gradient(155deg, #edf8fc 0%, #fff8ed 72%); color: var(--gray-800); }
.landing-header { height: 64px; max-width: 1120px; margin: auto; padding: 0 24px; display: flex; align-items: center; gap: 10px; }
.landing-header strong { color: var(--ocean-deep); font-size: 20px; }
.landing-header .text-btn { margin-left: auto; }
.brand-mark { font-size: 26px; }
.landing-hero { max-width: 850px; margin: 50px auto 30px; padding: 0 24px; text-align: center; }
.landing-hero h1 { max-width: 780px; margin: 8px auto 18px; color: var(--ocean-deep); font-size: clamp(34px, 6vw, 64px); line-height: 1.08; letter-spacing: -1.5px; }
.landing-hero > p:not(.eyebrow) { max-width: 650px; margin: auto; color: var(--gray-600); font-size: 18px; line-height: 1.7; }
.eyebrow { color: var(--ocean-mid); font-weight: 800; letter-spacing: 4px; font-size: 12px; }
.landing-actions { margin-top: 28px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.landing-bottle { width: 84px; height: 84px; margin: auto; color: var(--ocean-mid); transform: rotate(12deg); }
.landing-bottle svg, .bottle-glyph svg { width: 100%; height: 100%; fill: currentColor; }
.landing-bottle .bottle-wave, .bottle-glyph .bottle-wave { fill: none; stroke: white; stroke-width: 4; stroke-linecap: round; }
.landing-demo { max-width: 620px; margin: 34px auto; padding: 18px; background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-md); box-shadow: var(--shadow-md); display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: center; }
.landing-demo[hidden] { display: none; }
.demo-photo { height: 120px; border-radius: 10px; display: grid; place-items: center; font-size: 56px; background: linear-gradient(#c8e8f7, #ffd8a8); }
.demo-tag { display: block; margin: 5px 0 2px; color: var(--gray-500); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.demo-translation { color: var(--ocean-deep); font-weight: 600; }
.landing-features { max-width: 1000px; margin: 70px auto; padding: 0 24px; }
.landing-features h2 { text-align: center; color: var(--ocean-deep); margin-bottom: 24px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-grid article { background: rgba(255,255,255,.8); border: 1px solid rgba(46,134,193,.12); border-radius: var(--radius-md); padding: 24px; }
.feature-grid article > span { font-size: 30px; }.feature-grid h3 { margin: 12px 0 6px; color: var(--ocean-deep); }.feature-grid p { color: var(--gray-600); line-height: 1.55; font-size: 14px; }
.public-footer { min-height: 80px; padding: 24px; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 20px; border-top: 1px solid rgba(0,0,0,.06); color: var(--gray-600); font-size: 13px; }
.public-footer a:hover, .profile-policy-links a:hover { color: var(--ocean-mid); }
.text-btn { padding: 7px 9px; background: none; border: 0; color: var(--ocean-mid); cursor: pointer; font: inherit; }
.danger-text { color: var(--danger); }
.auth-back { margin: -20px 0 14px; }
.bottle-glyph { display: inline-grid; place-items: center; color: currentColor; }.pick-icon.bottle-glyph { width: 52px; height: 52px; }.tab-icon.bottle-glyph { width: 24px; height: 24px; }.success-bottle.bottle-glyph { width: 76px; height: 76px; margin: auto; color: var(--ocean-mid); }
.no-bottle-card { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%,-50%); width: min(88%, 360px); background: rgba(255,255,255,.94); padding: 26px; text-align: center; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); z-index: 4; }
.no-bottle-card .bottle-glyph { width: 52px; color: var(--ocean-light); }.no-bottle-card h3 { margin: 8px 0; color: var(--ocean-deep); }.no-bottle-card p { margin-bottom: 18px; color: var(--gray-600); font-size: 14px; line-height: 1.5; }
.safety-actions, .chat-safety { display: flex; justify-content: flex-end; gap: 6px; font-size: 12px; }.safety-actions { padding: 0 14px 10px; }.chat-safety { padding: 2px 12px; background: var(--gray-50); border-bottom: 1px solid var(--gray-200); }
.delete-account { width: 100%; color: var(--danger); margin-top: 8px; }.profile-policy-links { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 18px 0; color: var(--gray-500); font-size: 12px; }
.profile-form-card h4 { color: var(--ocean-deep); margin-bottom: 12px; }.my-bottle-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--gray-200); }.my-bottle-item:first-child { border-top: 0; }.my-bottle-item img, .my-bottle-no-photo { width: 52px; height: 52px; border-radius: 7px; }.my-bottle-item img { object-fit: cover; }.my-bottle-no-photo { display: grid; place-items: center; background: linear-gradient(145deg, var(--gray-50), #e7f5fb); color: var(--ocean-mid); font-size: 22px; }.my-bottle-text { min-width: 0; }.my-bottle-text p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }.my-bottle-text span { color: var(--gray-500); font-size: 11px; }

#view-auth {
  height: 100%;
}

/* ===== Bottom Tab Bar ===== */
#tab-bar {
  display: flex;
  height: var(--tab-height);
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  flex-shrink: 0;
  padding-bottom: var(--safe-bottom);
  z-index: 100;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--gray-500);
  transition: color 0.2s;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.tab-item.active {
  color: var(--ocean-mid);
}

.tab-icon {
  font-size: 22px;
  line-height: 1;
}

.tab-label {
  font-size: 11px;
  font-weight: 500;
}

/* ===== Auth View ===== */
.auth-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px;
  min-height: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--ocean-pale) 0%, var(--sand-light) 100%);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.bottle-icon {
  font-size: 56px;
  margin-bottom: 8px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.auth-logo h2 {
  font-size: 28px;
  color: var(--ocean-deep);
  font-weight: 700;
}

.auth-subtitle {
  color: var(--gray-600);
  font-size: 14px;
  margin-top: 4px;
}

.form-hint {
  margin-top: 6px;
  color: var(--gray-500);
  font-size: 12px;
  line-height: 1.4;
}

.auth-tabs {
  display: flex;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 4px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  width: 100%;
  max-width: 320px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: none;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.3s;
}

.auth-tab.active {
  background: var(--ocean-mid);
  color: var(--white);
}

.auth-form {
  width: 100%;
  max-width: 320px;
}

/* ===== Form Elements ===== */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 15px;
  color: var(--gray-800);
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--ocean-mid);
}

.form-group textarea {
  resize: none;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--ocean-mid), var(--ocean-deep));
  color: var(--white);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgba(46, 134, 193, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--ocean-mid);
  color: var(--ocean-mid);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-block {
  width: 100%;
}

.error-msg {
  margin-top: 12px;
  padding: 10px 14px;
  background: #fde8e8;
  color: var(--danger);
  border-radius: var(--radius-sm);
  font-size: 13px;
  text-align: center;
}

/* ===== Home / Pick View ===== */
.home-wrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.ocean-scene {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--ocean-pale) 0%, var(--ocean-light) 40%, var(--sand-warm) 90%, var(--sand-dark) 100%);
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--top-bar-height) - var(--tab-height));
}

/* Waves */
.wave {
  position: absolute;
  width: 200%;
  height: 80px;
  left: -50%;
  border-radius: 45%;
  animation: wave-move 6s ease-in-out infinite;
}

.wave1 {
  bottom: 30%;
  background: rgba(133, 193, 233, 0.25);
  animation-duration: 7s;
}

.wave2 {
  bottom: 28%;
  background: rgba(133, 193, 233, 0.2);
  animation-duration: 5s;
  animation-delay: -2s;
}

.wave3 {
  bottom: 26%;
  background: rgba(133, 193, 233, 0.15);
  animation-duration: 8s;
  animation-delay: -4s;
}

@keyframes wave-move {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  50% { transform: translateX(2%) rotate(1deg); }
}

.pick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 40px;
  background: linear-gradient(135deg, var(--ocean-mid), var(--ocean-deep));
  color: var(--white);
  border: none;
  border-radius: var(--radius-lg);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(46, 134, 193, 0.3);
  transition: all 0.3s;
  z-index: 2;
  animation: float 3s ease-in-out infinite;
}

.pick-btn:active {
  transform: scale(0.95);
}

.pick-icon {
  font-size: 48px;
}

/* Bottle Card */
.bottle-card {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  z-index: 10;
  display: flex;
  flex-direction: column;
  animation: slide-up 0.4s ease-out;
  overflow-y: auto;
}

@keyframes slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: none;
  background: rgba(0,0,0,0.05);
  font-size: 20px;
  color: var(--gray-600);
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottle-photo-wrap {
  width: 100%;
  aspect-ratio: 1;
  background: var(--gray-100);
  overflow: hidden;
  flex-shrink: 0;
}

.bottle-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bottle-info {
  padding: 16px 20px;
  flex: 1;
}

.bottle-caption {
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  margin-bottom: 12px;
}

.bottle-caption-original {
  margin: -4px 0 12px;
  color: var(--gray-600);
  font-size: 12px;
}

.bottle-caption-original summary {
  cursor: pointer;
  color: var(--ocean-mid);
  user-select: none;
}

.bottle-caption-original p {
  margin-top: 6px;
  white-space: pre-wrap;
}

.bottle-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--gray-500);
  flex-wrap: wrap;
}

.bottle-meta span::before {
  margin-right: 4px;
}

.bottle-reply {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
  flex-shrink: 0;
}

.bottle-reply input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  outline: none;
  font-size: 14px;
}

.bottle-reply input:focus {
  border-color: var(--ocean-mid);
}

.bottle-reply .btn {
  padding: 10px 20px;
  font-size: 14px;
}

/* ===== Throw View ===== */
.throw-wrapper {
  padding: 20px 16px;
  position: relative;
  min-height: calc(100vh - var(--top-bar-height) - var(--tab-height));
}

.throw-form-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-md);
}

.upload-area {
  width: 100%;
  aspect-ratio: 1;
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--gray-50);
  transition: border-color 0.2s;
  position: relative;
}

.upload-area:hover {
  border-color: var(--ocean-mid);
}

.upload-area.has-photo {
  border-style: solid;
  border-color: var(--ocean-light);
}

.upload-placeholder {
  text-align: center;
  color: var(--gray-500);
}

.upload-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 8px;
}

.upload-placeholder p {
  font-size: 14px;
}

#photo-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.throw-success {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--ocean-pale) 0%, var(--ocean-light) 50%, var(--sand-warm) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.success-anim {
  text-align: center;
  animation: success-pop 0.5s ease-out;
}

@keyframes success-pop {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.success-bottle {
  font-size: 80px;
  animation: throw-away 1.5s ease-out;
}

@keyframes throw-away {
  0% { transform: translateY(0) rotate(0); }
  30% { transform: translateY(-60px) rotate(-20deg); }
  60% { transform: translateY(-30px) rotate(10deg); }
  100% { transform: translateY(0) rotate(0); }
}

.success-anim p {
  font-size: 22px;
  font-weight: 600;
  color: var(--ocean-deep);
  margin-top: 16px;
}

.success-sub {
  font-size: 14px !important;
  font-weight: 400 !important;
  color: var(--gray-600) !important;
  margin-top: 8px !important;
}

.success-anim .btn {
  margin-top: 24px;
}

/* ===== Chat List ===== */
.chat-list-wrapper {
  min-height: calc(100vh - var(--top-bar-height) - var(--tab-height));
}

.chat-list {
  padding: 8px 0;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--gray-100);
}

.chat-item:active {
  background: var(--gray-50);
}

.chat-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--ocean-light), var(--ocean-mid));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 600;
  font-size: 18px;
  flex-shrink: 0;
}

.chat-content {
  flex: 1;
  min-width: 0;
}

.chat-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 4px;
}

.chat-last-msg {
  font-size: 13px;
  color: var(--gray-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-time {
  font-size: 12px;
  color: var(--gray-400);
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--gray-500);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 15px;
}

.empty-sub {
  font-size: 13px !important;
  color: var(--gray-400) !important;
  margin-top: 4px;
}

/* ===== Chat Room ===== */
.chatroom-wrapper {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--top-bar-height));
}

.chatroom-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--ocean-foam);
}

.translation-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  color: var(--gray-600);
  background: #f7fbfd;
  border-bottom: 1px solid var(--gray-200);
  font-size: 12px;
  line-height: 1.4;
  flex-shrink: 0;
}

.msg-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
  position: relative;
  word-break: break-word;
}

.msg-bubble.sent {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--ocean-mid), var(--ocean-deep));
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.msg-bubble.received {
  align-self: flex-start;
  background: var(--white);
  color: var(--gray-800);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.msg-bubble.msg-pending {
  opacity: 0.6;
}

.msg-translation {
  font-size: 12px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.2);
  opacity: 0.8;
}

.msg-translation span {
  display: block;
  margin-bottom: 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.78;
}

.msg-original {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid var(--gray-200);
  color: var(--gray-600);
  font-size: 12px;
}

.msg-original summary {
  cursor: pointer;
  color: var(--ocean-mid);
  font-size: 11px;
  list-style-position: inside;
  user-select: none;
}

.msg-original div {
  margin-top: 5px;
  white-space: pre-wrap;
}

.msg-bubble.received .msg-translation {
  border-top-color: var(--gray-200);
  color: var(--gray-500);
}

.msg-time {
  font-size: 11px;
  margin-top: 4px;
  opacity: 0.6;
}

.chatroom-input-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  padding-bottom: calc(12px + var(--safe-bottom));
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  flex-shrink: 0;
}

.chatroom-input-bar input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-lg);
  outline: none;
  font-size: 14px;
}

.chatroom-input-bar input:focus {
  border-color: var(--ocean-mid);
}

.chatroom-input-bar .btn {
  padding: 10px 20px;
  font-size: 14px;
  border-radius: var(--radius-lg);
}

/* ===== Profile View ===== */
.profile-wrapper {
  padding: 20px 16px;
  min-height: calc(100vh - var(--top-bar-height) - var(--tab-height));
}

.profile-card {
  text-align: center;
  padding: 24px;
  background: linear-gradient(135deg, var(--ocean-pale), var(--sand-light));
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--ocean-mid), var(--ocean-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 28px;
  font-weight: 700;
  margin: 0 auto 12px;
}

.profile-card h3 {
  font-size: 20px;
  color: var(--ocean-deep);
}

.profile-meta {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 4px;
}

.profile-form-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

#btn-logout {
  margin-top: 8px;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(33, 33, 33, 0.9);
  color: var(--white);
  padding: 10px 24px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  z-index: 9999;
  animation: toast-in 0.3s ease-out;
  max-width: 80%;
  text-align: center;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== Loading ===== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--ocean-mid);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Utilities ===== */
.hidden { display: none !important; }

.public-intro {
  margin: 28px 0 8px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  color: var(--gray-600);
  line-height: 1.6;
}
.public-intro h3 { color: var(--ocean-deep); margin-bottom: 8px; }
.public-intro p { font-size: 14px; }
.public-intro ul { margin: 10px 0 0 20px; font-size: 13px; }
.landing-view > .public-intro { max-width: 760px; margin: 28px auto; }
.landing-view > .public-intro h2 { color: var(--ocean-deep); margin-bottom: 8px; }
.landing-view > .public-intro a { color: var(--ocean-deep); font-weight: 700; }
.tool-network { max-width: 900px; margin: 28px auto 46px; padding: 18px 24px; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px 20px; color: var(--gray-600); font-size: 13px; }
.tool-network strong { color: var(--ocean-deep); }
.tool-network a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ===== Responsive ===== */
@media (max-width: 360px) {
  .pick-btn {
    padding: 22px 32px;
    font-size: 16px;
  }
  .pick-icon {
    font-size: 40px;
  }
}

@media (max-width: 640px) {
  .landing-hero { margin-top: 24px; }.landing-hero h1 { font-size: 36px; }.landing-hero > p:not(.eyebrow) { font-size: 16px; }
  .feature-grid { grid-template-columns: 1fr; }.landing-features { margin: 45px auto; }.landing-demo { margin: 28px 18px; grid-template-columns: 88px 1fr; }.demo-photo { height: 100px; }
}
