﻿:root {
  --bg: #06100e;
  --bg-deep: #030807;
  --panel: rgba(13, 29, 25, .82);
  --panel-solid: #0d1d19;
  --panel-raised: #132b24;
  --line: rgba(180, 244, 213, .12);
  --line-strong: rgba(180, 244, 213, .22);
  --text: #effbf4;
  --muted: #89a69a;
  --muted-2: #617b70;
  --mint: #8ff0c7;
  --mint-strong: #47d9a9;
  --mint-dim: #2b9a7c;
  --amber: #ffd27d;
  --amber-strong: #ffb95e;
  --rose: #ff9e95;
  --blue: #8fc6ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, .34);
  --radius-lg: 24px;
  --radius-md: 17px;
  --radius-sm: 12px;
  --font: "Inter", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg-deep); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font);
  background: radial-gradient(circle at 24% 6%, rgba(57, 191, 151, .12), transparent 28%), radial-gradient(circle at 86% 88%, rgba(255, 194, 99, .08), transparent 26%), linear-gradient(135deg, #071310 0%, #050c0a 54%, #071410 100%);
  overflow-x: hidden;
}
body.is-modal-open { overflow: hidden; }
button, input, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid rgba(143, 240, 199, .7); outline-offset: 3px; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { color: #04100c; background: var(--mint); }
.ambient { position: fixed; width: 640px; height: 640px; pointer-events: none; border-radius: 999px; filter: blur(110px); opacity: .18; z-index: 0; }
.ambient-one { top: -300px; left: 16%; background: #42e5b0; }
.ambient-two { right: -280px; bottom: -340px; background: #ffc365; opacity: .11; }
.app-shell { position: relative; z-index: 1; display: grid; grid-template-columns: 238px minmax(0, 1fr) 344px; gap: 16px; width: min(1800px, calc(100% - 32px)); min-height: 100vh; margin: 0 auto; padding: 16px 0; }
.panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(145deg, rgba(18, 42, 35, .9), rgba(8, 20, 17, .84)); box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .035); backdrop-filter: blur(20px); }
.sidebar { display: flex; flex-direction: column; min-height: calc(100vh - 32px); padding: 22px 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(180deg, rgba(16, 35, 30, .92), rgba(7, 17, 14, .92)); box-shadow: var(--shadow); overflow: hidden; }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 26px; }
.brand-mark { position: relative; display: grid; place-items: center; width: 37px; height: 37px; border: 1px solid rgba(143, 240, 199, .42); border-radius: 12px; background: linear-gradient(135deg, rgba(143, 240, 199, .22), rgba(71, 217, 169, .05)); box-shadow: 0 0 30px rgba(71, 217, 169, .12); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; width: 13px; height: 13px; border: 1px solid var(--mint); transform: rotate(45deg); }
.brand-mark::after { width: 5px; height: 5px; background: var(--amber); border-color: var(--amber); box-shadow: 0 0 12px var(--amber); }
.brand-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brand-copy strong { font-size: 17px; letter-spacing: .08em; }
.brand-copy small { color: var(--muted); font-size: 9px; letter-spacing: .14em; }
.sidebar-section { margin-top: 8px; }
.section-label { color: var(--muted-2); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; }
.main-nav { display: grid; gap: 5px; margin-top: 11px; }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid transparent; border-radius: 13px; color: var(--muted); background: transparent; text-align: left; transition: .22s ease; }
.nav-item:hover { color: var(--text); background: rgba(143, 240, 199, .05); }
.nav-item.is-active { color: var(--text); border-color: rgba(143, 240, 199, .17); background: linear-gradient(90deg, rgba(143, 240, 199, .14), rgba(143, 240, 199, .035)); }
.nav-icon { display: grid; place-items: center; width: 20px; color: var(--mint); font-size: 16px; }
.nav-count, .nav-soon { margin-left: auto; min-width: 24px; padding: 3px 7px; border-radius: 99px; color: var(--mint); background: rgba(143, 240, 199, .09); font-size: 10px; text-align: center; }
.nav-soon { color: var(--muted-2); background: rgba(255, 255, 255, .03); }
.nav-pulse { width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--mint); box-shadow: 0 0 14px var(--mint); }
.sidebar-pet { margin-top: auto; padding: 22px 6px 18px; border-top: 1px solid var(--line); }
.sidebar-pet-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 10px; }
.online-dot { color: var(--mint); font-size: 10px; }
.online-dot::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 9px var(--mint); }
.sidebar-pet-card { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255, 255, 255, .025); }
.sidebar-pet-card img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 5px 12px rgba(71, 217, 169, .18)); }
.sidebar-pet-card div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sidebar-pet-card strong { font-size: 13px; }
.sidebar-pet-card span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.level-chip { padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; color: var(--amber) !important; font-size: 9px !important; }
.sidebar-footer { display: grid; gap: 9px; padding: 15px 4px 0; }
.node-status { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px var(--mint); }
.domain-label { color: var(--muted-2); font-size: 9px; letter-spacing: .06em; }
.main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 0 6px; }
.eyebrow { color: var(--muted-2); font-size: 9px; letter-spacing: .19em; text-transform: uppercase; }
.topbar h1 { margin: 7px 0 0; font-size: clamp(26px, 2.2vw, 38px); font-weight: 500; letter-spacing: -.045em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.date-chip, .demo-chip, .count-badge, .soon-badge { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: rgba(255, 255, 255, .025); font-size: 10px; white-space: nowrap; }
.demo-chip { color: var(--amber); border-color: rgba(255, 210, 125, .18); background: rgba(255, 210, 125, .06); }
.soon-badge { color: var(--muted-2); }
.icon-button, .avatar-button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .025); color: var(--muted); font-size: 17px; transition: .2s ease; }
.icon-button:hover { color: var(--mint); border-color: var(--line-strong); transform: rotate(35deg); }
.avatar-button { color: var(--text); background: linear-gradient(135deg, rgba(143, 240, 199, .2), rgba(255, 210, 125, .08)); font-size: 10px; letter-spacing: .08em; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 326px; gap: 16px; min-width: 0; }
.world-card { min-width: 0; padding: 18px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 2px 2px 15px; }
.panel-heading.compact { align-items: center; padding-bottom: 12px; }
.panel-heading h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 7px 0 0; font-size: 19px; font-weight: 500; letter-spacing: -.025em; }
.weather-chip { padding: 4px 7px; border: 1px solid rgba(255, 210, 125, .17); border-radius: 99px; color: var(--amber); background: rgba(255, 210, 125, .05); font-size: 9px; font-weight: 400; letter-spacing: .02em; }
.theme-switcher { display: flex; gap: 8px; padding-top: 6px; }
.theme-dot { width: 18px; height: 18px; border: 2px solid transparent; border-radius: 50%; outline: 1px solid var(--line); transition: .2s ease; }
.theme-dot:nth-child(1) { background: linear-gradient(135deg, #f2c986, #6fe5c0); }
.theme-dot:nth-child(2) { background: linear-gradient(135deg, #263c76, #8ad9ff); }
.theme-dot:nth-child(3) { background: linear-gradient(135deg, #77b776, #f2cb78); }
.theme-dot:hover { transform: scale(1.12); }
.theme-dot.is-active { border-color: var(--text); outline-color: rgba(255,255,255,.3); box-shadow: 0 0 16px rgba(143, 240, 199, .22); }
.room { position: relative; min-height: 430px; overflow: hidden; border: 1px solid rgba(143, 240, 199, .13); border-radius: 20px; background: linear-gradient(180deg, rgba(107, 177, 156, .08), transparent 34%), linear-gradient(180deg, #172e29 0%, #0c1e19 58%, #0a1714 100%); isolation: isolate; transition: background .45s ease; }
.room::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .28; background: linear-gradient(90deg, transparent 49.8%, rgba(177, 255, 224, .12) 49.9%, transparent 50.2%); background-size: 86px 100%; mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 80%, transparent); }
.room::after { content: ""; position: absolute; right: 7%; bottom: 12%; left: 7%; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 210, 125, .55), transparent); box-shadow: 0 26px 80px 18px rgba(255, 190, 91, .11); pointer-events: none; }
.room[data-theme="night"] { background: radial-gradient(ellipse at 55% 26%, rgba(97, 153, 255, .2), transparent 35%), linear-gradient(180deg, #111f3f 0%, #0c1729 60%, #07121b 100%); }
.room[data-theme="garden"] { background: radial-gradient(ellipse at 70% 20%, rgba(250, 218, 132, .18), transparent 38%), linear-gradient(180deg, #254033 0%, #142a22 58%, #0b1a15 100%); }
.room-sky { position: absolute; inset: 0 0 auto; height: 55%; overflow: hidden; }
.room-sky::before { content: ""; position: absolute; top: -84px; right: -32px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 213, 136, .15), transparent 67%); }
.room[data-theme="night"] .room-sky::before { background: radial-gradient(circle, rgba(113, 171, 255, .25), transparent 67%); }
.room[data-theme="garden"] .room-sky::before { background: radial-gradient(circle, rgba(255, 235, 159, .22), transparent 67%); }
.star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff3c8; box-shadow: 0 0 10px 2px rgba(255, 231, 169, .6); animation: twinkle 3.4s ease-in-out infinite; }
.star-a { top: 18%; left: 18%; }
.star-b { top: 30%; left: 32%; animation-delay: -.9s; }
.star-c { top: 13%; right: 23%; animation-delay: -1.8s; }
.star-d { top: 37%; right: 16%; animation-delay: -2.4s; }
.planet { position: absolute; top: 73px; right: 15%; width: 82px; height: 82px; border: 1px solid rgba(255, 223, 161, .23); border-radius: 50%; background: radial-gradient(circle at 31% 29%, rgba(255, 246, 209, .7), rgba(255, 197, 111, .27) 28%, rgba(41, 116, 105, .05) 69%); box-shadow: 0 0 34px rgba(255, 208, 124, .13); }
.planet::after { content: ""; position: absolute; inset: 18px -16px; border: 1px solid rgba(255, 224, 162, .33); border-radius: 50%; transform: rotate(-18deg); }
.window-frame { position: absolute; top: 31px; left: 8%; width: 34%; height: 185px; border: 1px solid rgba(166, 248, 220, .15); border-radius: 18px 18px 12px 12px; box-shadow: inset 0 0 38px rgba(153, 240, 209, .06); }
.window-frame::before, .window-frame::after { content: ""; position: absolute; background: rgba(169, 248, 220, .11); }
.window-frame::before { top: 0; bottom: 0; left: 50%; width: 1px; }
.window-frame::after { top: 50%; right: 0; left: 0; height: 1px; }
.shelf { position: absolute; display: flex; align-items: end; gap: 6px; height: 10px; border-bottom: 1px solid rgba(255, 225, 166, .22); }
.shelf-left { top: 174px; right: 14%; width: 110px; }
.shelf-right { top: 92px; left: 47%; width: 88px; transform: scale(.78); transform-origin: left bottom; }
.book { display: block; width: 8px; border-radius: 3px 3px 0 0; background: var(--amber); opacity: .55; }
.book-a { height: 27px; transform: rotate(-5deg); }
.book-b { height: 20px; background: var(--mint); transform: rotate(7deg); }
.plant { width: 18px; height: 20px; margin-left: 4px; border-radius: 50% 50% 35% 35%; background: #54ae82; transform: rotate(-14deg); opacity: .78; }
.orb { width: 14px; height: 14px; border: 1px solid rgba(255, 210, 125, .7); border-radius: 50%; background: rgba(255, 210, 125, .2); box-shadow: 0 0 14px var(--amber); }
.frame { width: 19px; height: 24px; border: 1px solid rgba(143, 240, 199, .4); transform: rotate(5deg); }
.rug { position: absolute; right: 21%; bottom: 14%; width: 44%; height: 80px; border: 1px solid rgba(143, 240, 199, .2); border-radius: 50%; background: radial-gradient(ellipse, rgba(109, 215, 175, .14), rgba(76, 160, 131, .03) 63%, transparent 64%); transform: perspective(300px) rotateX(54deg); }
.desk { position: absolute; right: 7%; bottom: 25%; width: 21%; height: 9px; border-radius: 3px; background: linear-gradient(90deg, rgba(255, 213, 134, .12), rgba(187, 240, 211, .14)); box-shadow: 0 8px 26px rgba(0,0,0,.2); }
.desk::before, .desk::after { content: ""; position: absolute; top: 9px; width: 4px; height: 72px; background: rgba(167, 230, 201, .14); }
.desk::before { left: 10%; }
.desk::after { right: 10%; }
.desk-lamp { position: absolute; bottom: 8px; left: 37%; width: 24px; height: 1px; background: rgba(255, 214, 138, .45); transform: rotate(-62deg); transform-origin: left center; }
.desk-cup { position: absolute; bottom: 9px; right: 28%; width: 10px; height: 12px; border: 1px solid rgba(143, 240, 199, .25); border-radius: 2px 2px 5px 5px; }
.pet-stage { position: absolute; bottom: 13%; left: 50%; z-index: 3; width: min(36%, 230px); min-width: 172px; padding: 0; border: 0; background: transparent; transform: translateX(-50%); transition: filter .25s ease; }
.pet-stage:hover { filter: brightness(1.07); }
.pet-stage:active { transform: translateX(-50%) scale(.97); }
.pet-stage img { position: relative; z-index: 2; width: 100%; animation: floaty 4.6s ease-in-out infinite; transform-origin: 50% 80%; }
.pet-shadow { position: absolute; right: 23%; bottom: 5%; left: 23%; height: 12px; border-radius: 50%; background: rgba(0, 0, 0, .38); filter: blur(7px); animation: shadowPulse 4.6s ease-in-out infinite; }
.pet-glow { position: absolute; top: 26%; left: 23%; width: 54%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(143, 240, 199, .32), transparent 66%); filter: blur(14px); animation: glowPulse 4.6s ease-in-out infinite; }
.pet-stage.is-petted img { animation: petPop .52s ease; }
.pet-bubble { position: absolute; top: 15%; left: 50%; z-index: 4; display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; width: min(52%, 330px); padding: 14px 16px; border: 1px solid rgba(179, 255, 226, .18); border-radius: 16px 16px 16px 4px; background: rgba(11, 29, 23, .9); box-shadow: 0 18px 50px rgba(0, 0, 0, .24); backdrop-filter: blur(14px); transform: translateX(4%); transition: opacity .25s ease, transform .25s ease; }
.pet-bubble.is-hidden { opacity: 0; pointer-events: none; transform: translate(4%, 8px); }
.bubble-label { grid-column: 1 / -1; color: var(--mint); font-size: 9px; letter-spacing: .12em; }
#bubble-text { color: #d7ece0; font-size: 12px; line-height: 1.65; }
.bubble-close { align-self: start; width: 22px; height: 22px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 17px; }
.bubble-close:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.room-caption { position: absolute; right: 22px; bottom: 18px; left: 22px; display: flex; align-items: center; gap: 10px; color: var(--muted-2); font-size: 10px; }
.caption-line { width: 26px; height: 1px; background: var(--amber); box-shadow: 0 0 12px var(--amber); }
.action-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; padding-top: 13px; }
.action-button { display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, .022); text-align: left; transition: .2s ease; }
.action-button:hover { border-color: rgba(143, 240, 199, .3); background: rgba(143, 240, 199, .07); transform: translateY(-2px); }
.action-button:active { transform: translateY(0) scale(.98); }
.action-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; color: var(--amber); background: rgba(255, 210, 125, .08); font-size: 16px; }
.action-button:nth-child(2) .action-icon { color: var(--mint); background: rgba(143, 240, 199, .08); }
.action-button:nth-child(3) .action-icon { color: var(--blue); background: rgba(143, 198, 255, .08); }
.action-button:nth-child(4) .action-icon { color: var(--rose); background: rgba(255, 158, 149, .08); }
.action-button span:last-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.action-button strong { font-size: 11px; font-weight: 500; }
.action-button small { color: var(--muted-2); font-size: 9px; }
.status-card { display: flex; flex-direction: column; padding: 20px; }
.status-hero { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.status-avatar { position: relative; display: grid; place-items: center; width: 74px; height: 74px; border: 1px solid var(--line); border-radius: 22px; background: radial-gradient(circle at 50% 38%, rgba(143, 240, 199, .2), rgba(143, 240, 199, .025) 64%); overflow: hidden; }
.status-avatar img { position: relative; z-index: 1; width: 66px; height: 66px; object-fit: contain; animation: floaty 4.6s ease-in-out infinite; }
.status-orbit { position: absolute; width: 55px; height: 55px; border: 1px solid rgba(255, 210, 125, .35); border-radius: 50%; animation: spin 9s linear infinite; }
.status-orbit::after { content: ""; position: absolute; top: -2px; left: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.status-title h2 { margin: 5px 0 4px; font-size: 25px; font-weight: 500; letter-spacing: -.04em; }
.status-title p { margin: 0; color: var(--muted); font-size: 10px; }
.level-badge { align-self: start; padding: 5px 7px; border: 1px solid rgba(255, 210, 125, .2); border-radius: 8px; color: var(--amber); background: rgba(255, 210, 125, .05); font-size: 10px; }
.mood-line { display: flex; align-items: center; gap: 7px; padding: 15px 2px 17px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.mood-orb { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px rgba(255, 210, 125, .7); }
.mood-time { margin-left: auto; color: var(--muted-2); }
.stats { display: grid; gap: 14px; padding: 19px 2px 18px; }
.stat-row { display: grid; gap: 7px; }
.stat-label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; }
.stat-label strong { color: var(--text); font-size: 10px; font-weight: 500; }
.stat-track { height: 5px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .055); }
.stat-fill { display: block; height: 100%; width: 50%; border-radius: inherit; transition: width .5s ease; }
.stat-fill.hunger { background: linear-gradient(90deg, #d99f5c, var(--amber)); }
.stat-fill.energy { background: linear-gradient(90deg, #6aafd9, var(--blue)); }
.stat-fill.clean { background: linear-gradient(90deg, #67be9a, var(--mint)); }
.stat-fill.trust { background: linear-gradient(90deg, #d37f89, var(--rose)); }
.ritual-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid rgba(255, 210, 125, .13); border-radius: 13px; background: rgba(255, 210, 125, .045); }
.ritual-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--amber); background: rgba(255, 210, 125, .1); }
.ritual-card strong { display: block; font-size: 10px; font-weight: 500; }
.ritual-card p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.text-button { padding: 0; border: 0; color: var(--mint); background: transparent; font-size: 10px; white-space: nowrap; }
.text-button:hover { color: #c7ffe8; }
.status-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; padding: 18px 2px 0; color: var(--muted-2); font-size: 9px; }
.local-badge { color: var(--mint-dim); letter-spacing: .08em; }
.lower-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(260px, .82fr); gap: 16px; min-height: 320px; }
.chat-card, .memory-card { min-width: 0; padding: 18px; }
.chat-log { display: flex; flex-direction: column; gap: 11px; height: 194px; overflow-y: auto; padding: 3px 3px 10px; scrollbar-width: thin; scrollbar-color: rgba(143, 240, 199, .2) transparent; }
.chat-row { display: flex; gap: 8px; max-width: 88%; animation: messageIn .25s ease both; }
.chat-row.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-avatar { display: grid; place-items: center; flex: 0 0 26px; width: 26px; height: 26px; border-radius: 9px; color: var(--mint); background: rgba(143, 240, 199, .1); font-size: 10px; }
.chat-row.user .chat-avatar { color: var(--amber); background: rgba(255, 210, 125, .1); }
.chat-bubble { padding: 9px 11px; border: 1px solid var(--line); border-radius: 4px 13px 13px 13px; color: #d6ebe1; background: rgba(255, 255, 255, .035); font-size: 11px; line-height: 1.6; }
.chat-row.user .chat-bubble { border-color: rgba(255, 210, 125, .13); border-radius: 13px 4px 13px 13px; background: rgba(255, 210, 125, .07); }
.chat-meta { display: block; margin-top: 4px; color: var(--muted-2); font-size: 8px; }
.quick-prompts { display: flex; gap: 6px; flex-wrap: wrap; padding: 2px 0 9px; }
.quick-prompts button { padding: 6px 8px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: transparent; font-size: 9px; transition: .2s ease; }
.quick-prompts button:hover { color: var(--mint); border-color: rgba(143, 240, 199, .25); }
.chat-form { display: flex; gap: 7px; }
.chat-form input, .search-box input, .field-label input, .field-label textarea { width: 100%; border: 1px solid var(--line); border-radius: 11px; color: var(--text); background: rgba(2, 8, 6, .3); transition: border-color .2s ease, background .2s ease; }
.chat-form input { min-height: 39px; padding: 0 12px; font-size: 11px; }
.chat-form input::placeholder, .search-box input::placeholder, .field-label input::placeholder, .field-label textarea::placeholder { color: var(--muted-2); }
.chat-form input:focus, .search-box input:focus, .field-label input:focus, .field-label textarea:focus { border-color: rgba(143, 240, 199, .4); background: rgba(143, 240, 199, .035); outline: none; }
.send-button { display: grid; place-items: center; width: 39px; height: 39px; flex: 0 0 39px; border: 1px solid rgba(143, 240, 199, .3); border-radius: 11px; color: #06110d; background: var(--mint); font-size: 20px; transition: .2s ease; }
.send-button:hover { background: #c3ffe3; transform: translateY(-2px); }
.memory-list { display: grid; gap: 8px; min-height: 194px; }
.memory-item { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 12px 10px 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .024); }
.memory-item::before { content: ""; position: absolute; top: 12px; bottom: 12px; left: 6px; width: 2px; border-radius: 99px; background: var(--mint-dim); }
.memory-item[data-type="milestone"]::before { background: var(--amber); }
.memory-item strong { overflow: hidden; color: #e2f5e9; font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.memory-item p { overflow: hidden; grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.memory-date { color: var(--muted-2); font-size: 8px; white-space: nowrap; }
.wide-link { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 11px; padding: 10px 0 0; border: 0; border-top: 1px solid var(--line); color: var(--muted); background: transparent; font-size: 10px; }
.wide-link:hover { color: var(--mint); }
.inspector { display: flex; flex-direction: column; min-height: calc(100vh - 32px); padding: 17px 16px 16px; }
.inspector-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, .16); }
.inspector-tab { padding: 8px 6px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: 10px; transition: .2s ease; }
.inspector-tab:hover { color: var(--text); }
.inspector-tab.is-active { color: var(--text); background: rgba(143, 240, 199, .1); box-shadow: inset 0 0 0 1px rgba(143, 240, 199, .08); }
.inspector-panel { display: none; flex: 1; padding-top: 19px; }
.inspector-panel.is-active { display: flex; flex-direction: column; animation: panelIn .24s ease both; }
.inspector-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.inspector-head h2 { margin: 7px 0 0; font-size: 21px; font-weight: 500; letter-spacing: -.035em; }
.count-badge { min-height: 26px; font-size: 9px; }
.search-box { display: flex; align-items: center; gap: 7px; margin-top: 17px; padding: 0 11px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted-2); background: rgba(2, 8, 6, .22); }
.search-box input { min-height: 37px; padding: 0; border: 0; background: transparent; font-size: 10px; }
.filter-row { display: flex; gap: 6px; padding: 11px 0 8px; }
.filter-chip { padding: 5px 9px; border: 1px solid transparent; border-radius: 99px; color: var(--muted); background: transparent; font-size: 9px; }
.filter-chip:hover { color: var(--text); }
.filter-chip.is-active { border-color: var(--line); color: var(--mint); background: rgba(143, 240, 199, .07); }
.inspector-memory-list { display: flex; flex-direction: column; gap: 7px; overflow-y: auto; padding: 2px 2px 10px; scrollbar-width: thin; scrollbar-color: rgba(143, 240, 199, .18) transparent; }
.inspector-memory-item { padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.022); }
.inspector-memory-item .memory-title-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.inspector-memory-item strong { color: #e1f4e8; font-size: 11px; font-weight: 500; }
.inspector-memory-item p { margin: 5px 0 7px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.memory-tag { padding: 3px 6px; border-radius: 99px; color: var(--mint); background: rgba(143, 240, 199, .07); font-size: 8px; }
.memory-tag.milestone { color: var(--amber); background: rgba(255, 210, 125, .07); }
.memory-empty { padding: 24px 12px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted-2); font-size: 10px; line-height: 1.6; text-align: center; }
.panel-copy { margin: 14px 0 15px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.passport-seal { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(255, 210, 125, .25); border-radius: 50%; color: var(--amber); font-size: 9px; letter-spacing: .08em; }
.passport-card { position: relative; overflow: hidden; padding: 14px; border: 1px solid rgba(255, 210, 125, .17); border-radius: 16px; background: linear-gradient(145deg, rgba(40, 72, 58, .76), rgba(15, 35, 28, .9)); }
.passport-card::before { content: ""; position: absolute; top: -60px; right: -20px; width: 170px; height: 170px; border: 1px solid rgba(255, 210, 125, .15); border-radius: 50%; box-shadow: 0 0 0 22px rgba(255, 210, 125, .025), 0 0 0 44px rgba(255, 210, 125, .018); }
.passport-top { position: relative; display: flex; justify-content: space-between; color: var(--muted-2); font-size: 8px; letter-spacing: .16em; }
.passport-card img { position: relative; width: 98px; margin: 7px auto 1px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.22)); }
.passport-name { position: relative; color: var(--text); font-size: 22px; letter-spacing: -.04em; text-align: center; }
.passport-species { position: relative; margin-top: 4px; color: var(--muted); font-size: 9px; text-align: center; }
.passport-meta { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 16px; }
.passport-meta span { display: flex; flex-direction: column; gap: 3px; padding: 8px; border: 1px solid rgba(255, 255, 255, .06); border-radius: 9px; background: rgba(0, 0, 0, .08); }
.passport-meta small { color: var(--muted-2); font-size: 8px; }
.passport-meta strong { color: var(--mint); font-size: 10px; font-weight: 500; }
.passport-actions { display: grid; gap: 8px; margin-top: 13px; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 12px; border-radius: 10px; font-size: 10px; transition: .2s ease; }
.primary-button { border: 1px solid rgba(143, 240, 199, .4); color: #06120d; background: var(--mint); }
.primary-button:hover { background: #c6ffe6; transform: translateY(-1px); }
.secondary-button { border: 1px solid var(--line); color: var(--muted); background: rgba(255, 255, 255, .025); }
.secondary-button:hover { border-color: var(--line-strong); color: var(--text); }
.file-button { position: relative; overflow: hidden; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.notice-box { display: flex; gap: 8px; margin-top: 15px; padding: 11px; border: 1px solid rgba(255, 210, 125, .11); border-radius: 10px; background: rgba(255, 210, 125, .04); }
.notice-icon { display: grid; place-items: center; flex: 0 0 16px; width: 16px; height: 16px; border-radius: 50%; color: var(--amber); background: rgba(255, 210, 125, .13); font-size: 9px; }
.notice-box p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.setting-row { display: flex; justify-content: space-between; gap: 10px; padding: 13px 1px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.setting-row strong { color: var(--text); font-size: 10px; font-weight: 500; text-align: right; }
.muted-strong { color: var(--muted-2) !important; }
.settings-box { margin-top: 17px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.022); }
.settings-box p { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.memory-dialog { width: min(460px, calc(100% - 28px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 20px; color: var(--text); background: var(--panel-solid); box-shadow: 0 30px 100px rgba(0,0,0,.55); }
.memory-dialog::backdrop { background: rgba(0, 5, 3, .74); backdrop-filter: blur(7px); }
.memory-dialog form { padding: 21px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; }
.dialog-head h2 { margin: 7px 0 0; font-size: 21px; font-weight: 500; }
.dialog-close { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: transparent; font-size: 18px; }
.dialog-close:hover { color: var(--text); background: rgba(255,255,255,.05); }
.field-label { display: grid; gap: 7px; margin-top: 16px; color: var(--muted); font-size: 10px; }
.field-label input, .field-label textarea { padding: 10px 11px; font-size: 11px; }
.field-label textarea { resize: vertical; min-height: 92px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.dialog-actions .secondary-button, .dialog-actions .primary-button { min-width: 78px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 20; max-width: min(340px, calc(100% - 44px)); padding: 11px 14px; border: 1px solid rgba(143, 240, 199, .28); border-radius: 11px; color: #dffcec; background: rgba(18, 49, 39, .96); box-shadow: 0 18px 48px rgba(0,0,0,.3); font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .25s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1deg); } }
@keyframes shadowPulse { 0%, 100% { opacity: .7; transform: scaleX(.92); } 50% { opacity: .48; transform: scaleX(.78); } }
@keyframes glowPulse { 0%, 100% { opacity: .55; transform: scale(.96); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes twinkle { 0%, 100% { opacity: .35; transform: scale(.75); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes petPop { 0% { transform: scale(1); } 35% { transform: scale(1.04, .95) translateY(2px); } 70% { transform: scale(.98, 1.03) translateY(-3px); } 100% { transform: scale(1); } }
@keyframes messageIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes panelIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1280px) {
  .app-shell { grid-template-columns: 212px minmax(0, 1fr) 310px; gap: 12px; width: min(1500px, calc(100% - 24px)); }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) 292px; gap: 12px; }
  .world-card, .chat-card, .memory-card { padding: 15px; }
  .status-card { padding: 16px; }
  .inspector { padding-left: 12px; padding-right: 12px; }
  .action-button { padding: 8px; gap: 6px; }
  .action-icon { width: 25px; height: 25px; font-size: 13px; }
}
@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 206px minmax(0, 1fr); }
  .inspector { grid-column: 1 / -1; min-height: 0; }
  .inspector-tabs { width: min(340px, 100%); }
  .inspector-panel.is-active { min-height: 390px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 860px) {
  .app-shell { display: block; width: calc(100% - 20px); padding: 10px 0; }
  .sidebar { min-height: 0; margin-bottom: 10px; padding: 14px; }
  .brand { padding-bottom: 15px; }
  .sidebar-section { margin-top: 0; }
  .main-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nav-item { justify-content: center; gap: 6px; min-height: 40px; padding: 0 6px; font-size: 10px; }
  .nav-icon { width: auto; font-size: 13px; }
  .nav-count, .nav-pulse, .nav-soon { display: none; }
  .sidebar-pet, .sidebar-footer { display: none; }
  .main { gap: 10px; }
  .topbar { min-height: 62px; padding: 0 2px; }
  .hero-grid, .lower-grid { grid-template-columns: 1fr; gap: 10px; }
  .inspector { margin-top: 10px; }
  .room { min-height: 380px; }
  .status-card { min-height: 390px; }
  .status-foot { margin-top: 20px; }
}
@media (max-width: 560px) {
  .app-shell { width: calc(100% - 14px); padding: 7px 0; }
  .sidebar { padding: 12px 10px; border-radius: 18px; }
  .brand-copy strong { font-size: 15px; }
  .brand-copy small { font-size: 8px; }
  .topbar h1 { font-size: 25px; }
  .date-chip { display: none; }
  .world-card, .chat-card, .memory-card, .status-card, .inspector { padding: 12px; border-radius: 18px; }
  .room { min-height: 340px; border-radius: 15px; }
  .pet-stage { width: 47%; min-width: 145px; bottom: 17%; }
  .pet-bubble { top: 11%; left: 44%; width: 57%; padding: 11px; }
  #bubble-text { font-size: 10px; }
  .action-row { grid-template-columns: repeat(2, 1fr); }
  .action-button { min-height: 44px; }
  .panel-heading h2 { font-size: 17px; }
  .status-hero { grid-template-columns: 60px minmax(0, 1fr) auto; gap: 9px; }
  .status-avatar { width: 60px; height: 60px; border-radius: 18px; }
  .status-avatar img { width: 55px; height: 55px; }
  .status-title h2 { font-size: 21px; }
  .chat-log { height: 190px; }
  .inspector-panel.is-active { min-height: 360px; }
  .quick-prompts button { font-size: 8px; }
  .room-caption { right: 13px; bottom: 12px; left: 13px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* Mobile polish overrides */
@media (max-width: 860px) {
  .topbar-actions { flex: 0 0 auto; }
  .main-nav, .nav-item { min-width: 0; }
  .nav-item { gap: 4px; font-size: 9px; white-space: nowrap; }
  .nav-icon { font-size: 11px; }
}
@media (max-width: 560px) {
  .pet-bubble {
    top: 14px;
    right: 14px;
    left: 14px;
    width: auto;
    transform: none;
  }
  .pet-bubble.is-hidden { transform: translateY(8px); }
  .pet-stage { bottom: 19%; }
  .topbar h1 { font-size: 23px; }
  .avatar-button, .icon-button { width: 32px; height: 32px; }
}

@media (max-width: 560px) {
  .main-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; }
  .nav-item { justify-content: center; gap: 3px; padding: 0 2px; font-size: 9px; }
  .nav-item .nav-icon { display: none; }
}

/* DeepSeek Pet visual integration */
.pet-stage { aspect-ratio: 260 / 320; }
.pet-video {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
  transition: opacity .18s ease;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .25));
  background: transparent;
}
.pet-video-happy { opacity: 0; }
.pet-stage.is-happy .pet-video-idle { opacity: 0; }
.pet-stage.is-happy .pet-video-happy { opacity: 1; }
.pet-stage.is-petted .pet-video { animation: petPop .52s ease; }

/* Keep original dsh-pet 16:9 transparent videos centered in the tall pet stage. */
.pet-video { object-fit: cover; }

/* Configurable pet profile */
.pet-image { display: none; object-fit: contain; }
.pet-stage.is-image .pet-video-idle,
.pet-stage.is-image .pet-video-happy { display: none; }
.pet-stage.is-image .pet-image { display: block; }
.status-kicker { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.source-chip { padding: 3px 6px; border: 1px solid rgba(143, 240, 199, .16); border-radius: 99px; color: var(--mint); background: rgba(143, 240, 199, .055); font-size: 8px; letter-spacing: .08em; }
.profile-select { max-width: 150px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: var(--panel-solid); font-size: 10px; }
.profile-select:focus { outline: 1px solid rgba(143, 240, 199, .5); }
