:root {
<<<<<<< HEAD
  --bg: #061633;
  --card: rgba(255, 255, 255, 0.96);
  --text: #0b1220;
  --muted: #64748b;
  --line: rgba(11, 42, 91, 0.14);
  --navy: #0b2a5b;
  --navy-dark: #061633;
  --orange: #d95f00;
  --orange-dark: #b84a00;
  --orange-soft: #fff3e8;
  --danger: #dc2626;
  --shadow: 0 22px 68px rgba(0, 0, 0, 0.32);
=======
  --navy-950: #07162f;
  --navy-900: #0b2348;
  --navy-700: #244b78;
  --orange: #e96b19;
  --orange-dark: #bd4e08;
  --orange-soft: #fff0e5;
  --paper: #f7f8fb;
  --white: #ffffff;
  --text: #101827;
  --muted: #6d7889;
  --line: #dfe4ec;
  --danger: #b42318;
  --shadow: 0 18px 55px rgba(2, 12, 30, .28);
>>>>>>> cfe67c3dbb9e9037e480c6d8b66aeeecf9380be7
}

* { box-sizing: border-box; }

html,
body {
<<<<<<< HEAD
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior-y: none;
=======
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
>>>>>>> cfe67c3dbb9e9037e480c6d8b66aeeecf9380be7
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  background:
    radial-gradient(circle at 15% 8%, rgba(233, 107, 25, .32), transparent 30%),
    linear-gradient(160deg, var(--navy-950), var(--navy-900));
  color: var(--text);
}

button,
input,
textarea { font: inherit; }
<<<<<<< HEAD
button { -webkit-tap-highlight-color: transparent; }
=======

button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
>>>>>>> cfe67c3dbb9e9037e480c6d8b66aeeecf9380be7

button:active { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: default; }

.app-shell {
<<<<<<< HEAD
  width: min(100%, 560px);
=======
  position: fixed;
  inset: 0;
  width: min(100%, 580px);
>>>>>>> cfe67c3dbb9e9037e480c6d8b66aeeecf9380be7
  height: 100dvh;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
<<<<<<< HEAD
  gap: 14px;
=======
  gap: 8px;
>>>>>>> cfe67c3dbb9e9037e480c6d8b66aeeecf9380be7
  overflow: hidden;
}

.setup-card,
.chat-card {
  flex: 1;
  min-height: 0;
  width: 100%;
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(250,251,253,.98);
  box-shadow: var(--shadow);
  border-radius: 24px;
}

<<<<<<< HEAD
.hero-card {
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

.chat-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
=======
.setup-card {
  padding: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
>>>>>>> cfe67c3dbb9e9037e480c6d8b66aeeecf9380be7
}

.setup-card::-webkit-scrollbar { display: none; }

.setup-head {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.logo-mark,
.chat-logo {
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, var(--orange), var(--orange-dark));
  box-shadow: 0 10px 24px rgba(233,107,25,.28);
  font-weight: 950;
  letter-spacing: -.03em;
}

.logo-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  font-size: 15px;
}

.setup-head h1 {
  margin: 0;
  color: var(--navy-950);
  font-size: clamp(25px, 7vw, 35px);
  line-height: 1.06;
  letter-spacing: -.05em;
}

.setup-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.field-label,
.panel-title {
  color: var(--navy-900);
  font-size: 13px;
  font-weight: 900;
}

.field-label {
  display: block;
  margin: 10px 0 6px;
}

.text-input,
textarea,
.composer input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--text);
  outline: none;
}

.text-input {
  height: 46px;
  padding: 0 14px;
  border-radius: 14px;
}

.text-input:focus,
textarea:focus,
.composer input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(233,107,25,.13);
}

.panel {
  margin-top: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #f1f4f8;
}

.settings-panel { padding-bottom: 10px; }

.settings-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.setting-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--white);
}

.setting-row span {
  grid-column: 1 / -1;
  color: var(--navy-700);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.seconds-input {
  min-width: 0;
  width: 100%;
  height: 30px;
  border: 0;
  border-bottom: 2px solid var(--orange);
  outline: none;
  background: transparent;
  color: var(--navy-950);
  text-align: center;
  font-weight: 950;
}

.setting-row em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.panel-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.main-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 12px;
}

<<<<<<< HEAD
.primary-btn,
.ghost-btn,
.icon-btn,
.composer button,
.friend-action {
  border: 0;
  border-radius: 16px;
  padding: 13px 15px;
  font-weight: 900;
  cursor: pointer;
}
=======
.compact-actions { margin-top: 8px; }
>>>>>>> cfe67c3dbb9e9037e480c6d8b66aeeecf9380be7

.primary-btn,
.soft-btn,
.full-btn {
  min-height: 44px;
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 900;
}

.primary-btn {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: white;
}

<<<<<<< HEAD
.ghost-btn,
.icon-btn,
.friend-action {
  background: #eef3ff;
  color: var(--navy);
}

.primary-btn:active,
.ghost-btn:active,
.icon-btn:active,
.composer button:active,
.friend-action:active,
.peek-dot:active {
  transform: translateY(1px);
}

.wide { width: 100%; }

.invite-panel,
.install-box,
.identity-card,
.friends-panel,
.compact-settings {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #f8fafc;
  padding: 14px;
}

.panel-title {
  font-size: 13px;
  color: #374151;
  font-weight: 900;
  margin-bottom: 8px;
}

textarea {
  height: 92px;
=======
.soft-btn {
  background: #e8edf5;
  color: var(--navy-900);
}

.full-btn {
  width: 100%;
  margin-top: 14px;
}

.invite-panel textarea {
  height: 74px;
  margin-top: 8px;
  padding: 10px;
  border-radius: 12px;
>>>>>>> cfe67c3dbb9e9037e480c6d8b66aeeecf9380be7
  resize: none;
  font-size: 11px;
  line-height: 1.45;
}

<<<<<<< HEAD
.identity-row {
  display: grid;
  grid-template-columns: 1fr 82px;
  gap: 8px;
  align-items: center;
}

.identity-row .ghost-btn { padding: 12px 10px; }

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setting-row {
  display: grid;
  grid-template-columns: 88px 72px 1fr;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(11, 42, 91, 0.10);
  border-radius: 14px;
  background: #ffffff;
}

.setting-row span {
  color: var(--navy);
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.setting-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.seconds-input {
  width: 72px !important;
  min-width: 72px;
  padding: 8px 8px !important;
  border-radius: 12px !important;
  text-align: center;
  font-weight: 900;
}

=======
>>>>>>> cfe67c3dbb9e9037e480c6d8b66aeeecf9380be7
.friends-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 8px;
}

.friend-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
}

.friend-main {
  min-width: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.friend-main strong,
.friend-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-main strong { color: var(--navy-900); }
.friend-main span { margin-top: 2px; color: var(--muted); font-size: 10px; }

.friend-action {
<<<<<<< HEAD
  border-radius: 12px;
  font-size: 12px;
  padding: 8px 10px;
}

.danger-soft {
  background: #fee2e2;
  color: var(--danger);
}

.chat-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-bottom: 12px;
  flex: 0 0 auto;
}

.chat-title-block { min-width: 0; }

.header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  max-width: 190px;
}

.icon-btn {
  flex: 0 0 auto;
  padding: 10px 12px;
  font-size: 13px;
=======
  padding: 7px 9px;
  border-radius: 10px;
  background: #e8edf5;
  color: var(--navy-900);
  font-size: 11px;
  font-weight: 900;
}

.friend-action.danger-soft { color: var(--danger); background: #ffe9e7; }

.chat-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 10px;
}

.chat-header {
  flex: 0 0 auto;
  display: grid;
  grid-template-rows: auto auto;
  gap: 8px;
  padding: 2px 2px 10px;
  border-bottom: 1px solid var(--line);
}

.chat-title-row {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-title-wrap,
.title-side {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.chat-logo {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 12px;
}

.chat-name-wrap { min-width: 0; }

.chat-name-wrap h2 {
  margin: 0;
  overflow: hidden;
  color: var(--navy-950);
  font-size: 18px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-name-wrap p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.unread-pill,
.leave-btn {
  flex: 0 0 auto;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
>>>>>>> cfe67c3dbb9e9037e480c6d8b66aeeecf9380be7
}

.unread-pill {
  padding: 6px 9px;
  background: #e8edf5;
  color: var(--navy-900);
}

.unread-pill.active {
  background: var(--orange-soft);
  color: var(--orange-dark);
}

<<<<<<< HEAD
.install-box {
  background: var(--orange-soft);
  border-color: rgba(217, 95, 0, 0.28);
  margin-bottom: 12px;
}

.install-box p {
  margin: 4px 0 0;
  color: #8a3b00;
  font-size: 13px;
  line-height: 1.55;
}

.chat-box {
  flex: 1;
  min-height: 0;
  border: 1px solid rgba(11, 42, 91, 0.12);
  border-radius: 22px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef3ff 100%);
  padding: 12px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

.msg {
  max-width: 88%;
  width: fit-content;
  position: relative;
  padding: 10px 62px 10px 12px;
  border-radius: 16px;
  margin: 8px 0;
  background: #ffffff;
  border: 1px solid rgba(11, 42, 91, 0.08);
  box-shadow: 0 6px 18px rgba(11,42,91,0.08);
  line-height: 1.5;
  word-break: break-word;
}

.msg.mine {
  margin-left: auto;
  background: #eaf1ff;
  border-color: rgba(11, 42, 91, 0.18);
  animation: messageVanish var(--vanish-ms, 5s) forwards;
}

.msg.system {
  max-width: 100%;
  margin-inline: auto;
  text-align: center;
  background: #fef3c7;
  color: #92400e;
  font-size: 13px;
}

.msg-sender {
  display: block;
  font-size: 11px;
  color: #64748b;
  font-weight: 900;
  margin-bottom: 2px;
}

.msg-text { display: inline; }

.msg-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  border-radius: 999px;
  padding: 5px 7px;
  background: rgba(220,38,38,0.10);
  color: var(--danger);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.msg.peek {
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
=======
.leave-btn {
  min-height: 32px;
  padding: 6px 10px;
  background: #ffe9e7;
  color: var(--danger);
}

.chat-tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.chat-tools button {
  min-width: 0;
  min-height: 34px;
  border-radius: 11px;
  padding: 6px 4px;
  background: #e8edf5;
  color: var(--navy-900);
  font-size: 11px;
  font-weight: 900;
}

.install-box {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 13px;
  background: var(--orange-soft);
  color: var(--orange-dark);
>>>>>>> cfe67c3dbb9e9037e480c6d8b66aeeecf9380be7
}

.install-box strong { font-size: 11px; }
.install-box p { margin: 2px 0 0; font-size: 10px; }
.install-actions { display: flex; gap: 5px; }
.install-actions button {
  padding: 6px 8px;
  border-radius: 9px;
  background: white;
  color: var(--orange-dark);
  font-size: 10px;
  font-weight: 900;
}

.chat-box {
  flex: 1;
  min-height: 0;
  margin-top: 8px;
  padding: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: linear-gradient(180deg, #f8f9fb, #eef2f7);
}

.msg {
  position: relative;
  width: fit-content;
  max-width: 86%;
  margin: 7px 0;
  padding: 9px 38px 9px 11px;
  border: 1px solid var(--line);
  border-radius: 15px 15px 15px 5px;
  background: white;
  box-shadow: 0 6px 18px rgba(11,35,72,.06);
  line-height: 1.42;
  word-break: break-word;
}

.msg.mine {
  margin-left: auto;
  border-radius: 15px 15px 5px 15px;
  border-color: #ffd8bd;
  background: var(--orange-soft);
  animation: messageVanish var(--vanish-ms, 5s) forwards;
}

.msg.system {
  max-width: 100%;
  margin-inline: auto;
  padding: 7px 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.msg-sender {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.msg-text { font-size: 14px; }

.msg-delete {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 25px;
  height: 25px;
  padding: 0;
  border-radius: 999px;
  background: rgba(180,35,24,.08);
  color: var(--danger);
  font-size: 10px;
  font-weight: 900;
}

.msg-image {
  display: block;
  width: min(230px, 58vw);
  max-height: 300px;
  object-fit: contain;
  border-radius: 11px;
  background: #dfe4ec;
  transition: filter .12s ease;
  -webkit-user-drag: none;
}

.msg.image-msg { padding: 8px 35px 8px 8px; }

.peek-hint {
  display: block;
  margin-top: 6px;
  color: var(--orange-dark);
  font-size: 10px;
  font-weight: 900;
}

<<<<<<< HEAD
.msg.peek.revealed .peek-hint { color: var(--danger); }

.peek-dot {
  display: block;
  width: 52px;
  height: 36px;
  margin: 8px auto 0;
  border: 0;
  border-radius: 999px;
  background: rgba(11, 42, 91, 0.10);
  box-shadow: inset 0 0 0 1px rgba(11, 42, 91, 0.10);
  cursor: pointer;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  position: relative;
}

.peek-dot::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: var(--orange);
  box-shadow: 0 0 0 6px rgba(217, 95, 0, 0.13);
  transform: translate(-50%, -50%);
}

.msg.peek.revealed .peek-dot {
  background: rgba(217, 95, 0, 0.16);
}

.msg.peek.revealed .peek-dot::after {
  background: var(--orange-dark);
  transform: translate(-50%, -50%) scale(1.12);
}

.composer {
  display: grid;
  grid-template-columns: 1fr 78px;
  gap: 10px;
  margin-top: 12px;
  flex: 0 0 auto;
}

.status-bar {
  min-height: 32px;
  color: rgba(255,255,255,0.92);
  background: rgba(6, 22, 51, 0.38);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  text-align: center;
  backdrop-filter: blur(12px);
  flex: 0 0 auto;
}

.privacy-cover {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  background: rgba(6, 22, 51, 0.94);
  color: rgba(255,255,255,0.8);
  font-weight: 900;
  letter-spacing: .18em;
}

body.privacy-hidden .privacy-cover { display: flex; }
body.privacy-hidden .app-shell { filter: blur(10px); }

.hidden { display: none !important; }

@keyframes messageVanish {
  0% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-4px); }
}

@media (max-width: 420px) {
  .app-shell { padding-inline: 12px; }
  .hero-card,
  .chat-card { padding: 18px; border-radius: 24px; }
  .button-row { flex-direction: column; }
  .button-row button { width: 100%; }
  .setting-row {
    grid-template-columns: 82px 66px 1fr;
    gap: 7px;
    padding: 8px;
  }
  .seconds-input {
    width: 66px !important;
    min-width: 66px;
  }
  .setting-row em { font-size: 10.5px; }
  .identity-row { grid-template-columns: 1fr 74px; }
  .friend-item { grid-template-columns: 1fr; }
  .friend-action { width: 100%; }
  .chat-header { grid-template-columns: 1fr; }
  .header-actions {
    max-width: none;
    justify-content: flex-start;
  }
  .icon-btn { padding: 9px 10px; }
=======
.peek-dot {
  display: block;
  position: relative;
  width: 54px;
  height: 30px;
  margin: 7px auto 0;
  border-radius: 999px;
  background: rgba(233,107,25,.13);
  touch-action: none;
}

.peek-dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--orange);
  box-shadow: 0 0 0 5px rgba(233,107,25,.13);
  transform: translate(-50%, -50%);
}

.msg.peek.revealed .peek-dot { background: rgba(233,107,25,.22); }

.composer {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 58px;
  gap: 7px;
  margin-top: 8px;
}

.composer input {
  min-width: 0;
  height: 43px;
  padding: 0 12px;
  border-radius: 13px;
}

.photo-btn,
.send-btn {
  height: 43px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 900;
}

.photo-btn {
  background: #e8edf5;
  color: var(--navy-900);
}

.send-btn {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: white;
}

.status-bar {
  flex: 0 0 auto;
  min-height: 27px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  background: rgba(0,0,0,.18);
  color: rgba(255,255,255,.84);
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.privacy-cover {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  background: rgba(7,22,47,.97);
  color: white;
  font-weight: 900;
  letter-spacing: .15em;
}

body.privacy-hidden .privacy-cover { display: grid; }
body.privacy-hidden .app-shell { filter: blur(12px); }

.hidden { display: none !important; }

@keyframes messageVanish {
  0%, 82% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-3px); }
}

@media (max-width: 390px) {
  .app-shell { padding-inline: 7px; }
  .setup-card { padding: 14px; }
  .settings-list { gap: 5px; }
  .setting-row { padding: 7px; }
  .title-side { gap: 5px; }
  .unread-pill { padding-inline: 7px; }
>>>>>>> cfe67c3dbb9e9037e480c6d8b66aeeecf9380be7
}
