/* ═══════════════════════════════════════
   EPHONE — Black & White Bold Aesthetic
   ═══════════════════════════════════════ */

:root {
  --black:        #0a0a0a;
  --black-soft:   #1a1a1a;
  --gray-dark:    #444444;
  --gray-mid:     #888888;
  --gray-light:   #cccccc;
  --gray-pale:    #eeeeee;
  --white:        #ffffff;
  --off-white:    #f7f7f7;
  --text:         #0a0a0a;
  --text-soft:    #666666;
  --glass:        rgba(255,255,255,0.68);
  --glass-border: rgba(0,0,0,0.1);
  --shadow:       0 4px 20px rgba(0,0,0,0.10);
  --shadow-card:  0 2px 0px #0a0a0a;
  --radius:       20px;
  --radius-lg:    28px;
  --border:       2px solid #0a0a0a;
  --font:         'Quicksand', sans-serif;
  --font-display: 'Nunito', sans-serif;
  --font-sign:    'Liu Jian Mao Cao', cursive;
  --font-clock:   'Fredoka', sans-serif;
  --home-page-gap: 18px;
  --app-height: 100vh;
  --frameoff-scale: 1;
  --frameoff-top: 0px;
  --mobile-frame-drop: 56px;
  --vv-top-offset: 0px;
  --vv-bottom-offset: 0px;
  --viewport-bg: #f7f7f7;
}

* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--viewport-bg);
}
html {
  position: relative;
  min-height: 100%;
  min-height: calc(100% + env(safe-area-inset-top, 40px));
}
html::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--viewport-bg);
  pointer-events: none;
  z-index: -1;
}
html.app-open-mode,
body.app-open-mode {
  background: transparent !important;
  min-height: var(--app-height) !important;
  height: var(--app-height) !important;
}
html.android-device,
body.android-device {
  min-height: var(--app-height) !important;
  height: var(--app-height) !important;
  overflow: hidden;
  overscroll-behavior: none;
}
body.android-device {
  position: fixed;
  inset: 0;
  width: 100vw;
}
html.app-open-mode::before {
  background: transparent;
}
button {
  -webkit-appearance: none;
  appearance: none;
  -webkit-touch-callout: none;
  color: inherit;
}

body {
  background: transparent;
  min-height: 100%;
  min-height: calc(100% + env(safe-area-inset-top, 40px));
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
}

@media (hover: none) and (pointer: coarse) {
  body {
    background: transparent;
    align-items: stretch;
    justify-content: flex-start;
  }
  .phone-outer {
    width: 100%;
    min-height: var(--app-height);
    padding: 0;
  }
  .phone-frame {
    width: 100%;
    max-width: 100vw;
    min-height: var(--app-height);
  }
}

/* ── Phone Frame ── */
.phone-outer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.phone-outer.frame-off {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  min-height: 100dvh;
  padding: 0;
  overflow: hidden;
  display: block;
  background: transparent;
  z-index: 1;
}
html.android-device .phone-outer.frame-off {
  height: var(--app-height);
  min-height: var(--app-height);
  max-height: var(--app-height);
  display: block;
  align-items: stretch;
  justify-content: flex-start;
  overflow: hidden;
}
html.android-device .phone-outer.frame-off .phone-frame {
  position: absolute;
  inset: auto;
  left: 50%;
  top: var(--frameoff-top);
  width: 375px;
  height: 780px;
  min-height: 780px;
  max-height: 780px;
  transform: translateX(-50%) scale(var(--frameoff-scale));
  transform-origin: top center;
  overflow: visible;
}
.phone-outer.frame-off::before {
  content: '';
  position: fixed;
  inset: 0;
  background-color: var(--chat-shell-bg-color, transparent);
  background-image: var(--chat-shell-bg-image, none);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  pointer-events: none;
  z-index: 0;
}
.phone-outer.frame-off::after {
  display: none;
}

.phone-frame {
  width: 375px;
  height: 780px;
  background: var(--off-white);
  border-radius: 52px;
  box-shadow:
    0 0 0 2px var(--black),
    0 0 0 6px var(--white),
    0 0 0 8px var(--black),
    0 30px 80px rgba(0,0,0,0.35);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.frame-wallpaper {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--off-white);
}

.phone-outer.frame-off .phone-frame {
  width: 375px;
  height: 780px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  position: absolute;
  left: 50%;
  top: var(--frameoff-top);
  transform: translateX(-50%) scale(var(--frameoff-scale));
  transform-origin: top center;
  z-index: 2;
  overflow: visible;
}
@media (hover: none) and (pointer: coarse) {
  .phone-outer.frame-off {
    display: flex;
    justify-content: center;
    align-items: flex-start;
  }
  .phone-outer.frame-off .phone-frame {
    position: absolute;
    left: 50%;
    top: calc(var(--frameoff-top) + var(--mobile-frame-drop));
    bottom: auto;
    width: 375px;
    height: 780px;
    transform: translateX(-50%) scale(var(--frameoff-scale));
    transform-origin: top center;
  }
  html.android-device .phone-outer.frame-off .phone-frame {
    position: absolute;
    inset: auto;
    left: 50%;
    top: var(--frameoff-top);
    width: 375px;
    height: 780px;
    min-height: 780px;
    max-height: 780px;
    transform: translateX(-50%) scale(var(--frameoff-scale));
    transform-origin: top center;
    overflow: visible;
  }
  .phone-outer.frame-off.app-open {
    display: block;
  }
  .phone-outer.frame-off.app-open .phone-frame {
    position: fixed;
    inset: 0;
    left: 0;
    top: 0;
    width: 100vw;
    transform: none;
    border-radius: 0;
    box-shadow: none;
  }
}
.phone-outer.frame-off .slot-circle {
  margin-left: -2px;
}
.phone-outer.frame-off .home-screen {
  background: transparent;
}
.phone-outer.frame-off .frame-wallpaper {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc((100vw + 140px) / var(--frameoff-scale));
  height: calc((100dvh + 140px) / var(--frameoff-scale));
  transform: translate(-50%, -50%);
  z-index: 0;
}
html.android-device .phone-outer.frame-off .frame-wallpaper {
  height: calc((var(--app-height) + 140px) / var(--frameoff-scale));
}
.phone-outer.frame-off.app-open .frame-wallpaper {
  display: none;
}
.phone-outer.frame-off .home-content {
  padding-top: 21px;
  padding-bottom: 6px;
}
html.android-device .phone-outer.frame-off .screen,
html.android-device .phone-outer.frame-off .home-screen {
  height: 100%;
  min-height: 100%;
  max-height: 100%;
}
html.android-device .phone-outer.frame-off .home-content {
  height: 100%;
  min-height: 0;
  transform: none;
  padding-top: max(18px, env(safe-area-inset-top));
  padding-bottom: max(106px, calc(96px + env(safe-area-inset-bottom)));
  gap: 10px;
}

.phone-outer.frame-off .phone-frame::before,
.phone-outer.frame-off .phone-frame::after,
.phone-outer.frame-off .dynamic-island,
.phone-outer.frame-off .status-bar,
.phone-outer.frame-off .home-bar {
  display: none;
}
.phone-outer.frame-off .home-bar::after {
  display: none;
}
.phone-outer.app-open .home-bar {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  border-top: none !important;
  overflow: hidden !important;
  pointer-events: none !important;
}
.phone-outer.app-open .home-bar::after {
  display: none !important;
}

/* Side buttons */
.phone-frame::before {
  content: '';
  position: absolute;
  left: -5px; top: 120px;
  width: 4px; height: 35px;
  background: var(--black);
  border-radius: 4px 0 0 4px;
  box-shadow: 0 48px 0 var(--black), 0 96px 0 var(--black);
}
.phone-frame::after {
  content: '';
  position: absolute;
  right: -5px; top: 148px;
  width: 4px; height: 65px;
  background: var(--black);
  border-radius: 0 4px 4px 0;
}

/* ── Dynamic Island ── */
.dynamic-island {
  width: 126px;
  height: 34px;
  background: var(--black);
  border-radius: 20px;
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.island-camera {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 1.5px solid #2a2a2a;
}

/* ── Status Bar ── */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 28px 0;
  margin-top: 52px;
  font-size: 12px;
  font-weight: 700;
  color: var(--black);
  font-family: var(--font-display);
  position: relative;
  z-index: 50;
}
.status-right { display: flex; gap: 6px; }
.status-icon { font-size: 11px; }

/* ── Screen ── */
.screen {
  flex: 1;
  position: relative;
  overflow: hidden;
  overscroll-behavior: none;
}

.phone-outer.chat-shell-open .phone-frame,
.phone-outer.chat-shell-open .frame-wallpaper,
.phone-outer.chat-shell-open .screen {
  background-color: var(--chat-shell-bg-color, #f7f7f7) !important;
  background-image: var(--chat-shell-bg-image, none) !important;
  background-position: center !important;
  background-size: cover !important;
}
.phone-outer.chat-shell-open .app-topbar{
  display:none !important;
}

/* ── Home Screen ── */
.home-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.4s;
  background: var(--off-white);
  overscroll-behavior: none;
}
.home-screen.hidden {
  transform: scale(0.94);
  opacity: 0;
  pointer-events: none;
}
.phone-outer.chat-shell-open .home-screen.hidden{
  transform:none;
}
.phone-outer.chat-hard-cut .home-screen,
.phone-outer.chat-hard-cut .app-container,
.phone-outer.chat-hard-cut #app-iframe,
.phone-outer.chat-hard-cut .app-topbar{
  transition:none !important;
  animation:none !important;
}
.phone-outer.chat-hard-cut .home-screen.hidden{
  transform:none !important;
}

/* ── Wallpaper (now just a subtle bg) ── */
.wallpaper { position: absolute; inset: 0; z-index: 0; }
.wallpaper-gradient {
  position: absolute; inset: 0;
  background: var(--off-white);
  transition: background 0.8s;
}

/* ── Home Content ── */
.home-content {
  position: relative;
  z-index: 10;
  flex: 1;
  min-height: 0;
  overflow: visible;
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: none;
  transform: translateY(-6px);
}
.home-content::-webkit-scrollbar { display: none; }
.home-pages {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: visible;
  transition: margin-left 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  transform: none;
  margin-left: 0;
  touch-action: pan-y;
}
.home-page {
  flex: 0 0 100%;
  min-width: 100%;
  max-width: 100%;
  min-height: 0;
  height: 100%;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.home-page-gap {
  flex: 0 0 var(--home-page-gap);
  width: var(--home-page-gap);
  pointer-events: none;
  background: transparent;
}
.home-page-gap::before {
  content: none;
}
.home-page::-webkit-scrollbar { display: none; }

/* ── Home Layout ── */
.home-shell {
  min-height: 100%;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 14px;
}
@media (hover: none) and (pointer: coarse) {
  .home-content {
    padding: max(12px, env(safe-area-inset-top)) 12px 8px 12px;
  }
  .phone-outer.frame-off .home-content {
    padding: 21px 12px 6px 12px;
  }
  html.android-device .phone-outer.frame-off .home-content {
    padding: max(18px, env(safe-area-inset-top)) 12px max(106px, calc(96px + env(safe-area-inset-bottom))) 12px;
  }
  .home-content,
  .home-shell,
  .page-two-shell,
  .home-page {
    touch-action: pan-y;
  }
  .media-panel,
  .bond-widget-inner,
  .page-two-app-row .home-app-label {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .media-panel,
  .bond-widget-inner {
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
  }
}

.media-panel,
.bond-widget-inner {
  border: 1.5px solid rgba(0,0,0,0.2);
  border-radius: 34px;
  background: rgba(255,255,255,0.28);
  box-shadow: 0 14px 28px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-clip: padding-box;
  clip-path: none;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.media-panel {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: visible;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  margin-top: 15px;
  padding-bottom: 12px;
}

/* ── Widgets ── */
.widget {
  background: var(--white);
  border: var(--border);
  border-radius: 22px;
  box-shadow: 3px 4px 0 var(--black);
  transition: transform 0.15s;
}
.widget:active { transform: scale(0.97); }

.hero-wrap {
  border: none;
  border-radius: 34px;
  padding: 0;
  display: flex;
  gap: 8px;
  align-items: stretch;
  min-height: 108px;
  overflow: visible;
}

/* Clock Widget */
.widget-clock {
  flex: 0 1 208px;
  padding: 14px 12px;
  margin-right: 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  isolation: isolate;
  cursor: default;
}
.widget-clock::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--clock-widget-art, none) center / cover no-repeat;
  opacity: 0;
  transition: opacity .18s ease;
  z-index: 0;
}
.widget-clock::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.82) 0%, rgba(255,255,255,0.58) 52%, rgba(255,255,255,0.74) 100%);
  z-index: 0;
  pointer-events: none;
}
.widget-clock.has-art::before {
  opacity: 0.46;
}
.widget-clock > * {
  position: relative;
  z-index: 1;
}
.clock-time {
  font-family: var(--font-clock);
  font-size: 54px;
  font-weight: 700;
  color: var(--black);
  line-height: 0.9;
  letter-spacing: 0.035em;
  white-space: nowrap;
}
.clock-sun {
  font-size: 0.66em;
  margin-left: 6px;
  vertical-align: 12%;
}
.clock-date {
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 700;
  margin-top: 0;
  display: flex;
  align-items: center;
}
.clock-meta {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-left: 10px;
}
.clock-loc-bubble {
  border: var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  box-shadow: 2px 2px 0 var(--black);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  color: var(--text);
  padding: 3px 9px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 58%;
  cursor: pointer;
  margin-left: 6px;
  margin-top: 0;
}
.clock-loc-bubble:active {
  transform: translate(1px,1px);
  box-shadow: 1px 1px 0 var(--black);
}
.clock-loc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 1;
}
#clock-loc-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Image slots */
.slot-picker {
  border: var(--border);
  background: var(--off-white);
  box-shadow: 3px 4px 0 var(--black);
  color: var(--black);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  touch-action: manipulation;
}
.slot-base-mask {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  z-index: 1;
}
.slot-circle .slot-base-mask {
  inset: 0;
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.03), 0 5px 12px rgba(0,0,0,0.18);
}
.slot-circle.has-image .slot-base {
  transform: scale(1.08);
  transform-origin: center center;
}
.slot-tall.has-image img {
  transform: scale(1.06);
  transform-origin: center center;
}
.slot-circle.has-image::after {
  inset: 0;
  border-radius: 50%;
}
.slot-circle.has-image {
  box-shadow:
    0 0 0 2px rgba(255,255,255,0.92),
    4px 5px 0 rgba(10,10,10,0.96),
    0 12px 22px rgba(0,0,0,0.10);
}
.slot-picker::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: transparent;
}
.slot-picker::before {
  content: none;
}
.slot-picker.has-image::after {
  background: linear-gradient(to top, rgba(0,0,0,0.30), rgba(0,0,0,0));
}
.slot-tall[data-slot="1"].has-image::before,
.slot-tall[data-slot="2"].has-image::before,
.slot-tall[data-slot="3"].has-image::before,
.slot-tall[data-slot="4"].has-image::before {
  content: '♥';
  position: absolute;
  top: 10px;
  left: 10px;
  width: 34px;
  height: 22px;
  border-radius: 16px;
  background: #fff;
  color: #111;
  border: 1.5px solid rgba(0,0,0,0.7);
  box-shadow: 0 2px 0 rgba(0,0,0,0.35);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}
.slot-circle.has-image img {
  filter: none;
}
.slot-picker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.03);
  transform-origin: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.slot-base {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slot-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 176px;
  height: 176px;
  max-width: none;
  max-height: none;
  transform: translate(calc(-50% + var(--frame-offset-x, 0px)), calc(-50% + var(--frame-offset-y, 0px))) scale(var(--frame-scale, 1));
  transform-origin: center center;
  object-fit: contain;
  z-index: 5;
  pointer-events: none;
}
.slot-plus {
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  position: relative;
  z-index: 2;
}
.slot-picker.has-image .slot-plus {
  color: var(--white);
  font-size: 30px;
}
.slot-circle {
  width: 102px;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 50%;
  flex: 0 0 auto;
  align-self: center;
  overflow: visible;
  z-index: 8;
  margin-left: -6px;
  border: 2.5px solid rgba(10,10,10,0.82);
  box-shadow:
    0 0 0 2px rgba(255,255,255,0.92),
    0 0 0 5px rgba(255,255,255,0.6),
    3px 4px 0 rgba(10,10,10,0.96),
    0 10px 18px rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.96);
  position: relative;
  transform: none;
}
.hero-wrap > .slot-circle{
  transform: translate(13px, 3px);
}
.hero-wrap > .slot-circle::before{
  top: -4px;
}
.slot-circle::before {
  content: '';
  position: absolute;
  right: -12px;
  top: -10px;
  width: 52px;
  height: 40px;
  background: url("apps/assets/99+信息2.png") center / contain no-repeat;
  pointer-events: none;
  z-index: 14;
}
.slot-circle .slot-base-mask,
.slot-circle .slot-base,
.slot-circle.has-image img{
  width:100%;
  height:100%;
  display:block;
  border-radius:50%;
  object-fit:cover;
}
.slots-wrap {
  border: none;
  border-radius: 34px;
  padding: 0 8px 0 0;
  display: flex;
  gap: 8px;
  min-height: 258px;
  overflow: visible;
}
.slot-tall {
  flex: 1;
  border-radius: 30px;
}
.slot-tall:nth-child(1) { transform: translateY(8px); }
.slot-tall:nth-child(2) { transform: translateY(0); }
.slot-tall:nth-child(3) { transform: translateY(12px); }
.slot-tall:nth-child(4) { transform: translateY(4px); }
.live-overlay {
  position: absolute;
  inset: 0;
  display: none;
  pointer-events: none;
  z-index: 4;
  overflow: hidden;
  border-radius: inherit;
}
.slot-tall.has-image .live-overlay {
  display: block;
}
body.live-danmaku-off .slot-tall.has-image .live-overlay {
  display: none !important;
}
.live-danmaku {
  position: absolute;
  left: -72px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.38);
  border: 1px solid rgba(255,255,255,0.46);
  box-shadow: 0 3px 8px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: 'ZCOOL KuaiLe', 'Fredoka', var(--font-display);
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  color: rgba(255,255,255,0.96);
  text-shadow: 0 1px 2px rgba(0,0,0,0.18);
  white-space: nowrap;
  opacity: 0;
  animation: liveDanmakuFloat 10s linear infinite;
}
.live-danmaku.danmaku-a {
  top: 40px;
  animation-delay: 0s;
}
.live-danmaku.danmaku-b {
  top: 104px;
  animation-delay: 3.2s;
}
.live-danmaku.danmaku-c {
  top: 166px;
  animation-delay: 6.1s;
}
.live-like {
  position: absolute;
  right: 6px;
  bottom: 8px;
  font-size: 15px;
  color: #ff4d6d;
  text-shadow: 0 1px 4px rgba(0,0,0,0.28);
  opacity: 0;
  animation: liveLikeFloat 3.6s ease-out infinite;
}
.live-like.like-a {
  right: 6px;
  bottom: 8px;
  animation-delay: 0s;
}
.live-like.like-b {
  right: 16px;
  bottom: 16px;
  font-size: 12px;
  animation-delay: 1.2s;
}
.live-like.like-c {
  right: 24px;
  bottom: 4px;
  font-size: 10px;
  animation-delay: 2.1s;
}
.live-variant-1 .danmaku-a { top: 38px; animation-duration: 10.4s; }
.live-variant-1 .danmaku-b { top: 108px; animation-duration: 11.6s; }
.live-variant-1 .danmaku-c { top: 170px; animation-duration: 9.8s; }
.live-variant-1 .like-a { right: 7px; bottom: 8px; animation-duration: 3.8s; }
.live-variant-1 .like-b { right: 16px; bottom: 18px; animation-duration: 4.3s; }
.live-variant-1 .like-c { right: 25px; bottom: 4px; animation-duration: 4.8s; }
.live-variant-2 .danmaku-a { top: 46px; animation-duration: 11.8s; }
.live-variant-2 .danmaku-b { top: 130px; animation-duration: 9.9s; }
.live-variant-2 .danmaku-c { top: 186px; animation-duration: 12.4s; }
.live-variant-2 .like-a { right: 5px; bottom: 10px; animation-duration: 4.1s; }
.live-variant-2 .like-b { right: 14px; bottom: 22px; animation-duration: 4.9s; }
.live-variant-2 .like-c { right: 22px; bottom: 6px; animation-duration: 3.9s; }
.live-variant-3 .danmaku-a { top: 54px; animation-duration: 9.6s; }
.live-variant-3 .danmaku-b { top: 116px; animation-duration: 12.8s; }
.live-variant-3 .danmaku-c { top: 176px; animation-duration: 10.7s; }
.live-variant-3 .like-a { right: 4px; bottom: 9px; animation-duration: 4.5s; }
.live-variant-3 .like-b { right: 15px; bottom: 20px; animation-duration: 3.7s; }
.live-variant-3 .like-c { right: 27px; bottom: 3px; animation-duration: 5.1s; }
.live-variant-4 .danmaku-a { top: 34px; animation-duration: 11.1s; }
.live-variant-4 .danmaku-b { top: 96px; animation-duration: 10.2s; }
.live-variant-4 .danmaku-c { top: 160px; animation-duration: 12.1s; }
.live-variant-4 .like-a { right: 6px; bottom: 12px; animation-duration: 4.2s; }
.live-variant-4 .like-b { right: 18px; bottom: 24px; animation-duration: 4.7s; }
.live-variant-4 .like-c { right: 28px; bottom: 8px; animation-duration: 5.3s; }
@keyframes liveDanmakuFloat {
  0% { opacity: 0; transform: translateX(0); }
  8% { opacity: 0.92; }
  88% { opacity: 0.9; }
  100% { opacity: 0; transform: translateX(180px); }
}
@keyframes liveLikeFloat {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.9); }
  20% { opacity: 0.95; }
  100% { opacity: 0; transform: translate3d(-8px, -34px, 0) scale(1.08); }
}

/* Character Widget */
.home-chat-deck {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  padding: 0 10px 0 22px;
  overflow: visible;
  transform: translateX(-9px);
}
.widget-mini-orb{
  background:transparent;
  cursor:pointer;
  flex:0 0 auto;
  transform:none;
  margin-left:-12px;
  margin-right:14px;
  overflow: visible;
  width: 102px;
  aspect-ratio: 1 / 1;
}
.widget-mini-orb .slot-base-mask{
  inset: 0;
  border-radius:50%;
}
.widget-mini-orb::before{
  content: '';
  position: absolute;
  right: -10px;
  top: -4px;
  width: 52px;
  height: 40px;
  background: url("apps/assets/99+信息2.png") center / contain no-repeat;
  pointer-events: none;
  z-index: 14;
}
.home-chat-deck .slot-circle::before{
  top:-6px;
  right:-9px;
}
.widget-mini-orb-fill{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  overflow:hidden;
  background:#fff;
  font-weight:900;
}
.widget-mini-orb-plus{
  font-size: 38px;
  line-height: 1;
  color: rgba(17,17,17,0.92);
  transform: translateY(-1px);
}
.widget-mini-orb-fill img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center 52%;
  display:block;
}
.widget-mini-orb.has-image img{
  transform:none !important;
}
.widget-character {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding: 4px 0 0;
  cursor: default;
  gap: 10px;
  border: none;
  border-radius: 0;
  position: relative;
  overflow: visible;
  min-height: 96px;
  margin-left: auto;
  width: 100%;
  max-width: calc(100% - 122px);
  background: transparent !important;
  box-shadow: none !important;
}
.widget-character::after {
  content: none;
}
.widget-character-row {
  display: flex;
  align-items: center;
  gap: 0;
  width: fit-content;
  max-width: 100%;
  justify-content: flex-start;
}
.widget-character-row-char {
  justify-content: flex-end;
  align-self: flex-end;
}
.widget-character-row-user {
  justify-content: flex-start;
  align-self: flex-start;
}
.widget-character-line {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  max-width: 100%;
  width: fit-content;
  padding: 9px 14px;
  border: 1.5px solid rgba(255,255,255,0.72);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(226,236,251,0.24) 0%, rgba(226,236,251,0.10) 100%);
  box-shadow: none;
  overflow: hidden;
  flex: 0 1 auto;
  cursor: text;
  backdrop-filter: blur(30px) saturate(1.08);
  -webkit-backdrop-filter: blur(30px) saturate(1.08);
}
.widget-character-line.editing {
  border-color: rgba(17,17,17,0.18);
  background: linear-gradient(135deg, rgba(248,250,255,0.72) 0%, rgba(240,245,255,0.46) 100%);
}
.widget-character-line::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0.06) 100%);
  background-repeat: no-repeat;
  background-size: cover;
  z-index: 0;
  pointer-events: none;
  opacity:.95;
}
.widget-character-line-char {
  margin-right: -8px;
  padding-right: 18px;
}
.widget-character-line-user {
  margin-left: -8px;
  padding-left: 18px;
}
.widget-character-avatar {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(17,17,17,.86);
  border-radius: 999px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 1px 1px 0 rgba(10,10,10,0.95);
  position: relative;
  z-index: 1;
  transform:none;
  background: rgba(255,255,255,0.98);
}
.widget-character-avatar.user {
  order: 0;
}
.widget-character-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.widget-character-copy {
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  z-index: 1;
}
.widget-character-line-user .widget-character-copy {
  align-items: flex-end;
  text-align: right;
}
.widget-character-role {
  display: none;
}
.widget-character-text {
  font-family: 'Nunito', sans-serif;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  color: #111;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  text-shadow: 0 1px 0 rgba(255,255,255,0.92);
}
.widget-character-text.editing {
  outline: none;
  min-width: 8ch;
  font-size: 16px;
  line-height: 1.2;
  caret-color: #111;
  text-shadow: none;
}
.widget-text-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.widget-text-editor-overlay.open { display: flex; }
.widget-text-editor-card {
  width: min(340px, 100%);
  border: 2px solid #111;
  border-radius: 24px;
  background: rgba(255,255,255,0.96);
  box-shadow: 4px 4px 0 #111, 0 18px 38px rgba(0,0,0,.18);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.widget-text-editor-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  color: #111;
}
.widget-text-editor-input {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 0 18px 18px 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.82), rgba(245,245,245,.62)),
    linear-gradient(180deg, rgba(17,17,17,.14) 0%, rgba(17,17,17,.9) 24%, rgba(17,17,17,.9) 76%, rgba(17,17,17,.14) 100%);
  background-repeat: no-repeat;
  background-position: 0 0, 0 0;
  background-size: 100% 100%, 4px 100%;
  padding: 0 12px 0 18px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 900;
  color: #111;
  outline: none;
}
.widget-text-editor-actions {
  display: flex;
  gap: 10px;
}
.widget-text-editor-btn {
  flex: 1;
  height: 38px;
  border: 2px solid #111;
  border-radius: 999px;
  background: #fff;
  box-shadow: 2px 2px 0 #111;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 900;
  color: #111;
}
.widget-text-editor-btn.primary {
  background: #111;
  color: #fff;
}
.char-note-editor {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.28);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 170;
}
.char-note-editor.open { display: flex; }
.char-note-card {
  width: 276px;
  background: var(--white);
  border: var(--border);
  border-radius: 16px;
  box-shadow: 3px 4px 0 var(--black);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.char-note-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
}
.char-note-card textarea {
  width: 100%;
  min-height: 88px;
  resize: none;
  border: var(--border);
  border-radius: 12px;
  padding: 8px 10px;
  background: var(--off-white);
  color: var(--text);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  outline: none;
  -webkit-text-fill-color: currentColor;
  font-variant-emoji: text;
}
.char-note-card textarea:focus { box-shadow: 3px 3px 0 var(--black); }
.char-note-actions {
  display: flex;
  gap: 8px;
}
.char-note-btn {
  flex: 1;
  border: var(--border);
  border-radius: 12px;
  background: var(--white);
  color: var(--text);
  box-shadow: 2px 2px 0 var(--black);
  padding: 8px 10px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.char-note-btn.primary {
  background: var(--white);
  color: var(--black);
}
#top-frame-editor .char-note-btn.primary {
  background: var(--black);
  color: var(--white);
}
#clock-loc-editor .char-note-btn.primary {
  background: var(--white);
  color: var(--black);
}
.char-note-btn:active {
  transform: translate(1px,1px);
  box-shadow: 1px 1px 0 var(--black);
}
.frame-card {
  width: 302px;
}
.frame-card-copy {
  margin: -4px 0 10px;
  color: rgba(17,17,17,0.72);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.01em;
}
.frame-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 2px;
}
.frame-chip {
  border: var(--border);
  background: var(--off-white);
  border-radius: 12px;
  height: 56px;
  box-shadow: 2px 2px 0 var(--black);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 900;
}
.frame-chip-label {
  position: absolute;
  right: 5px;
  bottom: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border: 1.5px solid var(--black);
  background: var(--white);
  color: var(--black);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  box-sizing: border-box;
}
.frame-chip-none {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.03em;
}
#top-frame-editor .frame-card {
  width: min(328px, calc(100vw - 26px));
  border-radius: 0;
  background: var(--white);
  box-shadow: 6px 6px 0 var(--black);
}
#top-frame-editor .char-note-title {
  margin-bottom: 8px;
}
#top-frame-editor .frame-grid {
  margin-bottom: 10px;
  max-height: min(49vh, 320px);
}
#top-frame-editor .frame-chip {
  height: 62px;
  border-radius: 0;
  background: var(--white);
  box-shadow: 2px 2px 0 var(--black);
}
#top-frame-editor .frame-chip.active {
  background: var(--white);
  box-shadow: 0 0 0 2px var(--black), 3px 3px 0 var(--black);
  transform: translate(-1px, -1px);
}
#top-frame-editor .frame-chip.active .frame-chip-label {
  background: var(--black);
  color: var(--white);
}
#top-frame-editor .char-note-btn {
  border-radius: 0;
}
.frame-chip img {
  width: 130%;
  height: 130%;
  object-fit: contain;
}
.avatar-frame-stack{
  position:absolute;
  inset:0;
  display:block;
  pointer-events:none;
}
.avatar-frame-stack > img{
  position:absolute;
  display:block;
}
.frame-chip .avatar-frame-stack > img{
  inset:0;
  width:100%;
  height:100%;
}
.frame-chip .avatar-frame-inline{
  width:130%;
  height:130%;
  display:block;
}
.avatar-frame-fallback{
  position:relative;
  box-sizing:border-box;
  border-radius:999px;
  pointer-events:none;
}
.avatar-frame-fallback__outer,
.avatar-frame-fallback__inner,
.avatar-frame-fallback__dash{
  position:absolute;
  inset:0;
  border-radius:999px;
}
.avatar-frame-fallback__outer{
  border:4px solid var(--frame-stroke,#111);
  box-sizing:border-box;
}
.avatar-frame-fallback__inner{
  inset:7px;
  border:8px solid var(--frame-fill,#ffd6e7);
  box-sizing:border-box;
}
.avatar-frame-fallback__dash{
  inset:14px;
  border:2px dashed color-mix(in srgb, var(--frame-stroke,#111) 78%, transparent);
  box-sizing:border-box;
}
.avatar-frame-fallback__badge{
  position:absolute;
  left:50%;
  top:15%;
  transform:translateX(-50%);
  min-width:28px;
  height:28px;
  padding:0 6px;
  border:2px solid var(--frame-stroke,#111);
  border-radius:999px;
  background:var(--frame-fill,#fff);
  color:var(--frame-accent,#ff6fa7);
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:var(--fontd);
  font-size:16px;
  font-weight:900;
  line-height:1;
  box-sizing:border-box;
  box-shadow:1px 2px 0 rgba(0,0,0,.14);
}
.avatar-frame-dot{
  position:absolute;
  width:8px;
  height:8px;
  margin:-4px 0 0 -4px;
  border-radius:999px;
  background:var(--frame-accent,#ff6fa7);
  border:1.6px solid var(--frame-stroke,#111);
  box-sizing:border-box;
}
.avatar-frame-dot-0{ left:50%; top:5%; }
.avatar-frame-dot-1{ left:78%; top:12%; }
.avatar-frame-dot-2{ left:92%; top:34%; }
.avatar-frame-dot-3{ left:88%; top:68%; }
.avatar-frame-dot-4{ left:70%; top:88%; }
.avatar-frame-dot-5{ left:30%; top:88%; }
.avatar-frame-dot-6{ left:12%; top:68%; }
.avatar-frame-dot-7{ left:8%; top:34%; }
.frame-chip.active {
  background: var(--black);
  color: var(--white);
}
.char-avatar-wrap {
  width: 72px; height: 72px;
  border-radius: 20px;
  border: var(--border);
  background: var(--gray-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  flex-shrink: 0;
  overflow: hidden;
}
.char-avatar-wrap img {
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transform:scale(1.03);
  transform-origin:center;
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
}
.char-details { flex: 1; min-width: 0; }
.char-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-display);
  line-height: 1.2;
}
.char-sub {
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 2px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* ── App Grid ── */
.app-grid {
  border: none;
  border-radius: 28px;
  background: transparent;
  box-shadow: 0 14px 28px rgba(0,0,0,0.16);
  border: 1.5px solid rgba(0,0,0,0.2);
  padding: 9px 11px 7px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  background-clip: padding-box;
  clip-path: inset(0 round 28px);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}
.app-grid-dock {
  flex: 0 0 auto;
  margin-top: 2px;
  margin-bottom: 28px;
  width: calc(100% - 18px);
  margin-inline: auto;
  padding: 7px 12px 5px;
  border-radius: 24px;
  transform: translate3d(0, -28px, 0);
  grid-template-columns: repeat(4, 48px);
  justify-content: space-between;
  gap: 0;
  border: none;
}
html.android-device .phone-outer.frame-off .app-grid-dock,
html.ios-device .phone-outer.frame-off .app-grid-dock {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: var(--home-dock-bottom, max(12px, env(safe-area-inset-bottom)));
  width: min(340px, calc(100vw - 40px));
  margin: 0;
  transform: translate3d(-50%, 0, 0);
  z-index: 80;
}
html.android-device .phone-outer.frame-off,
html.ios-device .phone-outer.frame-off {
  --home-dock-bottom: max(12px, env(safe-area-inset-bottom));
  --home-dock-stack-height: 104px;
}
html.ios-device .phone-outer.frame-off .app-grid-dock {
  bottom: var(--home-dock-bottom);
}
html.ios-device .phone-outer.frame-off {
  --home-dock-bottom: calc(max(12px, env(safe-area-inset-bottom)) + 34px);
}
html.android-device .phone-outer.frame-off.app-open .phone-frame {
  position: fixed;
  inset: 0;
  left: 0;
  top: 0;
  width: 100vw;
  height: var(--app-height);
  min-height: var(--app-height);
  max-height: var(--app-height);
  transform: none;
  transform-origin: center;
  overflow: hidden;
}
.app-grid-dock::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.68) 0%, rgba(255,255,255,0.5) 52%, rgba(242,242,242,0.58) 100%),
    linear-gradient(135deg, rgba(255,255,255,0.34), rgba(255,255,255,0.08));
  box-shadow:
    0 12px 24px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255,255,255,0.86),
    inset 0 -1px 0 rgba(255,255,255,0.24);
  border: none;
  z-index: 0;
  pointer-events: none;
}
.app-grid-dock > * {
  position: relative;
  z-index: 1;
}
.home-page-indicator {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1.5px solid rgba(0,0,0,0.2);
  background: rgba(255,255,255,0.26);
  box-shadow: 0 10px 22px rgba(0,0,0,0.10), inset 0 1px 0 rgba(255,255,255,0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex: 0 0 auto;
  margin-top: -2px;
  margin-bottom: 0;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  backface-visibility: hidden;
  transform: translate3d(0,-20px,0);
}
html.android-device .phone-outer.frame-off .home-page-indicator,
html.ios-device .phone-outer.frame-off .home-page-indicator {
  position: fixed;
  left: 50%;
  bottom: calc(var(--home-dock-bottom, max(12px, env(safe-area-inset-bottom))) + var(--home-dock-stack-height, 104px));
  z-index: 82;
  margin: 0;
  transform: translate3d(-50%, 0, 0);
}
.phone-outer.frame-off.app-open .home-page-indicator {
  display: none;
}
.home-page-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(10,10,10,0.22);
  transition: transform .2s, background .2s;
}
.home-page-dot.active {
  background: rgba(10,10,10,0.95);
  transform: scale(1.16);
}
.home-app-btn {
  min-height: 0;
  aspect-ratio: auto;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
  line-height: 1.05;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: visible;
  padding: 0;
  position: relative;
  gap: 5px;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.home-app-badge{
  position:absolute;
  top:-2px;
  right:-2px;
  min-width:19px;
  height:19px;
  padding:0 5px;
  border-radius:999px;
  background:#d22;
  color:#fff;
  border:1.5px solid #7e0000;
  font-family:var(--font-display);
  font-size:10px;
  font-weight:900;
  line-height:1;
  display:none;
  align-items:center;
  justify-content:center;
  box-shadow:1px 1px 0 rgba(0,0,0,.32);
}
.home-app-badge.show{display:inline-flex}
.home-app-btn:active {
  transform: translateY(1px);
}
.home-app-btn.pressed {
  transform: translateY(1px);
}
.home-app-btn.has-custom-icon,
.bond-mini-app.has-custom-icon {
  background: transparent;
}
.home-app-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.96);
  border: var(--border);
  box-shadow: 3px 4px 0 var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.home-app-btn:active .home-app-icon-wrap,
.bond-mini-app:active .home-app-icon-wrap {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--black);
}
.home-app-btn.pressed .home-app-icon-wrap {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--black);
}
.home-app-btn.has-custom-icon .home-app-icon-wrap,
.bond-mini-app.has-custom-icon .home-app-icon-wrap {
  background: rgba(255,255,255,0.95);
}
.home-app-btn[data-app="map6"] .home-app-icon-wrap,
.bond-mini-app[data-app="map6"] .home-app-icon-wrap,
.bond-mini-app[data-app="couple"] .home-app-icon-wrap {
  background: rgba(255,255,255,.52);
  backdrop-filter: blur(12px) saturate(116%);
  -webkit-backdrop-filter: blur(12px) saturate(116%);
  box-shadow: 3px 4px 0 rgba(0,0,0,.18);
  filter: grayscale(1);
}
.home-app-btn[data-app="map6"] .home-app-icon-wrap::after,
.bond-mini-app[data-app="map6"] .home-app-icon-wrap::after,
.bond-mini-app[data-app="couple"] .home-app-icon-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.08) 0 6px, rgba(0,0,0,.04) 6px 12px);
  pointer-events: none;
}
.home-app-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-app-icon-fallback {
  background: rgba(255,255,255,0.78);
}
.home-app-fallback-text {
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  padding: 4px;
}
.home-app-label {
  width: 100%;
  text-align: center;
  font-family: 'Fredoka', 'ZCOOL KuaiLe', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.08;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2px;
  text-shadow: 0 1px 1px rgba(255,255,255,0.45), 0 0.5px 0 rgba(0,0,0,0.14);
}

.home-toast {
  position: absolute;
  left: 50%;
  bottom: calc(70px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: all .26s;
  background: rgba(255,255,255,.96);
  color: #111;
  border: 1.5px solid #111;
  border-radius: 0;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.45;
  padding: 9px 12px;
  z-index: 90;
  width: max-content;
  max-width: min(82vw, 360px);
  box-shadow: 6px 6px 0 rgba(17,17,17,.18), 0 14px 32px rgba(0,0,0,.14);
  text-align: left;
  white-space: normal;
}
.home-toast::before {
  content: none;
}
.home-toast.toast-success,.home-toast.toast-info,.home-toast.toast-warning,.home-toast.toast-error{background:rgba(255,255,255,.96);color:#111}
.home-toast.toast-error{pointer-events:auto;cursor:pointer}
.home-toast:hover{
  transform: translateX(-50%) translateY(0) scale(1.02);
}
.home-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.app-notify-shell {
  position: fixed;
  left: 50%;
  top: max(calc(env(safe-area-inset-top) + 12px), 12px);
  transform: translateX(-50%);
  z-index: 5000;
  width: min(88vw, 360px);
  pointer-events: none;
}
.app-notify-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 2px solid #111;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,244,244,.96));
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.96), 3px 3px 0 #111, 0 10px 18px rgba(0,0,0,.08);
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: auto;
}
.app-notify-shell.show .app-notify-card {
  opacity: 1;
  transform: translateY(0);
}
.app-notify-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  border: 2px solid #111;
  border-radius: 0;
  background: #fff center/cover no-repeat;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.96), 2px 2px 0 #111;
  flex-shrink: 0;
  overflow: hidden;
}
.app-notify-avatar-img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:none;
}
.app-notify-avatar-img.show{display:block}
.app-notify-avatar-fallback{
  position:absolute;
  inset:0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  color:#111;
  background:#fff;
}
.app-notify-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}
.app-notify-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  color: #111;
  line-height: 1.2;
}
.app-notify-body {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.42;
  color: #222;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}

.page-two-shell {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 4px 2px 4px;
}
.bond-widget {
  position: relative;
  width: 100%;
  max-width: 100%;
  border: none;
  border-radius: 0;
  padding: 28px 0 0;
  margin-bottom: 10px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  isolation: isolate;
}
.bond-widget-inner {
  margin-top: 2px;
  padding: 30px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: auto;
  overflow: visible;
  border: none;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.bond-widget-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(0,0,0,0.2);
  border-radius: 34px;
  background: rgba(255,255,255,0.28);
  box-shadow: 0 14px 28px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-clip: padding-box;
  clip-path: none;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  pointer-events: none;
  z-index: 0;
}
.home-pager-dragging .bond-widget-inner::before {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(255,255,255,0.16);
}
.bond-widget-inner > * {
  position: relative;
  z-index: 1;
}
.bond-days-pill {
  position: absolute;
  left: 50%;
  top: -2px;
  transform: translateX(-50%);
  border: var(--border);
  border-radius: 999px;
  background: #fff;
  box-shadow: 3px 4px 0 var(--black), 0 8px 18px rgba(0,0,0,0.08);
  min-width: 156px;
  padding: 11px 24px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'ZCOOL KuaiLe', 'Fredoka', var(--font-display);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #111;
  text-shadow:
    0.6px 0 0 rgba(0,0,0,0.08),
    -0.6px 0 0 rgba(0,0,0,0.08),
    0 0.6px 0 rgba(0,0,0,0.08),
    0 -0.6px 0 rgba(0,0,0,0.08);
  z-index: 6;
  will-change: transform;
}
.bond-days-pill:active {
  transform: translateX(-50%) translate(1px,1px);
  box-shadow: 1px 1px 0 var(--black);
}
#bond-days-number {
  font-size: 1.12em;
  letter-spacing: -0.03em;
}
.bond-days-pill span:last-child {
  font-size: 1.02em;
  font-weight: 900;
  letter-spacing: -0.04em;
  transform: translateY(1px) scale(1.12);
}
.bond-avatars-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 24;
}
.bond-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 0;
  position: relative;
  z-index: 30;
}
.bond-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2.5px solid rgba(10,10,10,0.82);
  background: #fff;
  box-shadow:
    0 0 0 2px rgba(255,255,255,1),
    4px 5px 0 rgba(10,10,10,0.96),
    0 10px 18px rgba(0,0,0,0.08);
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 900;
  color: var(--black);
  position: relative;
  z-index: 32;
}
.bond-avatar.has-bond-avatar-image::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--bond-avatar-src) center / cover no-repeat;
  transform: translateZ(0) scale(1.03);
  z-index: 0;
}
.bond-avatar-base img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(0) scale(1.03);
  transform-origin: center;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
#bond-char-avatar,
#bond-user-avatar {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  position: relative;
}
.bond-avatar-base {
  width: 100%;
  height: 100%;
  flex: 0 0 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.bond-avatar-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  max-width: none;
  max-height: none;
  transform: translate(calc(-50% + var(--frame-offset-x, 0px)), calc(-50% + var(--frame-offset-y, 0px) - 4px)) scale(var(--frame-scale, 1));
  transform-origin: center center;
  object-fit: contain;
  z-index: 40;
  pointer-events: none;
}
.bond-name-tag {
  max-width: 100%;
  border: var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 2px 2px 0 var(--black);
  padding: 5px 12px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bond-avatar::after {
  content: none;
}
.bond-heart-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  z-index: 1;
}
.bond-heart-wrap::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 282px;
  height: 104px;
  transform: translate(-50%, -64%);
  background: url("apps/assets/心电图爱心.png") center / contain no-repeat;
  pointer-events: none;
  z-index: 0;
}
.bond-heart-wrap::after {
  content: none;
}
.bond-heart-glow {
  display: none;
}
.bond-heart {
  opacity: 0;
}
.bond-lower-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  margin-top: 2px;
}
.bond-mini-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  min-width: 0;
  padding: 0;
}
.bond-lower-row .bond-mini-app:first-child {
  justify-self: center;
  transform: translateX(14px);
}
.bond-lower-row .bond-mini-app:last-child {
  justify-self: center;
  transform: translateX(-14px);
}
.bond-mini-app:active {
  transform: translateY(1px);
}
.bond-center-links {
  width: 138px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
  transform: translateY(-34px);
}
.bond-music-eq {
  position: absolute;
  left: 50%;
  top: -18px;
  width: 108px;
  height: 28px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  align-items: end;
  gap: 4px;
  padding: 7px 10px 5px;
  border: none;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  transform: translateX(calc(-50% + 6px));
  pointer-events: none;
}
.bond-music-eq::before {
  content: attr(data-song);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 1px);
  max-width: 130px;
  padding: 3px 8px 4px;
  border: 1.5px solid rgba(18,18,18,0.82);
  border-radius: 999px;
  background: rgba(255,255,255,0.96);
  box-shadow: 2px 2px 0 rgba(18,18,18,0.86);
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  color: rgba(12,12,12,0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bond-music-eq:not([data-song])::before,
.bond-music-eq[data-song=""]::before {
  display: none;
}
.bond-music-bar {
  display: block;
  min-height: 4px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.3), rgba(255,255,255,0)),
    linear-gradient(180deg, rgba(18,18,18,0.98), rgba(62,62,62,0.48));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22);
  transform-origin: center bottom;
  animation: bondEqIdle 1.6s ease-in-out infinite;
}
.bond-music-bar:nth-child(1) { height: 8px; animation-delay: 0s; }
.bond-music-bar:nth-child(2) { height: 12px; animation-delay: 0.12s; }
.bond-music-bar:nth-child(3) { height: 15px; animation-delay: 0.22s; }
.bond-music-bar:nth-child(4) { height: 10px; animation-delay: 0.34s; }
.bond-music-bar:nth-child(5) { height: 14px; animation-delay: 0.18s; }
.bond-music-bar:nth-child(6) { height: 11px; animation-delay: 0.3s; }
.bond-music-bar:nth-child(7) { height: 16px; animation-delay: 0.08s; }
.bond-music-bar:nth-child(8) { height: 9px; animation-delay: 0.24s; }
.bond-music-eq.is-playing .bond-music-bar {
  animation-name: bondEqPlaying;
  animation-duration: 0.78s;
}
.bond-center-title {
  font-family: 'ZCOOL KuaiLe', 'Fredoka', var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: rgba(26,26,26,0.92);
  text-align: center;
  text-shadow:
    0 1px 0 rgba(255,255,255,0.92),
    1px 0 0 rgba(255,255,255,0.92),
    -1px 0 0 rgba(255,255,255,0.92),
    0 -1px 0 rgba(255,255,255,0.92);
  margin-bottom: 0;
  white-space: nowrap;
  transform: translate(6px, 3px);
}
.bond-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}
.bond-link-line {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(72,72,72,0.94), rgba(96,96,96,0.6));
}
.bond-link-input {
  width: 100%;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: 'Fredoka', 'ZCOOL KuaiLe', var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(34,34,34,0.96);
  text-align: center;
  outline: none;
  text-shadow:
    0 1px 0 rgba(255,255,255,0.92),
    1px 0 0 rgba(255,255,255,0.92),
    -1px 0 0 rgba(255,255,255,0.92),
    0 -1px 0 rgba(255,255,255,0.92),
    0.4px 0 0 rgba(0,0,0,0.18),
    -0.4px 0 0 rgba(0,0,0,0.18);
  padding-bottom: 2px;
  background-image:
    repeating-linear-gradient(
      90deg,
      rgba(22,22,22,0.96) 0 8px,
      transparent 8px 12px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,0.92) 0 8px,
      transparent 8px 12px
    );
  background-size: 100% 3px, 100% 3px;
  background-position: 0 100%, 1px calc(100% - 1px);
  background-repeat: no-repeat;
}
.bond-link-input::placeholder {
  color: rgba(66,66,66,0.82);
}
.bond-link-input:focus {
  border-bottom-color: rgba(0,0,0,1);
}
.bond-mini-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}
.bond-mini-icon .home-app-fallback-text {
  font-size: 11px;
}
.bond-name-tag:active,
.bond-avatar:active {
  transform: translate(1px,1px);
  box-shadow: 1px 1px 0 var(--black);
}
.bond-edit-card {
  width: 276px;
}
.page-two-lower {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0;
  transform: translateY(-10px);
}
.page-two-feature-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.music-player-wrap {
  position: relative;
  width: 128px;
  height: 128px;
  transform: translateX(4px);
}
.music-player-widget {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 2px solid rgba(10,10,10,0.96);
  background: #0b0b0b;
  box-shadow: 4px 5px 0 var(--black), 0 14px 28px rgba(0,0,0,0.08);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: absolute;
  left: 0;
  top: 8px;
}
.page-two-mini-note {
  position: absolute;
  left: 104px;
  top: 16px;
  width: 30px;
  min-height: 94px;
  border: var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 3px 4px 0 var(--black);
  padding: 10px 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 3;
}
.page-two-mini-note:active {
  transform: translate(1px,1px);
  box-shadow: 1px 1px 0 var(--black);
}
.page-two-mini-note span {
  display: block;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: 'ZCOOL KuaiLe', 'Fredoka', var(--font-display);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  color: var(--black);
  max-height: 78px;
  overflow: hidden;
}
.music-player-platter {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.06) 0 34px, transparent 34px),
    #0b0b0b;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.08),
    0 4px 10px rgba(0,0,0,0.12);
}
.music-player-ring {
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.14);
}
.music-player-disc {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.12);
  background:
    linear-gradient(180deg, #f6f6f6 0%, #e8e8e8 100%);
  box-shadow: 0 5px 10px rgba(0,0,0,0.12), inset 0 0 0 1px rgba(255,255,255,0.65);
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: 0;
  margin-top: 0;
  transform: translate3d(calc(-50% + 2px), calc(-50% + 2px), 0);
  z-index: 2;
  animation: pageTwoDiscSpin 24s linear infinite;
}
.music-player-note {
  position: absolute;
  color: rgba(255,255,255,0.92);
  font-family: 'Fredoka', var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.18);
  animation: musicNoteFloat 5.8s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
}
.music-player-note-a {
  left: 12px;
  top: 18px;
  animation-delay: 0s;
}
.music-player-note-b {
  right: 14px;
  top: 16px;
  font-size: 12px;
  animation-delay: 1.4s;
}
.music-player-note-c {
  left: 16px;
  bottom: 16px;
  font-size: 11px;
  animation-delay: 2.8s;
}
.music-player-note-d {
  right: 18px;
  bottom: 22px;
  font-size: 13px;
  animation-delay: 3.6s;
}
.music-player-note-e {
  left: 48px;
  top: 8px;
  font-size: 10px;
  animation-delay: 4.4s;
}
.music-player-disc .slot-plus {
  font-size: 24px;
  position: relative;
  z-index: 2;
}
.music-player-disc.has-image .slot-plus {
  display: none;
}
.music-player-disc.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  transform: scale(1.03);
  transform-origin: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.music-player-disc.has-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
  z-index: 1;
}
.music-player-arm {
  display: none;
}
@keyframes pageTwoDiscSpin {
  from { transform: translate3d(calc(-50% + 2px), calc(-50% + 2px), 0) rotate(0deg); }
  to { transform: translate3d(calc(-50% + 2px), calc(-50% + 2px), 0) rotate(360deg); }
}
@keyframes musicNoteFloat {
  0%, 100% { opacity: 0.12; transform: translateY(2px) scale(0.96); }
  50% { opacity: 0.7; transform: translateY(-2px) scale(1.04); }
}
@keyframes musicNoteFloat {
  0%, 100% { opacity: 0.18; transform: translateY(2px) scale(0.96); }
  50% { opacity: 0.82; transform: translateY(-2px) scale(1.04); }
}
@keyframes bondEqIdle {
  0%, 100% { transform: scaleY(0.72); opacity: 0.74; }
  50% { transform: scaleY(0.96); opacity: 1; }
}
@keyframes bondEqPlaying {
  0%, 100% { transform: scaleY(0.42); }
  30% { transform: scaleY(1.1); }
  60% { transform: scaleY(0.7); }
}
.photo-stack {
  position: relative;
  height: 120px;
  padding-top: 12px;
  overflow: visible;
  min-width: 0;
  transform: translateX(2px);
}
.slot-photo-card {
  position: absolute;
  border-radius: 8px;
  padding: 0;
  overflow: visible;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfbfb 100%);
  box-shadow: 3px 4px 0 var(--black), 0 8px 14px rgba(0,0,0,0.05);
  border: 2px solid rgba(10,10,10,0.92);
}
.slot-photo-card::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  width: 38px;
  height: 18px;
  background:
    linear-gradient(180deg, #f4e5b7 0%, #dcc381 100%),
    repeating-linear-gradient(
      90deg,
      rgba(130,108,56,0.16) 0 3px,
      rgba(255,255,255,0.12) 3px 6px
    );
  border: 1px solid rgba(120,98,48,0.22);
  -webkit-clip-path: polygon(3% 21%, 12% 9%, 22% 15%, 31% 5%, 42% 12%, 53% 6%, 63% 14%, 74% 7%, 86% 13%, 96% 9%, 98% 25%, 92% 37%, 97% 52%, 91% 68%, 95% 83%, 85% 95%, 74% 87%, 63% 97%, 52% 89%, 40% 96%, 29% 88%, 18% 94%, 9% 82%, 4% 66%, 8% 50%, 2% 35%);
  clip-path: polygon(3% 21%, 12% 9%, 22% 15%, 31% 5%, 42% 12%, 53% 6%, 63% 14%, 74% 7%, 86% 13%, 96% 9%, 98% 25%, 92% 37%, 97% 52%, 91% 68%, 95% 83%, 85% 95%, 74% 87%, 63% 97%, 52% 89%, 40% 96%, 29% 88%, 18% 94%, 9% 82%, 4% 66%, 8% 50%, 2% 35%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.34) inset,
    0 1px 3px rgba(79,61,23,0.18);
  transform: translateX(-50%) rotate(-5deg);
  z-index: 4;
}
.slot-photo-card .slot-plus {
  font-size: 30px;
}
.slot-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  transform: scale(1.03);
  transform-origin: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.slot-circle.has-image img,
.slot-tall.has-image img,
.char-avatar-wrap,
.bond-avatar-base,
.music-player-disc.has-image,
#wgt-avatar,
#wgt-user-avatar{
  overflow: hidden;
}

#wgt-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transform:scale(1.03);
  transform-origin:center;
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
}
#wgt-user-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transform:scale(1.03);
  transform-origin:center;
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
}
.slot-photo-card.has-image::after {
  background: transparent;
}
.home-music-floating {
  position: absolute;
  left: 20px;
  top: 118px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 130;
  touch-action: none;
}
.home-music-bubble {
  --home-music-bubble-scale: 1;
  width: calc(44px * var(--home-music-bubble-scale));
  height: calc(44px * var(--home-music-bubble-scale));
  border: var(--border);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(236,236,236,0.94));
  box-shadow:
    0 0 0 1.5px rgba(255,255,255,0.96),
    3px 4px 0 var(--black),
    0 8px 14px rgba(0,0,0,0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(18px * var(--home-music-bubble-scale));
  font-weight: 900;
  color: var(--black);
  transition: width .2s cubic-bezier(.22,1,.36,1), height .2s cubic-bezier(.22,1,.36,1), font-size .2s cubic-bezier(.22,1,.36,1), transform .14s ease, box-shadow .14s ease;
}
.home-music-bubble.is-custom-image{
  width:auto;
  height:auto;
  min-width:calc(44px * var(--home-music-bubble-scale));
  min-height:calc(44px * var(--home-music-bubble-scale));
  border:none;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  padding:0;
  overflow:visible;
}
.home-music-bubble-custom-image{
  width:calc(60px * var(--home-music-bubble-scale));
  height:calc(60px * var(--home-music-bubble-scale));
  max-width:min(20vw, calc(72px * var(--home-music-bubble-scale)));
  max-height:min(20vw, calc(72px * var(--home-music-bubble-scale)));
  object-fit:contain;
  display:block;
  user-select:none;
  -webkit-user-drag:none;
  transition: width .2s cubic-bezier(.22,1,.36,1), height .2s cubic-bezier(.22,1,.36,1), max-width .2s cubic-bezier(.22,1,.36,1), max-height .2s cubic-bezier(.22,1,.36,1);
}
.home-music-bubble:active {
  transform: translate(1px,1px);
  box-shadow:
    0 0 0 1.5px rgba(255,255,255,0.96),
    1px 1px 0 var(--black),
    0 3px 6px rgba(0,0,0,0.10);
}
.home-music-bubble-icon {
  transform: translateX(1px);
}
.home-music-bubble.is-custom-image:active{
  transform:none;
  box-shadow:none;
}
.home-music-lyric-card {
  width: fit-content;
  min-width: 44px;
  max-width: min(72vw, 320px);
  min-height: 40px;
  border: 1px solid rgba(255,255,255,0.58);
  border-radius: 999px;
  background: rgba(255,255,255,0.42);
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.72),
    0 8px 18px rgba(0,0,0,0.08);
  padding: 10px 15px 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.home-music-lyric-line {
  font-family: 'ZCOOL KuaiLe', 'Fredoka', var(--font-display);
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: 0.01em;
  color: rgba(10,10,10,0.98);
  text-shadow:
    0 1px 0 rgba(255,255,255,0.98),
    0 0 8px rgba(255,255,255,0.22);
  min-height: 14px;
  white-space: normal;
  word-break: break-word;
  text-align: center;
}
.home-music-lyric-text {
  display: inline-block;
  max-width: 100%;
}
.home-music-floating.lyric-hidden .home-music-lyric-card {
  opacity: 0;
  transform: translateX(-8px) scale(0.98);
  width: 0;
  min-width: 0;
  max-width: 0;
  padding-left: 0;
  padding-right: 0;
  border-width: 0;
  box-shadow: none;
  overflow: hidden;
}
.home-music-panel {
  position: absolute;
  inset: 0;
  background: rgba(20,20,20,0.18);
  z-index: 129;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.home-music-panel[hidden],
.home-music-floating[hidden] {
  display: none !important;
}
.home-music-panel-card {
  position: relative;
  width: min(100%, 278px);
  max-height: 100%;
  overflow: auto;
  border: var(--border);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,245,245,0.96));
  box-shadow:
    0 0 0 1.5px rgba(255,255,255,0.96),
    4px 5px 0 var(--black),
    0 12px 22px rgba(0,0,0,0.12);
  padding: 18px 18px 20px;
}
.home-music-panel-close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 36px;
  height: 36px;
  border: var(--border);
  border-radius: 50%;
  background: #fff;
  box-shadow: 2px 3px 0 var(--black);
  font-size: 24px;
  line-height: 1;
}
.home-music-panel-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 48px;
  padding: 12px 48px 12px 12px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(10,10,10,0.34), rgba(10,10,10,0.38)),
    url("apps/assets/海边风景长条.png") center / cover no-repeat;
}
.home-music-panel-kicker {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.78);
}
.home-music-panel-title {
  position: relative;
  overflow: hidden;
  font-family: 'ZCOOL KuaiLe', 'Fredoka', var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.home-music-panel-subtitle {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255,255,255,0.86);
}
.home-music-cover-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: center;
  margin-top: 10px;
}
.home-music-cover {
  display: none;
}
.home-music-progress-wrap {
  min-width: 0;
  margin-top: 8px;
  padding: 10px 12px 12px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(10,10,10,0.32), rgba(10,10,10,0.36)),
    url("apps/assets/长条花.png") center / cover no-repeat;
}
.home-music-time-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.88);
  margin-bottom: 4px;
}
.home-music-progress {
  width: 100%;
  margin: 0;
  accent-color: #fff;
}
.home-music-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 40px 56px 40px 40px;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}
.home-music-control-btn,
.home-music-action-btn {
  border: var(--border);
  background: #fff;
  color: var(--black);
  box-shadow: 3px 4px 0 var(--black);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
}
.home-music-control-btn {
  min-width: 48px;
  height: 42px;
  border-radius: 14px;
}
.home-music-control-btn.icon {
  min-width: 40px;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: #fff;
  color: #111;
  box-shadow: 3px 4px 0 rgba(0,0,0,0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.home-music-control-btn.icon span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  line-height: 1;
  flex: 0 0 18px;
}
.home-music-control-btn.primary {
  flex: 1;
}
.home-music-control-btn.primary.icon {
  flex: 0 0 56px;
  width: auto;
  min-width: 56px;
}
@keyframes homeMusicMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 11px)); }
}
.home-music-action-btn {
  flex: 1;
  min-height: 40px;
  border-radius: 14px;
  padding: 0 14px;
}
.home-music-search-card {
  width: min(92vw, 308px);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(243,243,243,0.96)),
    url("apps/assets/海边风景长条.png") center top / cover no-repeat;
  box-shadow:
    0 0 0 1.5px rgba(255,255,255,0.96),
    4px 5px 0 var(--black),
    0 14px 24px rgba(0,0,0,0.12);
}
.home-music-search-card .char-note-title {
  text-align: center;
  margin-bottom: 10px;
}
.home-music-search-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.home-music-search-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  height: 44px;
  padding: 0 14px;
  box-sizing: border-box;
}
.home-music-search-row .char-note-btn {
  min-height: 44px;
  height: 44px;
  min-width: 84px;
  flex: 0 0 84px;
  box-sizing: border-box;
}
.home-music-search-results {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(48vh, 320px);
  overflow-y: auto;
  padding-right: 2px;
  align-items: stretch;
}
.home-music-search-empty {
  border: var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(243,243,243,0.96));
  padding: 16px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(0,0,0,0.58);
}
.home-music-search-item {
  flex: 0 0 auto;
  border: var(--border);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(245,245,245,0.96)),
    url("apps/assets/海边风景长条.png") center / cover no-repeat;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.92),
    3px 4px 0 rgba(0,0,0,0.94);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  min-height: 108px;
}
.home-music-search-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.84), rgba(255,255,255,0.9));
  pointer-events: none;
}
.home-music-search-item > * {
  position: relative;
  z-index: 1;
}
.home-music-search-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.home-music-search-item-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.home-music-search-item-name {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  word-break: break-word;
}
.home-music-search-item-artist {
  font-size: 11px;
  line-height: 1.4;
  color: rgba(0,0,0,0.62);
}
.home-music-search-item-tag {
  flex: 0 0 auto;
  border: var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  background: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.home-music-search-item-actions {
  display: flex;
  gap: 8px;
}
.home-music-search-item-btn {
  flex: 1;
  min-height: 34px;
  border: var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--black);
  box-shadow: 2px 3px 0 var(--black);
  font-size: 12px;
  font-weight: 800;
}
.home-music-search-item-btn.primary {
  background: #111;
  color: #fff;
}
.home-music-search-item-btn:active {
  transform: translate(1px,1px);
  box-shadow: 1px 1px 0 var(--black);
}
.music-icon {
  position: relative;
  width: 18px;
  height: 18px;
}
.music-icon::before,
.music-icon::after {
  content: '';
  position: absolute;
}
.music-icon-play::before {
  left: 6px;
  top: 2px;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid #111;
}
.music-icon-pause::before,
.music-icon-pause::after {
  top: 2px;
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: #111;
}
.music-icon-pause::before {
  left: 4px;
}
.music-icon-pause::after {
  right: 4px;
}
.music-icon-prev::before,
.music-icon-prev::after,
.music-icon-next::before,
.music-icon-next::after {
  top: 3px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.music-icon-prev::before {
  left: 1px;
  border-right: 7px solid #111;
}
.music-icon-prev::after {
  left: 7px;
  border-right: 7px solid #111;
}
.music-icon-next::before {
  right: 1px;
  border-left: 7px solid #111;
}
.music-icon-next::after {
  right: 7px;
  border-left: 7px solid #111;
}
.music-icon-repeat::before,
.music-icon-repeat::after,
.music-icon-shuffle::before,
.music-icon-shuffle::after {
  border-radius: 999px;
  background: #111;
}
.music-icon-repeat::before {
  left: 2px;
  top: 5px;
  width: 12px;
  height: 2px;
}
.music-icon-repeat::after {
  right: 1px;
  top: 2px;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid #111;
  background: transparent;
}
.music-icon-repeat-one::before {
  left: 2px;
  top: 5px;
  width: 12px;
  height: 2px;
  background: #111;
}
.music-icon-repeat-one::after {
  right: 1px;
  top: 2px;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid #111;
  background: transparent;
}
.music-icon-repeat-one {
  position: relative;
}
.music-icon-repeat-one span {
  display: none;
}
.music-icon-repeat-one i {
  position: absolute;
  left: 4px;
  bottom: 1px;
  font-style: normal;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  color: #111;
}
.music-icon-shuffle::before,
.music-icon-shuffle::after {
  height: 2px;
  background: #111;
}
.music-icon-shuffle::before {
  left: 1px;
  top: 5px;
  width: 15px;
  transform: rotate(32deg);
}
.music-icon-shuffle::after {
  left: 1px;
  bottom: 5px;
  width: 15px;
  transform: rotate(-32deg);
}
.music-icon-shuffle-tail::before,
.music-icon-shuffle-tail::after {
  content: '';
  position: absolute;
  right: 0;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid #111;
}
.music-icon-shuffle-tail::before {
  top: 1px;
}
.music-icon-shuffle-tail::after {
  bottom: 1px;
}
.home-music-action-btn.compact {
  flex: 0 0 auto;
}
.home-music-control-btn:active,
.home-music-action-btn:active,
.home-music-panel-close:active,
.home-music-track-btn:active {
  transform: translate(1px,1px);
  box-shadow: 1px 1px 0 var(--black);
}
.home-music-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.home-music-playlist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  max-height: 236px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
  min-height: 0;
}
.home-music-track {
  position: relative;
  flex: 0 0 auto;
  border: var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: none;
  overflow: hidden;
}
.home-music-track-swipe {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  background: linear-gradient(180deg, rgba(18,18,18,0.08), rgba(18,18,18,0.14));
}
.home-music-track-delete {
  width: 76px;
  border: none;
  border-left: var(--border);
  background: #d83b3b;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.home-music-track-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  background: inherit;
  padding: 11px 13px 12px;
  transition: transform 0.18s ease;
  touch-action: pan-y;
  cursor: pointer;
}
.home-music-track-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.home-music-track.is-active {
  background:
    linear-gradient(180deg, rgba(10,10,10,0.52), rgba(10,10,10,0.56)),
    url("apps/assets/黑白城市.jpg") center / cover no-repeat;
  color: #fff;
}
.home-music-track-name {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-music-track.is-active .home-music-track-name,
.home-music-track.is-preview .home-music-track-name {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.home-music-track.is-active .home-music-track-meta,
.home-music-track.is-preview .home-music-track-meta {
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 2px rgba(0,0,0,0.45);
}
.home-music-track-meta {
  font-size: 11px;
  line-height: 1;
  opacity: 0.76;
  white-space: nowrap;
  flex: 0 0 auto;
}
.home-music-track-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.home-music-track-btn {
  min-width: 54px;
  height: 34px;
  border: var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--black);
  box-shadow: 2px 3px 0 var(--black);
  font-size: 12px;
  font-weight: 800;
}
.home-music-track-edit {
  min-width: 46px;
}
.home-music-track-delete-inline {
  min-width: 46px;
  background: #d83b3b;
  color: #fff;
}
.home-music-track.is-preview {
  background:
    linear-gradient(180deg, rgba(10,10,10,0.42), rgba(10,10,10,0.48)),
    url("apps/assets/海边风景长条.png") center / cover no-repeat;
  color: #fff;
}
.home-music-track.is-active .home-music-track-btn {
  background: #fff;
}
.home-music-track.is-active .home-music-track-delete-inline {
  background: #d83b3b;
  color: #fff;
}
.slot-tall.has-image::after {
  background: transparent;
}
.photo-card-back {
  width: 88px;
  height: 88px;
  left: 18px;
  top: 15px;
  transform: rotate(-7deg);
}
.photo-card-front {
  width: 88px;
  height: 88px;
  right: 14px;
  top: 2px;
  transform: rotate(13deg) translateY(2px);
}
.photo-card-front::before {
  width: 30px;
  height: 16px;
  transform: translateX(-50%) rotate(9deg);
}
.slot-photo-card:active {
  box-shadow: 1px 1px 0 var(--black);
}
.page-two-app-row {
  box-shadow: none;
  border: none;
  background: transparent;
  justify-content: stretch;
  align-items: start;
  width: 100%;
  margin: 0;
  padding: 9px 11px 0;
  padding-top: 0;
  overflow: visible;
}
.page-two-mini-app {
  justify-self: center;
  width: auto;
  max-width: none;
}
.page-two-app-row .page-two-mini-app {
  transform: none !important;
}
.page-two-app-row .bond-mini-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255,255,255,0.96);
  box-shadow: 3px 4px 0 var(--black);
}
.page-two-app-row .home-app-label {
  font-size: 12px;
  width: auto;
  max-width: 48px;
  margin-top: 2px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.85);
  box-shadow: 0 3px 8px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-shadow: none;
}
.bond-edit-input {
  width: 100%;
  border: var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--off-white);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  outline: none;
  text-align: center;
}
.bond-edit-input:focus {
  box-shadow: 3px 3px 0 var(--black);
}

/* ── App Container ── */
.app-container {
  position: absolute;
  inset: 0;
  background: var(--off-white);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.4,0,0.2,1);
  z-index: 80;
}
.app-container.open {
  transform: translateX(0);
}
.phone-outer.app-open .app-container {
  inset: 0;
  height: auto;
}
.app-container[data-app-id="chat"] {
  background-color: var(--chat-shell-bg-color, #f7f7f7);
  background-image: var(--chat-shell-bg-image, none);
  background-position: center;
  background-size: cover;
  overflow: visible;
  transition: none;
  transform: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.app-container[data-app-id="chat"].open{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.app-container[data-app-id="chat"] .app-topbar{
  display:none !important;
  height:0 !important;
  min-height:0 !important;
  padding:0 !important;
  margin:0 !important;
  border:0 !important;
  transform:none !important;
  opacity:0 !important;
  overflow:hidden !important;
  pointer-events:none !important;
}
.app-container[data-app-id="chat"] #app-iframe {
  background-color: var(--chat-shell-bg-color, #f7f7f7);
  background-image: var(--chat-shell-bg-image, none);
  background-position: center;
  background-size: cover;
}
@media (hover: none) and (pointer: coarse) {
  .phone-outer.frame-off.app-open .app-container {
    position: absolute;
    inset: 0;
    height: auto;
    z-index: 120;
  }
}

.phone-outer.frame-off .screen,
.phone-outer.frame-off .app-container,
.phone-outer.frame-off #app-iframe {
  background: transparent;
  overscroll-behavior: none;
}
.phone-outer.frame-off.app-open,
.phone-outer.frame-off.app-open::before {
  background: transparent;
}
.phone-outer.frame-off.app-open .screen,
.phone-outer.frame-off.app-open .app-container,
.phone-outer.frame-off.app-open #app-iframe {
  background: transparent;
}

.ios-safe-area-cover {
  display: none !important;
}

.update-toast-card {
  position: fixed;
  inset: 0;
  z-index: 1600;
  pointer-events: auto;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background:
    linear-gradient(45deg, rgba(0,0,0,.06) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.06) 75%),
    linear-gradient(45deg, rgba(0,0,0,.06) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.06) 75%),
    rgba(255,255,255,.94);
  background-size: 6px 6px;
  background-position: 0 0, 3px 3px;
}
.update-toast-card[hidden] {
  display: none !important;
}
.update-toast-window {
  width: min(376px, calc(100vw - 28px));
  border: 3px solid var(--black);
  border-radius: 0;
  background: var(--white);
  box-shadow: 6px 6px 0 rgba(0,0,0,.24);
  padding: 3px;
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
  position: relative;
  z-index: 1;
  pointer-events: auto;
  touch-action: manipulation;
  font-family: 'Courier New', monospace;
}
.update-toast-frame {
  border: 2px solid var(--black);
  background: var(--white);
  min-height: 0;
}
.update-toast-titlebar {
  min-height: 36px;
  border-bottom: 2px solid var(--black);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  background:
    repeating-linear-gradient(0deg, transparent 0, transparent 2px, var(--black) 2px, var(--black) 3px),
    var(--white);
}
.update-toast-closebox,
.update-toast-resizebox {
  width: 12px;
  height: 12px;
  border: 2px solid var(--black);
  background: var(--white);
  border-radius: 0;
  padding: 0;
  flex: 0 0 12px;
  opacity: 1;
}
.update-toast-resizebox {
  position: relative;
}
.update-toast-resizebox::before,
.update-toast-resizebox::after {
  content: '';
  position: absolute;
  right: 1px;
  bottom: 1px;
  background: var(--black);
}
.update-toast-resizebox::before {
  width: 6px;
  height: 2px;
}
.update-toast-resizebox::after {
  width: 2px;
  height: 6px;
}
.update-toast-separator {
  height: 2px;
  background: var(--white);
  border-bottom: 2px solid var(--black);
}
.update-toast-body {
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.update-toast-title {
  flex: 1;
  background: var(--white);
  padding: 3px 10px 4px;
  text-align: center;
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
  color: var(--black);
  text-transform: none;
  border-left: 6px solid var(--white);
  border-right: 6px solid var(--white);
}
.update-toast-alert-row {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr);
  align-items: start;
  gap: 12px;
}
.update-toast-icon {
  width: 36px;
  height: 36px;
  border: 3px solid var(--black);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
  box-shadow: inset -3px -3px 0 #d7d7d7;
}
.update-toast-copy {
  padding-top: 1px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
  color: var(--black);
}
.update-toast-copy strong,
.update-toast-copy span {
  display: block;
}
.update-toast-copy strong {
  font-size: 18px;
  line-height: 1.15;
  font-weight: 900;
  margin-bottom: 4px;
}
.update-toast-notes {
  border: 2px solid var(--black);
  background: var(--white);
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.65;
  color: var(--black);
  box-shadow: inset 2px 2px 0 #cfcfcf;
}
.update-toast-notes-label {
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}
.update-toast-note-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.update-toast-note-line + .update-toast-note-line {
  margin-top: 4px;
}
.update-toast-note-icon {
  flex: 0 0 auto;
  width: 1.36em;
  min-width: 1.36em;
  height: 1.36em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  font-family: "Times New Roman", "Arial Unicode MS", "Noto Sans Symbols 2", serif;
  transform: translateY(1px);
  text-rendering: geometricPrecision;
}
.update-toast-note-text {
  flex: 1 1 auto;
  min-width: 0;
}
.update-toast-meta {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.65;
  color: var(--black);
  background: repeating-linear-gradient(0deg,#fff 0,#fff 4px,#e8e8e8 4px,#e8e8e8 5px);
  border: 1px solid var(--black);
  border-radius: 0;
  padding: 7px 9px;
  word-break: break-all;
}
.update-toast-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}
.update-toast-btn {
  min-width: 95px;
  min-height: 24px;
  border: 2px solid var(--black);
  border-radius: 0;
  background: var(--white);
  color: var(--black);
  box-shadow: none;
  padding: 3px 18px 4px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  position: relative;
  z-index: 2;
  pointer-events: auto;
  touch-action: manipulation;
}
.update-toast-btn::before {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px solid var(--black);
  pointer-events: none;
}
.update-toast-btn:active {
  transform: none;
  color: var(--white);
  background: var(--black);
}
@media (hover: none) and (pointer: coarse) {
  .phone-outer.frame-off ~ .ios-safe-area-cover {
    display: none !important;
  }
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(2px + env(safe-area-inset-top)) 16px 2px;
  background: var(--white);
  border-bottom: var(--border);
  position: relative;
  transform: translateY(-6px);
  margin-bottom: -6px;
  z-index: 3;
}
.app-container.no-topbar .app-topbar {
  display: none;
}
.back-btn {
  background: none; border: none;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 10px;
  transition: background 0.15s;
}
.back-btn:hover { background: var(--gray-pale); }
.back-arrow { font-size: 20px; font-weight: 300; }
.app-title-label {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--text);
}

#app-iframe {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
  background: var(--off-white);
  display: block;
}

/* ── Home Bar ── */
.home-bar {
  height: 22px;
  background: var(--white);
  border-top: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  z-index: 0;
}
.home-bar::after {
  content: '';
  width: 100px; height: 4px;
  background: var(--black);
  border-radius: 2px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 0; }

/* ── App Pages shared base ── */
.app-page {
  min-height: 100%;
  background: var(--off-white);
  font-family: 'Quicksand', sans-serif;
  color: var(--text);
  padding: 16px;
}

@media (hover: none) and (pointer: coarse) {
  .bond-widget-inner,
  .media-panel,
  .app-grid-dock::before,
  .home-page-indicator,
  .page-two-app-row .home-app-label {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .bond-widget-inner {
    background: rgba(255,255,255,0.28);
  }
}

/* ── Shared UI Components (used in apps) ── */
.card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 16px;
  margin-bottom: 12px;
}

.btn {
  font-family: var(--font-display);
  font-weight: 800;
  border: var(--border);
  border-radius: var(--radius);
  padding: 10px 20px;
  cursor: pointer;
  font-size: 13px;
  transition: transform 0.12s, box-shadow 0.12s;
  box-shadow: 2px 2px 0 var(--black);
}
.btn:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--black); }
.btn-black { background: var(--black); color: var(--white); }
.btn-white { background: var(--white); color: var(--black); }
.btn-full  { width: 100%; text-align: center; }

.cute-input {
  font-family: var(--font);
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  width: 100%;
  outline: none;
  font-weight: 600;
  transition: box-shadow 0.15s;
}
.cute-input:focus { box-shadow: 3px 3px 0 var(--black); }
.cute-input::placeholder { color: var(--gray-mid); }

select.cute-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230a0a0a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
  cursor: pointer;
}

textarea.cute-input { resize: none; }

.shell-loading-overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  z-index:140;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .24s ease, visibility .24s ease;
  overflow:hidden;
}
.shell-loading-overlay.instant{
  transition:none !important;
}
.shell-loading-overlay.show{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}
.shell-loading-card{
  position:relative;
  width:min(78%, 320px);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:14px;
}
.shell-loading-visual{
  position:relative;
  width:min(100%, 250px);
  aspect-ratio:1 / 1;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
}
.shell-loading-visual img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}
.shell-loading-copy{
  font-family:'ZCOOL KuaiLe', 'Fredoka', var(--font-display);
  font-size:30px;
  line-height:1.2;
  color:#2f2f2f;
  letter-spacing:.02em;
  text-align:center;
  white-space:nowrap;
  text-shadow:0 1px 0 rgba(255,255,255,.9);
  display:inline-flex;
  align-items:center;
  gap:5px;
}
.loading-dots{
  display:inline-flex;
  align-items:flex-end;
  gap:5px;
  min-width:34px;
}
.loading-dots span{
  width:7px;
  height:7px;
  border-radius:999px;
  background:#2f2f2f;
  opacity:.24;
  animation:loadingDotBounce 1.05s infinite ease-in-out;
}
.loading-dots span:nth-child(2){animation-delay:.15s}
.loading-dots span:nth-child(3){animation-delay:.3s}
@keyframes loadingDotBounce{
  0%,80%,100%{transform:translateY(0);opacity:.24}
  40%{transform:translateY(-4px);opacity:.95}
}

@media (max-width: 420px) {
  .home-music-lyric-card {
    max-width: 176px;
  }
  .home-music-panel {
    padding-left: 12px;
    padding-right: 12px;
  }
}
