﻿:root {
  --phone-w: 390px;
  --phone-h: 844px;
  --phone-scale: 1;
  --icon-w: 67px;
  --icon-h: 79px;
  --tile-size: 55px;
  --dock-icon-w: 65px;
  --dock-icon-h: 70px;
  --dock-tile-size: 52px;
  --text: #232629;
  --base-font-size: 14px;
  --app-icon-radius: 18px;
  --desktop-icon-color: #786973;
  --muted: #70777d;
  --line: rgba(120, 128, 134, 0.18);
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.76);
  --white: #fff;
  --shadow: 0 24px 70px rgba(46, 53, 58, 0.16);
  --soft-warm: rgba(245, 236, 222, 0.52);
  --accent: #efd3dc;
  --accent-strong: #d9a6b7;
  --button-pink: rgba(234, 224, 229, 0.68);
  --button-pink-strong: rgba(250, 218, 228, 0.7);
  --danger: #bf716b;
  --ios-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--ios-font);
  font-size: var(--base-font-size);
  background:
    radial-gradient(circle at 26% 12%, rgba(255, 255, 255, 0.92), transparent 28rem),
    linear-gradient(145deg, #eff1ef, #faf8f4 52%, #ecefed);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.phone,
.desktop,
.dock,
.app-icon,
.icon-tile,
.home-indicator,
.composer-actions,
.message-notification,
.floating-ball {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

.stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.phone {
  position: relative;
  width: min(calc(var(--phone-w) * var(--phone-scale)), calc(100vw - 28px));
  height: min(calc(var(--phone-h) * var(--phone-scale)), calc(100dvh - 28px));
  min-height: 680px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 44px;
  background: #f9faf8;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(34, 38, 42, 0.06);
}

.message-notification {
  position: absolute;
  top: 54px;
  left: 18px;
  right: 18px;
  z-index: 120;
  min-height: 58px;
  display: grid;
  gap: 3px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 42px rgba(70, 62, 68, 0.16);
  color: var(--text);
  text-align: left;
  backdrop-filter: blur(22px);
  touch-action: pan-y;
  transition: transform 160ms ease, opacity 160ms ease;
  will-change: transform, opacity;
}

.message-notification.hidden-form {
  display: none;
}

.message-notification strong {
  color: var(--theme-strong-text);
  font-size: calc(var(--base-font-size) - 1px);
}

.message-notification span {
  overflow: hidden;
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 2px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-toast {
  position: absolute;
  top: 58px;
  left: 50%;
  z-index: 180;
  max-width: calc(100% - 48px);
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 34px rgba(70, 62, 68, 0.14);
  color: var(--theme-strong-text);
  font-size: calc(var(--base-font-size) - 1px);
  font-weight: 720;
  text-align: center;
  backdrop-filter: blur(22px);
  opacity: 1;
  transition: transform 180ms ease, opacity 180ms ease;
}

.app-toast.hidden-form {
  display: none;
}

.app-toast.toast-leaving {
  opacity: 0;
  transform: translate(-50%, -8px);
}

.floating-ball {
  --floating-ball-size: 46px;
  position: absolute;
  bottom: 104px;
  z-index: 118;
  width: var(--floating-ball-size);
  height: var(--floating-ball-size);
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.76), var(--button-pink));
  box-shadow: 0 14px 32px rgba(70, 62, 68, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.48);
  color: var(--theme-strong-text);
  font-size: calc(var(--base-font-size) - 1px);
  font-weight: 800;
  backdrop-filter: blur(20px);
  cursor: grab;
  touch-action: none;
  transition: left 180ms ease, top 180ms ease, opacity 160ms ease, transform 180ms ease;
  user-select: none;
  will-change: left, top, transform;
}

.floating-ball:active {
  cursor: grabbing;
  transform: scale(0.96);
}

.floating-ball-dragging {
  transition: none;
}

.floating-ball.hidden-form {
  display: none;
}

.floating-ball-right {
  right: 18px;
}

.floating-ball-left {
  left: 18px;
}

.floating-ball span {
  width: calc(var(--floating-ball-size) - 14px);
  height: calc(var(--floating-ball-size) - 14px);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.46);
}

.floating-ball-collapsed span {
  background: rgba(255, 255, 255, 0.62);
}

.floating-panel {
  position: absolute;
  bottom: 160px;
  z-index: 119;
  width: min(248px, calc(100% - 36px));
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 24px;
  background: var(--theme-menu);
  box-shadow: 0 18px 42px rgba(70, 62, 68, 0.16);
  backdrop-filter: blur(22px);
}

.floating-panel.hidden-form {
  display: none;
}

.floating-panel-right {
  right: 16px;
}

.floating-panel-left {
  left: 16px;
}

.floating-preset-picker {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 5px;
}

.floating-preset-picker > span {
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 2px);
  font-weight: 700;
}

.floating-preset-trigger {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 15px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.58);
  color: var(--theme-strong-text);
  font: inherit;
  font-size: calc(var(--base-font-size) - 1px);
  font-weight: 730;
}

.floating-preset-trigger.empty {
  color: var(--muted);
}

.floating-preset-options {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 7px);
  z-index: 4;
  max-height: 152px;
  overflow: auto;
  display: grid;
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 17px;
  background: var(--theme-menu);
  box-shadow: 0 16px 34px rgba(70, 62, 68, 0.14);
  backdrop-filter: blur(20px);
  scrollbar-width: none;
}

.floating-preset-options.hidden-form {
  display: none;
}

.floating-preset-options::-webkit-scrollbar {
  display: none;
}

.floating-preset-option {
  min-height: 34px;
  border: 0;
  border-radius: 13px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: calc(var(--base-font-size) - 1px);
  font-weight: 700;
  text-align: left;
}

.floating-preset-option.active,
.floating-preset-option:hover {
  background: var(--theme-accent-button);
  color: var(--theme-strong-text);
}

.floating-panel-action {
  min-height: 36px;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 15px;
  padding: 0 11px;
  background: var(--button-pink);
  color: var(--theme-strong-text);
  font: inherit;
  font-size: calc(var(--base-font-size) - 1px);
  font-weight: 730;
  text-align: left;
}

.wallpaper {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.95), transparent 11rem),
    radial-gradient(circle at 82% 8%, rgba(229, 238, 236, 0.9), transparent 13rem),
    radial-gradient(circle at 66% 86%, rgba(244, 234, 219, 0.48), transparent 15rem),
    linear-gradient(155deg, #f9faf7, #eef2f0 48%, #faf7f0);
}

.status-bar {
  position: relative;
  z-index: 5;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  color: rgba(34, 38, 42, 0.78);
  font-size: calc(var(--base-font-size) - 1px);
  font-weight: 600;
}

.dynamic-island {
  width: 88px;
  height: 27px;
  border-radius: 999px;
  background: rgba(32, 35, 37, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 6px 18px rgba(38, 43, 46, 0.16);
  transition: opacity 160ms ease, transform 160ms ease;
}

.dynamic-island.hidden {
  opacity: 0;
  transform: scale(0.82);
}

.desktop,
.app-screen {
  position: absolute;
  inset: 42px 0 0;
  z-index: 2;
}

.desktop {
  display: none;
}

.desktop.active {
  display: block;
}

.page-strip {
  position: absolute;
  inset: 0;
  display: flex;
  transition: transform 220ms ease;
}

.desktop-page {
  width: 100%;
  height: 100%;
  flex: 0 0 100%;
  padding: 54px clamp(32px, 9vw, 48px) 118px;
}

.icon-grid {
  position: relative;
  width: 100%;
  height: 100%;
  --icon-step-x: calc((100% - var(--icon-w)) / 3);
  --icon-step-y: 82px;
}

.app-icon {
  position: absolute;
  width: var(--icon-w);
  height: var(--icon-h);
  display: grid;
  grid-template-rows: var(--tile-size) 1fr;
  justify-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--text);
  touch-action: none;
  user-select: none;
  transition: transform 160ms ease, opacity 160ms ease;
}

.app-icon.dragging {
  z-index: 20;
  opacity: 0.92;
  transform: scale(1.05);
  transition: none;
}

.desktop.editing .app-icon:not(.dragging) {
  animation: iconWiggle 220ms ease-in-out infinite alternate;
}

@keyframes iconWiggle {
  from {
    transform: rotate(-1.2deg);
  }
  to {
    transform: rotate(1.2deg);
  }
}

.icon-tile {
  width: var(--tile-size);
  height: var(--tile-size);
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--app-icon-radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42));
  box-shadow: 0 12px 28px rgba(60, 68, 74, 0.12);
  backdrop-filter: blur(18px);
  font-size: calc(var(--base-font-size) + 10px);
}

.icon-tile img,
.custom-icon-image {
  width: 72%;
  height: 72%;
  display: block;
  object-fit: cover;
  border-radius: max(6px, calc(var(--app-icon-radius) - 4px));
}

.glyph {
  position: relative;
  width: 29px;
  height: 29px;
  display: block;
  color: var(--desktop-icon-color);
}

.glyph::before {
  position: absolute;
  inset: 0;
  content: "";
  background: currentColor;
  -webkit-mask: var(--glyph-mask) center / contain no-repeat;
  mask: var(--glyph-mask) center / contain no-repeat;
}

.glyph::after {
  display: none;
}

.glyph-chat {
  --glyph-color: #426b73;
  --glyph-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a4 4 0 0 1-4 4H8l-5 3V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4z'/%3E%3Cpath d='M8 9h8M8 13h5'/%3E%3C/svg%3E");
}

.glyph-settings {
  --glyph-color: #5d6670;
  --glyph-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z'/%3E%3Cpath d='M19.4 15a1.8 1.8 0 0 0 .36 2l.05.05a2.1 2.1 0 0 1-2.97 2.97l-.05-.05a1.8 1.8 0 0 0-2-.36 1.8 1.8 0 0 0-1.1 1.66V21a2.1 2.1 0 0 1-4.2 0v-.08a1.8 1.8 0 0 0-1.1-1.66 1.8 1.8 0 0 0-2 .36l-.05.05a2.1 2.1 0 0 1-2.97-2.97l.05-.05a1.8 1.8 0 0 0 .36-2 1.8 1.8 0 0 0-1.66-1.1H3a2.1 2.1 0 0 1 0-4.2h.08a1.8 1.8 0 0 0 1.66-1.1 1.8 1.8 0 0 0-.36-2l-.05-.05a2.1 2.1 0 0 1 2.97-2.97l.05.05a1.8 1.8 0 0 0 2 .36A1.8 1.8 0 0 0 10.45 3V3a2.1 2.1 0 0 1 4.2 0v.08a1.8 1.8 0 0 0 1.1 1.66 1.8 1.8 0 0 0 2-.36l.05-.05a2.1 2.1 0 0 1 2.97 2.97l-.05.05a1.8 1.8 0 0 0-.36 2 1.8 1.8 0 0 0 1.66 1.1H21a2.1 2.1 0 0 1 0 4.2h-.08A1.8 1.8 0 0 0 19.4 15z'/%3E%3C/svg%3E");
}

.glyph-appearance {
  --glyph-color: #7a6a91;
  --glyph-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22a10 10 0 1 0 0-20 7 7 0 0 0-7 7c0 2.2 1.8 4 4 4h1.2a2 2 0 0 1 1.8 2.8l-.3.7A4 4 0 0 0 15.4 22z'/%3E%3Ccircle cx='7.5' cy='10' r='.8'/%3E%3Ccircle cx='9.5' cy='6.8' r='.8'/%3E%3Ccircle cx='14' cy='6.8' r='.8'/%3E%3Ccircle cx='16.5' cy='10' r='.8'/%3E%3C/svg%3E");
}

.glyph-offline {
  --glyph-color: #677a58;
  --glyph-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s7-4.7 7-11a7 7 0 1 0-14 0c0 6.3 7 11 7 11z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3Cpath d='M4 4l16 16'/%3E%3C/svg%3E");
}

.glyph-character {
  --glyph-color: #76605b;
  --glyph-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3Cpath d='M19 4v4M21 6h-4'/%3E%3C/svg%3E");
}

.glyph-memory {
  --glyph-color: #496f68;
  --glyph-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7' y='7' width='10' height='10' rx='2'/%3E%3Cpath d='M4 9h3M4 15h3M17 9h3M17 15h3M9 4v3M15 4v3M9 17v3M15 17v3'/%3E%3Cpath d='M10 12h4'/%3E%3C/svg%3E");
}

.glyph-worldbook {
  --glyph-color: #536b8a;
  --glyph-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5A2.5 2.5 0 0 1 6.5 3H20v16H6.5A2.5 2.5 0 0 0 4 21z'/%3E%3Cpath d='M4 5.5V21M9 7h6M9 11h7M9 15h4'/%3E%3C/svg%3E");
}

.glyph-phone {
  --glyph-color: #56646b;
  --glyph-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7' y='2.5' width='10' height='19' rx='2.5'/%3E%3Cpath d='M11 18h2'/%3E%3C/svg%3E");
}

.glyph-music {
  --glyph-color: #7d536b;
  --glyph-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l11-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='17' cy='16' r='3'/%3E%3C/svg%3E");
}

.glyph-forum {
  --glyph-color: #4d6f7b;
  --glyph-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 14a3 3 0 0 1-3 3H9l-5 3V7a3 3 0 0 1 3-3h11a3 3 0 0 1 3 3z'/%3E%3Cpath d='M8 9h8M8 13h6'/%3E%3C/svg%3E");
}

.glyph-call {
  --glyph-color: #466f5c;
  --glyph-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.7 19.7 0 0 1-8.6-3.1 19.3 19.3 0 0 1-6-6A19.7 19.7 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 1.9.7 2.8a2 2 0 0 1-.5 2.1L8.1 9.9a16 16 0 0 0 6 6l1.3-1.2a2 2 0 0 1 2.1-.5c.9.3 1.8.6 2.8.7A2 2 0 0 1 22 16.9z'/%3E%3C/svg%3E");
}

.glyph-album {
  --glyph-color: #6b7784;
  --glyph-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Ccircle cx='8' cy='10' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 19'/%3E%3C/svg%3E");
}

.glyph-shop {
  --glyph-color: #7a6653;
  --glyph-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8h12l-1 13H7z'/%3E%3Cpath d='M9 8a3 3 0 0 1 6 0'/%3E%3Cpath d='M9 12h6'/%3E%3C/svg%3E");
}

.glyph-diary {
  --glyph-color: #706078;
  --glyph-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h11a2 2 0 0 1 2 2v16H6a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z'/%3E%3Cpath d='M8 7h7M8 11h6M8 15h4M4 19a2 2 0 0 0 2 2'/%3E%3C/svg%3E");
}

.glyph-wish {
  --glyph-color: #867250;
  --glyph-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 2h4M11 2v5l-5 8a4 4 0 0 0 3.4 6h5.2A4 4 0 0 0 18 15l-5-8V2'/%3E%3Cpath d='M9 14h6M9 17h6'/%3E%3Cpath d='M19 4l1 2 2 1-2 1-1 2-1-2-2-1 2-1z'/%3E%3C/svg%3E");
}

.glyph-health {
  --glyph-color: #7d5c61;
  --glyph-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 4.6a5.5 5.5 0 0 0-7.8 0L12 5.6l-1-1a5.5 5.5 0 0 0-7.8 7.8l1 1L12 21l7.8-7.6 1-1a5.5 5.5 0 0 0 0-7.8z'/%3E%3Cpath d='M7 12h3l1.5-3 2 6 1.5-3h2'/%3E%3C/svg%3E");
}

.app-icon span:last-child {
  max-width: 68px;
  color: var(--text);
  font-family: var(--ios-font);
  font-size: calc(var(--base-font-size) - 1.5px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
  text-align: center;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.dock {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 36px;
  z-index: 6;
  min-height: 74px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  justify-items: center;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 16px 42px rgba(58, 64, 70, 0.13);
  backdrop-filter: blur(22px);
}

.page-dots {
  position: absolute;
  left: 50%;
  bottom: 116px;
  z-index: 7;
  display: flex;
  gap: 6px;
  transform: translateX(-50%);
}

.page-dot {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 50%;
  background: var(--theme-accent-soft);
}

.page-dot.active {
  width: 18px;
  border-radius: 999px;
  background: var(--theme-accent-mid);
}

.dock .app-icon {
  position: static;
  width: var(--dock-icon-w);
  height: var(--dock-icon-h);
  grid-template-rows: var(--dock-tile-size) 1fr;
}

.dock .icon-tile {
  width: var(--dock-tile-size);
  height: var(--dock-tile-size);
  border-radius: var(--app-icon-radius);
}

.edit-popover {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 7;
  display: grid;
  align-items: center;
  width: auto;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.44);
  box-shadow: 0 12px 30px rgba(58, 64, 70, 0.12);
  backdrop-filter: blur(16px);
}

.edit-popover[hidden] {
  display: none;
}

.edit-popover.drag-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
}

.app-screen {
  z-index: 8;
  display: none;
  grid-template-rows: auto 1fr;
  background: rgba(250, 251, 249, 0.62);
  backdrop-filter: blur(26px);
}

.app-screen.open {
  display: grid;
  animation: openApp 180ms ease both;
}

.appearance-page {
  height: 100%;
  display: block;
  gap: 12px;
  overflow: auto;
  padding: 14px;
}

.preview-phone {
  width: 112px;
  height: 202px;
  display: grid;
  place-items: center;
  justify-self: center;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 18px 38px rgba(60, 68, 74, 0.1);
  backdrop-filter: blur(18px);
}

.preview-phone div {
  width: 72%;
  height: 72%;
  border-radius: 22px;
  background: linear-gradient(155deg, rgba(255,255,255,.92), rgba(231,238,236,.8));
}

.compact {
  padding: 0;
  min-height: auto;
  height: auto;
  overflow: visible;
}

.appearance-page .settings-list {
  display: grid;
  gap: 10px;
  padding: 0 0 16px;
}

.appearance-page .settings-list details {
  position: relative;
  z-index: 1;
  min-height: 0;
  padding: 0 14px 13px;
  border-color: rgba(255, 255, 255, 0.76);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(246, 243, 245, 0.42));
  box-shadow: 0 8px 24px rgba(70, 62, 68, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.56);
  overflow: visible;
}

.appearance-page .settings-list details.color-panel-open {
  z-index: 80;
}

.appearance-page .settings-list summary {
  position: static;
  min-height: 46px;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  color: #657583;
  font-weight: 760;
}

.appearance-page .settings-list details > label,
.appearance-page .settings-list details > .preset-grid,
.appearance-page .settings-list details > .theme-preview-grid,
.appearance-page .settings-list details > .glass-button {
  margin-left: 0;
  margin-right: 0;
}

.appearance-page #save-appearance-btn {
  position: static;
  margin-top: 0;
}

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

.theme-group-select {
  position: relative;
  z-index: 6;
}

.theme-group-trigger {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  padding: 0 13px 0 15px;
  background: rgba(255, 255, 255, 0.46);
  color: var(--theme-strong-text);
  box-shadow: inset 0 1px 3px rgba(92, 82, 88, 0.06);
  font: inherit;
  font-size: calc(var(--base-font-size) - 1px);
  font-weight: 720;
  backdrop-filter: blur(18px);
}

.theme-group-arrow {
  color: var(--muted);
  font-size: calc(var(--base-font-size) + 1px);
  line-height: 1;
  transition: transform 160ms ease;
}

.theme-group-trigger[aria-expanded="true"] .theme-group-arrow {
  transform: rotate(180deg);
}

.theme-group-options {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 7px);
  z-index: 9;
  display: grid;
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 18px;
  background: var(--theme-menu);
  box-shadow: 0 16px 34px rgba(70, 62, 68, 0.14);
  backdrop-filter: blur(20px);
}

.theme-group-options.hidden-form {
  display: none;
}

.theme-group-option {
  min-height: 36px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: calc(var(--base-font-size) - 1px);
  font-weight: 720;
  text-align: left;
  padding: 0 11px;
}

.theme-group-option.active,
.theme-group-option:hover {
  background: var(--theme-accent-button);
  color: var(--theme-strong-text);
  box-shadow: 0 8px 20px rgba(84, 74, 80, 0.1), inset 0 0 0 1px var(--theme-accent-soft);
}

.theme-preview-button {
  min-height: 56px;
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 4px 8px;
  border: 1px solid rgba(183, 157, 168, 0.24);
  border-radius: 16px;
  padding: 8px;
  background: rgba(250, 249, 249, 0.48);
  color: var(--muted);
  text-align: left;
}

.theme-preview-button.active {
  border-color: var(--theme-accent-mid);
  background: var(--theme-accent-button);
  color: var(--text);
}

.theme-preview-swatch {
  width: 26px;
  height: 26px;
  grid-row: 1 / span 2;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.58), 0 6px 14px rgba(70, 62, 68, 0.1);
}

.theme-preview-tone {
  height: 13px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.56);
}

.theme-preview-button strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: calc(var(--base-font-size) - 2px);
}

.color-picker-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: inset 0 1px 3px rgba(92, 82, 88, 0.06);
}

.color-picker-row.color-picker-row-active {
  z-index: 120;
}

.native-color-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.custom-color-picker {
  position: relative;
  width: max-content;
  max-width: 100%;
  z-index: 18;
}

.custom-color-picker.open {
  z-index: 150;
}

.custom-color-trigger {
  min-width: 74px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 15px;
  padding: 4px 9px 4px 5px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 1px 3px rgba(92, 82, 88, 0.06);
  color: var(--muted);
  font: inherit;
  font-size: calc(var(--base-font-size) - 3px);
  font-weight: 700;
  backdrop-filter: blur(18px);
}

.custom-color-trigger[aria-expanded="true"] {
  border-color: var(--theme-accent-mid);
  color: var(--theme-strong-text);
}

.custom-color-swatch {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(70, 62, 68, 0.08), 0 7px 14px rgba(70, 62, 68, 0.1);
}

.custom-color-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 151;
  width: min(248px, calc(var(--phone-w) - 54px));
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 20px;
  background: var(--theme-menu);
  box-shadow: 0 18px 42px rgba(70, 62, 68, 0.16);
  backdrop-filter: blur(24px);
}

.custom-color-panel.hidden-form {
  display: none;
}

.custom-color-field {
  --picker-hue: 330deg;
  position: relative;
  height: 118px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  background:
    linear-gradient(to top, #000, transparent),
    linear-gradient(to right, #fff, hsl(var(--picker-hue) 100% 50%));
  box-shadow: inset 0 0 0 1px rgba(70, 62, 68, 0.05);
  touch-action: none;
}

.custom-color-field-marker {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(34, 38, 42, 0.55), 0 4px 10px rgba(34, 38, 42, 0.18);
  transform: translate(-50%, -50%);
}

.custom-color-panel input.custom-color-hue {
  width: 100%;
  height: 15px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
}

.custom-color-panel input.custom-color-hue::-webkit-slider-runnable-track {
  height: 9px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: linear-gradient(to right, #df5757, #e5cb55, #67c96c, #5fc9d9, #6d77da, #d65cc8, #df5757);
}

.custom-color-panel input.custom-color-hue::-webkit-slider-thumb {
  width: 17px;
  height: 17px;
  margin-top: -5px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--theme-accent-mid);
  box-shadow: 0 0 0 1px rgba(70, 62, 68, 0.18), 0 6px 14px rgba(70, 62, 68, 0.14);
  -webkit-appearance: none;
}

.custom-color-panel input.custom-color-hue::-moz-range-track {
  height: 9px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: linear-gradient(to right, #df5757, #e5cb55, #67c96c, #5fc9d9, #6d77da, #d65cc8, #df5757);
}

.custom-color-panel input.custom-color-hue::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--theme-accent-mid);
  box-shadow: 0 0 0 1px rgba(70, 62, 68, 0.18), 0 6px 14px rgba(70, 62, 68, 0.14);
}

.custom-color-hex-row {
  grid-template-columns: 1fr;
  gap: 5px;
  margin: 0;
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 3px);
  font-weight: 700;
}

.custom-color-hex-row input {
  height: 34px;
  padding: 0 10px;
  border-radius: 13px;
  text-transform: uppercase;
}

.custom-color-rgb {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.custom-color-rgb label {
  gap: 4px;
  margin: 0;
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 4px);
  text-align: center;
}

.custom-color-rgb input {
  min-width: 0;
  height: 34px;
  padding: 0 6px;
  border-radius: 13px;
  text-align: center;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.preset-button {
  min-height: 46px;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 15px;
  background: var(--button-pink);
  text-align: left;
  padding: 7px 10px;
  line-height: 1.15;
}

.preset-button strong {
  display: block;
  margin-bottom: 3px;
  font-size: calc(var(--base-font-size) - 1px);
}

.preset-button small {
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 3px);
}

#size-preset-list + .glass-button.full {
  min-height: 38px;
  margin-top: 7px;
}

.preset-button.active {
  border-color: var(--theme-accent-mid);
  background: var(--theme-accent-button);
  color: var(--theme-strong-text);
}

@keyframes openApp {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.app-topbar,
.dialog-header,
.toolbar-row,
.composer-actions,
.row,
.music-controls {
  display: flex;
  align-items: center;
}

.app-topbar {
  gap: 12px;
  padding: 8px 14px 12px;
  border-bottom: 1px solid var(--line);
}

.app-topbar > div {
  flex: 1 1 auto;
  min-width: 0;
}

.app-topbar h1,
.app-topbar .app-kicker {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-kicker {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 2px);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: calc(var(--base-font-size) + 6px);
}

h2 {
  margin-bottom: 6px;
  font-size: calc(var(--base-font-size) + 6px);
}

.top-icon,
.glass-button,
.primary-button,
.ai-button,
input,
textarea,
select {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--text);
  backdrop-filter: blur(18px);
}

.top-icon,
.glass-button,
.ai-button {
  border-color: var(--theme-accent-soft);
  background: var(--button-pink);
  color: var(--theme-strong-text);
}

.top-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: calc(var(--base-font-size) + 8px);
}

.app-topbar .top-icon {
  border-radius: 50%;
  font-size: calc(var(--base-font-size) + 6px);
  line-height: 1;
}

.glass-button,
.primary-button,
.ai-button {
  min-height: 38px;
  padding: 0 13px;
}

.small-button {
  min-height: 34px;
  padding: 0 11px;
  font-size: calc(var(--base-font-size) - 1px);
}

.compact-row {
  margin-top: 8px;
}

#fetch-models-btn,
#fetch-memory-models-btn {
  min-height: 36px;
  margin-top: 8px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
}

.primary-button {
  color: var(--theme-strong-text);
  border-color: var(--theme-accent-soft);
  background: linear-gradient(145deg, rgba(250, 247, 249, 0.94), var(--button-pink-strong));
}

.preset-button strong,
.session-item strong,
.contact-item strong,
.contact-candidate-item strong,
.profile-card strong,
.memory-item strong,
.list-card strong,
.settings-list summary,
.chat-style-preset-card strong,
.identity-option strong {
  color: var(--theme-strong-text);
}

.ai-button {
  background: var(--button-pink);
}

.full {
  width: 100%;
}

.app-body {
  display: none;
  min-height: 0;
  overflow: hidden;
}

.app-body.active {
  display: block;
}

#chat-app.active {
  display: grid;
  grid-template-rows: 1fr auto;
}

#conversation-app {
  position: relative;
}

#conversation-app.active {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

#music-app {
  position: relative;
}

#music-app,
.music-page,
.music-channel-tabs,
.music-feature-rail,
.music-playlist-grid,
.music-result-list,
.playlist {
  scrollbar-width: none !important;
  -ms-overflow-style: none;
}

#music-app::-webkit-scrollbar,
.music-page::-webkit-scrollbar,
.music-channel-tabs::-webkit-scrollbar,
.music-feature-rail::-webkit-scrollbar,
.music-playlist-grid::-webkit-scrollbar,
.music-result-list::-webkit-scrollbar,
.playlist::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.chat-tabs {
  order: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 7px 10px 22px;
  border-top: 1px solid var(--line);
  background: rgba(250, 251, 249, 0.62);
  backdrop-filter: blur(18px);
}

.chat-tab {
  height: 42px;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 15px;
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 1px);
  background: var(--button-pink);
}

.chat-tab.active {
  color: var(--text);
  border-color: var(--theme-accent-mid);
  background: var(--theme-accent-button);
  backdrop-filter: blur(16px);
}

.edit-symbol-button {
  min-width: 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  font-size: calc(var(--base-font-size) + 7px);
  font-weight: 700;
  line-height: 1;
}

.chat-panel {
  order: 1;
  display: none;
  min-height: 0;
  height: 100%;
  overflow: auto;
  padding: 0 12px 14px;
}

.chat-panel.active {
  display: block;
}

.session-list,
.contact-list,
.contact-candidate-list,
.moment-list,
.mask-list,
.memory-list,
.playlist,
.settings-list {
  display: grid;
  gap: 10px;
}

.session-item,
.contact-item,
.contact-candidate-item,
.moment-card,
.profile-card,
.memory-item,
.list-card,
.settings-list details,
.post-composer,
.memory-form,
.player-card,
.empty-state,
.call-card,
.dialog-card {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 10px 30px rgba(60, 68, 74, 0.08);
  backdrop-filter: blur(18px);
}

.session-item,
.contact-item,
.contact-candidate-item,
.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 12px;
  border: 0;
  text-align: left;
}

.session-list,
.contact-list {
  padding-top: 10px;
}

.contact-candidate-list {
  max-height: min(430px, calc(100vh - 190px));
  overflow: auto;
}

.contact-candidate-item small,
.contact-empty {
  color: var(--muted);
}

.session-item small,
.contact-item small,
.contact-candidate-item small {
  display: block;
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-item > span:not(.avatar),
.contact-item > span:not(.avatar),
.contact-candidate-item > span:not(.avatar) {
  flex: 1 1 auto;
  min-width: 0;
}

#me-panel > .profile-card {
  margin-top: 10px;
}

#me-panel > .full {
  margin: 10px 0;
}

.chat-style-card {
  margin-bottom: 14px;
  padding: 12px;
}

.sticker-manager-card {
  margin-bottom: 14px;
  padding: 12px;
}

.identity-card {
  margin-top: 10px;
  padding: 12px;
}

.identity-card .mask-list {
  margin-top: 10px;
}

.identity-card .full {
  margin-top: 10px;
}

.identity-option {
  width: 100%;
  padding: 10px 12px;
  border-color: var(--theme-accent-soft);
  color: var(--text);
  text-align: left;
}

.identity-option strong {
  color: var(--theme-strong-text);
}

.identity-option p {
  margin: 4px 0 0;
}

.identity-option.active {
  border-color: var(--theme-accent-mid);
  background: var(--theme-accent-button);
  box-shadow: inset 0 0 0 1px var(--theme-accent-soft);
}

.identity-empty {
  margin: 0;
  padding: 10px 2px 2px;
  font-size: calc(var(--base-font-size) - 2px);
}

.identity-card summary,
.chat-style-card summary,
.sticker-manager-card summary {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--theme-strong-text);
  font-weight: 760;
  list-style: none;
  cursor: pointer;
}

.identity-card summary::-webkit-details-marker,
.chat-style-card summary::-webkit-details-marker,
.sticker-manager-card summary::-webkit-details-marker {
  display: none;
}

.identity-card summary::after,
.chat-style-card summary::after,
.sticker-manager-card summary::after {
  content: "›";
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--theme-strong-text);
  background: var(--button-pink);
  transform: rotate(90deg);
  transition: transform 160ms ease;
}

.identity-card[open] summary,
.chat-style-card[open] summary,
.sticker-manager-card[open] summary {
  margin-bottom: 10px;
}

.identity-card[open] summary::after,
.chat-style-card[open] summary::after,
.sticker-manager-card[open] summary::after {
  transform: rotate(-90deg);
}

.contact-category-filter {
  padding: 2px 0;
}

.avatar {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 17px;
  overflow: hidden;
  color: #43605b;
  background: linear-gradient(145deg, rgba(222, 238, 234, 0.95), rgba(255, 255, 255, 0.7));
  font-weight: 800;
}

.session-item.has-unread .avatar::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: var(--theme-accent-mid);
  box-shadow: 0 4px 10px rgba(70, 62, 68, 0.14);
}

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

.avatar-empty {
  color: transparent;
  background: linear-gradient(145deg, rgba(214, 218, 221, 0.82), rgba(244, 246, 247, 0.72));
  box-shadow: inset 0 0 0 1px rgba(132, 140, 146, 0.12);
}

small,
.muted {
  color: var(--muted);
}

.conversation {
  min-height: 0;
  height: auto;
  overflow: auto;
  padding: 16px 14px;
  scrollbar-width: none;
}

.conversation::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.conversation-settings-page {
  height: 100%;
  overflow: auto;
}

.conversation-settings-list {
  padding: 14px;
  overflow: visible;
}

.conversation-person-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.conversation-settings-page .list-card {
  padding: 14px;
}

.conversation-settings-page .switch-row:first-child {
  margin-top: 0;
}

.conversation-avatar-settings {
  position: relative;
  z-index: 50;
  display: grid;
  gap: 14px;
  overflow: visible;
}

.conversation-background-field {
  position: relative;
}

.conversation-style-settings {
  display: grid;
  gap: 8px;
}

.chat-style-select-setting {
  position: relative;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 2px);
  font-weight: 700;
}

.chat-style-select-trigger {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 16px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.58);
  color: var(--theme-strong-text);
  font: inherit;
  font-size: calc(var(--base-font-size) - 1px);
  font-weight: 730;
}

.chat-style-select-options {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36), 0 12px 28px rgba(70, 62, 68, 0.1);
}

.chat-style-select-options.hidden-form {
  display: none;
}

.chat-style-select-option {
  min-height: 36px;
  border: 0;
  border-radius: 14px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: calc(var(--base-font-size) - 1px);
  font-weight: 700;
  text-align: left;
}

.chat-style-select-option.active,
.chat-style-select-option:hover {
  background: var(--theme-accent-button);
  color: var(--theme-strong-text);
}

.background-picker {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 18px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--theme-strong-text);
  text-align: left;
}

.background-thumb {
  height: 58px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(226, 221, 224, 0.68)),
    var(--theme-accent-button);
  background-size: cover;
  background-position: center;
}

.background-picker small {
  color: var(--muted);
  font-weight: 700;
}

.conversation.has-chat-background {
  background-size: cover;
  background-position: center;
}

.chat-history-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.chat-history-card summary {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  cursor: pointer;
}

.chat-history-card summary::-webkit-details-marker {
  display: none;
}

.chat-history-card summary::after {
  content: "›";
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--theme-strong-text);
  background: var(--button-pink);
  transform: rotate(90deg);
  transition: transform 160ms ease;
}

.chat-history-card[open] summary::after {
  transform: rotate(-90deg);
}

.history-weekdays,
.history-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.history-weekdays {
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 4px);
  text-align: center;
}

.history-month-row {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 6px;
}

.history-month-row strong {
  font-size: calc(var(--base-font-size) - 1px);
  text-align: center;
}

.history-month-row .top-icon {
  width: 34px;
  height: 34px;
  font-size: calc(var(--base-font-size) + 4px);
}

.history-day {
  height: 28px;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: rgba(112, 119, 125, 0.58);
  font-size: calc(var(--base-font-size) - 3px);
}

.history-day.blank {
  border: 0;
  background: transparent;
}

.history-day.has-chat {
  color: #6b3f50;
  font-weight: 800;
  background: transparent;
}

.history-day.active {
  border-color: var(--theme-accent-mid);
  background: var(--theme-accent-button);
  box-shadow: inset 0 0 0 1px var(--theme-accent-soft);
}

.history-hint {
  margin: 4px 0 0;
  font-size: calc(var(--base-font-size) - 3px);
  text-align: center;
}

.history-result {
  position: relative;
  width: 100%;
  border: 1px solid var(--theme-accent-soft);
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--text);
  text-align: left;
  touch-action: manipulation;
}

.history-result p {
  margin: 4px 0 0;
  line-height: 1.45;
  white-space: pre-wrap;
}

.history-hint {
  margin: 0;
  color: rgba(112, 119, 125, 0.76);
  font-size: calc(var(--base-font-size) - 2px);
  text-align: center;
}

.history-dialog-card {
  position: relative;
  max-height: min(560px, calc(100vh - 72px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.history-dialog-list {
  position: relative;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding-right: 2px;
}

#chat-history-dialog {
  max-width: calc(100% - 28px);
  max-height: calc(100% - 28px);
  overflow: clip !important;
  scrollbar-width: none !important;
}

#chat-history-dialog::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

#chat-history-dialog .dialog-card {
  overflow: clip;
}

.history-action-menu {
  position: absolute;
  z-index: 80;
  min-width: 144px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--theme-accent-mid);
  border-radius: 18px;
  background: var(--theme-menu);
  box-shadow: 0 16px 38px rgba(70, 62, 68, 0.14);
  backdrop-filter: blur(20px);
}

.history-action-menu.hidden-form {
  display: none;
}

.history-action-menu button {
  min-height: 34px;
  border: 0;
  border-radius: 12px;
  padding: 0 10px;
  background: var(--button-pink);
  color: var(--theme-strong-text);
  text-align: left;
}

.message-action-menu {
  position: absolute;
  z-index: 90;
  min-width: 128px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--theme-accent-mid);
  border-radius: 18px;
  background: var(--theme-menu);
  box-shadow: 0 16px 38px rgba(70, 62, 68, 0.14);
  backdrop-filter: blur(20px);
}

.message-action-menu.hidden-form {
  display: none;
}

.message-action-menu button {
  min-height: 34px;
  border: 0;
  border-radius: 12px;
  padding: 0 10px;
  background: var(--button-pink);
  color: var(--theme-strong-text);
  text-align: left;
}

.message-focus .bubble {
  box-shadow: 0 0 0 2px var(--theme-accent-soft), 0 14px 28px rgba(88, 74, 82, 0.13);
  transition: box-shadow 180ms ease;
}

.message {
  max-width: 78%;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.message.has-avatar {
  max-width: 90%;
}

.message.user {
  margin-left: auto;
  justify-content: flex-end;
}

.message.system {
  max-width: 100%;
  justify-content: center;
}

.chat-message-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 13px;
  font-size: calc(var(--base-font-size) - 2px);
  box-shadow: 0 8px 18px rgba(60, 68, 74, 0.08);
}

.bubble {
  padding: 10px 13px;
  border-radius: 18px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(14px);
}

.message-content {
  display: block;
}

.chat-action-card {
  min-width: min(210px, 62vw);
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.chat-action-card > span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--theme-strong-text);
  font-weight: 800;
}

.chat-action-card strong,
.chat-action-card small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-action-card strong {
  color: var(--theme-strong-text);
  font-size: calc(var(--base-font-size) + 1px);
}

.chat-action-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 2px);
}

.message-quote,
.composer-quote {
  border-left: 3px solid var(--theme-accent-mid);
  background: rgba(255, 255, 255, 0.42);
}

.message-quote {
  margin-bottom: 7px;
  padding: 6px 8px;
  border-radius: 10px;
  color: var(--muted);
}

.message-quote small,
.composer-quote small {
  display: block;
  margin-bottom: 2px;
  color: var(--theme-strong-text);
  font-size: calc(var(--base-font-size) - 3px);
  font-weight: 700;
}

.message-quote p,
.composer-quote p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 2px);
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message.user .bubble {
  color: #213b37;
  background: rgba(218, 235, 230, 0.78);
  border-bottom-right-radius: 6px;
}

.message.ai .bubble {
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-bottom-left-radius: 6px;
}

.message.system .bubble {
  max-width: 92%;
  padding: 4px 8px;
  color: rgba(112, 119, 125, 0.72);
  background: transparent;
  font-size: calc(var(--base-font-size) - 3px);
  line-height: 1.35;
}

.composer {
  min-height: 92px;
  padding: 9px 10px 18px;
  border-top: 1px solid var(--line);
  background: rgba(250, 251, 249, 0.5);
  backdrop-filter: blur(20px);
}

textarea,
input,
select {
  width: 100%;
  padding: 11px 12px;
  outline: none;
}

input[type="range"] {
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  accent-color: var(--theme-accent-mid);
  appearance: none;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 3px rgba(96, 86, 92, 0.08);
}

input[type="range"]::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: var(--theme-accent-mid);
  box-shadow: 0 8px 18px rgba(84, 74, 80, 0.16);
  -webkit-appearance: none;
}

input[type="range"]::-moz-range-track {
  height: 8px;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 3px rgba(96, 86, 92, 0.08);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: var(--theme-accent-mid);
  box-shadow: 0 8px 18px rgba(84, 74, 80, 0.16);
}

textarea {
  resize: none;
}

.composer textarea {
  min-height: 36px;
  max-height: 96px;
  padding: 8px 10px;
  line-height: 1.35;
  font-size: calc(var(--base-font-size) - 1px);
}

.composer-main {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px;
}

.composer-plus {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 50%;
  background: var(--button-pink);
  color: var(--theme-strong-text);
  font-size: calc(var(--base-font-size) + 5px);
  line-height: 1;
  backdrop-filter: blur(18px);
}

.composer-plus.active {
  background: var(--theme-accent-button);
  transform: rotate(45deg);
}

.composer-send-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.composer-send-actions .ai-button,
.composer-send-actions .primary-button {
  min-height: 34px;
  border-radius: 14px;
  font-size: calc(var(--base-font-size) - 2px);
  white-space: nowrap;
}

.composer-send-actions .ai-button {
  min-width: 34px;
  width: 34px;
  padding: 0;
  font-size: calc(var(--base-font-size) + 1px);
}

.composer-send-actions .primary-button {
  min-width: 44px;
  padding: 0 9px;
}

.composer-quote {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px 8px 8px 10px;
  border-radius: 14px;
}

.composer-quote.hidden-form {
  display: none;
}

.composer-quote button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-size: calc(var(--base-font-size) + 4px);
  line-height: 1;
}

.composer-actions,
.toolbar-row,
.row {
  gap: 8px;
  margin-top: 8px;
}

.composer-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 12px 10px;
  margin: 10px -2px 0;
  padding: 12px 8px 2px;
  border-top: 1px solid rgba(120, 128, 134, 0.12);
  background: rgba(255, 255, 255, 0.18);
  scrollbar-width: none;
}

.composer-actions::-webkit-scrollbar {
  display: none;
}

.composer-tool {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  text-align: center;
}

.composer-tool-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 8px 18px rgba(60, 68, 74, 0.07);
  color: var(--theme-strong-text);
  position: relative;
  backdrop-filter: blur(16px);
}

.composer-tool-icon::before {
  content: "";
  width: 23px;
  height: 23px;
  display: block;
  background: currentColor;
  opacity: 0.86;
  -webkit-mask: var(--composer-mask) center / contain no-repeat;
  mask: var(--composer-mask) center / contain no-repeat;
}

.composer-icon-voice {
  --composer-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v2.4a2 2 0 0 1-2.2 2 18.5 18.5 0 0 1-8.1-2.9 18 18 0 0 1-5.6-5.6A18.5 18.5 0 0 1 3.2 4.2 2 2 0 0 1 5.2 2h2.4a2 2 0 0 1 2 1.7c.1.8.3 1.6.6 2.3a2 2 0 0 1-.45 2.1L8.8 9.05a14.4 14.4 0 0 0 6.15 6.15l.95-.95a2 2 0 0 1 2.1-.45c.75.25 1.5.45 2.3.55A2 2 0 0 1 22 16.9z'/%3E%3C/svg%3E");
}

.composer-icon-video {
  --composer-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='6' width='13' height='12' rx='2.2'/%3E%3Cpath d='m16.5 10 4-2.4v8.8l-4-2.4z'/%3E%3C/svg%3E");
}

.composer-icon-offline {
  --composer-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s7-4.6 7-11a7 7 0 1 0-14 0c0 6.4 7 11 7 11z'/%3E%3Ccircle cx='12' cy='10' r='2.4'/%3E%3C/svg%3E");
}

.composer-icon-sticker {
  --composer-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21a9 9 0 1 0-9-9 9 9 0 0 0 9 9z'/%3E%3Cpath d='M8.5 14.2c1.8 1.5 5.2 1.5 7 0'/%3E%3Cpath d='M8.7 9.2h.01M15.3 9.2h.01'/%3E%3C/svg%3E");
}

.composer-icon-memory {
  --composer-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6.5' y='6.5' width='11' height='11' rx='2'/%3E%3Cpath d='M4 9h2.5M4 15h2.5M17.5 9H20M17.5 15H20M9 4v2.5M15 4v2.5M9 17.5V20M15 17.5V20M10 12h4'/%3E%3C/svg%3E");
}

.composer-icon-transfer {
  --composer-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 4 5 7 5-7M12 11v9M8 13h8M8 16h8'/%3E%3C/svg%3E");
}

.composer-icon-red-packet {
  --composer-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='2.5'/%3E%3Cpath d='M5 8.5c3.4 2.5 10.6 2.5 14 0M9 14h6M12 11v7'/%3E%3C/svg%3E");
}

.composer-icon-location {
  --composer-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s7-4.6 7-11a7 7 0 1 0-14 0c0 6.4 7 11 7 11z'/%3E%3Cpath d='M12 7v6M9 10h6'/%3E%3C/svg%3E");
}

.composer-icon-image {
  --composer-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='14' rx='2.2'/%3E%3Ccircle cx='8.5' cy='10' r='1.4'/%3E%3Cpath d='m20.5 15-4.4-4.4L7 19'/%3E%3C/svg%3E");
}

.composer-tool:active .composer-tool-icon {
  background: var(--theme-accent-button);
  transform: scale(0.96);
}

.composer-tool small {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 1px);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sticker-panel {
  display: grid;
  gap: 9px;
  margin: 10px -2px 0;
  padding: 10px 6px 4px;
  border-top: 1px solid rgba(120, 128, 134, 0.12);
}

.sticker-panel.hidden-form {
  display: none;
}

.sticker-panel-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sticker-panel-tabs::-webkit-scrollbar {
  display: none;
}

.sticker-panel-tab {
  min-height: 30px;
  flex: 0 0 auto;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 999px;
  padding: 0 11px;
  background: var(--button-pink);
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 2px);
}

.sticker-panel-tab.active {
  background: var(--theme-accent-button);
  color: var(--theme-strong-text);
}

.sticker-panel-grid {
  max-height: 160px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  overflow: auto;
  scrollbar-width: none;
}

.sticker-panel-grid::-webkit-scrollbar {
  display: none;
}

.sticker-panel-item,
.sticker-import-item,
.sticker-manager-item {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 8px 18px rgba(60, 68, 74, 0.06);
}

.sticker-panel-item {
  aspect-ratio: 1;
  padding: 6px;
}

.sticker-panel-item img,
.sticker-import-item img,
.sticker-manager-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 11px;
}

.sticker-manager {
  display: grid;
  gap: 10px;
}

.sticker-manager-title {
  margin: 4px 0 0;
  color: var(--theme-strong-text);
  font-size: calc(var(--base-font-size) - 2px);
  font-weight: 760;
}

.sticker-album-import-list,
.sticker-manager-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.sticker-import-item {
  display: grid;
  gap: 4px;
  padding: 5px;
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 3px);
}

.sticker-import-item img {
  aspect-ratio: 1;
}

.sticker-manager-item {
  position: relative;
  aspect-ratio: 1;
  padding: 5px;
}

.sticker-manager-item button {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  min-height: 24px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: #8f5660;
  font-size: calc(var(--base-font-size) - 3px);
}

.sticker-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.36);
}

.quick-memory-panel {
  display: grid;
  gap: 9px;
  margin: 10px -2px 0;
  padding: 10px 6px 4px;
  border-top: 1px solid rgba(120, 128, 134, 0.12);
}

.quick-memory-panel.hidden-form {
  display: none;
}

.quick-memory-panel label {
  display: grid;
  grid-template-columns: auto 78px auto;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 2px);
  font-weight: 700;
}

.quick-memory-panel input,
.quick-memory-panel textarea,
.quick-memory-panel select {
  min-height: 34px;
  font-size: calc(var(--base-font-size) - 2px);
}

.quick-memory-panel textarea {
  max-height: 78px;
}

.quick-memory-panel .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.quick-memory-panel > small {
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 3px);
}

.post-composer,
.memory-form,
.settings-list details,
.moment-card,
.memory-item,
.list-card,
.empty-state {
  padding: 14px;
}

.hidden-form {
  display: none;
}

.offline-page {
  height: 100%;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
  overflow: auto;
}

.offline-scene-card,
.offline-action-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 10px 30px rgba(70, 62, 68, 0.08);
  backdrop-filter: blur(18px);
}

.offline-play-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.offline-play-head small {
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 3px);
  white-space: nowrap;
}

.offline-scene-card h2 {
  margin: 0;
}

.offline-scene-card p,
.offline-action-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.offline-action-card .offline-scene-text {
  color: var(--text);
  line-height: 1.7;
}

.offline-scene-note {
  display: block;
  color: var(--theme-strong-text);
  line-height: 1.45;
}

.offline-scene-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.92), transparent 1.3rem),
    linear-gradient(145deg, var(--theme-accent-button), rgba(255, 255, 255, 0.55));
  box-shadow: 0 10px 22px rgba(70, 62, 68, 0.1);
}

.offline-action-card strong {
  color: var(--theme-strong-text);
}

.offline-character-list {
  display: grid;
  gap: 8px;
}

.offline-character-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 17px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--text);
  text-align: left;
}

.offline-character-item > span:not(.avatar) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.offline-character-item small,
.offline-empty {
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 2px);
}

.offline-character-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 14px 6px;
}

.character-toolbar {
  justify-content: space-between;
  padding: 14px 14px 0;
  margin-top: 0;
}

.avatar-field {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  position: relative;
}

.avatar-picker {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  text-align: left;
}

.avatar-picker .avatar {
  width: 58px;
  height: 58px;
  border-radius: 20px;
}

.avatar-picker.has-avatar {
  color: var(--text);
}

.source-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 20;
  min-width: min(260px, 100%);
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--theme-accent-mid);
  border-radius: 24px;
  background: var(--theme-menu);
  box-shadow: 0 18px 42px rgba(70, 62, 68, 0.14);
  backdrop-filter: blur(22px);
}

.source-menu.hidden-form {
  display: none;
}

.source-menu label {
  margin-top: 2px;
  color: var(--theme-strong-text);
}

.source-option {
  min-height: 42px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 16px;
  padding: 0 10px;
  background: var(--button-pink);
  color: var(--theme-strong-text);
  text-align: left;
}

.source-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 10px;
  color: var(--theme-strong-text);
  background: rgba(255, 255, 255, 0.52);
}

.message-image-stack {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.message-image-stack img {
  width: min(210px, 100%);
  max-height: 260px;
  display: block;
  border-radius: 16px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.4);
}

.bubble-save-photo {
  min-height: 28px;
  margin-top: 8px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--button-pink);
  color: var(--theme-strong-text);
  font-size: calc(var(--base-font-size) - 2px);
}

.album-page {
  position: relative;
  height: 100%;
  overflow: auto;
  padding: 10px 12px 14px;
}

.album-add-menu {
  left: auto;
  right: 10px;
  top: 8px;
  z-index: 45;
}

.album-avatar-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(18px);
}

.album-avatar-panel.hidden-form {
  display: none;
}

.album-avatar-panel .full {
  width: auto;
  white-space: nowrap;
}

.album-filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 10px;
}

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

.album-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 10px 30px rgba(60, 68, 74, 0.08);
  backdrop-filter: blur(18px);
}

.album-card > img {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
  background: rgba(242, 244, 245, 0.7);
}

.album-card-meta {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 8px;
  display: grid;
  gap: 3px;
  padding: 7px 8px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(14px);
}

.album-card-meta strong,
.album-card-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-card-actions {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.album-card-actions .small-button {
  flex: 1 1 auto;
  min-width: 52px;
  min-height: 30px;
  padding: 0 7px;
  background: rgba(255, 248, 251, 0.76);
  font-size: calc(var(--base-font-size) - 2px);
}

.album-empty {
  grid-column: 1 / -1;
}

.call-app-page {
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 10px 12px 0;
  scrollbar-width: none;
}

.call-app-page::-webkit-scrollbar {
  display: none;
}

.call-panel {
  display: none;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-bottom: 14px;
  scrollbar-width: none;
}

.call-panel.active {
  display: grid;
  align-content: start;
}

.call-panel::-webkit-scrollbar {
  display: none;
}

.call-panel-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 4px;
}

.call-panel-title strong {
  color: var(--theme-strong-text);
  font-size: calc(var(--base-font-size) + 1px);
}

.call-list {
  display: grid;
  gap: 8px;
}

.call-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 36px 36px;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 10px 28px rgba(60, 68, 74, 0.07);
  backdrop-filter: blur(18px);
}

.call-row .avatar {
  width: 44px;
  height: 44px;
  border-radius: 16px;
}

.call-row-main {
  min-width: 0;
  display: grid;
  gap: 3px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.call-row-main strong,
.call-row-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-action-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 50%;
  background: var(--button-pink);
  color: var(--theme-strong-text);
  font-size: calc(var(--base-font-size) + 2px);
}

.call-empty {
  margin: 4px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.42);
}

.call-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 8px 8px 18px;
  border-top: 1px solid var(--line);
  background: rgba(250, 251, 249, 0.62);
  backdrop-filter: blur(18px);
}

.call-tab {
  min-height: 44px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: transparent;
  color: var(--muted);
  font: inherit;
}

.call-tab span {
  font-size: calc(var(--base-font-size) + 3px);
  line-height: 1;
}

.call-tab small {
  font-size: calc(var(--base-font-size) - 3px);
}

.call-tab.active {
  border-color: var(--theme-accent-soft);
  background: var(--theme-accent-button);
  color: var(--theme-strong-text);
}

.danger-option {
  color: #8f5660;
}

.wallpaper-upload-panel {
  position: relative;
  display: grid;
  gap: 10px;
  margin-top: 12px;
  min-height: 74px;
  padding: 14px 16px;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.34);
}

.wallpaper-picker {
  width: 100%;
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  text-align: left;
}

.wallpaper-thumb {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border: 1px solid rgba(180, 188, 192, 0.16);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(226, 231, 232, 0.86), rgba(249, 250, 250, 0.76));
  background-size: cover;
  background-position: center;
}

.app-icon-custom-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.icon-custom-button {
  display: grid;
  justify-items: center;
  gap: 6px;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 18px;
  padding: 9px 6px;
  background: var(--button-pink);
  color: var(--text);
}

.icon-custom-button.active {
  border-color: var(--theme-accent-mid);
  background: var(--theme-accent-button);
}

.mini-icon-tile {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--app-icon-radius);
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 8px 18px rgba(60, 68, 74, 0.08);
}

.mini-icon-tile .glyph {
  width: 23px;
  height: 23px;
}

.mini-icon-tile img {
  width: 74%;
  height: 74%;
  object-fit: cover;
  border-radius: max(5px, calc(var(--app-icon-radius) - 6px));
}

.icon-custom-button small {
  max-width: 100%;
  font-size: calc(var(--base-font-size) - 3px);
  line-height: 1.2;
  text-align: center;
}

#appearance-icon-tools {
  position: static;
  margin-top: 10px;
}

.character-create-page {
  margin: 14px;
}

.character-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.character-card-main {
  min-width: 0;
}

.character-card .glass-button {
  grid-column: 2;
  justify-self: start;
}

.category-chip {
  min-height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 999px;
  padding: 0 12px;
  background: var(--button-pink);
  color: var(--muted);
}

.category-chip.active {
  color: var(--theme-strong-text);
  border-color: var(--theme-accent-mid);
  background: var(--theme-accent-button);
}

.settings-list details {
  min-height: 54px;
  padding: 0;
  overflow: visible;
}

.settings-list details[open] {
  padding-bottom: 14px;
}

.settings-list summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  position: sticky;
  top: 0;
  z-index: 2;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(18px);
}

.settings-list details > label,
.settings-list details > .row,
.settings-list details > .api-preset-picker,
.settings-list details > .api-preset-editor,
.settings-list details > .api-section-title,
.settings-list details > .preset-grid,
.settings-list details > .glass-button {
  display: grid;
  margin-left: 14px;
  margin-right: 14px;
}

#settings-app .settings-list details > .glass-button.full {
  width: auto;
}

.api-section-title {
  margin-top: 14px;
  margin-bottom: 2px;
  color: var(--theme-strong-text);
  font-size: calc(var(--base-font-size) - 1px);
  font-weight: 720;
  letter-spacing: 0;
}

.api-preset-picker {
  position: relative;
  z-index: 30;
  gap: 7px;
}

.api-preset-picker > span {
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 2px);
  font-weight: 700;
}

.api-preset-trigger {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 16px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.58);
  color: var(--theme-strong-text);
  font: inherit;
  font-weight: 700;
}

.api-preset-trigger.empty {
  color: var(--muted);
}

.picker-chevron {
  color: var(--muted);
  font-size: calc(var(--base-font-size) + 1px);
}

.api-preset-options {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 35;
  max-height: 190px;
  overflow: auto;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 32px rgba(82, 74, 78, 0.13);
  backdrop-filter: blur(18px);
  scrollbar-width: none;
}

.api-preset-options.hidden-form {
  display: none;
}

.api-preset-options::-webkit-scrollbar {
  display: none;
}

.api-preset-option {
  min-height: 36px;
  border: 0;
  border-radius: 12px;
  padding: 0 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
}

.api-preset-option.active,
.api-preset-option:hover {
  background: var(--theme-accent-button);
  color: var(--theme-strong-text);
}

.api-preset-editor {
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
}

.settings-list details > .api-preset-editor.hidden-form {
  display: none;
}

.chat-style-category-filter {
  margin-bottom: 10px;
  padding-bottom: 2px;
  overflow-x: auto;
}

.chat-style-preset-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.chat-style-preset-card {
  min-height: 44px;
  display: flex;
  align-items: center;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 16px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--text);
  text-align: left;
  backdrop-filter: blur(14px);
}

.chat-style-preset-card span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.chat-style-preset-card strong,
.chat-style-preset-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-style-preset-card strong {
  color: var(--theme-strong-text);
  font-size: calc(var(--base-font-size) - 1px);
}

.chat-style-preset-card small {
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 3px);
}

.chat-style-preset-card.active {
  border-color: var(--theme-accent-mid);
  background: var(--theme-accent-button);
}

.chat-style-empty {
  margin: 0;
  padding: 8px 2px;
  font-size: calc(var(--base-font-size) - 2px);
}

.chat-style-editor {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(18px);
}

.chat-style-editor label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 2px);
  font-weight: 700;
}

.chat-style-editor textarea {
  min-height: 132px;
  resize: vertical;
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: calc(var(--base-font-size) - 2px);
  line-height: 1.55;
}

.chat-style-preview {
  overflow: hidden;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 20px;
  background: rgba(250, 251, 249, 0.58);
}

.chat-style-preview .preview-conversation {
  height: auto;
  min-height: 148px;
  display: grid;
  align-content: end;
  gap: 10px;
  overflow: hidden;
  padding: 14px 12px;
}

.chat-style-preview .preview-composer {
  min-height: 58px;
  padding: 8px 10px 10px;
}

.chat-style-preview .preview-composer textarea {
  min-height: 36px;
  resize: none;
}

.chat-style-preview .message {
  margin-bottom: 0;
}

.chat-style-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.settings-list {
  min-height: 100%;
  height: auto;
  overflow: visible;
  padding: 14px 14px 88px;
  align-content: start;
}

#settings-app #save-settings-btn {
  position: sticky;
  bottom: 12px;
  z-index: 3;
  min-height: 48px;
  box-shadow: 0 14px 32px rgba(73, 93, 90, 0.2);
}

#settings-app,
#appearance-app,
#memory-app,
#worldbook-app,
#character-create-app,
#album-app {
  overflow: auto;
}

#appearance-app,
.appearance-page,
.appearance-page .settings-list {
  scrollbar-width: none !important;
  -ms-overflow-style: none;
}

#settings-app,
#appearance-app,
#memory-app,
#worldbook-app,
#character-create-app,
#album-app,
.album-page,
.conversation-settings-page,
.history-dialog-list,
.conversation,
.chat-panel,
.char-section {
  scrollbar-width: none;
}

#appearance-app::-webkit-scrollbar,
.appearance-page::-webkit-scrollbar,
.appearance-page .settings-list::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

#settings-app::-webkit-scrollbar,
#appearance-app::-webkit-scrollbar,
#memory-app::-webkit-scrollbar,
#worldbook-app::-webkit-scrollbar,
#character-create-app::-webkit-scrollbar,
#album-app::-webkit-scrollbar,
.album-page::-webkit-scrollbar,
.conversation-settings-page::-webkit-scrollbar,
.history-dialog-list::-webkit-scrollbar,
.conversation::-webkit-scrollbar,
.chat-panel::-webkit-scrollbar,
.char-section::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

#settings-app::-webkit-scrollbar-thumb,
#appearance-app::-webkit-scrollbar-thumb,
#memory-app::-webkit-scrollbar-thumb,
#worldbook-app::-webkit-scrollbar-thumb,
#character-create-app::-webkit-scrollbar-thumb,
#album-app::-webkit-scrollbar-thumb,
.album-page::-webkit-scrollbar-thumb,
.conversation::-webkit-scrollbar-thumb,
.chat-panel::-webkit-scrollbar-thumb,
.char-section::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(80, 88, 94, 0.14);
}

#settings-app::-webkit-scrollbar-button,
#appearance-app::-webkit-scrollbar-button,
#memory-app::-webkit-scrollbar-button,
#worldbook-app::-webkit-scrollbar-button,
#character-create-app::-webkit-scrollbar-button,
#album-app::-webkit-scrollbar-button,
.album-page::-webkit-scrollbar-button,
.conversation::-webkit-scrollbar-button,
.chat-panel::-webkit-scrollbar-button,
.char-section::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

#settings-app::-webkit-scrollbar-track,
#appearance-app::-webkit-scrollbar-track,
#memory-app::-webkit-scrollbar-track,
#worldbook-app::-webkit-scrollbar-track,
#character-create-app::-webkit-scrollbar-track,
#album-app::-webkit-scrollbar-track,
.album-page::-webkit-scrollbar-track,
.conversation::-webkit-scrollbar-track,
.chat-panel::-webkit-scrollbar-track,
.char-section::-webkit-scrollbar-track {
  background: transparent;
}

summary {
  cursor: pointer;
  font-weight: 700;
}

label {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  color: #555d62;
  font-size: calc(var(--base-font-size) - 1px);
}

.switch-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.switch-row input {
  width: 44px;
  height: 24px;
  appearance: none;
  padding: 0;
  border-radius: 999px;
  background: rgba(155, 162, 166, 0.28);
  position: relative;
}

.switch-row input::after {
  position: absolute;
  content: "";
  width: 18px;
  height: 18px;
  left: 3px;
  top: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(36, 42, 46, 0.16);
  transition: transform 160ms ease;
}

.switch-row input:checked {
  background: var(--theme-accent-mid);
}

.switch-row input:checked::after {
  transform: translateX(19px);
}

.mini-app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 14px;
}

.mini-app {
  min-height: 48px;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 16px;
  background: var(--button-pink);
}

.char-section {
  display: none;
  height: calc(100% - 76px);
  overflow: auto;
  padding: 0 14px 18px;
}

.char-section.active {
  display: grid;
  align-content: start;
  gap: 10px;
}

.player-card {
  margin: 14px;
  padding: 20px;
  text-align: center;
}

.disc {
  width: 138px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  color: white;
  background:
    radial-gradient(circle at center, #f8faf8 0 9%, transparent 10%),
    conic-gradient(#27312f, #89aaa2, #f0e9dd, #27312f);
  box-shadow: 0 20px 42px rgba(48, 57, 59, 0.16);
  font-size: calc(var(--base-font-size) + 22px);
}

.music-controls {
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.playlist {
  padding: 0 14px 18px;
}

.music-page {
  height: 100%;
  overflow: auto;
  padding-bottom: 16px;
}

.music-actions,
.music-search-row,
.music-connect-row {
  display: grid;
  gap: 8px;
  margin: 10px 14px 0;
}

.music-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 12px 0 0;
}

.music-search-row,
.music-connect-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.music-connect-row input,
.music-search-row input {
  min-height: 38px;
}

.music-section {
  margin: 14px 14px 0;
}

.music-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.music-section-title strong {
  color: var(--theme-strong-text);
}

.music-section-title small {
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 3px);
}

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

.music-playlist-card {
  min-height: 112px;
  display: grid;
  align-content: start;
  gap: 7px;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 20px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--text);
  text-align: left;
  backdrop-filter: blur(16px);
}

.music-playlist-card.active {
  border-color: var(--theme-accent-mid);
  background: var(--theme-accent-button);
}

.playlist-cover {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.92), transparent 34px),
    linear-gradient(145deg, var(--theme-accent-button), rgba(255, 255, 255, 0.72));
  color: var(--theme-strong-text);
  font-weight: 800;
}

.music-playlist-card strong,
.music-playlist-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-playlist-card small {
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 3px);
}

.music-result-list {
  display: grid;
  gap: 8px;
}

.music-song-row {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--theme-accent-soft);
  border-radius: 16px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.46);
  color: var(--text);
  text-align: left;
  backdrop-filter: blur(14px);
}

.music-song-row.active {
  border-color: var(--theme-accent-mid);
  background: var(--theme-accent-button);
}

.song-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--theme-strong-text);
  font-weight: 800;
}

.music-song-row span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.music-song-row strong,
.music-song-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-song-row small,
.music-empty {
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 2px);
}

.music-empty {
  margin: 0;
  padding: 10px 2px;
}

.netease-home {
  min-height: 100%;
}

.music-page {
  background: linear-gradient(180deg, rgba(248, 249, 252, 0.82), rgba(244, 247, 251, 0.56));
  padding: 10px 0 132px;
}

.music-home-header {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 8px;
  padding: 0 14px 10px;
}

.music-icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #111827;
  font-size: calc(var(--base-font-size) + 10px);
}

.music-channel-tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  justify-content: space-between;
  gap: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.music-channel-tabs::-webkit-scrollbar {
  display: none;
}

.music-channel-tabs button {
  position: relative;
  border: 0;
  padding: 8px 0;
  background: transparent;
  color: #8b8f98;
  font-size: calc(var(--base-font-size) + 3px);
  font-weight: 760;
  white-space: nowrap;
}

.music-channel-tabs button.active {
  color: #111827;
}

.music-channel-tabs button.active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: #111827;
}

.music-search-row {
  margin: 0 14px 12px;
  display: block;
}

.music-search-row input {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(148, 153, 162, 0.14);
}

.music-connect-row {
  margin: 0 14px 12px;
}

.music-feature-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(142px, 46%);
  gap: 10px;
  overflow-x: auto;
  padding: 0 14px 20px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.music-feature-rail::-webkit-scrollbar {
  display: none;
}

.music-feature-card {
  min-height: 150px;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 7px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: rgba(255, 255, 255, 0.7);
  color: #111827;
  text-align: left;
  scroll-snap-align: start;
}

.feature-cover {
  min-height: 96px;
  display: grid;
  place-items: start;
  padding: 12px;
  background-size: cover;
  background-position: center;
  color: #fff;
  font-size: calc(var(--base-font-size) + 12px);
  font-weight: 900;
}

.feature-cover:not(.has-cover-image) {
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.6), transparent 34px),
    linear-gradient(135deg, #d7c7bd, #8998b9 58%, #2c3148);
}

.music-feature-card strong,
.music-feature-card small {
  padding: 0 10px;
}

.music-feature-card strong {
  font-size: calc(var(--base-font-size) + 3px);
  font-weight: 850;
}

.music-feature-card small {
  padding-bottom: 10px;
  color: #f8fafc;
  color: rgba(17, 24, 39, 0.66);
  font-size: calc(var(--base-font-size) - 2px);
}

.music-section {
  margin: 0;
  padding: 0 14px 22px;
}

.music-section-title {
  margin-bottom: 12px;
}

.music-section-title strong {
  color: #111827;
  font-size: calc(var(--base-font-size) + 6px);
  font-weight: 900;
}

.music-playlist-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(112px, 31%);
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.music-playlist-grid::-webkit-scrollbar {
  display: none;
}

.music-playlist-card {
  min-height: 0;
  display: grid;
  gap: 7px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.music-playlist-card.active {
  background: transparent;
}

.music-playlist-card .playlist-cover {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  color: #fff;
  font-size: calc(var(--base-font-size) + 10px);
  box-shadow: 0 10px 24px rgba(46, 52, 59, 0.1);
}

.music-playlist-card .playlist-cover:not(.has-cover-image) {
  background:
    radial-gradient(circle at 22% 18%, rgba(255,255,255,.62), transparent 38px),
    linear-gradient(145deg, #c8b9b0, #9eb7c7 55%, #59616d);
}

.music-playlist-card strong {
  display: -webkit-box;
  overflow: hidden;
  color: #1f2937;
  font-size: calc(var(--base-font-size) - 1px);
  line-height: 1.28;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.music-playlist-card small {
  color: #8b8f98;
}

.music-playlist-detail {
  margin: 0 14px 22px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 12px 28px rgba(51, 59, 67, 0.08);
  backdrop-filter: blur(16px);
}

.playlist-detail-head {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.playlist-detail-cover {
  width: 78px;
  height: 78px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
}

.playlist-detail-head strong {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: calc(var(--base-font-size) + 2px);
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-detail-head p {
  margin: 4px 0 8px;
  overflow: hidden;
  color: #7d838d;
  font-size: calc(var(--base-font-size) - 2px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-detail-tracks {
  display: grid;
  gap: 6px;
}

.music-result-list,
.playlist {
  display: grid;
  gap: 8px;
  padding: 0;
}

.music-song-row {
  min-height: 54px;
  border: 0;
  border-radius: 0;
  padding: 4px 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.music-song-row.active {
  background: transparent;
}

.song-index {
  background-size: cover;
  background-position: center;
  color: #6b7280;
  font-size: calc(var(--base-font-size) - 1px);
}

.song-index.has-cover-image {
  color: transparent;
}

.music-song-row strong {
  color: #111827;
  font-size: calc(var(--base-font-size) + 1px);
  font-weight: 760;
}

.music-song-row small {
  color: #8b8f98;
  font-size: calc(var(--base-font-size) - 2px);
}

.music-mini-player {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 62px;
  z-index: 8;
  min-height: 58px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 34px 44px 34px;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 10px 6px 6px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 40px rgba(46, 52, 59, 0.14);
  backdrop-filter: blur(22px);
}

.mini-cover {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #111827 0 8px, transparent 9px),
    conic-gradient(#101827, #9aa4b3, #f1f5f9, #101827);
  background-size: cover;
  background-position: center;
  color: #fff;
  font-size: calc(var(--base-font-size) + 2px);
  font-weight: 900;
}

.mini-cover.has-cover-image {
  color: transparent;
}

.music-mini-player div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.music-mini-player strong,
.music-mini-player small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-mini-player strong {
  color: #111827;
  font-size: var(--base-font-size);
}

.music-mini-player small {
  color: #6b7280;
  font-size: calc(var(--base-font-size) - 3px);
}

.mini-play {
  min-width: 0;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #111827;
  font-size: calc(var(--base-font-size) + 2px);
  font-weight: 900;
}

#play-song-btn.mini-play {
  border: 1px solid rgba(17, 24, 39, 0.12);
  font-size: calc(var(--base-font-size) + 1px);
}

.music-bottom-tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 7;
  height: 76px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  padding: 0 10px 12px;
  background: rgba(248, 250, 252, 0.88);
  backdrop-filter: blur(22px);
}

.music-bottom-tabs button {
  border: 0;
  background: transparent;
  color: #8b8f98;
  font-size: calc(var(--base-font-size) - 1px);
  font-weight: 760;
}

.music-bottom-tabs button.active {
  color: #111827;
}

.music-actions {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 124px;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

dialog {
  width: min(360px, calc(100% - 28px));
  border: 0;
  padding: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(42, 47, 50, 0.22);
  backdrop-filter: blur(6px);
}

.dialog-card,
.call-card {
  padding: 18px;
}

.dialog-header {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.api-replace-card p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.55;
}

.api-replace-card .row {
  grid-template-columns: 1fr 1fr;
}

.app-confirm-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.app-confirm-actions {
  grid-template-columns: 1fr 1fr;
}

.composer-action-card {
  display: grid;
  gap: 12px;
}

.composer-action-panel {
  display: grid;
  gap: 10px;
}

.composer-action-panel.hidden-form {
  display: none;
}

.composer-action-panel label {
  display: grid;
  gap: 6px;
  color: var(--theme-strong-text);
  font-weight: 720;
}

.composer-action-panel input {
  width: 100%;
  min-height: 42px;
  font-size: calc(var(--base-font-size) + 1px);
}

.composer-action-panel small {
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 2px);
  line-height: 1.45;
}

.composer-action-footer {
  grid-template-columns: 1fr 1fr;
}

.composer-image-preview {
  min-height: 88px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.35);
}

.composer-image-preview:empty::before {
  content: "还没有选择图片";
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 72px;
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 2px);
}

.composer-image-preview img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(70, 62, 68, 0.08);
}

.context-length-setting {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.context-length-setting > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  font-weight: 650;
}

.context-length-setting small {
  color: var(--muted);
  font-size: calc(var(--base-font-size) - 2px);
  font-weight: 650;
}

.call-orb {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  margin: 18px auto 12px;
  border-radius: 36px;
  color: #fff;
  background: linear-gradient(145deg, #88aaa3, #5e8580);
  font-size: calc(var(--base-font-size) + 20px);
}

.local-video {
  width: 100%;
  max-height: 260px;
  border-radius: 22px;
  object-fit: cover;
  background: #1f2424;
}

.call-log {
  display: grid;
  gap: 8px;
  max-height: 190px;
  overflow: auto;
  margin-top: 12px;
}

.call-line {
  padding: 9px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  color: #555d62;
  font-size: calc(var(--base-font-size) - 1px);
}

.home-indicator {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 30;
  width: 92px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(35, 38, 41, 0.2);
  transform: translateX(-50%);
}

/* Grey-pink theme refinement */
:root {
  --text: #292629;
  --desktop-icon-color: #72686d;
  --muted: #80777d;
  --line: rgba(118, 105, 113, 0.18);
  --glass: rgba(248, 247, 247, 0.58);
  --glass-strong: rgba(250, 248, 249, 0.78);
  --shadow: 0 24px 70px rgba(54, 49, 53, 0.15);
  --soft-warm: rgba(220, 207, 213, 0.38);
  --accent: #d7c0c9;
  --accent-strong: #aa8795;
  --button-pink: rgba(234, 224, 229, 0.68);
  --button-pink-strong: rgba(221, 203, 212, 0.78);
  --danger: #a8676e;
  --theme-body-a: #dedddd;
  --theme-body-b: #f0ecee;
  --theme-body-c: #dad6d8;
  --theme-phone: #f3f1f2;
  --theme-wall-a: #f4f2f3;
  --theme-wall-b: #e7e4e6;
  --theme-wall-c: #f2eef0;
  --theme-accent-soft: rgba(185, 154, 167, 0.22);
  --theme-accent-mid: rgba(185, 154, 167, 0.52);
  --theme-accent-button: rgba(230, 221, 225, 0.74);
  --theme-user-bubble: rgba(227, 213, 220, 0.82);
  --theme-menu: rgba(246, 242, 244, 0.92);
  --theme-strong-text: #67545d;
}

body {
  background:
    radial-gradient(circle at 24% 10%, rgba(255, 255, 255, 0.8), transparent 27rem),
    linear-gradient(145deg, var(--theme-body-a), var(--theme-body-b) 52%, var(--theme-body-c));
}

.phone {
  border-color: rgba(255, 255, 255, 0.72);
  background: var(--theme-phone);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(70, 62, 68, 0.07);
}

.wallpaper {
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.84), transparent 10.5rem),
    radial-gradient(circle at 82% 10%, rgba(222, 213, 218, 0.84), transparent 13rem),
    radial-gradient(circle at 68% 86%, var(--theme-accent-soft), transparent 15rem),
    linear-gradient(155deg, var(--theme-wall-a), var(--theme-wall-b) 48%, var(--theme-wall-c));
}

.app-screen,
.chat-tabs,
.composer {
  background: rgba(242, 240, 241, 0.66);
}

.icon-tile {
  background: linear-gradient(145deg, rgba(252, 251, 251, 0.78), rgba(231, 225, 228, 0.46));
  box-shadow: 0 12px 28px rgba(70, 62, 68, 0.11);
}

.dock,
.edit-popover,
.session-item,
.contact-item,
.contact-candidate-item,
.moment-card,
.profile-card,
.memory-item,
.list-card,
.settings-list details,
.post-composer,
.memory-form,
.player-card,
.empty-state,
.call-card,
.dialog-card,
.album-card,
.album-avatar-panel {
  border-color: rgba(255, 255, 255, 0.68);
  background: rgba(248, 247, 247, 0.54);
  box-shadow: 0 10px 30px rgba(70, 62, 68, 0.08);
}

.glass-button,
.ai-button,
.chat-tab,
.source-option,
.history-action-menu button,
.message-action-menu button,
.bubble-save-photo {
  border-color: var(--theme-accent-soft);
  background: var(--button-pink);
  color: var(--theme-strong-text);
}

.primary-button,
.chat-tab.active {
  color: var(--theme-strong-text);
  border-color: rgba(171, 135, 150, 0.38);
  background: linear-gradient(145deg, rgba(250, 247, 249, 0.94), var(--button-pink-strong));
}

.source-menu,
.history-action-menu,
.message-action-menu {
  border-color: var(--theme-accent-mid);
  background: var(--theme-menu);
  box-shadow: 0 18px 42px rgba(70, 62, 68, 0.14);
}

.bubble {
  background: rgba(250, 249, 249, 0.66);
}

.message.user .bubble {
  color: #4a3f46;
  background: var(--theme-user-bubble);
}

.message.ai .bubble {
  border-color: rgba(255, 255, 255, 0.68);
  background: rgba(249, 248, 248, 0.7);
}

.history-day.has-chat {
  color: var(--theme-strong-text);
}

.history-day.active {
  border-color: var(--theme-accent-mid);
  background: var(--theme-accent-button);
  box-shadow: inset 0 0 0 1px var(--theme-accent-soft);
}

.message-focus .bubble {
  box-shadow: 0 0 0 2px var(--theme-accent-soft), 0 14px 28px rgba(88, 74, 82, 0.13);
}

.avatar {
  color: #62565d;
  background: linear-gradient(145deg, rgba(226, 219, 223, 0.95), rgba(252, 251, 251, 0.72));
}

.home-indicator {
  background: rgba(55, 50, 54, 0.22);
}

@media (max-height: 760px) {
  .phone {
    min-height: 620px;
  }

  .desktop-page {
    padding-top: 18px;
  }
}

@media (max-width: 700px), (hover: none) and (pointer: coarse) {
  .stage {
    padding: 0;
    place-items: stretch;
  }

  .phone {
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    border-radius: 0;
    border: 0;
    box-shadow: none;
  }

  .desktop-page {
    padding: clamp(48px, 9vh, 74px) clamp(32px, 8.5vw, 42px) 122px;
  }

  .appearance-page {
    padding: 12px;
  }

  .preview-phone {
    width: 88px;
    height: 132px;
    margin: 0 auto 10px;
    border-radius: 24px;
  }

  .appearance-page .settings-list details {
    border-radius: 18px;
    padding-inline: 12px;
  }

  .dock {
    left: max(22px, calc(env(safe-area-inset-left) + 22px));
    right: max(22px, calc(env(safe-area-inset-right) + 22px));
    bottom: max(28px, calc(env(safe-area-inset-bottom) + 14px));
  }

  .home-indicator {
    bottom: max(7px, env(safe-area-inset-bottom));
  }
}

.conversation {
  scrollbar-width: none !important;
}

.conversation::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}


