#app-appearance {
  background: #f2f2f7;
  color: #111111;
  display: flex;
  flex-direction: column;
  padding-top: calc(env(safe-area-inset-top) + 8px);
}

.app-header {
  display: flex;
  align-items: center;
  padding: 6px 18px 12px;
}

.app-back {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.14) 55%, rgba(255, 255, 255, 0.26) 100%);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.12),
    0 2px 5px rgba(0, 0, 0, 0.05),
    inset 0 2px 2px rgba(255, 255, 255, 1),
    inset 0 -1.5px 3px rgba(0, 0, 0, 0.07);
  transition: transform 0.15s ease;
}

.app-back:active {
  transform: scale(0.92);
}

.app-back svg {
  width: 18px;
  height: 18px;
  stroke: #111111;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 16px 100px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.lg-card {
  border-radius: 24px;
  background: #ffffff;
  margin-bottom: 16px;
  overflow: hidden;
}

.lg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
  gap: 12px;
}

.lg-row:last-child {
  border-bottom: none;
}

.lg-row.hidden {
  display: none;
}

.lg-row-col {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.lg-row-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.lg-label {
  font-size: var(--app-font-size, 15px);
  font-weight: 400;
  color: #111111;
}

.lg-sub {
  font-size: calc(var(--app-font-size, 15px) - 3px);
  color: #8e8e93;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lg-row-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lg-switch {
  width: 51px;
  height: 31px;
  border-radius: 999px;
  background: #e5e5ea;
  position: relative;
  transition: background 0.22s ease;
}

.lg-switch.on {
  background: #111111;
}

.lg-switch-thumb {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #ffffff;
  position: absolute;
  top: 2px;
  left: 2px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease;
}

.lg-switch.on .lg-switch-thumb {
  transform: translateX(20px);
}

.wall-thumb {
  width: 38px;
  height: 50px;
  border-radius: 10px;
  background: #ffffff;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.mini-btn {
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  color: #333333;
  background: #f2f2f7;
}

.mini-btn:active {
  transform: scale(0.95);
}

/* p2 风格字号滑块 */
.ios-size-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0 2px;
}

.ios-size-a-sm {
  font-size: 13px;
  color: #666666;
  font-weight: 500;
}

.ios-size-a-lg {
  font-size: 20px;
  color: #666666;
  font-weight: 500;
}

.ios-slider-box {
  position: relative;
  flex: 1;
  height: 28px;
  display: flex;
  align-items: center;
}

.ios-slider-dots {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.ios-slider-dots span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.22);
}

.ios-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.16);
  outline: none;
  position: relative;
  z-index: 2;
}

.ios-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 34px;
  height: 22px;
  border-radius: 999px;
  background: #ffffff;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.20), 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* 字体折叠列表 */
.chevron {
  width: 16px;
  height: 16px;
  stroke: #8e8e93;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.22s ease;
}

.chevron.open {
  transform: rotate(180deg);
}

.font-accordion {
  display: none;
  background: #fafafa;
  border-top: 0.5px solid rgba(0, 0, 0, 0.06);
}

.font-accordion.open {
  display: block;
}

.font-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.05);
  gap: 10px;
}

.font-item:last-child {
  border-bottom: none;
}

.font-item-name {
  font-size: calc(var(--app-font-size, 15px) - 1px);
  color: #111111;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.font-item-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.font-check {
  font-size: 14px;
  font-weight: 600;
  color: #111111;
  opacity: 0;
}

.font-item.active .font-check {
  opacity: 1;
}

.font-del {
  font-size: 12px;
  color: #8e8e93;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
}

.font-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px 18px;
  font-size: calc(var(--app-font-size, 15px) - 1px);
  color: #111111;
  font-weight: 500;
}

.font-add-btn:active {
  background: rgba(0, 0, 0, 0.04);
}

/* 底部小胶囊液态玻璃 */
.lg-bottom-bar {
  position: absolute;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 196px;
  z-index: 30;
  display: flex;
  padding: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.06) 50%, rgba(255, 255, 255, 0.20) 100%);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.14),
    0 2px 6px rgba(0, 0, 0, 0.06),
    inset 0 2px 3px rgba(255, 255, 255, 1),
    inset 0 -2px 4px rgba(0, 0, 0, 0.07);
}

.lg-tab-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.055);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.75),
    0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  pointer-events: none;
}

.lg-bottom-bar.is-icons .lg-tab-indicator {
  transform: translateX(100%);
}

.lg-tab {
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
  padding: 9px 0;
  font-size: 14px;
  font-weight: 500;
  color: #666666;
  border-radius: 999px;
  transition: color 0.2s ease, transform 0.15s ease;
}

.lg-tab:active {
  transform: scale(0.94);
}

.lg-tab.active {
  color: #111111;
  font-weight: 600;
}

.empty-tip {
  text-align: center;
  padding: 60px 20px;
  font-size: calc(var(--app-font-size, 15px) - 1px);
  color: #8e8e93;
}
/* 图标页（模仿 p2） */
.icon-sec-title {
  font-size: 12px;
  font-weight: 600;
  color: #8e8e93;
  letter-spacing: 0.6px;
  padding: 6px 6px 8px;
}

.home-icon-card {
  padding: 18px;
}

.home-icon-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.home-icon-title {
  font-size: calc(var(--app-font-size, 15px) + 2px);
  font-weight: 600;
  color: #111111;
}

.home-tag {
  font-size: 11px;
  font-weight: 600;
  color: #8e8e93;
  background: #f2f2f7;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

.home-icon-desc {
  font-size: calc(var(--app-font-size, 15px) - 2px);
  color: #8e8e93;
  margin-bottom: 16px;
}

.home-icon-boxes {
  display: flex;
  gap: 18px;
  margin-bottom: 14px;
}

.home-icon-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.icon-upload-box {
  width: 66px;
  height: 66px;
  border-radius: 16px;
  border: 1.5px dashed #c7c7cc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #8e8e93;
  background: #fafafa;
}

.icon-upload-box:active {
  transform: scale(0.94);
}

.icon-default-box {
  position: relative;
  width: 66px;
  height: 66px;
  border-radius: 16px;
  border: 1.5px solid #111111;
  background: #ffffff;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #111111;
}

.icon-default-box.has-img {
  font-size: 0;
}

.home-icon-slot-label {
  font-size: 12px;
  color: #666666;
}

.home-icon-note {
  font-size: 12px;
  color: #aeaeb2;
  line-height: 1.5;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 10px;
  padding: 18px 14px;
}

.icon-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.icon-grid-box {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
  background-size: cover;
  background-position: center;
}

.icon-grid-box.has-img {
  font-size: 0;
}

.icon-reset-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #111111;
  color: #ffffff;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  display: none;
}

.icon-grid-box.has-img .icon-reset-badge,
.icon-default-box.has-img .icon-reset-badge {
  display: block;
}

.icon-grid-name {
  font-size: calc(var(--app-font-size, 15px) - 3px);
  color: #111111;
  text-align: center;
}