:root {
  --night: #111416;
  --night-deep: #0c0f10;
  --lifted: #1b2022;
  --lifted-2: #252c2d;
  --primary: #f6f1e8;
  --muted: #a4aba8;
  --quiet: #727b78;
  --leaf: #738c7a;
  --leaf-soft: #9bb0a0;
  --smoke: #a69ab8;
  --copper: #b77d5f;
  --glow: #d8b96a;
  --line: rgba(246, 241, 232, 0.12);
  --line-strong: rgba(246, 241, 232, 0.22);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--primary);
  background: #080a0b;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(115, 140, 122, 0.12), transparent 30rem),
    radial-gradient(circle at 90% 85%, rgba(166, 154, 184, 0.1), transparent 34rem),
    #080a0b;
}

button, input { font: inherit; }
button { cursor: pointer; }

.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 28px 16px;
}

.stage__hint {
  margin: 0;
  color: rgba(246, 241, 232, 0.44);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.phone {
  position: relative;
  width: min(390px, 100%);
  height: min(844px, calc(100vh - 74px));
  min-height: 680px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(246, 241, 232, 0.16);
  border-radius: 34px;
  background: var(--night);
  box-shadow: var(--shadow), inset 0 0 0 7px rgba(0, 0, 0, 0.16);
}

.phone__grain {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.screen {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow: hidden;
  padding: calc(24px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom));
  animation: screen-in 280ms ease both;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen::before,
.screen::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  filter: blur(3px);
  pointer-events: none;
}

.screen::before {
  width: 240px;
  height: 240px;
  top: 170px;
  right: -110px;
  background: radial-gradient(circle, rgba(166, 154, 184, 0.13), transparent 70%);
}

.screen::after {
  width: 230px;
  height: 230px;
  bottom: 30px;
  left: -130px;
  background: radial-gradient(circle, rgba(115, 140, 122, 0.14), transparent 70%);
}

.eyebrow,
.screen__meta,
.status-line,
.field-note,
.security-note,
.microcopy {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-transform: uppercase;
}

.eyebrow__right {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  letter-spacing: 0;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--copper);
  box-shadow: 0 0 16px rgba(183, 125, 95, 0.7);
}

.status-dot--on {
  background: var(--glow);
  box-shadow: 0 0 18px rgba(216, 185, 106, 0.8);
}

h1, h2, p { margin: 0; }

.hero {
  max-width: 330px;
  margin-top: 66px;
}

.hero__title {
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-size: clamp(31px, 9vw, 42px);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.05em;
}

.hero__copy {
  max-width: 290px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.atmosphere {
  position: relative;
  height: 258px;
  margin: 30px -8px 0;
}

.aura {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.aura--leaf {
  width: 218px;
  height: 218px;
  background: radial-gradient(circle, rgba(115, 140, 122, 0.21), rgba(115, 140, 122, 0.03) 64%, transparent 70%);
  filter: blur(11px);
}

.aura--smoke {
  width: 148px;
  height: 148px;
  background: radial-gradient(circle, rgba(166, 154, 184, 0.26), rgba(166, 154, 184, 0.03) 67%, transparent 72%);
  filter: blur(7px);
}

.aura__core {
  width: 56px;
  height: 56px;
  background: radial-gradient(circle at 35% 28%, #f3d58a, var(--glow) 35%, #9e7748 78%);
  box-shadow: 0 0 34px rgba(216, 185, 106, 0.45);
}

.aura__core::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  top: 21px;
  left: 22px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 14px var(--primary);
}

.field-note {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  text-align: center;
  letter-spacing: 0.02em;
}

.bottom-stack {
  position: absolute;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 24px;
}

.security-note {
  margin-bottom: 14px;
  letter-spacing: 0;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 18px;
  color: var(--night);
  font-size: 15px;
  font-weight: 700;
  transition: transform 160ms ease, filter 160ms ease, background 160ms ease;
}

.primary-btn { background: var(--leaf); }
.primary-btn:hover, .secondary-btn:hover, .ghost-btn:hover, .danger-btn:hover { filter: brightness(1.08); }
.primary-btn:active, .secondary-btn:active, .ghost-btn:active, .danger-btn:active { transform: scale(0.985); }

.secondary-btn {
  color: var(--primary);
  background: var(--lifted-2);
}

.ghost-btn {
  min-height: 42px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
}

.danger-btn {
  color: #f6ddd2;
  background: rgba(183, 125, 95, 0.18);
  border: 1px solid rgba(183, 125, 95, 0.35);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar__title {
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.icon-btn {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--primary);
  background: rgba(27, 32, 34, 0.72);
}

.icon-btn:hover { background: var(--lifted-2); }

.topbar__right { display: inline-flex; align-items: center; gap: 10px; }
.lang-toggle {
  min-width: 35px;
  height: 27px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(27, 32, 34, 0.72);
  font-size: 10px;
  letter-spacing: 0.04em;
}
.lang-toggle:hover { color: var(--primary); border-color: var(--line-strong); background: var(--lifted-2); }

.edit-intro { margin-top: 40px; }
.edit-intro h1 { font-size: 27px; line-height: 1.32; font-weight: 500; }
.edit-intro p { max-width: 300px; margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.7; }

.scent-section { margin-top: 28px; }
.scent-section + .scent-section { margin-top: 20px; }
.scent-section__label { display: flex; align-items: baseline; justify-content: space-between; color: var(--primary); font-size: 14px; }
.scent-section__label span { color: var(--quiet); font-size: 11px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag {
  appearance: none;
  cursor: pointer;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(27, 32, 34, 0.65);
  font-size: 12px;
}
.tag:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }
.tag--leaf.is-selected { border-color: rgba(115, 140, 122, 0.75); color: var(--primary); background: rgba(115, 140, 122, 0.22); }
.tag--smoke.is-selected { border-color: rgba(166, 154, 184, 0.75); color: var(--primary); background: rgba(166, 154, 184, 0.22); }
.tag--copper.is-selected { border-color: rgba(183, 125, 95, 0.75); color: var(--primary); background: rgba(183, 125, 95, 0.22); }

.edit-footer { position: absolute; right: 24px; bottom: calc(24px + env(safe-area-inset-bottom)); left: 24px; }
.edit-footer__note { margin-bottom: 12px; color: var(--muted); font-size: 11px; line-height: 1.6; }

.mode-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding: 13px 14px;
  border: 1px solid rgba(216, 185, 106, 0.27);
  border-radius: 17px;
  background: rgba(216, 185, 106, 0.08);
}
.mode-card__main { display: flex; align-items: center; gap: 9px; }
.mode-card__main strong { display: block; font-size: 13px; font-weight: 600; }
.mode-card__main small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.mode-card__time { color: var(--glow); font-variant-numeric: tabular-nums; font-size: 14px; }

.nearby-head { margin-top: 30px; }
.nearby-head h1 { font-family: "Noto Serif SC", "Songti SC", "SimSun", serif; font-size: 28px; font-weight: 500; line-height: 1.28; }
.nearby-head p { margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.55; }

.scent-field {
  position: relative;
  height: 390px;
  margin: 17px -15px 0;
  overflow: hidden;
  border: 1px solid rgba(246, 241, 232, 0.06);
  border-radius: 28px;
  background:
    radial-gradient(circle at 25% 32%, rgba(115, 140, 122, 0.12), transparent 23%),
    radial-gradient(circle at 75% 62%, rgba(166, 154, 184, 0.1), transparent 26%),
    rgba(12, 15, 16, 0.45);
}

.scent-field::before {
  content: "";
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(246, 241, 232, 0.06);
  border-radius: 50%;
  transform: rotate(-12deg) scaleX(1.14);
}

.scent-node {
  position: absolute;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--night);
  background: transparent;
}
.scent-node::before,
.scent-node::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.scent-node::before { inset: -24px; opacity: 0.26; filter: blur(9px); }
.scent-node::after { inset: -9px; border: 1px solid currentColor; opacity: 0.24; }
.scent-node span { position: relative; z-index: 1; width: 23px; height: 23px; border-radius: 50%; box-shadow: 0 0 22px currentColor; }
.scent-node--leaf { color: var(--leaf-soft); }
.scent-node--leaf::before { background: var(--leaf); }
.scent-node--leaf span { background: var(--leaf-soft); }
.scent-node--smoke { color: var(--smoke); }
.scent-node--smoke::before { background: var(--smoke); }
.scent-node--smoke span { background: var(--smoke); }
.scent-node--copper { color: var(--copper); }
.scent-node--copper::before { background: var(--copper); }
.scent-node--copper span { background: var(--copper); }
.scent-node--glow { color: var(--glow); }
.scent-node--glow::before { background: var(--glow); }
.scent-node--glow span { background: var(--glow); }
.scent-node--large span { width: 34px; height: 34px; }
.scent-field__label { position: absolute; right: 17px; bottom: 15px; left: 17px; color: var(--quiet); font-size: 10px; text-align: center; }

.nearby-footer { position: absolute; right: 24px; bottom: calc(24px + env(safe-area-inset-bottom)); left: 24px; display: grid; gap: 10px; }
.nearby-footer__row { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.nearby-footer__row button { padding: 0; border: 0; color: var(--muted); background: none; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }

.detail-card {
  position: absolute;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 24px;
  padding: 19px;
  border: 1px solid rgba(246, 241, 232, 0.14);
  border-radius: 25px;
  background: rgba(27, 32, 34, 0.92);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}
.detail-card__top { display: flex; align-items: center; gap: 12px; }
.detail-card__avatar { width: 49px; height: 49px; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #d9d0ba, var(--smoke) 37%, var(--leaf) 90%); box-shadow: 0 0 26px rgba(166, 154, 184, 0.24); }
.detail-card__title { font-family: "Noto Serif SC", "Songti SC", "SimSun", serif; font-size: 18px; }
.detail-card__subtitle { margin-top: 4px; color: var(--muted); font-size: 11px; }
.detail-card__line { height: 1px; margin: 16px 0; background: var(--line); }
.detail-card__label { color: var(--quiet); font-size: 10px; letter-spacing: 0.08em; }
.detail-card__value { margin-top: 6px; font-size: 14px; line-height: 1.6; }
.detail-card__tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 17px; }
.mini-tag { padding: 6px 9px; border-radius: 999px; color: var(--muted); background: rgba(166, 154, 184, 0.14); font-size: 11px; }

.center-state { display: grid; align-content: center; height: 100%; padding-bottom: 70px; text-align: center; }
.center-state__visual { position: relative; width: 220px; height: 220px; margin: 0 auto 42px; }
.center-state__visual::before, .center-state__visual::after { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(216, 185, 106, 0.22); border-radius: 50%; animation: breathe 2.8s ease-in-out infinite; }
.center-state__visual::after { inset: 38px; border-color: rgba(166, 154, 184, 0.25); animation-delay: 350ms; }
@keyframes breathe { 0%, 100% { transform: scale(0.94); opacity: 0.55; } 50% { transform: scale(1.04); opacity: 1; } }
.center-state__dot { position: absolute; left: 50%; top: 50%; width: 55px; height: 55px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--glow); box-shadow: 0 0 42px rgba(216, 185, 106, 0.58); }
.center-state__dot::after { content: ""; position: absolute; inset: 20px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 14px var(--primary); }
.center-state h1 { font-family: "Noto Serif SC", "Songti SC", "SimSun", serif; font-size: 30px; font-weight: 500; }
.center-state p { max-width: 275px; margin: 14px auto 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.center-state__actions { display: grid; gap: 10px; margin-top: 34px; }

.chat-screen { display: flex; flex-direction: column; padding-bottom: 16px; }
.chat-head { margin-top: 29px; }
.chat-head__profile { display: flex; align-items: center; gap: 11px; }
.chat-head__avatar { width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 30% 26%, #dbcfbd, var(--copper) 45%, var(--smoke)); }
.chat-head__name { font-family: "Noto Serif SC", "Songti SC", "SimSun", serif; font-size: 20px; }
.chat-head__status { margin-top: 3px; color: var(--muted); font-size: 10px; }
.chat-intro { margin: 24px 0 20px; padding: 13px 14px; border-left: 2px solid var(--glow); color: var(--muted); background: rgba(216, 185, 106, 0.08); font-size: 11px; line-height: 1.6; }
.messages { display: grid; gap: 12px; max-height: 430px; overflow: auto; padding-right: 3px; }
.message { max-width: 78%; padding: 11px 13px; border-radius: 17px; color: var(--primary); font-size: 13px; line-height: 1.55; }
.message--them { justify-self: start; border-top-left-radius: 6px; background: var(--lifted); }
.message--me { justify-self: end; border-top-right-radius: 6px; background: rgba(115, 140, 122, 0.34); }
.composer { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 15px; }
.composer input { min-width: 0; flex: 1; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 16px; outline: none; color: var(--primary); background: var(--lifted); font-size: 13px; }
.composer input:focus { border-color: rgba(115, 140, 122, 0.8); }
.composer button { flex: 0 0 auto; width: 46px; height: 46px; border: 0; border-radius: 16px; color: var(--night); background: var(--glow); font-size: 17px; }

.safety-list { display: grid; gap: 10px; margin-top: 32px; }
.safety-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: rgba(27, 32, 34, 0.78); }
.safety-item strong { display: block; font-size: 13px; font-weight: 600; }
.safety-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.safety-item button { flex: 0 0 auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: transparent; font-size: 11px; }
.safety-item button:hover { color: var(--primary); border-color: var(--line-strong); }
.safety-footer { position: absolute; right: 24px; bottom: calc(24px + env(safe-area-inset-bottom)); left: 24px; }

.toast { position: absolute; z-index: 20; right: 17px; bottom: 18px; left: 17px; padding: 12px 14px; border: 1px solid rgba(216, 185, 106, 0.35); border-radius: 14px; color: var(--primary); background: rgba(17, 20, 22, 0.93); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); font-size: 12px; text-align: center; animation: toast-in 220ms ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

@media (max-height: 740px) {
  .phone { min-height: 630px; }
  .hero { margin-top: 42px; }
  .atmosphere { height: 220px; margin-top: 16px; }
  .scent-field { height: 310px; }
  .messages { max-height: 320px; }
}

@media (max-width: 420px) {
  .stage { padding: 0; gap: 0; }
  .phone { width: 100vw; height: 100vh; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
  .stage__hint { display: none; }
}
