/* 酒狐 · 短信：与游戏内聊天界面同一套深色玻璃、金色（主人）与象牙白（酒狐）气泡。 */
:root {
  --ink: #0b0e12;
  --panel: rgba(16, 20, 26, 0.8);
  --panel-solid: rgba(18, 22, 28, 0.95);
  --raise: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.08);
  --text: #ece9e2;
  --soft: #b9b6ae;
  --muted: #858b93;
  --gold: #ecc583;
  --gold-2: #d8a95e;
  --gold-ink: #2b2110;
  --ivory: #f1efe9;
  --ivory-ink: #1d2026;
  --teal: #74d5bf;
  --rose: #e98a78;
  --radius: 22px;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  height: 100%;
  margin: 0;
}
body {
  font-family:
    'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.stage {
  position: fixed;
  inset: 0;
  background: url(/chat-assets/backdrop.png) center / cover;
  filter: blur(24px) saturate(1.2) brightness(0.55);
  transform: scale(1.08);
}
.stage::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 20% 10%, rgba(236, 197, 131, 0.1), transparent 55%),
    linear-gradient(180deg, rgba(11, 14, 18, 0.1), rgba(11, 14, 18, 0.65));
}
main {
  position: relative;
  height: 100dvh;
}
.icon-button {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--raise);
  color: var(--soft);
}
.icon-button svg {
  width: 18px;
  height: 18px;
}
.icon-button:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.16);
}
.portrait,
.avatar {
  display: block;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
}
.portrait img,
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 登录 */
body:has(#login-panel:not([hidden])) .stage {
  filter: blur(3px) saturate(1.1) brightness(0.62);
  transform: scale(1.02);
}
body:has(#login-panel:not([hidden])) .stage::after {
  background:
    linear-gradient(
      90deg,
      rgba(9, 11, 15, 0.92),
      rgba(9, 11, 15, 0.55) 45%,
      rgba(9, 11, 15, 0.35) 70%,
      rgba(9, 11, 15, 0.7)
    ),
    radial-gradient(60% 60% at 20% 70%, rgba(236, 197, 131, 0.12), transparent);
}
.auth {
  height: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 56px;
  display: grid;
  grid-template-columns: 1.15fr 420px;
  align-items: center;
  gap: 60px;
  overflow-y: auto;
}
.kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.42em;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 12px;
}
.kicker::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--gold);
}
/* 登录页标题就是品牌字标（10-07 用户定）：整名金色，与验证邮件页眉同色，不再单给某个字上色 */
.hello h1 {
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 22px 0 18px;
  background: linear-gradient(180deg, #f7dca8, var(--gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  width: fit-content;
}
.intro {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--soft);
  max-width: 420px;
  margin: 0;
}
/* 品牌标语（10-07 用户定）：一句诗，字距放开 */
.intro.tagline {
  font-size: 19px;
  letter-spacing: 0.28em;
}
.auth-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 30px;
  backdrop-filter: blur(22px);
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.tabs {
  display: flex;
  padding: 4px;
  border-radius: 14px;
  background: var(--raise);
  border: 1px solid var(--line);
  margin-bottom: 24px;
}
.tabs button {
  flex: 1;
  padding: 9px 0;
  border: 0;
  border-radius: 10px;
  background: none;
  font-size: 13.5px;
  color: var(--muted);
}
.tabs button[aria-selected='true'] {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  font-weight: 600;
}
[data-pane] > form + form {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.auth-card label {
  display: block;
  font-size: 12.5px;
  color: var(--soft);
  margin-bottom: 16px;
}
.auth-card input:not([type='checkbox']) {
  display: block;
  width: 100%;
  margin-top: 8px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0 16px;
  font-size: 15px;
  outline: none;
}
.auth-card .secret {
  display: block;
  position: relative;
  margin-top: 8px;
}
.auth-card .secret input {
  margin-top: 0;
  padding-right: 52px;
}
.auth-card .reveal {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.auth-card .reveal:hover,
.auth-card .reveal[aria-pressed='true'] {
  color: var(--soft);
}
.auth-card .reveal svg {
  width: 20px;
  height: 20px;
}
.auth-card .reveal .eye-hide,
.auth-card .reveal[aria-pressed='true'] .eye-show {
  display: none;
}
.auth-card .reveal[aria-pressed='true'] .eye-hide {
  display: block;
}
.auth-card input:focus {
  border-color: rgba(236, 197, 131, 0.6);
  box-shadow: 0 0 0 4px rgba(236, 197, 131, 0.12);
}
.auth-card .check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.6;
}
.auth-card .check input {
  margin-top: 4px;
  accent-color: var(--gold);
}
.note {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin: -6px 0 16px;
}
.note strong {
  color: var(--soft);
}
.primary {
  width: 100%;
  height: 50px;
  margin-top: 8px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #f3cf90, var(--gold-2));
  color: var(--gold-ink);
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 14px 30px -12px rgba(236, 197, 131, 0.7);
}
.primary:disabled {
  opacity: 0.6;
}
.aux {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
}
.aux button {
  border: 0;
  background: none;
  padding: 0;
  font-size: 12.5px;
  color: var(--soft);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
#auth-status {
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--gold);
}
#auth-status:empty {
  display: none;
}

/* 工作台 */
#workspace {
  height: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 22px;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
}
.side,
.chat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(22px) saturate(1.2);
  box-shadow:
    0 30px 80px -30px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  min-height: 0;
}
.side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  overflow-y: auto;
  scrollbar-width: none;
}
.card {
  position: relative;
  flex: none;
  height: 272px;
  border-radius: 20px;
  overflow: hidden;
  background: radial-gradient(100% 90% at 50% 25%, #fff, #e6e9ef);
}
.card > img {
  position: absolute;
  left: 50%;
  top: 10px;
  width: 238px;
  transform: translateX(-50%);
}
.card-tag {
  position: absolute;
  right: 12px;
  bottom: 84px;
  writing-mode: vertical-rl;
  letter-spacing: 0.4em;
  font-size: 9.5px;
  font-weight: 600;
  color: #a9aeb8;
}
.see-big {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(18, 22, 28, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  text-align: left;
  transition: transform 0.2s ease;
}
.see-big:hover {
  transform: translateY(-1px);
}
.see-big b {
  display: block;
  font-size: 14px;
}
.see-big small {
  font-size: 11.5px;
  color: var(--soft);
}
.play {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: var(--gold);
  color: var(--gold-ink);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 0 rgba(236, 197, 131, 0.5);
  animation: breathe 2.8s ease-out infinite;
}
.play svg {
  width: 15px;
  height: 15px;
  margin-left: 2px;
}
.see-on {
  display: none;
}
.watching .see-idle {
  display: none;
}
.watching .see-on {
  display: inline;
}
.watching .see-big {
  background: var(--gold);
  color: var(--gold-ink);
  border-color: transparent;
  pointer-events: none;
}
.watching .see-big small {
  color: #5a4520;
}
.watching .see-big .play {
  background: var(--gold-ink);
  color: var(--gold);
  animation: none;
}
.me {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}
.me h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0.08em;
}
.me p {
  margin: 4px 0 0;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--soft);
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(116, 213, 191, 0.18);
}
.side-work {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.side-work h3 {
  margin: 6px 2px 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--soft);
}
.side-empty {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}
.work-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(116, 213, 191, 0.1), rgba(255, 255, 255, 0.02) 60%);
  border: 1px solid rgba(116, 213, 191, 0.18);
}
.work-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.work-icon {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: rgba(236, 197, 131, 0.1);
  border: 1px solid rgba(236, 197, 131, 0.22);
}
.work-icon svg {
  width: 20px;
  height: 20px;
}
.work-title {
  min-width: 0;
  flex: 1;
}
.work-item {
  display: block;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.work-phase {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--soft);
}
.work-stale {
  color: var(--rose);
}
.work-count {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: var(--teal);
}
.work-count i {
  font-style: normal;
  color: var(--muted);
}
.work-bar {
  position: relative;
  height: 6px;
  margin-top: 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.work-fill {
  position: relative;
  display: block;
  height: 100%;
  border-radius: 9px;
  background: linear-gradient(90deg, #4fb9a2, var(--teal));
  box-shadow: 0 0 12px rgba(116, 213, 191, 0.6);
  overflow: hidden;
  transition: width 0.6s ease;
}
.work-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: translateX(-100%);
  animation: shimmer 2.4s ease-in-out infinite;
}
.work-blocker {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #f2b3a6;
}
.work-done div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 2px;
  font-size: 12.5px;
  color: var(--soft);
  border-bottom: 1px dashed var(--line);
}
.work-done div:last-child {
  border: 0;
}
.work-done em {
  font-style: normal;
  font-size: 11.5px;
  color: var(--teal);
  flex: none;
}
.wardrobe {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(135deg, rgba(236, 197, 131, 0.16), rgba(236, 197, 131, 0.04));
  border: 1px solid rgba(236, 197, 131, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}
.wardrobe:hover {
  border-color: rgba(236, 197, 131, 0.6);
  transform: translateY(-1px);
}
.w-ico {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 14px;
  background: rgba(236, 197, 131, 0.16);
  color: var(--gold);
  display: grid;
  place-items: center;
}
.w-ico svg {
  width: 24px;
  height: 24px;
}
.w-t b {
  display: block;
  font-size: 15px;
}
.w-t small {
  font-size: 12px;
  color: var(--soft);
}
.w-go {
  margin-left: auto;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: var(--gold);
  color: var(--gold-ink);
  display: grid;
  place-items: center;
  font-weight: 700;
}

/* 矮一些的电脑屏幕：缩小角色卡，给工作与衣橱入口留位置 */
@media (max-height: 960px) {
  .card {
    height: 214px;
  }
  .card > img {
    width: 188px;
  }
  .card-tag {
    display: none;
  }
  .side {
    gap: 14px;
  }
}

/* 对话 */
.chat {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-header {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 26px;
  border-bottom: 1px solid var(--line);
}
.header-avatar,
.narrow,
.acts,
#work-cards {
  display: none;
}
.who {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}
.who h1 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0.06em;
}
#status {
  margin-left: auto;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#status::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
}
.tag {
  font-size: 10.5px;
  letter-spacing: 0.32em;
  color: var(--muted);
}
#timeline {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 22px 26px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  outline: none;
  overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 36px);
  mask-image: linear-gradient(180deg, transparent, #000 36px);
}
.entry {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}
.entry.user {
  justify-content: flex-end;
}
.entry.user + .entry.assistant,
.entry.assistant + .entry.user {
  margin-top: 14px;
}
#timeline .entry.fresh {
  animation: rise 0.22s ease-out;
}
.entry .avatar {
  width: 34px;
  height: 34px;
  box-shadow: 0 0 0 2px rgba(236, 197, 131, 0.55);
}
.entry.assistant:has(+ .entry.assistant) .avatar {
  visibility: hidden;
}
.message-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: min(560px, 72%);
  min-width: 0;
}
.entry.user .message-body {
  align-items: flex-end;
}
.bubble {
  padding: 10px 15px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.6);
}
.entry.assistant .bubble {
  background: var(--ivory);
  color: var(--ivory-ink);
  border-bottom-left-radius: 6px;
}
.entry.assistant + .entry.assistant .bubble {
  border-top-left-radius: 6px;
}
.entry.user .bubble {
  background: linear-gradient(180deg, #f3cf90, var(--gold));
  color: var(--gold-ink);
  border-bottom-right-radius: 6px;
}
.bubble.markdown {
  white-space: normal;
}
.bubble.markdown > :first-child {
  margin-top: 0;
}
.bubble.markdown > :last-child {
  margin-bottom: 0;
}
.bubble.markdown p {
  margin: 0 0 6px;
}
.bubble.markdown ul,
.bubble.markdown ol {
  margin: 6px 0;
  padding-left: 20px;
}
.bubble.markdown li {
  margin: 2px 0;
}
.bubble.markdown h1,
.bubble.markdown h2,
.bubble.markdown h3,
.bubble.markdown h4 {
  font-size: 15px;
  margin: 8px 0 4px;
}
.bubble.markdown a {
  color: #8a5a12;
}
.bubble.markdown code {
  font-family: ui-monospace, 'SF Mono', Consolas, monospace;
  font-size: 13px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.07);
}
.bubble.markdown pre {
  margin: 6px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.07);
  overflow-x: auto;
}
.bubble.markdown pre code {
  padding: 0;
  background: none;
}
.bubble.markdown blockquote {
  margin: 6px 0;
  padding-left: 10px;
  border-left: 3px solid rgba(0, 0, 0, 0.15);
  color: #4a4f57;
}
.bubble.markdown table {
  border-collapse: collapse;
  margin: 6px 0;
  font-size: 13px;
}
.bubble.markdown th,
.bubble.markdown td {
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 4px 8px;
}
.bubble.markdown hr {
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}
.task-mark {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}
.task-mark::before {
  content: '';
  width: 13px;
  height: 13px;
  flex: none;
  box-sizing: border-box;
  border-radius: 50%;
  border: 2px solid rgba(116, 213, 191, 0.25);
  border-top-color: var(--teal);
  animation: spin 0.9s linear infinite;
}
.task-mark[data-state='completed']::before {
  border: 0;
  animation: none;
  background: var(--teal)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m3 6.2 2 2 4-4.4' fill='none' stroke='%230d2420' stroke-width='1.8'/%3E%3C/svg%3E")
    center / 9px no-repeat;
}
.task-mark:is([data-state='paused'], [data-state='cancelled'], [data-state='queued'])::before {
  animation: none;
  border-color: var(--muted);
}
.task-mark:is([data-state='failed'], [data-state='uncertain'])::before {
  animation: none;
  border-color: var(--rose);
}
.task-mark:is([data-state='failed'], [data-state='uncertain']) {
  color: #f2b3a6;
}
#timeline.typing::after {
  content: '';
  flex: none;
  width: 56px;
  height: 32px;
  margin-left: 46px;
  border-radius: 16px 16px 16px 6px;
  background:
    radial-gradient(circle, #9aa0a6 3px, transparent 3.5px) 10px 50% / 12px 12px no-repeat,
    radial-gradient(circle, #9aa0a6 3px, transparent 3.5px) 22px 50% / 12px 12px no-repeat,
    radial-gradient(circle, #9aa0a6 3px, transparent 3.5px) 34px 50% / 12px 12px no-repeat,
    var(--ivory);
  animation: typing 1.2s ease-in-out infinite;
}
#latest {
  position: absolute;
  left: 50%;
  bottom: 150px;
  transform: translateX(-50%);
  z-index: 2;
  padding: 7px 14px;
  border-radius: 99px;
  border: 1px solid rgba(236, 197, 131, 0.35);
  background: rgba(18, 22, 28, 0.9);
  color: var(--gold);
  font-size: 12.5px;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.8);
}
.composer {
  flex: none;
  padding: 12px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.busy {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 7px 7px 14px;
  border-radius: 14px;
  background: rgba(116, 213, 191, 0.07);
  border: 1px solid rgba(116, 213, 191, 0.16);
  font-size: 12.5px;
  color: var(--soft);
}
.busy .ring {
  width: 14px;
  height: 14px;
  flex: none;
  border-radius: 50%;
  border: 2px solid rgba(116, 213, 191, 0.25);
  border-top-color: var(--teal);
  animation: spin 0.9s linear infinite;
}
.busy[data-state='paused'] .ring {
  animation: none;
  border-color: var(--muted);
}
#busy-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pause {
  height: 32px;
  flex: none;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid rgba(233, 138, 120, 0.35);
  background: rgba(233, 138, 120, 0.08);
  color: #f2b3a6;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
}
.pause svg {
  width: 13px;
  height: 13px;
}
.pause:disabled {
  opacity: 0.45;
}
#chat {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.input-shell {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 8px 0 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.input-shell:focus-within {
  border-color: rgba(236, 197, 131, 0.5);
  box-shadow: 0 0 0 4px rgba(236, 197, 131, 0.1);
}
.input-shell textarea {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  resize: none;
  background: none;
  padding: 14px 0;
  font-size: 15px;
  line-height: 1.5;
  max-height: 120px;
}
.input-shell textarea::placeholder {
  color: var(--muted);
}
.kbd {
  flex: none;
  font-size: 10.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  margin: 0 6px;
}
.send {
  height: 52px;
  flex: none;
  padding: 0 20px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, #f3cf90, var(--gold-2));
  color: var(--gold-ink);
  font-weight: 700;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 26px -10px rgba(236, 197, 131, 0.7);
  transition: transform 0.15s ease;
}
.send:active {
  transform: scale(0.97);
}
.send:disabled {
  opacity: 0.6;
}
.send svg {
  width: 16px;
  height: 16px;
}

/* 看看她 */
#viewing {
  position: relative;
  flex: none;
  margin: 14px 20px 0;
  aspect-ratio: 16 / 9;
  max-height: 52vh;
  border-radius: 18px;
  overflow: hidden;
  background: #05070a;
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
}
#world-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  touch-action: none;
}
.watching.hide-bubbles #timeline {
  display: none;
}
.watching.hide-bubbles #viewing {
  flex: 1;
  aspect-ratio: auto;
  max-height: none;
  margin-bottom: 4px;
}
.view-toolbar,
.view-right {
  position: absolute;
  top: 12px;
  z-index: 2;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.view-toolbar {
  left: 12px;
}
.view-right {
  right: 12px;
}
.controls-hidden .view-toolbar,
.controls-hidden .view-right {
  display: none;
}
.view-cameras {
  display: flex;
  padding: 3px;
  border-radius: 12px;
  background: rgba(10, 12, 16, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}
.view-cameras button {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: none;
  font-size: 12.5px;
  color: var(--soft);
  white-space: nowrap;
}
.view-cameras button[aria-pressed='true'] {
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 700;
}
#view-reset,
#view-bubbles,
#view-close,
#view-quality-menu summary {
  height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 12.5px;
  white-space: nowrap;
  color: var(--text);
  background: rgba(10, 12, 16, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
}
#view-close {
  width: 36px;
  padding: 0;
  justify-content: center;
}
#view-quality-menu {
  position: relative;
}
#view-quality-menu summary {
  list-style: none;
  cursor: pointer;
  gap: 4px;
}
#view-quality-menu summary::-webkit-details-marker {
  display: none;
}
.quality-options {
  position: absolute;
  top: 42px;
  right: 0;
  min-width: 96px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: rgba(14, 17, 22, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}
.quality-options button {
  padding: 7px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  text-align: left;
  font-size: 12.5px;
  color: var(--soft);
}
.quality-options button[aria-pressed='true'] {
  background: rgba(236, 197, 131, 0.16);
  color: var(--gold);
}
.live-pill {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 11px;
  letter-spacing: 0.18em;
  background: rgba(10, 12, 16, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.live-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff6b5b;
  box-shadow: 0 0 0 3px rgba(255, 107, 91, 0.25);
}
#view-latest {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 1;
  max-width: 46%;
  margin: 0;
  padding: 9px 14px;
  border-radius: 16px 16px 16px 6px;
  background: rgba(241, 239, 233, 0.94);
  color: var(--ivory-ink);
  font-size: 13.5px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
}
#view-message {
  position: absolute;
  left: 50%;
  top: 60px;
  transform: translateX(-50%);
  z-index: 2;
  margin: 0;
  max-width: 80%;
  text-align: center;
  font-size: 12.5px;
}
#view-message:not(:empty) {
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(10, 12, 16, 0.72);
}
#view-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--soft);
  background: rgba(5, 7, 10, 0.55);
}
#view-loading i {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(236, 197, 131, 0.25);
  border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
}

/* 设置 */
#settings-scrim {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(5, 7, 10, 0.55);
  backdrop-filter: blur(2px);
  animation: fade 0.2s ease-out;
}
#settings {
  position: fixed;
  z-index: 21;
  top: 14px;
  right: 14px;
  bottom: 14px;
  width: 380px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-radius: 24px;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  box-shadow: -30px 0 80px -30px rgba(0, 0, 0, 0.9);
  animation: slide-in 0.24s ease-out;
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-head h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.08em;
}
.group h4 {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--muted);
  font-weight: 600;
}
.option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.option select {
  padding: 6px 10px;
  border-radius: 9px;
  background: var(--raise);
  border: 1px solid var(--line);
  font-size: 13px;
}
.danger {
  width: 100%;
  height: 44px;
  border-radius: 13px;
  background: rgba(233, 138, 120, 0.08);
  border: 1px solid rgba(233, 138, 120, 0.4);
  color: #f2a898;
  font-weight: 700;
  font-size: 14px;
}
.hint {
  margin: 9px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
/* 账号与退出登录（10-08）：设置抽屉顶部一栏，电脑左栏底部常驻一行 */
.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--raise);
  border: 1px solid var(--line);
}
.account-name {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.account-name small {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.account-name b {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-out {
  flex: none;
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--soft);
  font-size: 13px;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}
.account-out:hover {
  color: #f2a898;
  border-color: rgba(233, 138, 120, 0.45);
  background: rgba(233, 138, 120, 0.08);
}
.side-account {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 0;
}
.side-account .account-name b {
  font-size: 14px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}
@keyframes breathe {
  70% {
    box-shadow: 0 0 0 10px rgba(236, 197, 131, 0);
  }
}
@keyframes typing {
  50% {
    opacity: 0.6;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
}

/* 手机与矮屏：单栏 */
@media (max-width: 900px), (max-height: 520px) {
  .auth {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 26px;
    padding: 56px 16px 24px;
  }
  body:has(#login-panel:not([hidden])) .stage::after {
    background: linear-gradient(180deg, rgba(9, 11, 15, 0.3), rgba(9, 11, 15, 0.92) 48%);
  }
  .intro {
    font-size: 14px;
  }
  .auth-card {
    padding: 22px;
  }
  #workspace {
    grid-template-columns: 1fr;
    padding: 0;
    gap: 0;
  }
  .side {
    display: none;
  }
  .chat {
    border: 0;
    border-radius: 0;
  }
  .chat-header {
    gap: 10px;
    padding: 12px 14px;
    padding-top: max(12px, env(safe-area-inset-top));
  }
  .header-avatar {
    display: block;
    width: 44px;
    height: 44px;
    box-shadow: 0 0 0 2px var(--gold);
  }
  .wide {
    display: none;
  }
  .narrow {
    display: inline;
  }
  .who {
    display: block;
  }
  .who h1 {
    font-size: 18px;
  }
  #status {
    margin: 3px 0 0;
    font-size: 11.5px;
  }
  .acts {
    display: flex;
    gap: 6px;
  }
  .see,
  .ward {
    height: 38px;
    padding: 0 11px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
  }
  .see {
    border: 1px solid rgba(236, 197, 131, 0.4);
    background: rgba(236, 197, 131, 0.14);
    color: var(--gold);
  }
  .see svg {
    width: 13px;
    height: 13px;
  }
  .watching .see {
    background: var(--gold);
    color: var(--gold-ink);
  }
  .watching .see svg,
  .watching #work-cards {
    display: none;
  }
  .ward {
    border: 1px solid var(--line);
    background: var(--raise);
    color: var(--text);
  }
  .ward svg {
    width: 16px;
    height: 16px;
    color: var(--gold);
  }
  #work-cards {
    flex: none;
    display: flex;
    max-height: 200px;
    overflow-y: auto;
    margin: 10px 12px 0;
    flex-direction: column;
    gap: 8px;
  }
  #work-cards .work-card {
    padding: 10px 12px;
    border-radius: 16px;
  }
  #work-cards .work-icon {
    width: 32px;
    height: 32px;
  }
  #work-cards .work-bar {
    height: 4px;
    margin-top: 8px;
  }
  #timeline {
    padding: 14px 12px 8px;
  }
  .message-body {
    max-width: 80%;
  }
  .bubble {
    font-size: 15px;
  }
  .entry .avatar {
    width: 30px;
    height: 30px;
  }
  #timeline.typing::after {
    margin-left: 42px;
  }
  #latest {
    bottom: 140px;
  }
  .composer {
    padding: 8px 10px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
  .busy {
    padding: 5px 5px 5px 12px;
  }
  .input-shell {
    min-height: 48px;
    padding-left: 14px;
  }
  .kbd {
    display: none;
  }
  .send {
    width: 48px;
    height: 48px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
  .send span {
    display: none;
  }
  #viewing {
    margin: 0;
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    max-height: none;
  }
  .view-toolbar {
    top: auto;
    bottom: 10px;
    left: 10px;
  }
  .view-right {
    top: 10px;
    right: 10px;
  }
  .live-pill {
    top: 10px;
    bottom: auto;
    left: 10px;
  }
  .view-cameras button {
    padding: 0 9px;
    font-size: 12px;
  }
  #view-reset,
  #view-close,
  #view-quality-menu summary {
    height: 34px;
  }
  #view-bubbles,
  #view-latest {
    display: none;
  }
  #settings {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-height: 86%;
    overflow-y: auto;
    border-radius: 24px 24px 0 0;
    padding: 18px;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    animation-name: sheet-in;
  }
  #settings::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-50%);
  }
}
@keyframes sheet-in {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
}
@media (max-width: 380px) {
  .ward {
    padding: 0 9px;
    font-size: 0;
  }
  .ward svg {
    width: 18px;
    height: 18px;
  }
  /* 320 宽时画面只有 180 高，画质四档菜单按常规间距会超出画面底边约 8 像素、压到下面的聊天 */
  .quality-options {
    top: 38px;
  }
  .quality-options button {
    padding: 5px 12px;
  }
}

/* 手机横屏看画面：画面铺满，聊天浮在左侧 */
@media (max-height: 520px) and (orientation: landscape) {
  .watching .chat {
    background: #05070a;
  }
  .watching #viewing {
    position: absolute;
    inset: 0;
    z-index: 0;
    aspect-ratio: auto;
    border: 0;
  }
  .watching .chat-header,
  .watching #timeline,
  .watching .composer,
  .watching #work-cards {
    position: relative;
    z-index: 1;
  }
  .watching .chat-header {
    border: 0;
    background: linear-gradient(rgba(5, 7, 10, 0.75), transparent);
  }
  .watching #work-cards {
    display: none;
  }
  .watching #timeline {
    width: min(420px, 48vw);
    pointer-events: none;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%);
    mask-image: linear-gradient(180deg, transparent, #000 30%);
  }
  .watching #timeline .entry {
    pointer-events: auto;
  }
  .watching .composer {
    width: min(560px, 70vw);
  }
  .watching .view-right {
    top: 72px;
  }
  .watching .view-toolbar {
    left: auto;
    right: 12px;
    bottom: auto;
    top: 122px;
  }
  .watching #status,
  .watching .task-mark {
    text-shadow: 0 1px 3px #000;
  }
  .watching #view-bubbles {
    display: flex;
  }
  .watching.hide-bubbles #timeline {
    display: flex;
    visibility: hidden;
  }
  .watching.controls-hidden .chat-header {
    visibility: hidden;
  }
  .watching .live-pill {
    display: none;
  }
}

/* ===== 动效（10-07 用户要全站动态）=====
 * 一处强时刻 + 环境动态 + 微交互：登录页开场有编排（背景退远 → 字标逐字浮现、扫一道光 → 卡片升起、表单依次就位），
 * 之后只留慢节奏的环境动态（樱花、萤光、背景呼吸）和指向主按钮的周期光；进页、换面板、发消息都有短促的进出场。
 * 进场一律 from 关键帧，终态就是原样式，所以“减少动态”时直接关掉动画即可。 */
:root {
  /* 进场：快到、慢停（Material 3 emphasized decelerate）；状态切换用 standard */
  --ease-out: cubic-bezier(0.05, 0.7, 0.1, 1);
  --ease-std: cubic-bezier(0.2, 0, 0, 1);
}
@property --beam {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
/* 登录 → 聊天 → 衣橱之间跳页时整页淡入淡出（浏览器不支持就照常跳） */
@view-transition {
  navigation: auto;
}
::view-transition-old(root) {
  animation: vt-out 0.28s cubic-bezier(0.3, 0, 0.8, 0.15) both;
}
::view-transition-new(root) {
  animation: vt-in 0.55s var(--ease-out) both;
}
.ambient {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.ambient-front {
  z-index: 5;
}

/* 登录开场 */
body:has(#login-panel:not([hidden])) .stage {
  animation:
    stage-in 2.8s var(--ease-out) both,
    stage-drift 34s 2.8s ease-in-out infinite alternate;
}
.hello {
  position: relative;
  isolation: isolate;
}
.hello::before {
  content: '';
  position: absolute;
  left: -18%;
  top: -45%;
  width: 130%;
  height: 190%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    closest-side,
    rgba(236, 197, 131, 0.17),
    rgba(236, 197, 131, 0.05) 55%,
    transparent
  );
  animation:
    fade 2.4s 0.3s var(--ease-out) both,
    glow 7s 2.7s ease-in-out infinite alternate;
}
.kicker {
  animation: fade-up 0.9s 0.25s var(--ease-out) both;
}
.kicker::before {
  transform-origin: left;
  animation: line-draw 1.2s 0.4s var(--ease-out) both;
}
/* 字标逐字浮现；之后每隔几秒一道高光从左扫到右（每个字晚一点，连起来就是一道光） */
.hello h1 {
  background: none;
  color: inherit;
}
.hello h1 span {
  display: inline-block;
  background:
    linear-gradient(105deg, transparent 42%, rgba(255, 249, 232, 0.95) 50%, transparent 58%) 100%
      0 / 300% 100% no-repeat,
    linear-gradient(180deg, #f7dca8, var(--gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation:
    char-in 1.2s var(--ease-out) both,
    sheen 7.5s ease-in-out infinite;
}
.hello h1 span:nth-child(1) {
  animation-delay: 0.45s, 2.3s;
}
.hello h1 span:nth-child(2) {
  animation-delay: 0.57s, 2.4s;
}
.hello h1 span:nth-child(3) {
  animation-delay: 0.69s, 2.5s;
}
.hello h1 span:nth-child(4) {
  animation-delay: 0.81s, 2.6s;
}
.intro.tagline {
  animation: tag-in 1.8s 1.15s var(--ease-out) both;
}
/* 怎么玩（10-08）：玩家说不清网站和游戏的关系。三步讲清：网站领养、启动器进服、两边是同一个 AI搭子；
   与启动器主页的三步同一套说法。原“樱树下，有人在等你”用户 10-08 定删掉，三步接在标语之后依次浮现 */
.how {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  max-width: 440px;
  display: grid;
  gap: 14px;
  counter-reset: how;
}
.how li {
  position: relative;
  padding-left: 40px;
  counter-increment: how;
  animation: fade-up 0.9s var(--ease-out) both;
}
.how li:nth-child(1) {
  animation-delay: 1.7s;
}
.how li:nth-child(2) {
  animation-delay: 1.85s;
}
.how li:nth-child(3) {
  animation-delay: 2s;
}
.how li::before {
  content: counter(how);
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid rgba(236, 197, 131, 0.5);
  background: rgba(11, 14, 18, 0.6);
}
.how li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 12px;
  top: 30px;
  bottom: -11px;
  width: 1px;
  background: linear-gradient(rgba(236, 197, 131, 0.35), rgba(236, 197, 131, 0.08));
}
.how b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.04em;
}
.how span {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}
@media (max-width: 900px), (max-height: 520px) {
  .how {
    margin-top: 22px;
    gap: 10px;
  }
  .how span {
    font-size: 12.5px;
  }
}
/* 矮屏手机（如 375×667）只留三步标题，免得把登录框挤出首屏（10-08 复核） */
@media (max-width: 900px) and (max-height: 760px) {
  .how {
    margin-top: 18px;
    gap: 11px;
  }
  .how span,
  .how li:not(:last-child)::after {
    display: none;
  }
}
.auth-card {
  position: relative;
  animation: card-in 1.1s 0.75s var(--ease-out) both;
}
/* 卡片描边上一道金光慢慢绕圈 */
.auth-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: conic-gradient(
    from var(--beam),
    transparent 0 60%,
    rgba(236, 197, 131, 0) 62%,
    rgba(250, 226, 178, 0.85) 74%,
    rgba(236, 197, 131, 0) 86%,
    transparent
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation:
    fade 1.2s 1.6s both,
    beam 10s linear infinite;
}
/* 鼠标在卡片上移动时，表面跟着亮一小块（坐标由 ambient.js 写进 --mx/--my） */
.auth-card::after,
.wardrobe::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, -40%),
    rgba(236, 197, 131, 0.1),
    transparent 62%
  );
  opacity: 0;
  transition: opacity 0.5s var(--ease-std);
}
.auth-card:hover::after,
.wardrobe:hover::after {
  opacity: 1;
}
.wardrobe {
  position: relative;
}
/* 开场时表单各行依次就位（只在进页那一次，脚本 2.6 秒后摘掉 body.opening） */
.opening .auth-card .tabs,
.opening #login > *,
.opening .auth-card .aux {
  animation: fade-up 0.7s var(--ease-out) both;
}
.opening .auth-card .tabs {
  animation-delay: 0.95s;
}
.opening #login > :nth-child(1) {
  animation-delay: 1.03s;
}
.opening #login > :nth-child(2) {
  animation-delay: 1.11s;
}
.opening #login > :nth-child(3) {
  animation-delay: 1.19s;
}
.opening #login > :nth-child(4) {
  animation-delay: 1.27s;
}
.opening .auth-card .aux {
  animation-delay: 1.35s;
}
/* 登录 / 注册切换：底下那块亮色滑过去，表单淡入 */
.tabs {
  position: relative;
}
.tabs::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    transform 0.42s var(--ease-std),
    opacity 0.2s;
}
.tabs:has([data-auth='register'][aria-selected='true'])::before {
  transform: translateX(100%);
}
.tabs:not(:has([aria-selected='true']))::before {
  opacity: 0;
}
.tabs button {
  position: relative;
  transition: color 0.3s;
}
.tabs button[aria-selected='true'] {
  background: none;
}
[data-pane]:not([hidden]) {
  animation: pane-in 0.45s var(--ease-out) both;
}
.auth-card input:not([type='checkbox']) {
  transition:
    border-color 0.2s,
    box-shadow 0.3s var(--ease-std),
    background-color 0.2s;
}
.auth-card input:not([type='checkbox']):hover {
  background-color: rgba(255, 255, 255, 0.07);
}
#auth-status:not(:empty) {
  animation: fade-up 0.45s var(--ease-out) both;
}
/* 主按钮：每隔几秒一道光扫过，告诉人“点这里”；悬停浮起、按下回弹 */
.primary,
.send {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.2s var(--ease-std),
    box-shadow 0.3s var(--ease-std),
    filter 0.2s;
}
.primary::after,
.send::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.6) 50%,
    transparent 65%
  );
  transform: translateX(-130%);
  animation: btn-sheen 6s 2.6s ease-in-out infinite;
}
.primary:hover:not(:disabled),
.send:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px -14px rgba(236, 197, 131, 0.9);
  filter: brightness(1.05);
}
.primary:active:not(:disabled),
.send:active:not(:disabled) {
  transform: translateY(0) scale(0.975);
  transition-duration: 0.08s;
}
.primary:disabled::after,
.send:disabled::after {
  display: none;
}
/* 登录成功那一下：卡片轻轻收起，花瓣被吹散，再淡到聊天页 */
.leaving .auth-card {
  animation: card-out 0.5s var(--ease-std) both;
}
.leaving .hello {
  animation: hello-out 0.6s var(--ease-std) both;
}
body.arriving::after {
  animation: greet-hold 1.9s var(--ease-std) both;
}
/* 问候先占住画面，聊天界面等它开始淡出再升起 */
body.arriving #workspace:not([hidden]) .side {
  animation-delay: 0.9s;
}
body.arriving #workspace:not([hidden]) .chat {
  animation-delay: 1s;
}
body.leaving::after,
body.arriving::after {
  content: attr(data-greet);
  position: fixed;
  left: 0;
  right: 0;
  top: 46%;
  z-index: 6;
  text-align: center;
  font-size: clamp(26px, 3.6vw, 42px);
  font-weight: 700;
  letter-spacing: 0.32em;
  color: #f7dca8;
  text-shadow: 0 0 34px rgba(236, 197, 131, 0.5);
  pointer-events: none;
}
body.leaving::after {
  animation: greet-in 1.1s 0.2s var(--ease-out) both;
}

/* 聊天页进场：左栏从左滑入，聊天区升起 */
#workspace:not([hidden]) .side {
  animation: side-in 0.8s var(--ease-out) both;
}
#workspace:not([hidden]) .chat {
  animation: chat-in 0.9s 0.1s var(--ease-out) both;
}
/* 搭子立绘：轻轻浮动，隔一会儿扫过一道光；“看看她”的播放钮一下下发光（这是她独有的功能） */
.card > img {
  animation: float 6s ease-in-out infinite;
}
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 38%,
    rgba(255, 255, 255, 0.7) 50%,
    transparent 62%
  );
  transform: translateX(-110%);
  animation: card-sheen 10s 1.4s ease-in-out infinite;
}
.see-big .play {
  animation: beacon 2.6s 1.2s infinite;
}
.watching .see-big .play {
  animation: none;
}
/* 手机上“看看她”在顶栏 */
.see {
  animation: beacon 2.8s 1.6s infinite;
}
.watching .see {
  animation: none;
}
#status::before {
  animation: dot-breathe 2.8s ease-in-out infinite;
}
#timeline .entry.fresh {
  animation: msg-in 0.45s var(--ease-out) both;
}
#timeline .entry.assistant.fresh {
  transform-origin: 0 100%;
}
#timeline .entry.user.fresh {
  transform-origin: 100% 100%;
  animation-name: msg-in-user;
}
.send svg {
  transition: transform 0.25s var(--ease-std);
}
.send:hover:not(:disabled) svg {
  transform: translate(2px, -2px);
}
.send.launch svg {
  animation: launch 0.6s var(--ease-std);
}
.w-go {
  transition: transform 0.3s var(--ease-std);
  animation: nudge 5s 3s ease-in-out infinite;
}
.wardrobe:hover .w-go {
  transform: translateX(4px);
  animation: none;
}
.icon-button {
  transition:
    color 0.2s,
    border-color 0.2s,
    transform 0.2s var(--ease-std);
}
.icon-button:hover {
  transform: translateY(-1px);
}
.settings-open:hover svg {
  transition: transform 0.4s var(--ease-std);
  transform: rotate(-12deg);
}

@keyframes vt-out {
  to {
    opacity: 0;
    transform: scale(0.985);
    filter: blur(6px);
  }
}
@keyframes vt-in {
  from {
    opacity: 0;
    transform: scale(1.015);
  }
}
@keyframes stage-in {
  from {
    transform: scale(1.16);
    filter: blur(12px) saturate(1.1) brightness(0.3);
  }
}
@keyframes stage-drift {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.07) translate(-1.2%, -0.8%);
  }
}
@keyframes glow {
  from {
    opacity: 0.7;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1.04);
  }
}
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
@keyframes line-draw {
  from {
    transform: scaleX(0);
  }
}
@keyframes char-in {
  from {
    opacity: 0;
    transform: translateY(0.42em) scale(0.94);
    filter: blur(12px);
  }
}
@keyframes sheen {
  0% {
    background-position:
      100% 0,
      0 0;
  }
  18%,
  100% {
    background-position:
      0 0,
      0 0;
  }
}
@keyframes tag-in {
  from {
    opacity: 0;
    letter-spacing: 0.7em;
    filter: blur(5px);
  }
}
@keyframes beacon {
  0% {
    box-shadow: 0 0 0 0 rgba(236, 197, 131, 0.6);
  }
  70%,
  100% {
    box-shadow: 0 0 0 10px rgba(236, 197, 131, 0);
  }
}
@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
  }
}
@keyframes beam {
  to {
    --beam: 360deg;
  }
}
@keyframes pane-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
@keyframes btn-sheen {
  0% {
    transform: translateX(-130%);
  }
  20%,
  100% {
    transform: translateX(130%);
  }
}
@keyframes card-out {
  to {
    opacity: 0;
    transform: translateY(-16px) scale(0.96);
  }
}
@keyframes hello-out {
  to {
    opacity: 0;
    transform: translateY(-10px);
    filter: blur(8px);
  }
}
@keyframes greet-in {
  from {
    opacity: 0;
    letter-spacing: 0.7em;
    filter: blur(10px);
  }
}
@keyframes greet-hold {
  55% {
    opacity: 1;
    transform: none;
    filter: none;
  }
  to {
    opacity: 0;
    transform: translateY(-14px);
    filter: blur(8px);
  }
}
@keyframes side-in {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
}
@keyframes chat-in {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
}
@keyframes float {
  50% {
    transform: translate(-50%, -7px);
  }
}
@keyframes card-sheen {
  0% {
    transform: translateX(-110%);
  }
  16%,
  100% {
    transform: translateX(110%);
  }
}
@keyframes dot-breathe {
  50% {
    opacity: 0.45;
    box-shadow: 0 0 0 4px rgba(116, 213, 191, 0.12);
  }
}
@keyframes msg-in {
  from {
    opacity: 0;
    transform: translate(-8px, 12px) scale(0.96);
  }
}
@keyframes msg-in-user {
  from {
    opacity: 0;
    transform: translate(8px, 12px) scale(0.96);
  }
}
@keyframes launch {
  45% {
    transform: translate(16px, -16px) scale(0.6);
    opacity: 0;
  }
  46% {
    transform: translate(-12px, 12px) scale(0.6);
    opacity: 0;
  }
}
@keyframes nudge {
  0%,
  80%,
  100% {
    transform: none;
  }
  88% {
    transform: translateX(5px);
  }
}

/* 启动器登录确认（10-08 网站当账号服务器）：盖在任何页面上，问一句“允许”再把浏览器带回启动器 */
.launcher-ask {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(5, 7, 10, 0.72);
  backdrop-filter: blur(10px);
  animation: fade 0.3s var(--ease-std) both;
}
.launcher-card {
  width: min(420px, 100%);
  padding: 28px 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-solid);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  animation: fade-up 0.45s var(--ease-out) both;
}
.launcher-card h3 {
  margin: 6px 0 12px;
  font-size: 21px;
}
.launcher-card p {
  margin: 0;
  line-height: 1.7;
  color: var(--soft);
}
.launcher-card b {
  color: var(--gold);
}
.launcher-kicker {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--gold-2) !important;
}
.launcher-acts {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}
.launcher-acts .primary {
  margin-top: 0;
}
.launcher-deny {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: none;
  color: var(--soft);
}
.launcher-deny:hover {
  color: var(--rose);
  border-color: rgba(233, 138, 120, 0.4);
}
#launcher-ask-status {
  margin-top: 12px;
  min-height: 1.7em;
  font-size: 13px;
  color: var(--gold);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
