:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: #f8f3e9;
  color: #405047;
  --cream: #f8f3e9;
  --paper: #fffdf8;
  --green: #769080;
  --deep-green: #35483f;
  --soft-green: #dfece4;
  --blue: #e7f0f3;
  --gold: #e5bd67;
  --line: rgba(101, 126, 112, .14);
  --shadow: 0 24px 70px rgba(81, 103, 91, .12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

button {
  font: inherit;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.96), transparent 34%),
    linear-gradient(145deg, #fbf7ef 0%, #edf6f0 56%, #e8f1f5 100%);
}

.entrance {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-content: center;
  padding:
    max(32px, env(safe-area-inset-top))
    max(32px, env(safe-area-inset-right))
    max(32px, env(safe-area-inset-bottom))
    max(32px, env(safe-area-inset-left));
}

.home-name {
  position: fixed;
  top: max(26px, env(safe-area-inset-top));
  left: max(32px, env(safe-area-inset-left));
  margin: 0;
  color: #7f9086;
  font-size: 12px;
  letter-spacing: .22em;
}

.welcome {
  position: relative;
  width: min(620px, 100%);
  margin: auto;
  padding: clamp(42px, 8vw, 84px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 34px;
  background: rgba(255,255,255,.6);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.sunlight {
  position: absolute;
  top: -90px;
  right: -70px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255,232,181,.54);
  filter: blur(10px);
  pointer-events: none;
}

.eyebrow,
.card-label,
.room-header p {
  margin: 0;
  color: #789082;
  font-size: 13px;
  letter-spacing: .14em;
}

.welcome h1 {
  margin: 18px 0 0;
  color: var(--deep-green);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(42px, 8vw, 72px);
  font-weight: 400;
  line-height: 1.2;
}

.note {
  margin: 24px 0 0;
  color: #7a8981;
  font-size: 15px;
  line-height: 1.8;
}

.enter-home {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  margin-top: 34px;
  padding: 13px 20px;
  border: 1px solid rgba(90, 119, 103, .14);
  border-radius: 999px;
  background: var(--deep-green);
  color: #fffdf7;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(53, 72, 63, .2);
  transition: transform .2s ease, box-shadow .2s ease;
}

.enter-home:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(53, 72, 63, .26);
}

.enter-home:focus-visible,
.room-link:focus-visible,
.back-door:focus-visible {
  outline: 3px solid rgba(229, 189, 103, .65);
  outline-offset: 3px;
}

.home-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: 24px;
  padding:
    max(22px, env(safe-area-inset-top))
    max(22px, env(safe-area-inset-right))
    max(22px, env(safe-area-inset-bottom))
    max(22px, env(safe-area-inset-left));
}

.sidebar,
.room-stage {
  border: 1px solid rgba(255,255,255,.76);
  background: rgba(255,255,255,.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.sidebar {
  display: flex;
  min-height: calc(100vh - 44px);
  min-height: calc(100dvh - 44px);
  flex-direction: column;
  padding: 20px;
  border-radius: 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 22px;
  border-bottom: 1px solid var(--line);
}

.brand img {
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(83, 105, 93, .12);
}

.brand strong,
.brand span,
.presence strong,
.presence span {
  display: block;
}

.brand strong {
  color: var(--deep-green);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 22px;
  font-weight: 400;
}

.brand span,
.presence span {
  margin-top: 3px;
  color: #87968e;
  font-size: 11px;
}

.room-nav {
  display: grid;
  gap: 7px;
  margin-top: 20px;
}

.room-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: #68796f;
  cursor: pointer;
  text-align: left;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.room-link:hover {
  background: rgba(255,255,255,.65);
  transform: translateX(2px);
}

.room-link.active {
  background: var(--soft-green);
  color: var(--deep-green);
}

.room-link small {
  color: #9aa79f;
  font-size: 10px;
  letter-spacing: .08em;
}

.presence {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 14px 12px 4px;
  border-top: 1px solid var(--line);
}

.presence-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #89aa92;
  box-shadow: 0 0 0 5px rgba(137,170,146,.13);
}

.presence strong {
  color: #607269;
  font-size: 12px;
  font-weight: 500;
}

.room-stage {
  min-width: 0;
  padding: clamp(24px, 4vw, 54px);
  border-radius: 34px;
}

.room-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.room-header h1 {
  margin: 8px 0 0;
  color: var(--deep-green);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(38px, 6vw, 58px);
  font-weight: 400;
}

.back-door {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.58);
  color: #718178;
  cursor: pointer;
}

.living-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.qibai-card,
.home-card,
.chat-place,

.room-placeholder {
  border: 1px solid rgba(255,255,255,.8);
  background: rgba(255,255,255,.64);
  box-shadow: 0 14px 40px rgba(81,103,91,.08);
}

.qibai-card {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: clamp(24px, 4vw, 38px);
  border-radius: 26px;
}

.avatar {
  display: grid;
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 22px;
  background: var(--soft-green);
  color: var(--deep-green);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 27px;
}

.qibai-card h2,
.room-placeholder h2 {
  margin: 9px 0 8px;
  color: var(--deep-green);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(25px, 4vw, 36px);
  font-weight: 400;
}

.qibai-card p:last-child,
.home-card p,
.room-placeholder p {
  color: #7b8a82;
  line-height: 1.8;
}

.home-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  padding: 26px;
  border-radius: 24px;
}

.home-card strong {
  display: block;
  margin-top: 12px;
  color: #52655a;
  font-size: 20px;
  font-weight: 500;
}

.soft-window {
  position: absolute;
  right: -10px;
  bottom: -10px;
  display: grid;
  grid-template-columns: repeat(2, 64px);
  gap: 6px;
  padding: 8px;
  border: 9px solid #d6e3dc;
  border-radius: 52px 52px 12px 12px;
  background: #fdf8e9;
  opacity: .72;
}

.soft-window span {
  width: 64px;
  height: 54px;
  background: linear-gradient(145deg, #dcecf0, #fff4cf);
}

.coming-tag,
.locked-tag {
  display: inline-flex;
  margin-top: 14px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #edf2ee;
  color: #819188;
  font-size: 11px;
}

.chat-place {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-radius: 20px;
}

.chat-place strong {
  display: block;
  margin-top: 6px;
  color: #53665b;
  font-weight: 500;
}

.chat-place > span {
  color: #9aa69f;
  font-size: 12px;
}


.room-placeholder {
  position: relative;
  min-height: 440px;
  padding: clamp(34px, 7vw, 76px);
  overflow: hidden;
  border-radius: 28px;
}

.room-placeholder p {
  max-width: 620px;
}

.room-number {
  position: absolute;
  right: 34px;
  bottom: 10px;
  color: rgba(84,105,94,.07);
  font-family: Georgia, serif;
  font-size: clamp(130px, 22vw, 250px);
}

.memory-tone {
  background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(226,239,230,.72));
}

.study-tone {
  background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(244,235,212,.7));
}

.collection-tone {
  background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(228,238,242,.78));
}

.bedroom-tone {
  background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(235,229,223,.82));
}

@media (max-width: 760px) {
  .entrance {
    padding: 18px;
  }

  .home-name {
    top: max(20px, env(safe-area-inset-top));
    left: max(22px, env(safe-area-inset-left));
  }

  .welcome {
    padding: 48px 30px;
    border-radius: 28px;
  }

  .home-shell {
    display: block;
    padding:
      max(14px, env(safe-area-inset-top))
      14px
      calc(92px + env(safe-area-inset-bottom));
  }

  .sidebar {
    position: fixed;
    z-index: 10;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 12px;
    min-height: 0;
    padding: 7px;
    border-radius: 22px;
  }

  .brand,
  .presence {
    display: none;
  }

  .room-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    margin: 0;
  }

  .room-link {
    display: grid;
    gap: 3px;
    justify-items: center;
    padding: 10px 3px;
    border-radius: 16px;
    font-size: 12px;
    text-align: center;
  }

  .room-link:hover {
    transform: none;
  }

  .room-link small {
    font-size: 8px;
  }

  .room-stage {
    min-height: calc(100dvh - 106px);
    padding: 25px 20px;
    border-radius: 27px;
  }

  .room-header {
    margin-bottom: 22px;
  }

  .back-door {
    padding: 8px 11px;
    font-size: 11px;
  }

  .living-grid {
    grid-template-columns: 1fr;
  }

  .qibai-card,
  .chat-place {
    grid-column: auto;
  }

  .qibai-card {
    align-items: flex-start;
  }

  .chat-place {
    display: block;
  }

  .chat-place > span {
    display: block;
    margin-top: 10px;
  }

  .room-placeholder {
    min-height: 58vh;
    padding: 34px 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
