html.php-app, html.php-app body {
  height: auto;
  min-height: 100%;
  overflow: auto;
}
html.php-app #app {
  height: auto;
  min-height: 100vh;
}
html.php-app .content {
  overflow: visible;
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 24px);
}
html.php-app.embed-app,
html.php-app.embed-app body {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}
html.php-app.embed-app #app {
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
html.php-app.embed-app .topbar { flex: 0 0 auto; }
html.php-app.embed-app .tabs { flex: 0 0 auto; }
html.php-app .content.embed {
  flex: 1 1 0;
  min-height: 0;
  height: 0;
  padding: 0;
  padding-bottom: calc(var(--tab-h) + var(--safe-b));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
html.php-app .content.embed .player-wrap {
  flex: 1 1 0;
  min-height: 0;
  height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: #0f1020;
}
html.php-app .content.embed .player-wrap iframe,
html.php-app .content.embed iframe.player-frame {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0f1020;
}
.tabs a {
  background: none;
  border: 0;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
}
.tabs a.active { color: var(--tab-on); }
.tabs svg { width: 22px; height: 22px; }
a.app-item, a.song-item { color: inherit; }
.form .error { color: var(--danger); text-align: center; font-size: 13px; }
.form .hint { color: var(--muted); font-size: 12px; }
.form label { font-size: 13px; color: var(--muted); }
.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.info-list { margin: 12px 0 18px; }
.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.info-item .label { color: var(--muted); min-width: 72px; }
.edit-row { display: none; margin-top: 10px; }
.edit-row input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.edit-actions { margin-top: 8px; display: flex; gap: 8px; justify-content: flex-end; }
.avatar-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  cursor: pointer;
  flex-shrink: 0;
}
.avatar-wrap .avatar, .avatar-wrap img.avatar-img, .avatar-wrap .avatar-initial {
  width: 72px;
  height: 72px;
  border-radius: 50%;
}
.avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}
.avatar-wrap:hover .avatar-overlay { opacity: 1; }
.pwd-gate {
  max-width: 360px;
  margin: 40px auto 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px 18px;
  text-align: center;
}
.pwd-gate h3 { margin-bottom: 8px; }
.pwd-gate p { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.pwd-gate .fuli-hint { margin-bottom: 14px; }
.shots { margin-top: 12px; }
.links a.btn { text-align: center; }
.history-empty {
  text-align: center;
  color: var(--muted);
  padding: 18px 10px;
  font-size: 13px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}
html.php-app .topbar { position: sticky; top: 0; z-index: 40; }
html.php-app .tv-page .tv-search { top: 0; }
html.php-app.in-frame .topbar,
html.php-app.in-frame .tabs { display: none !important; }
html.php-app.in-frame .content { padding-bottom: 24px; }
html.php-app.in-frame .content.embed { padding-bottom: 0; }
html.php-app .tabs { z-index: 50; }
