/* 呢喃 UI Refresh 2026 — shared visual language for landing + Web App */
:root {
  --bg: #0d0c11;
  --bg-soft: #141219;
  --card: #1a171f;
  --card-hover: #211d28;
  --border: rgba(255, 255, 255, .085);
  --text: #f8f4f7;
  --text-dim: #aaa1ad;
  --pink: #f18aa6;
  --pink-deep: #e85f82;
  --purple: #9484ff;
  --grad: linear-gradient(135deg, #ef6f91 0%, #8f7cf5 100%);
  --radius: 24px;
  --radius-sm: 14px;
  --radius-lg: 30px;
  --shadow-card: 0 18px 54px rgba(0, 0, 0, .34);
  --maxw: 1180px;
}

body { font-feature-settings: "kern"; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }

.btn { min-height: 44px; padding-inline: 22px; letter-spacing: .1px; }
.btn-primary { box-shadow: 0 10px 28px rgba(232, 95, 130, .24); }
.btn-primary:hover { box-shadow: 0 14px 34px rgba(232, 95, 130, .34); }

/* Landing */
.nav { top: 14px; left: 16px; right: 16px; background: transparent; border: 0; backdrop-filter: none; }
.nav-inner {
  max-width: var(--maxw); padding: 10px 12px 10px 18px;
  border: 1px solid var(--border); border-radius: 22px;
  background: rgba(18, 16, 23, .74); backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 12px 38px rgba(0, 0, 0, .22);
}
.brand-dot { width: 28px; height: 28px; border-radius: 10px; box-shadow: 0 8px 18px rgba(232, 95, 130, .24); }
.brand-name { font-size: 18px; letter-spacing: .5px; }
.brand-en { font-size: 10px; letter-spacing: 1.6px; }
.nav-links { gap: 8px; }
.nav-links a { padding: 8px 13px; border-radius: 999px; }
.nav-links a:hover { background: rgba(255,255,255,.055); }

.hero { min-height: 820px; padding-top: 132px; padding-bottom: 92px; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: linear-gradient(to bottom, black, transparent 82%);
}
.hero-inner { grid-template-columns: minmax(0, 1.08fr) minmax(340px, .78fr); gap: clamp(40px, 7vw, 92px); }
.hero-kicker, .section-kicker { letter-spacing: 2.4px; color: var(--pink); }
.hero-title { font-size: clamp(44px, 5.3vw, 68px); line-height: 1.1; letter-spacing: -.04em; margin-bottom: 24px; }
.hero-sub { font-size: 17px; line-height: 1.85; }
.hero-badges { color: #d3ccd5; gap: 10px 18px; }
.carousel { width: min(100%, 410px); justify-self: end; }
.carousel-viewport { border-radius: var(--radius-lg); box-shadow: 0 34px 90px rgba(0,0,0,.48); }
.carousel-cap { left: 24px; right: 24px; bottom: 24px; }
.carousel-arrow { width: 42px; height: 42px; border-radius: 15px; }

.section { padding-top: 96px; padding-bottom: 96px; }
.section-head { margin-bottom: 44px; }
.section-title { letter-spacing: -.025em; }
.char-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.char-card, .feature, .download-card { border-radius: var(--radius); }
.char-card { aspect-ratio: 3 / 4; }
.feature { background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.018)); }
.download-card { box-shadow: var(--shadow-card); }

/* Shared Web App shell */
.app-shell { background: var(--bg); }
.rail { width: 72px; flex-basis: 72px; padding: 14px 0; background: #0a090d; }
.rail-top, .rail-bottom { gap: 8px; }
.rail-item { width: 54px; min-height: 52px; border-radius: 17px; font-size: 10px; }
.rail-item:hover { background: rgba(255,255,255,.06); }
.rail-item.active { color: #ff9bb5; background: rgba(232,95,130,.14); }

/* Chat */
.chat-app { grid-template-columns: 264px minmax(430px, 1fr) 294px; }
.chat-side, .chat-detail { background: #110f15; }
.chat-side { padding: 18px 14px; }
.chat-side .brand { padding: 2px 8px 6px; }
.side-title { margin: 22px 8px 10px; letter-spacing: 1.4px; }
.persona-list { gap: 6px; }
.persona-item { padding: 10px; border-radius: 16px; gap: 11px; }
.persona-item img { width: 42px; height: 42px; }
.persona-item.active { background: linear-gradient(100deg, rgba(232,95,130,.15), rgba(148,132,255,.09)); border-color: rgba(241,138,166,.24); }
.chat-main { background: radial-gradient(90% 70% at 90% 0%, rgba(148,132,255,.12), transparent 64%), #0d0c11; }
.chat-head { min-height: 76px; padding: 14px 22px; background: rgba(13,12,17,.72); backdrop-filter: blur(22px) saturate(140%); }
.head-avatar { width: 44px; height: 44px; border-width: 1px; }
.chat-msgs { padding: 28px clamp(20px, 4vw, 54px) 20px; gap: 20px; }
.msg-row { gap: 9px; }
.msg-bubble { min-width: 0; max-width: min(72%, 620px); padding: 12px 16px; border-radius: 20px; line-height: 1.7; }
.msg-row.ai .msg-bubble { background: #211e27; border: 1px solid var(--border); border-bottom-left-radius: 6px; }
.msg-row.user .msg-bubble { border-bottom-right-radius: 6px; }
.msg-time { margin-top: 5px; opacity: .75; }
.chat-inputbar { margin: 0 clamp(12px, 2.5vw, 34px); padding: 10px; border: 1px solid var(--border); border-radius: 22px; background: rgba(27,24,32,.92); }
#chatInput { min-height: 44px; padding: 11px 14px; border: 0; border-radius: 16px; background: transparent; }
.chat-send { min-width: 78px; border-radius: 16px; }
.chat-tip { padding: 7px clamp(22px, 5vw, 60px) 14px; }
.detail-img { margin: 14px; border: 1px solid var(--border); border-radius: 22px; aspect-ratio: 4 / 5; }
.detail-info { padding: 6px 18px 20px; }
.detail-meta { border-radius: 14px; padding: 10px 12px; }

/* Plaza */
.plaza-main { padding: 32px clamp(20px, 3.6vw, 54px) 52px; background: radial-gradient(90% 70% at 92% -10%, rgba(148,132,255,.14), transparent 60%), var(--bg); }
.plaza-head { align-items: center; margin: 0 auto 26px; max-width: 1440px; }
.plaza-head-title h1 { font-size: 28px; letter-spacing: -.02em; }
.plaza-search { min-width: 300px; min-height: 46px; border-radius: 16px; background: var(--card); }
.discovery-tabs { max-width: 1440px; margin: 0 auto 16px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.discovery-tabs::-webkit-scrollbar { display: none; }
.discovery-tab { min-height: 40px; padding: 0 17px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text-dim); cursor: pointer; white-space: nowrap; font-weight: 700; }
.discovery-tab.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.plaza-feature { max-width: 1440px; height: min(54vh, 570px); min-height: 410px; margin: 0 auto 30px; border: 1px solid var(--border); border-radius: 30px; overflow: hidden; background: var(--card); box-shadow: var(--shadow-card); }
.feature-link { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; }
.feature-link > img { width: 100%; height: 100%; object-fit: cover; object-position: center 24%; transition: transform .7s cubic-bezier(.22,1,.36,1); }
.feature-link:hover > img { transform: scale(1.025); }
.feature-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,7,10,.1), rgba(8,7,10,.05) 38%, rgba(8,7,10,.35)), linear-gradient(0deg, rgba(8,7,10,.96), transparent 68%); }
.feature-top { position: absolute; top: 20px; left: 20px; right: 20px; display: flex; justify-content: space-between; align-items: center; }
.feature-top span { padding: 8px 12px; border-radius: 999px; background: rgba(10,8,12,.56); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(12px); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .8px; }
.feature-top .feature-online { color: rgba(255,255,255,.82); letter-spacing: 0; }
.feature-content { position: absolute; left: 28px; right: 28px; bottom: 24px; max-width: 560px; }
.feature-name { color: #fff; font-size: clamp(34px, 4vw, 54px); line-height: 1; font-weight: 900; letter-spacing: -.04em; }
.feature-tag { margin-top: 8px; color: rgba(255,255,255,.72); font-size: 14px; font-weight: 700; }
.feature-content > p { margin-top: 14px; color: #fff; font-size: 18px; line-height: 1.55; font-weight: 700; }
.feature-reply { margin-top: 20px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.17); display: flex; justify-content: space-between; align-items: center; max-width: 480px; }
.feature-reply span { display: flex; flex-direction: column; }
.feature-reply small { color: rgba(255,255,255,.52); font-size: 10px; }
.feature-reply b { color: #fff; font-size: 15px; }
.feature-reply i { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 20px; font-style: normal; }
.plaza-section-head { max-width: 1440px; margin: 0 auto 15px; display: flex; justify-content: space-between; align-items: end; }
.plaza-section-head h2 { margin: 0; color: var(--text); font-size: 19px; }
.plaza-section-head p, .plaza-section-head > span { margin: 3px 0 0; color: var(--text-dim); font-size: 11px; }
.plaza-grid { max-width: 1440px; margin: 0 auto; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.persona-card { border-radius: 22px; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.persona-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.persona-card .card-img { aspect-ratio: 4 / 5; }
.persona-card .card-img-overlay { padding: 54px 14px 14px; }
.persona-card .card-body { padding: 13px; }
.persona-card .card-chat { min-height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 13px; }
.modal-card, .login-card { border-radius: 24px; box-shadow: var(--shadow-card); }

@media (max-width: 1100px) {
  .chat-app { grid-template-columns: 234px minmax(0, 1fr); }
  .chat-detail { display: none; }
  .char-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .nav { top: 10px; left: 10px; right: 10px; }
  .nav-inner { padding: 8px 9px 8px 13px; border-radius: 19px; }
  .nav-links { display: none; }
  .brand-dot { width: 24px; height: 24px; border-radius: 8px; }
  .brand-en { display: none; }
  .btn-download-nav { min-height: 40px; padding: 8px 15px; }
  .hero { min-height: auto; padding: 112px 18px 68px; }
  .hero-inner { grid-template-columns: 1fr; gap: 42px; }
  .hero-title { font-size: clamp(39px, 12vw, 54px); }
  .hero-sub { font-size: 15.5px; }
  .hero-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero-cta .btn { padding-inline: 12px; }
  .carousel { width: min(100%, 360px); justify-self: center; }
  .scroll-hint { display: none; }
  .section { padding: 70px 18px; }
  .section-head { text-align: left; margin-bottom: 28px; }
  .section-sub { margin: 0; }
  .char-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .feature-grid { grid-template-columns: 1fr; }

  .app-shell { display: block; }
  .rail {
    position: fixed; z-index: 80; left: 8px; right: 8px; bottom: 8px;
    width: auto; height: 66px; padding: 6px; border: 1px solid var(--border);
    border-radius: 22px; flex: none; flex-direction: row; justify-content: center;
    background: rgba(20,17,25,.92); backdrop-filter: blur(22px) saturate(145%);
    box-shadow: 0 16px 44px rgba(0,0,0,.44);
  }
  .rail-top, .rail-bottom { flex-direction: row; gap: 2px; }
  .rail-item { width: 49px; min-height: 52px; padding: 4px 0; border-radius: 16px; font-size: 9px; }
  .rail-item svg { width: 19px; height: 19px; }
  .chat-side { display: none; }
  .chat-app { grid-template-columns: minmax(0, 1fr); }
  .chat-head { min-height: 68px; padding: 10px 13px; }
  .chat-msgs { padding: 18px 12px 12px; gap: 16px; }
  .msg-bubble { max-width: 82%; font-size: 14px; }
  .chat-inputbar { margin: 0 9px; padding: 7px; gap: 6px; border-radius: 19px; }
  .chat-send { min-width: 64px; padding-inline: 13px; }
  .chat-tip { padding: 5px 18px 84px; }

  .plaza-main { height: 100vh; padding: 20px 12px 98px; }
  .plaza-head { align-items: flex-start; }
  .plaza-head-actions { gap: 8px; }
  .plaza-search { min-width: 0; min-height: 44px; }
  .plaza-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .discovery-tabs { margin-bottom: 12px; }
  .discovery-tab { min-height: 36px; padding-inline: 14px; font-size: 12px; }
  .plaza-feature { min-height: 0; height: 430px; margin-bottom: 24px; border-radius: 22px; }
  .feature-link > img { object-position: center top; }
  .feature-top { top: 13px; left: 13px; right: 13px; }
  .feature-top span { padding: 7px 9px; font-size: 9px; }
  .feature-content { left: 17px; right: 17px; bottom: 16px; }
  .feature-name { font-size: 34px; }
  .feature-content > p { font-size: 15px; margin-top: 10px; }
  .feature-reply { margin-top: 13px; padding-top: 11px; }
  .persona-card { border-radius: 18px; }
  .persona-card .card-body { padding: 10px; }
  .persona-card .card-bg { display: none; }
}

@media (max-width: 390px) {
  .hero-cta { grid-template-columns: 1fr; }
  .char-grid { grid-template-columns: 1fr 1fr; }
  .rail { width: auto; }
  .rail-item { width: 47px; }
  .plaza-head-actions .btn { padding-inline: 13px; }
}
