/* web/css/noel-ui.css - NoelHome 官方权威 UI 设计规范 (Pixel-Perfect High Aesthetics) */
:root {
  /* 暖白燕麦底色 (Clean Radiant Oatmeal Cream) */
  --color-bg-base: #F5F2EC;
  --color-bg-card: #FCFAF8;
  --color-text-primary: #24211E;    /* 暖黑 */
  --color-text-secondary: #756F67;  /* 深灰 */
  --color-divider: #D8D2C9;
  --color-accent-amber: #C58A3E;    /* 暖琥珀焦糖金 */
  --color-accent-sage: #7F8974;
  --color-accent-rose: #B9726C;
  --accent-gold: var(--color-accent-amber);
  --accent-warm: #E8C894;

  --color-bg-fallback: #F5F2EC;
  --color-text-main: #24211E;
  --color-text-soft: #756F67;
  --color-text-faint: rgba(117, 111, 103, 0.6);
  --glass-bg: #FCFAF8;
  --glass-bg-strong: #FCFAF8;
  --glass-border: #D8D2C9;
  --glass-shadow: 0 2px 12px rgba(36, 33, 30, 0.08);

  --radius-card: 16px;
  --radius-btn: 12px;
  --shadow-soft: 0 2px 12px rgba(36, 33, 30, 0.08);

  --app-height: 100vh;
  --safe-top: 0px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

*:focus {
  outline: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: MiSans, 'HarmonyOS Sans', 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI Emoji', 'Apple Color Emoji', sans-serif;
  background-color: var(--color-bg-base, #F5F2EC);
  color: var(--color-text-primary, #24211E);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: var(--app-height);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-color: #F5F2EC;
}

/* App 容器通用样式 */
.app-container {
  position: relative;
  background-color: #F5F2EC;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.app-page {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #F5F2EC;
}

.app-main {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.app-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.app-scroll::-webkit-scrollbar {
  display: none;
}
.app-scroll {
  scrollbar-width: none;
}

/* Compatibility layer for pages that still use the original NoelHome shell. */
.theme-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.theme-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

.hide-scrollbar {
  scrollbar-width: none;
}

.back-icon {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--color-text-main);
  font-size: 1.8rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(252, 250, 248, 0.92);
  border: 1px solid rgba(216, 210, 201, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-soft);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(36, 33, 30, 0.06);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bubble {
  padding: 10px 14px;
  line-height: 1.6;
  font-size: 15px;
  color: var(--color-text-main);
  border: 1px solid rgba(216, 210, 201, 0.62);
  box-shadow: 0 5px 16px rgba(36, 33, 30, 0.06);
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

@media (min-width: 500px) {
  .app-container {
    width: 100%;
    max-width: 412px;
    height: 90vh;
    max-height: 840px;
    border-radius: 36px;
    border: 8px solid #ffffff;
    box-shadow: 0 24px 64px rgba(36, 33, 30, 0.10);
  }
}

@media (max-width: 499px) {
  :root {
    --safe-top: 38px;
  }
  .app-container {
    position: relative;
    width: 100vw;
    height: var(--app-height);
    min-height: var(--app-height);
    max-height: var(--app-height);
    overflow: hidden;
  }
}
